#tony_51013
1 messages · Page 1 of 1 (latest)
How are you integrating Apple Pay?
Ok, but what payment UI? Payment Element? Payment Request Button?
request button
Can you share the code you use to initialise Stripe.js and create the Payment Request instance, or a pi_xxx ID you're creating
This error message is returned by the request URL: https://api.stripe.com/v1/apple_pay/sessions
OK
pi_3Oc2j0ILnfDwQNcg0o7muqbU_secret_tozsulaKuRCNgHMnjuO7GVbiP
You're a Connect platform, right?
sorry I am not sure: what's connect platform
That answers my question 🙂
Taking a look at the issue now
What's the full domain you're trying to use Apple Pay on?
Cupshe New Zealand Official Site, a fun beachwear fashion brand. Explore the latest one pieces, bikinis, beach cover ups, dresses and more. Free Shipping & Easy Returns. Shop Now!
Can you share the code you use to initialise Stripe.js?
I refer to this document and the code is almost the same.
Almost the same? Please share the code, I can't really debug the issue without seeing the actual code you're using
Okay, give me a few minutes
Where the code where you initialise Stripe.js?
const stripe = Stripe('pk_test_51M90AeILnfDwQNcgWOETNmzUhonDeP82dLrbyjrF1D5ldwO9hZ3zK0fNjB5ULljySeBP4MPHRRt4b9O1ohFV2q4v0068ZclTOU', {
apiVersion: "2022-11-15",
});
Thanks!
here is a demo code
Can you run this API call for me server-side with your sk_test_xxx key:
domain_name: 'nz-release.kapeixi.cn',
});```
you can visite my test website:https://nz-release.kapeixi.cn/checkouts?check=1750093029212295169
Cupshe New Zealand Official Site, a fun beachwear fashion brand. Explore the latest one pieces, bikinis, beach cover ups, dresses and more. Free Shipping & Easy Returns. Shop Now!
choose Apple Pay and click Pay Now button
It's asking me to sign in
I keep getting 'network connection is lost' error when I try and use Apple Pay
Can you do this please
let me see
Can you share a screenshot of the error page?
I can see the Apple Pay tab. I select it and click pay now and it doesn't work
refresh this page and try it again
Did you run the code I asked you to?
Same error
Is there any way I can share my screen with you?
Not here, but you can write in to my team: https://support.stripe.com/contact/email?topic=api_integration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I think I know what the issue is, however you're not following instructions as I've advised so I can't really help any further!
I can show you a simple demo page
you can check the code
payment intent input value :pi_3Oc3LTILnfDwQNcg0VvOdqRo
Have you done this yet?
yes and I got the same error
client secret input value:pi_3Oc3LTILnfDwQNcg0VvOdqRo_secret_5ZcvkyYQwjZmN6zl6aTPIxQ8V
Hmm, was the call successful?
got a error message :
{
"error": {
"message": "Could not create Apple Pay session. Please make sure you have registered this Stripe account. For more information, see https://stripe.com/docs/apple-pay#web.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_C8229qBbgAHB3Z?t=1706090895",
"type": "invalid_request_error"
}
}
I used to use this code and it passed without any changes to the code, but now it doesn't work
I am in China
my website will be deployed in US
I can't reproduce the issue which would suggest it's not a coding integration issue. My initial hunch was that it's related to your location but Apple Pay seems to be supported in mainland China: https://support.apple.com/102775
See the countries and regions that support Apple Pay.
To be clear, you see that error in the browser console when you click Initialize webSDK?
I know what you're talking about. The test Apple ID I used can test Apple Pay, and we can test it normally using Nuvei.
Apple Pay only cannot be used on Macs in mainland China, but it can be used on iPhones. I am currently testing Apple Pay on iPhones.
Try and run this please:
await stripe.applePayDomains.delete('apwc_1OZT2EILnfDwQNcgLXCcjr4I');
That's using our Node SDK, but can be adapted
Do you want me to execute it in the browser console?
No, you'll need to run it server-side using your sk_test_xxx key
The JAVA language used by my server-side code
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>22.0.0</version>
</dependency>
We are using this version of sdk
ApplePayDomain domain = ApplePayDomain.retrieve("apwc_xxx");
domain.delete();
run this code before create payment intent?
no, you just do it as a once-off thing/script to try and debug your current problem
it's not something you need to do in operation
What are the parameters
which parameters?
it's the ID we shared earlier
no
apwc_1OZT2EILnfDwQNcgLXCcjr4I like mentioned(seems like you removed the first two characters for some reason)
can you try changing the API keys on the page to livemode and visiting the page?
that's the point
I cannot use livemode to test this
com.stripe.exception.AuthenticationException: No API key provided. Set your API key using Stripe.apiKey = "<API-KEY>". You can generate API keys from the Stripe Dashboard. See https://stripe.com/docs/api/authentication for details or contact support at https://support.stripe.com/email if you have any questions.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
delete failed
that just means you have made some sort of misake in configuring the site and are amissing an API key somewhere
maybe stripeApiKey.getSecretKey is null.
This is not possible because this is code that works fine in production and we already use Stripe to complete credit card payments.
this code runs well more than 2 years
I'll print log
cool
Authorization: Bearer sk_test_51M90AeILnfDwQNcgvjkgFqq1GvJkKJ8BvigiBLd56JXI0ROrbgXpNNcxXqiO1cP75bySaUlxgDzNMHL34Vv9vXsi00dPdbuU9C
stripeApiKey.getSecretKey is not null
ah right because you don't use the globals
you pass requestOption for every call, but you didn't pass it to the Delete call.
in your setup it would have to be domain.delete(optionsBuilder.build());.
ok I'll try it again
ah you have a keen eye
wow it works now
But I cannot understand what happened
And I had registed a new account,and got the same error.So I need run the code agian for this new account ?
possibly
but I don't the parameter like :apwc_1OZT2EILnfDwQNcgLXCcjr4I
and I want to know why need to do this
I had registed a new account
how exactly do you do this? in the Dashboard or in code?
do you have some code you can show me for how your backend registers a domain?
I register domian on dashboard
ok
was there a reason you did that?
well it's not really easy to get the apwx_xxx ID and you shouldn't really need to keep doing this delete action multiple times, we were just trying to get your current domain fixed
so is your current domain working now?
yeah it seems work well
I have another question
The conditions for Google Pay to be available seem to be very demanding,
got it. What's the question?
The Google Pay development documentation says: Google Pay can be used on almost any browser, but when we use stripe.js it can only be used on the Chrome browser
sorry, what was the exact question?
I want to be able to use Google Pay on a browser other than Chrome
but when I run the code : canMakePayment on other broswer,it always return null
ok. Clarifying questions:
which specific browser are you interested in?
The Google Pay development documentation says: Google Pay can be used on almost any browser
do you have a link to exactly where you're seeing this so I can read it in context?
We are using Nuvei to complete Google Pay now,and it can work on other broswers
I mean we support that too, but you are using the old PaymentRequestButton product.
see ExpressCheckoutElement for example.
https://stripe.com/docs/elements/express-checkout-element
the PaymentRequestButton can only show one button at a time
When using a non-Chrome browser, Google Pay will jump to the Google Pay web page to complete the payment, just like Paypal.
and for example on Safari that one button will always be Apple Pay(since that's something Apple have rules about)
write to https://support.stripe.com/?contact=true I suppose and we'd look!