Skip to content

Instantly share code, notes, and snippets.

<script>
PaymentRequestBehavior = {
listeners: {
'show-payment-request': '_requestPayment',
},
_requestPayment: function(e, total) {
var supportedInstruments = [{
supportedMethods: [
var methods = ["//android.com/pay", "visa", "mastercard", "amex", "discover"];
var request = {
"items": [
{
"id": "basket",
"label": "Sub-total",
"amount": {
"currencyCode": "USD",
"value": "55.00"
}