# mongoose-subscriptions-braintree

> Braintree processor for mongoose-subscriptions

Latest version **1.8.3** (published 2019-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongoose-subscriptions-braintree
pnpm add mongoose-subscriptions-braintree
yarn add mongoose-subscriptions-braintree
bun add mongoose-subscriptions-braintree
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.3 |
| Published | 2019-02-20 |
| First published | 2017-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 48.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ivan Kerin |
| Maintainers | deepsyx, ginovski, ikerin |

## Links

- npm: https://www.npmjs.com/package/mongoose-subscriptions-braintree
- Repository: https://github.com/enhancv/mongoose-subscriptions-braintree
- Homepage: https://github.com/enhancv/mongoose-subscriptions-braintree#readme
- Issues: https://github.com/enhancv/mongoose-subscriptions-braintree/issues
- npm.io page: https://npm.io/package/mongoose-subscriptions-braintree

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4

## Recent versions

- 1.8.3 (latest) — 2019-02-20
- 1.7.3 — 2018-08-01
- 1.7.1 — 2018-07-30
- 1.7.0 — 2018-04-03
- 1.6.1 — 2018-02-01
- 1.6.0 — 2017-10-25
- 1.5.1 — 2017-10-06
- 1.5.0 — 2017-10-04
- 1.4.7 — 2017-08-25
- 1.4.6 — 2017-08-21
- 1.4.5 — 2017-07-12
- 1.4.4 — 2017-07-12
- 1.4.3 — 2017-07-10
- 1.4.2 — 2017-07-07
- 1.4.1 — 2017-07-05
- … 19 more at https://npm.io/package/mongoose-subscriptions-braintree/versions

## README

Mongoose Subscriptions Braintree
================================

[![Build Status](https://travis-ci.org/enhancv/mongoose-subscriptions-braintree.svg?branch=master)](https://travis-ci.org/enhancv/mongoose-subscriptions-braintree)
[![Code Climate](https://codeclimate.com/github/enhancv/mongoose-subscriptions-braintree/badges/gpa.svg)](https://codeclimate.com/github/enhancv/mongoose-subscriptions-braintree)
[![Test Coverage](https://codeclimate.com/github/enhancv/mongoose-subscriptions-braintree/badges/coverage.svg)](https://codeclimate.com/github/enhancv/mongoose-subscriptions-braintree/coverage)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Braintree processor for https://github.com/enhancv/mongoose-subscriptions

Useage
------

```
yarn add mongoose-subscription-braintree
```

```javascript
const braintree = require("braintree");
const Customer = require("mongoose-subscriptions").Customer;
const BraintreeProcessor = require("mongoose-subscriptions-braintree");

const gateway = braintree.connect({ ... });
const plan = {
    processorId: 'id-plan',
    price: 4,
    billingFrequency: 3,
    level: 2,
};

// Define a processor using braintree gateway and some existing plans
// Currently the plans need to be input as plain objects to the processor
// and kept in sync with braintree plans
const processor = new BraintreeProcessor(gateway, [plan]);

const customer = new Customer({ ... });
customer.save().then(customer => customer.saveProcessor(processor));
```

---
_Source: https://npm.io/package/mongoose-subscriptions-braintree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
