ngx-braintree
ngx-braintree copied to clipboard
Also, how do you get the nonce and chargeAmount when you implement your own method? Your example shows an HTTP get, when the code shows a post to the url.
Also, how do you get the nonce and chargeAmount when you implement your own method? Your example shows an HTTP get, when the code shows a post to the url.
EDIT: looks like the sample code was coppied and pasted from getClientToken
Originally posted by @westlakem in https://github.com/srikanthonl/ngx-braintree/issues/82#issuecomment-416436943
Hey,
The method signature of your custom method can take the nonce and chargeAmount as arguments which gets populated for you
e.g.
purchase = (nonce: string, chargeAmount: number): Observable<any> => { return this.braintreeService.purchase(nonce, chargeAmount); }