function buyWithAllCardsModifier() {  // eslint-disable-line no-unused-vars
  try {
    new PaymentRequest([{supportedMethods: 'basic-card'}], {
      total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
      modifiers: [{
        supportedMethods: 'basic-card',
        total: {
          label: 'Total',
          amount: {currency: 'USD', value: '4.00'},
        },
        additionalDisplayItems: [{
          label: 'basic-card discount',
          amount: {currency: 'USD', value: '-1.00'},
        }],
        data: {discountProgramParticipantId: '86328764873265'},
      }],
    })
        .show()
        .then(function(resp) {
          resp.complete('success')
              .then(function() {
                print(JSON.stringify(resp, undefined, 2));
              })
              .catch(function(error) {
                print('complete() rejected<br>' + error.message);
              });
        })
        .catch(function(error) {
          print('show() rejected<br>' + error.message);
        });
  } catch (error) {
    print('exception thrown<br>' + error.message);
  }
}
/**
 * Launches the PaymentRequest UI with 'basic-card' payment method and
 * all cards modifier.
 */
Launches the PaymentRequest UI with 'basic-card' payment method and
all cards modifier.
Launches the PaymentRequest UI with ' basic - card ' payment method and all cards modifier .
function buyWithAllCardsModifier() {  
  try {
    new PaymentRequest([{supportedMethods: 'basic-card'}], {
      total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
      modifiers: [{
        supportedMethods: 'basic-card',
        total: {
          label: 'Total',
          amount: {currency: 'USD', value: '4.00'},
        },
        additionalDisplayItems: [{
          label: 'basic-card discount',
          amount: {currency: 'USD', value: '-1.00'},
        }],
        data: {discountProgramParticipantId: '86328764873265'},
      }],
    })
        .show()
        .then(function(resp) {
          resp.complete('success')
              .then(function() {
                print(JSON.stringify(resp, undefined, 2));
              })
              .catch(function(error) {
                print('complete() rejected<br>' + error.message);
              });
        })
        .catch(function(error) {
          print('show() rejected<br>' + error.message);
        });
  } catch (error) {
    print('exception thrown<br>' + error.message);
  }
}
function buyWithAllCardsModifier ( ) { try { new PaymentRequest ( [ { supportedMethods : 'basic-card' } ] , { total : { label : 'Total' , amount : { currency : 'USD' , value : '5.00' } } , modifiers : [ { supportedMethods : 'basic-card' , total : { label : 'Total' , amount : { currency : 'USD' , value : '4.00' } , } , additionalDisplayItems : [ { label : 'basic-card discount' , amount : { currency : 'USD' , value : '-1.00' } , } ] , data : { discountProgramParticipantId : '86328764873265' } , } ] , } ) . show ( ) . then ( function ( resp ) { resp . complete ( 'success' ) . then ( function ( ) { print ( JSON . stringify ( resp , undefined , 2 ) ) ; } ) . catch ( function ( error ) { print ( 'complete() rejected<br>' + error . message ) ; } ) ; } ) . catch ( function ( error ) { print ( 'show() rejected<br>' + error . message ) ; } ) ; } catch ( error ) { print ( 'exception thrown<br>' + error . message ) ; } }
Launches the PaymentRequest UI with 'basic-card' payment method and
 all cards modifier.
Launches the PaymentRequest UI with ' basic - card ' payment method and all cards modifier .
// eslint-disable-line no-unused-vars