Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(window.PaymentRequest) {
- // Use Payment Request API
- // Checkout details
- var details = {
- displayItems: [{
- label: 'Tax Cost',
- amount: { currency: 'GBP', value: '77.00' }
- }, {
- label: 'Early payment discount',
- amount: { currency: 'GBP', value: '-15.00' }
- }],
- total: {
- label: 'Total due',
- amount: { currency: 'GBP', value: '62.00' }
- }
- };
- } else {
- // Fallback to traditional checkout
- window.location.href = '/checkout/traditional';
- }
Add Comment
Please, Sign In to add comment