Open vitorderobe opened 1 year ago
// Create a client. braintree.client.create({ authorization: CLIENT_TOKEN_ENCODED_WITH_CUSTOMER_ID }, function (clientErr, clientInstance) {
// Create a PayPal Checkout component. braintree.paypalCheckout.create({ autoSetDataUserIdToken: true, client: clientInstance }, function (paypalCheckoutErr, paypalCheckoutInstance) { paypalCheckoutInstance.loadPayPalSDK({
// The following are optional params
dataAttributes: {
amount: "100.00"
}
}, function () {
paypal.Buttons({
fundingSource: paypal.FUNDING.PAYPAL,
createOrder: function () {
return paypalCheckoutInstance.createPayment({
//...
});
},
onApprove: function (data, actions) {
return paypalCheckoutInstance.tokenizePayment(data, function (err, payload) {
// Submit `payload.nonce` to your server
});
},
onCancel: function (data) {
console.log('PayPal payment canceled', JSON.stringify(data, 0, 2));
},
onError: function (err) {
console.error('PayPal error', err);
}
}).render('#paypal-button').then(function () {
// The PayPal button will be rendered in an html element with the ID
// `paypal-button`. This function will be called when the PayPal button
// is set up and ready to be used
});
});
});
});
Hi, We've looked into this issue and found that browser support for our PaymentRequest implementation was recently deprecated in Chrome/Chromium. We're looking into potential resolutions and do not have an ETA at this time.
Thanks
@ibooker is the current issue that the Braintree Payment Request API implementation is coupled with the basic-card implementation that was deprecated in 2021 and finally removed in Chrome 100? Perhaps this is a good time to revisit compatibility with payment methods and APIs since support is a bit different from when the Braintree implementation was released.
Now, the Payment Request API has support for digital wallets across Chrome, Edge, and Safari (desktop and iOS). It's compatible with Apple Pay on Safari and Google Pay (Chrome, maybe Edge?).
If you're able to support Google Pay and Apple Pay wherever browser support exists, that would be a great update.
deprecated in 2021
Hi @ibooker So it will impact all the merchants who use Change payment button, right?
General information
Issue description
I have an issue with the Payment Request API. I keep getting the error when I call the
tokenize
method:And I really don't know why because my implementation looks exactly the same as the example
My code:
If I use the
PaymentRequest.show()
API directly, it works fine. I'm not sure, but I think the Braintree Iframe is not permitted to run thePaymentRequest.show()
, and I need to give permission to it somehow. I've also tested with the Microsoft Edge browser and got the same error.Any help is appreciated. Thank you!
Additional Prints