I have a dropin UI setup for braintree. I can see the user interface. Before that, I created a client, and I can see the client in a sandbox song. Now I want to add a payment method to the client. I am trying to do the following code, but paymentMethodNonceReceived is not called. I do not know why.
braintree.setup("<?=CLIENT_TOKEN_FROM_PHP?>", "dropin", { container: "divBrainTreeContainer", paymentMethodNonceReceived: function (event, nonce) { console.log(nonce); $('#formProfile').append('<input type="hidden" name="payment_method_nonce" value="'+nonce+'" />'); $('#formProfile').submit(); } } );
javascript php payment-gateway braintree
Haris ur rehman
source share