function buy() {  // eslint-disable-line no-unused-vars
  try {
    var request = new PaymentRequest(
        [{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
        {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
    request.canMakePayment()
        .then(function(result) {
          print(result);
        })
        .catch(function(error) {
          print(error);
        });
  } catch (error) {
    print(error.message);
  }
}
/**
 * Checks for existence of a complete VISA credit card.
 */
Checks for existence of a complete VISA credit card.
Checks for existence of a complete VISA credit card .
function buy() {  
  try {
    var request = new PaymentRequest(
        [{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
        {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
    request.canMakePayment()
        .then(function(result) {
          print(result);
        })
        .catch(function(error) {
          print(error);
        });
  } catch (error) {
    print(error.message);
  }
}
function buy ( ) { try { var request = new PaymentRequest ( [ { supportedMethods : 'basic-card' , data : { supportedNetworks : [ 'visa' ] } } ] , { total : { label : 'Total' , amount : { currency : 'USD' , value : '5.00' } } } ) ; request . canMakePayment ( ) . then ( function ( result ) { print ( result ) ; } ) . catch ( function ( error ) { print ( error ) ; } ) ; } catch ( error ) { print ( error . message ) ; } }
Checks for existence of a complete VISA credit card.
Checks for existence of a complete VISA credit card .
// eslint-disable-line no-unused-vars