Re: [w3c/payment-request] Adding support for private-label credit cards (#662)

@marcoscaceres sure.

At a minimum, I imagine having a `PaymentInstrumentChangeEvent` that looks like this:

```
interface PaymentInstrumentChangeEvent : Event {
    readonly attribute DOMString methodName; // the payment method that triggered the instrument change
    readonly attribute object details; // payment method-specific details
    void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
}
```

For Apple Pay, `details` would store an [ApplePayPaymentMethod](https://developer.apple.com/documentation/applepayjs/applepaypaymentmethod). For `credit`, `debit`, and `prepaid` cards, only the `type` field would be populated, e.g.:

```
{
    methodName: 'https://apple.com/apple-pay',
    details: {
        type: 'credit',
    },
}
```

For `store` cards, though, where we've established an association between the card and the merchant domain, we will populate more fields:

```
{
    methodName: 'https://apple.com/apple-pay',
    details: {
        displayName: 'Private Label 9876',
        network: 'Private Label',
        type: 'store',
        paymentPass: {
            primaryAccountIdentifier: '...',
            primaryAccountNumberSuffix: '1234',
            deviceAccountIdentifier: '...',
            deviceAccountNumberSuffix: '5678',
            activationState: 'activated',
        },
    },
}
```

-- 
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/662#issuecomment-359038775

Received on Friday, 19 January 2018 17:45:10 UTC