Skip to content

Instantly share code, notes, and snippets.

@michelle
Created August 25, 2017 18:47
Show Gist options
  • Save michelle/1f1ff787f942fb77c4faa16f914c4559 to your computer and use it in GitHub Desktop.
Save michelle/1f1ff787f942fb77c4faa16f914c4559 to your computer and use it in GitHub Desktop.
const details = {"displayItems": [], "shippingOptions": [], "total": {"amount": {"currency": "USD", "value": "10.00"}, "label": "Total", "pending": false}};
const methods = [{"data": {"supportedNetworks": ["amex", "discover", "mastercard", "visa"]}, "supportedMethods": ["basic-card"]}, {"data": {"allowedPaymentMethods": ["CARD", "TOKENIZED_CARD"], "apiVersion": 1, "cardRequirements": {"allowedCardNetworks": ["VISA"], "billingAddressRequired": false}, "emailRequired": false, "environment": "TEST", "merchantId": "08597815757386259075", "paymentMethodTokenizationParameters": {"parameters": {"gateway": "stripe", "stripe:publishableKey": "pk_test_xxx", "stripe:version": "Stripe.js/AndroidPay"}, "tokenizationType": "PAYMENT_GATEWAY"}, "phoneNumberRequired": false, "shippingAddressRequired": false}, "supportedMethods": ["https://google.com/pay"]}];
const options = {};
const paymentRequest = new window.PaymentRequest(methods, details, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment