Closed MSIH closed 2 years ago
Hey @MSIH, are you seeing any errors in the console or the network tab? Also, did you ensure you completed all the necessary configurations for accepting Apple Pay?
Apply Pay only appears when you are on iPhone and using safari. I do not know how to bring up dev tools on iPhone with safari.
I followed the configuration:
@MSIH It looks like you might be nesting the properties in your paymentRequest
object incorrectly. This object requires a total with a label and amount like this:
paymentRequest: {
total: {
label: 'My Store',
amount: '19.99'
},
Thank I will try that. The example in the code is different:
<caption>Setting up a Drop-in instance to accept credit cards, PayPal, PayPal Credit, Venmo, and Apple Pay</caption>
* braintree.dropin.create({
* authorization: 'CLIENT_AUTHORIZATION',
* container: '#dropin-container',
* applePay: {
* displayName: 'Merchant Name',
* paymentRequest: {
* label: 'Localized Name',
* total: '10.00'
* }
* },
* paypal: {
* flow: 'checkout',
* amount: '10.00',
* currency: 'USD'
* },
* paypalCredit: {
* flow: 'checkout',
* amount: '10.00',
* currency: 'USD'
* },
* venmo: true
* }, function (err, dropinInstance) {
* // Set up a handler to request a payment method and
* // submit the payment method nonce to your server
* });
That worked
Glad that worked for you, @MSIH , and good catch about the example in our code. We'll create a task to get that updated.
also incorrect on this page https://braintree.github.io/braintree-web-drop-in/docs/current/module-braintree-web-drop-in.html#~dataCollectorOptions
braintree.dropin.create({
authorization: 'CLIENT_AUTHORIZATION',
container: '#dropin-container',
applePay: {
displayName: 'Merchant Name',
paymentRequest: {
label: 'Localized Name',
total: '10.00'
}
},
paypal: {
flow: 'checkout',
amount: '10.00',
currency: 'USD'
},
paypalCredit: {
flow: 'checkout',
amount: '10.00',
currency: 'USD'
},
venmo: true
}, function (err, dropinInstance) {
// Set up a handler to request a payment method and
// submit the payment method nonce to your server
});
General information
Issue description
The Apply Pay icon appears but nothing happens when I click on it. Not sure how to debug.