PayPal Test

This page can be used to test PayPal. The user must add PayPal account information to Google Pay for this demo to work. No payment will be processed. View source.

Price: USD $1.00


  

Will make the following request for a PayPal token from Google Pay:

new PaymentRequest([{
  supportedMethods: 'https://google.com/pay',
  data: {
    apiVersion: 2,
    apiVersionMinor: 0,
    allowedPaymentMethods: [{
      type: 'PAYPAL',
      parameters: {
        purchase_context: {
          payment_intent: 'AUTHORIZE', // Or 'CAPTURE'.
          purchase_units: [{
            description: 'Test Transaction',
            payee: {
              // Please use your own PayPal merchant ID.
              merchant_id: '7CVBPVJ6XSJNA',
            },
          }],
        },
      },
      tokenizationSpecification: {
        type: 'DIRECT',
      },
    }],
    transactionInfo: {
      countryCode: 'US',
      currencyCode: 'USD',
      totalPriceStatus: 'FINAL',
      totalPrice: '1.00',
    },
    // Please use your own Google Pay merchant ID.
    merchantInfo: {
      merchantName: 'Rouslan Solomakhin',
      merchantId: '00184145120947117657',
    },
  },
}], {
  total: {
    label: 'Tots',
    amount: {
      currency: 'USD',
      value: '1.00',
    },
  },
});

Based on the Google Pay tutorial and the PayPal tutorial.