Re: [w3c/payment-request] Location declaration (#870)

> would an enhancement to the API make this possible in a future release?

Yep, if you have a few locations, you should be able to call PR API like so:

```javascript
new PaymentRequest[{
    supportedMethods: 
      'basic-card',
  }], {
    total: {
      label: 'Total',
      amount: {
        currency: 'USD',
        value: '1.00',
      },
    },
    modifiers: [{
      supportedMethods: 'basic-card',
      total: {
        label: '(Canada) Total',
        amount: {
          currency: 'CAD',
          value: '1.00',
        },
      },
      data: {
        cardNumberPrefix: '411111',
      }
    }]
  }).show();
```

Such an enhancement would require some changes to either this spec or to https://w3c.github.io/payment-method-basic-card/.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/870#issuecomment-505476001

Received on Tuesday, 25 June 2019 14:42:05 UTC