#gladeluco-ssl-applepay

1 messages ยท Page 1 of 1 (latest)

covert needle
#

@ionic siren usually it's due to not having registered the domain properly

#

do you have a URL I can look at?

ionic siren
#

We're live in production with it, but this application (and one other) just won't stick.

#

The domains are def listed.

covert needle
#

looking

#

so where should I see Apple Pay?

ionic siren
#

The option inserts itself between Other and the Credit Cards, and the Button renders below the radio options.

#

You can see the error in the console for stripe.js rejecting it.

covert needle
#

Gotcha, do you use Stripe Connect?

ionic siren
#

Yes.

#

The same platform keys and stripe merchant account work on another test application. The only difference is the hostname.

covert needle
#

yeah but that's likely the issue

#

where does the Apple Pay code lives? like where do you initialize the API key and account id?

ionic siren
#

They are listed one above the other in both the Platform and the Connected Account's Apple Pay settings.

#

I can't emphasis enough that we have 5 applications, plus production working fine, but these two hostnames wont stick. We have enabled hundreds of connected accounts, as well.

covert needle
#

I understand. Apple Pay + Stripe Connect is extremely finicky for many edge-cases

ionic siren
#

yeah, its been a rough ride.

covert needle
#

To help you I need to run through common steps that you likely think you know about but it's the only way to debug this

ionic siren
#

understood

covert needle
#

where can I find your code? Clearly you're an advanced user, you likely don't hardcode Stripe's loading JS in the head of your HTML

#

Can you point me to where you're initializing Stripe.js?

#

that will allow me to find your API key + account id myself and then compare with what I see internally and hopefully tell you the exact issue

ionic siren
#

pretty entangled in our angular bootstrapping/startup. let me locate it and see if its not minified out of reach.

covert needle
#

yeah, digging too. I'll check in Chrome in paralle

ionic siren
#

scripts-1d7f98528d.js

#

line 61317 in safari

#

i appreciate the help a lot.

covert needle
#

still digging, but looking

#

damn it's so minified it's going to be impossible to debug

#

@ionic siren is there any way you can make a simple example yourself? This code is layers and layers of callbacks. I can't even find the simple log line where you initialize Stripe.js

#

the one you shared is the advanced way later one for canMakePayment() but where did you explicitly initialize Stripe.js + passed the stripeAccount option ?

ionic siren
#

Yeah, I had just asked my dev for the same thing.

covert needle
#

ahhh okay you have 2 calls

#

found it

#

give me a few minutes now that I have the right options

#

yep okay so that specific connected account is not configured properly. As far as I can tell it's exactly what I thought

#

the domain auto.dev.gigwell.io has been registered in Test mode by the platform, but it needs to be registered in Live mode

#

do you have a domain where this works on that account for me to compare?

ionic siren
#

regardless of the live mode toggle

#

is that a bug?

covert needle
#

not exactly that's what I meant earlier, extremely finicky

ionic siren
#

ok I was afraid of that behavior

covert needle
#

Someone, registered the domain auto.dev.gigwell.io by hand in the Dashboard on the connected account

#

This never works

#

and that blocks all future attempts ๐Ÿ˜ฆ

ionic siren
#

aaaahhhh

covert needle
#

You have to always register domains via the API and in Live mode

ionic siren
#

would the api calls to fetch this show us the gaps?

covert needle
#

My team has a small tool that dumps all the domains registered, which mode and who registered them

#

I am not entirely sure but I don't think so, it's a pretty limited API because it almost never needs info except for cases like yours :p

#

my recommendation:
1/ Remove the domain auto.dev.gigwell.io in Test mode (list all domains and explicitly delete it)
2/ Remove the auto.dev.gigwell.io in Live mode (same list all and delete)
3/ Re-register the domain via the API with the platform's Live API key and the Stripe-Account header

#

once you have done that on that specific account let me know I can confirm in my tool

ionic siren
#

You're hitting all the spots along the way I was sus about. I'm sure this will work - thanks for the vantage point!

#

will report back when I can

covert needle
#

I'm not sure it will work yet, it can be other things ๐Ÿ˜ฆ

ionic siren
#

fair enough but this matches our history

#

since we started with this host and registering via ui

covert needle
#

the real issue is that if the domain is already registered by the user, then re-registering is a noop unless you delete

#

it's super annoying but it's such an edge-case that we don't really have a good way of documenting

ionic siren
#

the ui showing the same list regardless of toggle is a give away

#

the docs say Live MOde clearly

#

but its hard to know what happened when you toggle it and the same data is there both ways

covert needle
#

agreed ๐Ÿ˜ฆ

#

my team spends a lot of times on those edge-cases we even have detailed internal articles on all that can go wrong (there are a lot of things between all the Apple Pay and Google Pay settings, don't even get me started on mobile webviews lol)

#

We could definitely improve the UI though. One day I hope

ionic siren
#

hah same story here ๐Ÿ™‚

ionic siren
#

ok, i had to do one extra step here which was to connect using a livemode oauth flow so that I had permission to update the domain using a live key.

#

That's also not obvious. The involvement of the live key for this is confusing vs previous integrations.

#

if you want to double check your perspective, that would be great. I've gone back to the test oauth token.

covert needle
#

give me a sec I need to find the account again, I closed all my tabs lol

#

okay the domain is still registered in Test mode, and should not be, but it is properly registered in Live mode now

ionic siren
#

Yeah, i'll have our flow updated so we cleanup better. The oauth via live link so that the live key has access to the test account might need to be listed somewhere. Not a standard flow in dev by any means.

#

The closest page to helping us was this one:

#

but its still really light on connect instrux

#

Thanks again for your help, a nice exit to my week. Cheers

covert needle
#

Congrats, I'm glad you're unblocked