#Badr-Apple Pay
1 messages ยท Page 1 of 1 (latest)
thanks @desert bridge ๐
I think I got that working now ๐
we manually added the domain from the dashboard and it worked
on documentation it said , we should only use the api call when it's connector accounts
oh so the domain wasn't verified?
it was verified
but on the connected account
not on the main account
for some reason it's not verified for dev url there but it's working
check the main account on this
I can't see this domain from the main account dahsboard
are you using Apple Pay Sandbox on dev?
that might be the reason
why it's working
it is working
so we have
dev - test - production
only production is the live
dev and test are liveMode false
it's working where ?
can you send me which link it worked with ?
I just tried https://test-payzone.easypaymentsplus.com/fundraising/campaign/75/donate/ and it didnt work
taking over
that page indeed does not work
it's because you're using the public key of the connected account that you got from OAuth(https://stripe.com/docs/connect/authentication#api-keys), which is wrong and deprecated
the only way for this to work is to initialise stripe.js with your platform public key and the Stripe-Account header as per the example on https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-using-with-connect
there's a specific reason for that(it's to do with stripe.js needing to know the account ID so it can find the correct registration when calling Apple's function). But that's what you need to do.
I don't know why it works on the other page, since it's the same key, but it's probably just something that happened from doing so much testing on this one account and domain, I believe it's most likely that the registration status on Stripe and the registration status on Apple have drifted out of sync , since that can happen
your production page works fine so ultimately while not ideal, I think you're ok
@lean arch that production page wasn't working at all 1 hour ago , I just went to dashboard and manually added the domain there in the main account and it worked
yep, which technically is not what you're supposed to do, but I can see why it works
sorry, it's a mess and it's really hard for me to explain without spending a long time explaining exactly how this works internally
basically if you register the domain for a connected account using the API(like https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-using-with-connect says to do) , when we register the domain with Apple we register with an identifier like merchant.dev-payzone.easypaymentsplus.com.acct_1F2EnuIzQrXzOQ2M.stripe
when an account itself registers the domain through the dashboard, it registers with Apple with an identifier like merchant.dev-payzone.easypaymentsplus.com.stripe (no account ID)
then when you call canMakePayments in stripe.js, we look up Apple's registry by passing an identifier and asking them if it exists
if you don't pass the account ID to stripe.js at that point(which you don't since you are using the deprecated OAuth-public-key only approach) , stripe.js can't know the account ID to be able to create a request to Apple to look for the first identifier, so it looks for merchant.dev-payzone.easypaymentsplus.com.stripe instead
which doesn't exist (or didn't until you manually added it to that account's dashboard) which is why canMakePayments returns false
I don't really expect anyone to understand this since it's all internal details of our systems and integration with Apple, but the simple answer is you have to do exactly what the docs describe when using Connect + Apple Pay, any deviation in any way and it just immediately stops working
I have to run for lunch, will be back a little later!