function cardsAndBobPayBuy() {  // eslint-disable-line no-unused-vars
  try {
    request = new PaymentRequest(
        [
          {supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}},
          {
            supportedMethods: 'https://bobpay.com',
          },
        ],
        {
          total: {
            label: 'Total',
            amount: {
              currency: 'USD',
              value: '5.00',
            },
          },
          shippingOptions: [{
            id: 'freeShippingOption',
            label: 'Free global shipping',
            amount: {
              currency: 'USD',
              value: '0',
            },
            selected: true,
          }],
        },
        {
          requestShipping: true,
        });
    request.show()
        .then(function(resp) {
          resp.complete('success')
              .then(function() {
                print(
                    resp.methodName + '<br>' +
                    JSON.stringify(resp.details, undefined, 2));
              })
              .catch(function(error) {
                print(error.message);
              });
        })
        .catch(function(error) {
          print(error.message);
        });
  } catch (error) {
    print(error.message);
  }
}
/**
 * Launches the PaymentRequest UI which accepts credit cards and Bob Pay.
 */
Launches the PaymentRequest UI which accepts credit cards and Bob Pay.
Launches the PaymentRequest UI which accepts credit cards and Bob Pay .
function cardsAndBobPayBuy() {  
  try {
    request = new PaymentRequest(
        [
          {supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}},
          {
            supportedMethods: 'https://bobpay.com',
          },
        ],
        {
          total: {
            label: 'Total',
            amount: {
              currency: 'USD',
              value: '5.00',
            },
          },
          shippingOptions: [{
            id: 'freeShippingOption',
            label: 'Free global shipping',
            amount: {
              currency: 'USD',
              value: '0',
            },
            selected: true,
          }],
        },
        {
          requestShipping: true,
        });
    request.show()
        .then(function(resp) {
          resp.complete('success')
              .then(function() {
                print(
                    resp.methodName + '<br>' +
                    JSON.stringify(resp.details, undefined, 2));
              })
              .catch(function(error) {
                print(error.message);
              });
        })
        .catch(function(error) {
          print(error.message);
        });
  } catch (error) {
    print(error.message);
  }
}
function cardsAndBobPayBuy ( ) { try { request = new PaymentRequest ( [ { supportedMethods : 'basic-card' , data : { supportedNetworks : [ 'visa' ] } } , { supportedMethods : 'https://bobpay.com' , } , ] , { total : { label : 'Total' , amount : { currency : 'USD' , value : '5.00' , } , } , shippingOptions : [ { id : 'freeShippingOption' , label : 'Free global shipping' , amount : { currency : 'USD' , value : '0' , } , selected : true , } ] , } , { requestShipping : true , } ) ; request . show ( ) . then ( function ( resp ) { resp . complete ( 'success' ) . then ( function ( ) { print ( resp . methodName + '<br>' + JSON . stringify ( resp . details , undefined , 2 ) ) ; } ) . catch ( function ( error ) { print ( error . message ) ; } ) ; } ) . catch ( function ( error ) { print ( error . message ) ; } ) ; } catch ( error ) { print ( error . message ) ; } }
Launches the PaymentRequest UI which accepts credit cards and Bob Pay.
Launches the PaymentRequest UI which accepts credit cards and Bob Pay .
// eslint-disable-line no-unused-vars