ngx-braintree icon indicating copy to clipboard operation
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.

Open RickRandWhitney opened this issue 6 years ago • 1 comments

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

RickRandWhitney avatar Feb 08 '19 14:02 RickRandWhitney

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); }

codecoded avatar Apr 15 '19 14:04 codecoded