Created
July 28, 2016 22:27
-
-
Save jeffcarp/5879cebb61049baca52a79a0cd567b66 to your computer and use it in GitHub Desktop.
This file contains hidden or 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