Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. const request = new PaymentRequest(buildPaymentMethodData(), buildDetails());
  2.  
  3. // TODO Next
  4.  
  5. function buildPaymentMethodData() {
  6. // Example supported payment methods:
  7. return [{
  8. supportedMethods: 'basic-card',
  9. data: {
  10. supportedNetworks: ['visa', 'mastercard'],
  11. supportedTypes: ['debit', 'credit']
  12. }
  13. }];
  14. }
  15.  
  16. function buildDetails() {
  17. return {
  18. id: 'count-order',
  19. displayItems: [
  20. {
  21. label: 'รองเท้าวิ่ง',
  22. amount: {currency: 'USD', value: '50.00'}
  23. }
  24. ],
  25. total: {
  26. label: 'Total',
  27. amount: {currency: 'USD', value: count }
  28. }
  29. };
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement