#xiaxiao-applepay

1 messages · Page 1 of 1 (latest)

olive verge
pulsar ibex
olive verge
#

do you have an URL which you can share for us to access?

pulsar ibex
#

I am using Stripe Elements

#

I added alert() and console.log() in js

olive verge
#

gimme a while to look into this

#

where are you expecting to view ApplePay in your checkout page?

pulsar ibex
#

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.

olive verge
#

@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.

pulsar ibex
#

this.country_value = US

#

This is what I displayed when testing

frosty compass
#

Hi @pulsar ibex I'm taking over this thread

#

give me a sec to catch up

pulsar ibex
#

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.

frosty compass
#

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.

pulsar ibex
#

When testing apple pay, return is null

frosty compass
#

What country did you specify to the paymentRequest?

pulsar ibex
#

US

frosty compass
#

Can you do a console.log(country)? because based on the log the value of country seems to be empty.

pulsar ibex
#

I added a piece of code: alert(country);

#

If it doesn't fit, I can add console.log()

frosty compass
#

The country is empty

#

The country is set after refreshing the page

pulsar ibex
#

Did you fill in the shopping information?

frosty compass
#

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?

pulsar ibex
#

Verified

frosty compass
#

Is this website integrated with your Stripe account? or one of your connected accounts?

pulsar ibex
#

How can I check?

frosty compass
#

Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details

pulsar ibex
#

acct_1KBa4mG4AOPM3T3W

frosty compass
#

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?

pulsar ibex
#

paymentRequest.on('paymentmethod', (e) => { Generate intent order

frosty compass
#

It'll be helpful if you can get me a paymentIntent ID

pulsar ibex
#

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

olive verge
#

@pulsar ibex we managed to find the PaymentIntent id. The platform account (acct_1GgPmdCqe4ZYWauS) created the PaymentIntent on the connected account (acct_1KBb2eKbf1yl0Crn)

pulsar ibex
#

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

frosty compass
#

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}}',
});```
pulsar ibex
#

Not yet, I just added the domain name to apple pay

frosty compass
#

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.

pulsar ibex
#

ok thanks for your help. I will update my code and test it.

frosty compass
#

Sure, let me know if you need any helps!

pulsar ibex
#

☺️

pulsar ibex
#

Hi, can you test it for me?😂

frosty compass
#

Did you register the domain with the platform's secret key?

pulsar ibex
#

used

frosty compass
#

Was the registration successful? can you send the request ID of the domain registration?

pulsar ibex
#

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

#

ios 12 china user

#

apple 6

pulsar ibex
frosty compass
#

So you haven't register the domain with the platform's secret key yet, am I right?

pulsar ibex
#

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

pulsar ibex
frosty compass
#

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.

frosty compass
pulsar ibex
#

ok