Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The order amount and currency of the order, as well as supported card types, should be passed as order parameters.

Code Block
languagexml
    Const currency = $('#currency').val(); // currency
    Const paymentRequest = {
      countryCode: region.toUpperCase(),
      currencyCode: currency.toUpperCase(),
      total: {
        label: 'Your label', // payment name
        amount: $('#amount').val() //order amount
      },
      supportedNetworks:['masterCard', 'visa'],
      merchantCapabilities: [ 'supports3DS' ] //supported cards
    };
Const applePaySession = new window.ApplePaySession(1, paymentRequest);