#Mark Edwards - ApplePay
1 messages Β· Page 1 of 1 (latest)
alternately, I'm okay to configure it twice, but I'm a little concerned that this might cause problems, so would love any guidance on that you guys can give.
Unfortunately I'm not really finding guidance from us on this. How to have two domain files hosted might be more of a question for Apple's support. Still looking though, I am reaching out to my colleagues to see if they have a better understanding here and will get back with what we can find
Also can you tell me a bit more about why you are looking to do this?
it does seems to work -- I can make payments via Stripe, and I can call ApplePaySession.
The reason is I want to show an "Set up Apple Pay" button in the case that Stripe determines the user does not have Apple Pay configured, and Stripe doesn't support this. I chatted yesterday with @grand stump about it, and he's following up on the possibility of revisiting supporting this in the Stripe JS SDK. But meanwhile I am implementing it manually.
Ah gotcha, I forgot about that behavior on our button for a moment.
And that is good that you got it working, so you are looking for best practices here then or does that mean you basically solved it between asking earlier and now?
So, the weird part is having two merchant domain configurations, and two files. The file naming miraculously (or maybe intentionally) does not conflict:
apple-developer-merchantid-domain-association
apple-developer-merchantid-domain-association.txt
but I have no idea if this is going to cause interference with Stripe somehow. it feels pretty hacky.
I'm not worried about the hack itself working, I just have no idea how stripe has the whole merchant domain thing set up behind the scenes, and if having a duplicate setup in Apple for the same domain will break stuff.
or maybe there's away to share a config?
Gotcha. As far as I know, we only look at exactly your domain's apple-developer-merchantid-domain-association file, I am not sure how Apple would be accessing each separately here though. I had to bounce around in other threads for a bit and just properly asked my colleagues, will let you know what we can find
So the flow on the Stripe side is clearly kind of custom. If you don't turn up any red flags, I'll just go with it, since it seems to work π
however, I would note that if Stripe started looking for apple-developer-merchantid-domain-association.txt, then I would have a problem π
oh, sorry π
all good
I guess there are two at Stripe?
Only one but I think someone on the server is using the same name. All good though!
Okay coming back to the question now
Typically with domain verification, we look at apple-developer-merchantid-domain-association file from our end, if we see it okay then we flag it to apple so that they can retrieve it. Once Apple is able to see it and verify everything on their end, they'll flag it back to us.
Now, I don't think we have any changes in pipeline that may affect this. However, if Apple decides to change anything in the process then we may have to change our approach as well
got it, but this doesn't happen in my custom flow
Right, because in your custom flow your app is directly talking to Apple
okay, so its a little fragile, but seems to work for now
Yup, we wouldn't know if there are any other shortcomings or issues with this flow as I donβt think anyone (that I know of) has ever attempted to implement this π
cool, if you don't see any obvious issue with this approach I'll go with it. all I'm doing is calling ApplePaySession.openPaymentSetup(), so its pretty simple
the only tricky bit is detecting when to reload stripe. I can use "focus" and "blur" on window on desktop, but that doesn't work on mobile. I'll find a way around that.
Sounds good, Good luck! π
thanks for your help