```webidl
enum CardType {
"credit",
"debit",
"prepaid"
};
enum TokenProviderEnvironment {
"test",
"production"
};
dictionary TokenProviderParameters {
required DOMString merchantId;
required DOMString publicKey;
required DOMString tokenProviderURL;
optional TokenProviderEnvironment environment;
};
dictionary ProviderTokenizedCardRequest {
sequence<DOMString> supportedNetworks;
sequence<CardType> supportedTypes;
required TokenProviderParameters[] tokenProviderParameters;
};
```
The Javascript would look as follows:
```javascript
var supportedInstruments = [
{
supportedMethods: ['provider-tokenized-card']
data: {
supportedNetworks: ['amex', 'discover','mastercard','visa'],
supportedTypes: ['credit', 'debit'],
tokenProviderParameters: [
{
merchantId: 'ZWMQtaTEyVDb8]FKdNaVmVj2yy;rNG',
publicKey: 'live_DmF7xVDZKAUpkY]sxjidtRg@6dVPLt',
tokenProviderURL: 'https://my.payment-gateway.com/webpayment/tokenize',
environment: 'test',
oneTimeUse: false
}
]
}
},
...,
];
var payment = new PaymentRequest(
supportedInstruments,
details,
options
);
```
--
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/webpayments-methods-tokenization/issues/11#issuecomment-314480944