An open API service indexing awesome lists of open source software.

https://github.com/mehcode/rn-braintree

React Native interface to Braintree's Android and iOS SDKs
https://github.com/mehcode/rn-braintree

Last synced: 12 months ago
JSON representation

React Native interface to Braintree's Android and iOS SDKs

Awesome Lists containing this project

README

          

# React Native Braintree
> React Native interface to Braintree's Android and iOS SDKs

## Install

1. `npm install --save rn-braintree`

2. `react-native link rn-braintree`

### iOS

Refer to the official
Braintree iOS SDK documentation: https://github.com/braintree/braintree_ios#getting-started

## Usage

### Configure

```js
import Braintree from "rn-braintree";

Braintree.configure("");
```

### Tokenize

```js
import Braintree from "rn-braintree";

// Braintree.configure must have been called previously
Braintree.tokenize({
card: {
number: "4111111111111111",
expirationMonth: "12",
expirationYear: "2020",
cvv: "123",
},
}).then((result) => {
// result.nonce => "..."
// result.type => "visa"
// result.isDefault => true
// result.description => "..."
}).catch((err) => {
// [...]
});
```