Closed pankajjjpr closed 6 years ago
can anyone give any update on this issue?
Hi @pankajjjpr, this is the library for processing Braintree transactions on a node server.
The plugin you mentioned is not developed by Braintree. The Github repo for it is here: https://github.com/jibon57/nativescript-braintree
Based on the usage documentation, it looks like you are missing the step to instantiate it:
this.braintree = new Braintree();
I see you are doing that within the catch, but since calling this.braintree.startPayment
is not within the promise, it's throwing an error that is not being caught by your promise.
For further help, I'd encourage you to open an issue on the plugin repo.
Hi,
I am trying to add Braintree into my Nativescript- Angular app.
For this I took help from this link and was able to write the code.
https://market.nativescript.org/plugins/nativescript-braintree
I created a button with tap event to call a method "MakePayment()". The definition of the method at .ts file is as follows:
import { Braintree, BrainTreeOptions } from 'nativescript-braintree'; export class PrivacyPolicyComponent { private braintree: Braintree; public MakePayment() { try{ let opts: BrainTreeOptions = { amount: "10.0", collectDeviceData: false, requestThreeDSecureVerification: false, } let token = "sandbox_66qj9r76_qx2c2bc3znjs55fv"; //Get the token from server. https://developers.braintreepayments.com/start/hello-server/php
}
I am doing just for demo and learning purpose, so i created a Token using my account. when i ran the app and topped the button then i got below error message: Cannot read property 'startPayment' of undefined
can anyone tell me what does it mean and why is it coming?