-
Notifications
You must be signed in to change notification settings - Fork 166
Description
Hello, long time no see :)
Describe the bug
Since the merge of PR #3539 (release v6.23.0+), Google Pay integration crashes at runtime whenever the maestro brand is included in the mapped brands list. The issue seems related to the way Google Pay interprets "MAESTRO" in the allowedCardNetworks array.
This is how allowedCardNetworks are defined in GooglePay docs (link):
To Reproduce
Example of payment method configuration that works
"paymentMethods": {
"paymentMethods": [
{
"brands": [
"maestro",
"amex",
"visa"
],
"name": "Cards",
"type": "scheme"
},
{
"brands": [
"mc",
"visa"
],
"configuration": {
"merchantId": "REDACTED",
"gatewayMerchantId": "REDACTED"
},
"name": "Google Pay",
"type": "googlepay"
}
]
}
Example of payment method configuration that doesn't work
"paymentMethods": {
"paymentMethods": [
{
"brands": [
"maestro",
"amex",
"visa"
],
"name": "Cards",
"type": "scheme"
},
{
"brands": [
"maestro",
"visa"
],
"configuration": {
"merchantId": "REDACTED",
"gatewayMerchantId": "REDACTED"
},
"name": "Google Pay",
"type": "googlepay"
}
]
}
Screenshots
Additional context
Tested on v6.23.0 and v6.25.0, on both desktop (Windows, MacOS) and mobile (Android, iOS) devices. If maestro is supplied as a brand in the google pay configuration, the initialization will crash.
I have also found this to be a similar issue in Stripe's gh. Crosslink: stripe/stripe-android#8435 (comment) Something to do with Brazil specific methods regarding Google Pay? However, this is an inconsistency with Adyen then, where Google Pay - Maestro is treated just like any other payment method.