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
- Host: GitHub
- URL: https://github.com/mehcode/rn-braintree
- Owner: mehcode
- License: mit
- Created: 2016-11-18T08:27:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T22:51:42.000Z (about 9 years ago)
- Last Synced: 2025-03-06T09:11:59.644Z (12 months ago)
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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) => {
// [...]
});
```