-
-
Save PaulGuo/0d00baa5361722ecdba4d808ede6c980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var session | |
if (window.ApplePaySession) { | |
var merchantIdentifier = 'merchant.com.canine-clothing' | |
ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier) | |
.then(function (canMakePayments) { | |
if (canMakePayments) { | |
showApplePayButtons() | |
} | |
}); | |
} | |
var paymentRequest = { | |
currencyCode: 'USD', | |
countryCode: 'US', | |
total: { | |
label: 'Canine Clothing', | |
amount: '19.99' | |
}, | |
supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'], | |
merchantCapabilities: ['supports3DS'], | |
requiredShippingAddressFields: ['postalAddress'] | |
}; | |
$('.apple-pay-button').on('click', function () { | |
session = new ApplePaySession(1, paymentRequest) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment