#MILAN-GooglePay
1 messages · Page 1 of 1 (latest)
No
OK. You need to have an active card in Google Pay in order to use Google Pay in your Android app.
Also did you register a readyCallback? if so, can you check if the isReady=true in the readyCallback?
readyCallback. is always giving me the false. Actually, I have tried to add a test card but google pay has not allowed me to add it. So let me check with the real card.
Yup, please add a real card and test again.
Also you should only invoke present() if isReady=true.
Ok
Is this an error from Google pay? how about using another card?
Yes, the error getting from Gpay.
GooglePay Payment Failed java.lang.RuntimeException: Google Pay failed with error 412
Cad added successfully
@minor mango
is isReady = true?
OK, can you send me the stacktrace?
java.lang.RuntimeException: Google Pay failed with error with 412 and errorCode
Full stacktrace please?
GooglePay Payment Failed java.lang.RuntimeException: Google Pay failed with error 412: 412:
at com.stripe.android.googlepaylauncher.GooglePayPaymentMethodLauncherActivity.onActivityResult(GooglePayPaymentMethodLauncherActivity.kt:133)
at android.app.Activity.dispatchActivityResult(Activity.java:7590)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4416)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4465)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
@minor mango
Ok, so the payment is failed. can you share with me the payment intent ID?
I have not provided payment intent ID anywhere
How did you create the payment intent?
https://stripe.com/docs/google-pay?platform=android#creating-a-paymentmethod
I have followed this
If you confirm your payment on your server, you can use GooglePayPaymentMethodLauncher to only collect a PaymentMethod instead of confirm payment.
So as per this i need to get the paymentMethodId and pass it to server.
OK, so you are collecting a paymentmethod without making a charge
yes, I need to block the amount for some period of time.
After that time we will release that blocked amount.
Are you in Test environment?
Yes
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
OK
Also can you share the code where you initialize the GooglePayPaymentMethodLauncher ?
googlePayPaymentMethodLauncher = GooglePayPaymentMethodLauncher(
activity = this,
config = GooglePayPaymentMethodLauncher.Config(
environment = GooglePayEnvironment.Test,
merchantCountryCode = "IN",
merchantName = "Test Test"
),
readyCallback = ::handleGooglePayReadyToUse,
resultCallback = ::handleGooglePayResult
)
I noticed that your merchant country is India, and I'm afraid Google Pay is not available in India. see https://stripe.com/docs/connect/payment-method-available-countries#google-pay
Ok, but what does it mean? because we are using google pay in India.
That's why payment is failed?
Stripe doesn't support Google Pay in India.
Ohh, so it will work for other countries? Because the product which I am developing is working in other supported country.
Yes, you can refer to doc that I sent earlier for the list of supported countries.
Ok, I am sorry but how we can test it in India to ensure that it will work in other countries?
What if I change the merchantCountryCode for testing purspose?
You need to use a Stripe account registered under one of the supported country and set the merchantCountryCode accordingly.
Hi @tame falcon can you send me the merchant ID? I'd like to check if the payment failure is due to country.