#xiaxiao-applepay
1 messages · Page 1 of 1 (latest)
hi there! Are you following any specific documentation e.g. https://stripe.com/docs/apple-pay?
do you have an URL which you can share for us to access?
gimme a while to look into this
where are you expecting to view ApplePay in your checkout page?
In this place, the button is displayed if apple pay is supported. If not supported, display text
Because this is displayed if the button display is unsuccessful.
return == null
Can other websites display normally on your apple mobile phone?
I don't know the code reason or there is something wrong with my device.
@pulsar ibex sometimes when loading the payment page, this.country_value is an empty string i.e. "" - this is causing the button to not load. You need to step through your code to understand why.
OK, thank you!
My website is connected to google pay and apple pay.
Now google pay can show buttons,
apple pay doesn't show up.
Uncaught (in promise) IntegrationError: Invalid value for paymentRequest(): country should be one of the following strings: AE, AT, AU, BE, BG, BR, CA, CH, CI, CR, CY, CZ, DE, DK, DO, EE, ES, FI, FR, GB, GI, GR, GT, HK, HR, HU, ID, IE, IN, IT, JP, LI, LT, LU, LV, MT, MX, MY, NL, NO, NZ, PE, PH, PL, PT, RO, SE, SG, SI, SK, SN, TH, TT, US, UY. You specified: .
That's what I saw in the browser console.
When testing apple pay, return is null
What country did you specify to the paymentRequest?
US
Can you do a console.log(country)? because based on the log the value of country seems to be empty.
Did you fill in the shopping information?
Yes I did
And I'm getting null after clicking Apple Pay
I think it's from
alert(e),
console.log(e),```
Is your domain verified?
Verified
yes
Is this website integrated with your Stripe account? or one of your connected accounts?
How can I check?
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
acct_1KBa4mG4AOPM3T3W
Thanks, I'm unable to find any recent payment intents of USD 1 under this account
Are the paymentIntents in the website created by the platform?
Or if possible, can you share with me a paymentIntent ID?
paymentRequest.on('paymentmethod', (e) => { Generate intent order
It'll be helpful if you can get me a paymentIntent ID
When I tested google pay before, there are many, can I share one of them with you?
When the customer clicks the button of google/apple pay, we will call the PHP code first, PHP will generate paymentIntent and return it to JAVASCRIPT
@pulsar ibex we managed to find the PaymentIntent id. The platform account (acct_1GgPmdCqe4ZYWauS) created the PaymentIntent on the connected account (acct_1KBb2eKbf1yl0Crn)
so when you register the ApplePay domain, you need to register it on tthe connected account : acct_1KBb2eKbf1yl0Crn
OK, thank you. I first try to add my domain name in acct_1KBb2eKbf1yl0Crn
Hi, my domain name has been added to the account. ID: acct_1KBb2eKbf1yl0Crn
Hi @pulsar ibex did you use the platform (acct_1GgPmdCqe4ZYWauS) 's secret key to register the domain for acct_1KBb2eKbf1yl0Crn?
const domain = await stripe.applePayDomains.create({
domain_name: 'example.com',
},{
stripe_account: '{{CONNECTED_ACCOUNT_ID}}',
});```
Not yet, I just added the domain name to apple pay
You need to use the platform's secret key to register in order to enable Apple pay in the connected account.
Registering with connected account's secret key won't work.
ok thanks for your help. I will update my code and test it.
Sure, let me know if you need any helps!
☺️
Hi, can you test it for me?😂
Did you register the domain with the platform's secret key?
used
Was the registration successful? can you send the request ID of the domain registration?
This is my other test account and test site, it doesn't seem to show the apple button.
google pay can show, apple pay: alert shows null
my domian https://xx.carerat.online/
ios 12 china user
apple 6
register? I don't seem to have registered, but I changed the key and account ID.
I still can't see the apple pay button
So you haven't register the domain with the platform's secret key yet, am I right?
No, I am registered.
I use account ID: acct_1KBb2eKbf1yl0Crn
and uses its secret key
At the same time I added my domain name in its apple pay configuration
But when I'm testing, I can't see any changes
You don't need to register the domain with the connect account's secret key, you just need to register with the platform's secret key.
I am not using connect account
Allow me to explain again.
The platform account (acct_1GgPmdCqe4ZYWauS) creates the PaymentIntent on the connected account (acct_1KBb2eKbf1yl0Crn aka your account). Therefore, in order to enable Apple Pay on acct_1KBb2eKbf1yl0Crn, you need to use platform's secret key to register your domain, as clearly explained in
https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-using-with-connect
ok