function canMakePaymentHelper(methodData) {
  try {
    new PaymentRequest(methodData, {
      total: {
        label: 'Total',
        amount: {
          currency: 'USD',
          value: '5.00',
        },
      },
    })
        .canMakePayment()
        .then(function(result) {
          print(result);
        })
        .catch(function(error) {
          print(error);
        });
  } catch (error) {
    print(error);
  }
}
/**
 * Calls PaymentRequest.canMakePayment() and prints out the result.
 * @param {sequence<PaymentMethodData>} methodData The supported methods.
 * @private
 */
Calls PaymentRequest.canMakePayment() and prints out the result.
@param {sequence} methodData The supported methods.
@private
Calls PaymentRequest . canMakePayment () and prints out the result . @param { sequence } methodData The supported methods . @private
function canMakePaymentHelper(methodData) {
  try {
    new PaymentRequest(methodData, {
      total: {
        label: 'Total',
        amount: {
          currency: 'USD',
          value: '5.00',
        },
      },
    })
        .canMakePayment()
        .then(function(result) {
          print(result);
        })
        .catch(function(error) {
          print(error);
        });
  } catch (error) {
    print(error);
  }
}
function canMakePaymentHelper ( methodData ) { try { new PaymentRequest ( methodData , { total : { label : 'Total' , amount : { currency : 'USD' , value : '5.00' , } , } , } ) . canMakePayment ( ) . then ( function ( result ) { print ( result ) ; } ) . catch ( function ( error ) { print ( error ) ; } ) ; } catch ( error ) { print ( error ) ; } }
Calls PaymentRequest.canMakePayment() and prints out the result.
Calls PaymentRequest . canMakePayment () and prints out the result .