Guest User

Untitled

a guest
Jan 20th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. if(window.PaymentRequest) {
  2. // Use Payment Request API
  3. // Checkout details
  4. var details = {
  5. displayItems: [{
  6. label: 'Tax Cost',
  7. amount: { currency: 'GBP', value: '77.00' }
  8. }, {
  9. label: 'Early payment discount',
  10. amount: { currency: 'GBP', value: '-15.00' }
  11. }],
  12. total: {
  13. label: 'Total due',
  14. amount: { currency: 'GBP', value: '62.00' }
  15. }
  16. };
  17. } else {
  18. // Fallback to traditional checkout
  19. window.location.href = '/checkout/traditional';
  20. }
Add Comment
Please, Sign In to add comment