#Jcme
1 messages · Page 1 of 1 (latest)
hi! what kind of device are you running this on? an emulator or a physical device?
Hello,I use physical device(Samsung S9 +)
do you have this app installed on the phone? https://play.google.com/store/apps/details?id=com.google.android.apps.walletnfcrel
Yes, normal payment can run. But it's without google pay in the future pay.
so Google Pay works with the PaymentSheet for you normally, and it's only specifically if you're using setupFutureUsage ?
or rather, using a SetupIntent?
yes,so strange
I use presentWithSetupIntent according to this documentation:https://stripe.com/docs/payments/save-and-reuse
what version of stripe-android does your app use? Can you share a SetupIntent ID seti_xxxx where you're having this problem?
I tried 20.8.0 and 20.14.0, but it doesn't work.
do you have a SetupIntent ID?
means setupIntentClientSecret?
yep, or just the seti_xxxx part of it
seti_1LsRuAL08i0ZDogVqCD90GPr_secret_MbfEUdTBFk5mJG9Nhlez4PLV4Bfcw51
I see it's associated with a Customer, are you also using an ephemeral key? Can you please share your complete code? (in text not a screenshot)
Can a physical machine test future payments? Apple pay on iOS is only available in the simulator.
it should work fine yes
to clarify, are you in India(physically, or your Google account)? There's an Indian version of Google Pay that is different from the global version, and we don't really support it.
ephemeralKey = "ek_test_YWNjdF8xTFZvNDBMMDhpMFpEb2dWLEhxV09tb3RLNGNqNHhJMHNqOURVR3NnNm1taTVMb0I_00xx7nidE8"
customer = "cus_MbfI302rGZDVRA"
setupIntent = "seti_1LsRxnL08i0ZDogV0nYBXXJz_secret_MbfIGLdmLo7pQDCzRFS0oJaoHzoQNuh"
not indian
Can you please share your complete code? (in text not a screenshot)
customerConfig = new PaymentSheet.CustomerConfiguration(
response.getData().getCustomer(),
response.getData().getEphemeralKey()
);
setupIntentClientSecret = response.getData().getSetupIntent();
PaymentConfiguration.init(getApplicationContext(), response.getData().getPublishableKey());
final PaymentSheet.GooglePayConfiguration googlePayConfiguration =
new PaymentSheet.GooglePayConfiguration(
PaymentSheet.GooglePayConfiguration.Environment.Test,
"NZ","NZD"
);
final PaymentSheet.Configuration configuration = new PaymentSheet.Configuration.Builder("Example, Inc.")
.customer(customerConfig)
.googlePay(googlePayConfiguration)
// Set `allowsDelayedPaymentMethods` to true if your business can handle payment methods
// that complete payment after a delay, like SEPA Debit and Sofort.
.allowsDelayedPaymentMethods(true)
.build();
paymentSheet.presentWithSetupIntent(
setupIntentClientSecret,
configuration
);
It's all based on the documentation.
ok, let me think/look for a while
thanks
still having a look but just confirming it does generally work fine for me
it's wired
can you share the full code? including how you initialise the library and call PaymentConfiguration.init and how you create the paymentSheet variable, for example
Application onCreate:PaymentConfiguration.init(this, PUBLISHABLE_KEY);
paymentSheet = new PaymentSheet(this, this::onPaymentSheetResult);
It's all written according to the documentation.
makes sense
The google pay button just doesn't appear.
This is an example from the documentation
I just tried 20.15.0
I have no idea unfortunately, it all works fine for me. If it helps, here's the code I use and I'm running it on a physical Samsung Galaxy S222 Ultra on Android version 12 and version 20.15.0 of our SDK
I'd suggest trying to run your code on other devices you/your colleagues have access to.
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
also config manifest
yep, but to be clear, you said it worked for payments right? it was only in SetupIntents that it doesn't appear?
yes
so your configuration is likely all correct, so I really don't know what would cause this. You can try comparing your code to mine(though I didn't see any real difference in what we have) and maybe trying your code on other devices as these feels like maybe something specific to your device or Google account, I really don't have any other idea.
Really the only difference is the currency, the country code.
yep but I did try setting my mine to NZ and NZD too to rule that out, it still worked
hmm, maybe one last idea
on https://dashboard.stripe.com/test/settings/payment_methods do you have Google Pay enabled?
like I assume you do since you said payments work, but maybe you are using mutliple Stripe accounts
do you have Google Pay enabled? --》enabled。。。。
yeah and I checked on the settings of the account that SetupIntent you posted earlier and it is indeed enabled
so I really have nothing here, all I can suggest is trying on some other devices
Ok, thanks a lot. I try another device.
Take the liberty to ask if you can generate an apk for me to try to see if my device can be used.
I don't think I can really do that unfortunately.
Oh, it's okay, I'm taking the liberty.