Mastercard modifier does not apply |
|||
Issue descriptionChrome Version : 61.0.3153.4 OS Version: Ubuntu 14.04.5 LTS URL: https://rsolomakhin.github.io/pr/ What steps will reproduce the problem? 1. Enable chrome://flags/#enable-experimental-web-platform-features 2. Open https://rsolomakhin.github.io/pr/. 3. Click "Buy". 4. If not already selected, select a mastercard payment method. What is the expected result? Mastercard discount should apply. What happens instead of that? Mastercard discount does not apply. JS code: const supportedInstruments = [{ supportedMethods: ['https://android.com/pay'], data: { merchantName: 'Rouslan Solomakhin', merchantId: '00184145120947117657', allowedCardNetworks: ['AMEX', 'MASTERCARD', 'VISA', 'DISCOVER'], paymentMethodTokenizationParameters: { tokenizationType: 'GATEWAY_TOKEN', parameters: { 'gateway': 'stripe', 'stripe:publishableKey': 'pk_live_lNk21zqKM2BENZENh3rzCUgo', 'stripe:version': '2016-07-06', }, }, }, }, { supportedMethods: ['basic-card'], }]; const details = { total: { label: 'Donation', amount: { currency: 'USD', value: '55.00', }, }, displayItems: [{ label: 'Original donation amount', amount: { currency: 'USD', value: '65.00', }, }, { label: 'Friends and family discount', amount: { currency: 'USD', value: '-10.00', }, }], modifiers: [{ supportedMethods: ['basic-card'], data: { supportedTypes: ['debit'], }, total: { label: 'Debit card discounted donation', amount: { currency: 'USD', value: '45.00', }, }, additionalDisplayItems: [{ label: 'Debit card discount', amount: { currency: 'USD', value: '-10.00', }, }], }, { supportedMethods: ['basic-card'], data: { supportedNetworks: ['mastercard'], }, total: { label: 'MasterCard discounted donation', amount: { currency: 'USD', value: '50.00', }, }, additionalDisplayItems: [{ label: 'MasterCard discount', amount: { currency: 'USD', value: '-5.00', }, }], }], }; try { PaymentRequest(supportedInstruments, details).show(); } catch (e) { error('Developer mistake: \'' + e + '\''); }
,
Jul 18 2017
+Jared, any idea why this would happen?
,
Jul 18 2017
In my testing, I added a fake MasterCard "5555 5555 5555 4444" and the discount did not apply on https://rsolomakhin.github.io/pr/, even though it has supportedNetworks: ['mastercard'] modifier.
,
Jul 18 2017
This would be normal because type is UNKNOWN for local cards, right?
,
Jul 18 2017
Although type is UNKOWN, the network is "mastercard", so that filter should match.
,
Jul 18 2017
I think we settled on not matching any modifiers for local cards. Did I misunderstand something or did our stance on that change? Anthony Vallee-dubois Jul 6, 12:03 PM One more question: how should we behave with local cards? We don't know their type so should they just not match any modifier? Anthony Vallee-dubois Jul 6, 12:03 PM *Any that specify "supportedTypes" Rouslan Solomakhin Jul 6, 12:07 PM That one option that's acceptable. That would be the simplest implementation. Given that no partners are clamoring for this, I'm OK with this implementation.
,
Jul 18 2017
Sorry, that must've been miscommunication on my part. Local cards have "unknown" card type, so their type cannot be used in filtering. However, all cards in PaymentRequest have a type, so we should probably filter on that. This task is not _super_ urgent. I was going through https://chromestatus.com today in prep for the M-61 branch point and noticed that modifiers are not enabled yet. Tested it out: looks not ready to ship yet. Hence this bug.
,
Jul 20 2017
I still can't parse what we need to do for modifiers here. Few questions: 1) If you have a local card (Mastercard, UNKNOWN type) and the website specifies they accept Mastercard+All-types, BUT have a Mastercard+Debit discount modifier, we still allow the card to be chosen, but do not apply the discount? 2) If using the same card the website has a Mastercard+All-types discount, do we apply the discount?
,
Jul 20 2017
Yes to both questions.
,
Jul 24 2017
> Local cards have "unknown" card type, so their type cannot be used in filtering. However, all cards in PaymentRequest have a type, so we should probably filter on that. Spotted a typo. The last instance of the word "type" should be "issuer network." The second sentence should be: "All cards in PaymentRequest have an issuer network, so we should filter on that."
,
Jul 24 2017
+zach to weigh in
,
Aug 9 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ma...@chromium.org
, Jul 18 2017