Closed gunnartorfis closed 8 months ago
Hey @gunnartorfis
From the looks of it, it seems unable to find a fragment by tag.
This is the side-effect indeed - I'll add safe check #362
I'm not sure why hide is being called straight from start() so I am kind of lost.
This is a pickle. SDK does not normally call hide
. I assume that there was an exception (probably in checkConfiguration) and your code caught it and called hide
.
Could this be the case?
This is a pickle. SDK does not normally call hide. I assume that there was an exception (probably in checkConfiguration) and your code caught it and called hide.
We're only calling hide when we get error responses from our API, so I doubt it 🤔 Would be interested to check out the #362 patch - are there plans to publish beta 2 soon?
@gunnartorfis
Do you see anything in Metro or Android studio logs?
You can also enable verboseLogs
analytics: {
verboseLogs: true,
},
Hey @descorp I just noticed that we hadn't declared "googlepay" in the paymentMethods array - I assumed it would be enough to declare it within the config object.
It looks like that fixes my issue 🙏 Thanks for the help.
@descorp is it possible to render just the standalone Google Pay button using this package? We're using the component integration and need to render and call start("googlepay") upon onPress on some Google Pay button.
Hey @gunnartorfis
Not yet. For now ApplePay and GooglePay are simply glorify "instant" payments. We will look into adding full scale "GPayButton" view after stable v2 release.
Not sure if there is any useful React Native plugins out there to render GPay button.. Fun fact: The GooglePay team was also not eager to take up the "Button" challenge.
Oh well, thanks a lot! I'll just render some SVG/PNG then 😄
I am getting an error when trying to pay with GooglePay though. Let me know if I should create a new issue or just keep talking here @descorp
The error is Invalid PayWithGoogle Token (validation: 5_202)
I was getting that error on web when I hadn't configured gatewayMerchantId
and merchantId
but I have already configured that on the RN side.
We are taking a brief shortcut into the paymentMethods and are hard-coding it for the time being. We are proxying the Adyen API and not making requests directly from the app. The googlepay entry is however the same as the API returns it from Adyen.
// paymentMethods={..}
{
type: "googlepay",
name: "Google Pay",
configuration: {
merchantName: "Noona",
merchantId: "12345678901234567890",
gatewayMerchantId: "NoonaLabsEhfECOM",
},
}
// config={...}
{
googlepay:
Platform.OS === "android"
? {
merchantAccount: "12345678901234567890",
allowedCardNetworks: ["Visa", "Mastercard"],
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
googlePayEnvironment: GooglePayEnvironment.Test (3)
}
: undefined,
}
Do you see anything wrong with this config? Or any other ideas?
Hey @gunnartorfis
The error is Invalid PayWithGoogle Token (validation: 5_202)
Here is 5_202 error code page.
I can only suggest to revisit GooglePay setup guideline. If still no luck - please reach out to Adyen Support.
As a side note:
1) you don't need platform check once channel is set correctly - /paymentMethod
API response would not contain Google Pay / Apple Pay for iOS and Android respectively.
2) /paymentMethod
API response usually contains everything you might need for a basic GooglePay payment, and in my experience - no extra configuration is necessary:
googlePayEnvironment
will match root environment
; merchantAccount
will use merchantId
from /paymentMethod
API response; allowedCardNetworks
usually comes from /paymentMethod
API response as brands
;allowedAuthMethods
is already preset by SDK.Thanks a lot 🙌
I solved it by removing the configuration entirely from the config object 🤔 now it is just coming from the paymentMethods response.
Describe the bug When calling start("googlepay"), I get a crash from within BaseComponentFragment's hide function. From the looks of it, it seems unable to find a fragment by tag. I'm not sure why hide is being called straight from start() so I am kind of lost.
Expected behavior The Google Pay sheet should appear.
Screenshots
Smartphone (please complete the following information):
Additional context I've gone through the Android Google Pay setup: