Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not return any error and response? #121

Open
harleenarora opened this issue Dec 4, 2019 · 0 comments
Open

Does not return any error and response? #121

harleenarora opened this issue Dec 4, 2019 · 0 comments

Comments

@harleenarora
Copy link

harleenarora commented Dec 4, 2019

Hi, I am integrate this package for get the card token based on my braintree tokenization key. But I have not got the any error and response. I have used latest react-native version.

Code:

import React, { PureComponent } from 'react';
import { Button } from 'react-native';
import BTClient from 'react-native-braintree-xplat';

class paymentMethod extends PureComponent {
	componentDidMount() {
		let token = 'braintree_tokenization_key';
		BTClient.setup(token);
	}

	getCardToken(){
		const card = {
			number: '4111111111111111',
			expirationDate: '10/2023',
			cvv: '123',
		}
		BTClient.getCardNonce(card).then(function (nonce) {
			console.log(nonce, 'nonce');
		}).catch(function (err) {
			console.log(err, 'err');
		});
	}

	render(){
		return (
			<Button onPress={()=>getCardToken()} > Card Token </Button>
		)
	}
}
export default paymentMethod;

Please tell me how to integrate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant