#mkoenke

1 messages ยท Page 1 of 1 (latest)

torpid furnaceBOT
wind nebula
hard heath
#

yes! We are hosting and serving the domain association file. On our platform we host many different sites, so we want to set it up so that when a site chooses their subdomain, we can make the call to stripe, and register the subdomain with apple programmatically. The problem is, when we try to do this locally or in a test environment, it appears to work because we get a successful response, but it is not reflected in the dashboard as actually registered, even when the stripe dashboard is in test mode.

#

Example response we get in test environment: #<Stripe::ApplePayDomain:0x4734c id=apwc_0NDUZFUmS57H7yUMTFzjIEK6> JSON: {
"id": "apwc_0NDUZFUmS57H7yUMTFzjIEK6",
"object": "apple_pay_domain",
"created": 1685460877,
"domain_name": "vhx.vhxqa4.com",
"livemode": false
}

wind nebula
#

Okay I can see that registration as well

hard heath
#

so the one that is on the dashboard, I added manually

wind nebula
#

and I see a number of test Apple Pay domains associated with your account

hard heath
#

where can I see them?

#

when i switch over to test mode on the dashboard, nothing changes

wind nebula
#

I'm looking at your account Apple Pay web domains and I see two

hard heath
#

yes, those were both added manually. Whenever I do it through the API, I get a successful response, and nothing changes in the dashboard

#

If I make the call Stripe::ApplePayDomain.create({ domain_name: 'nyytalk.vhxqa4.com', })

#

I get this response

#

but nothing actually seems to happen

wind nebula
#

Hmmm..

#

The ID does show up as an object I can inspect and it is associated with your account

hard heath
#

where can you see that?

wind nebula
#

It's an admin tool.

hard heath
#

ahh ok

wind nebula
#

Wait, can you share the ID in the response, not just the screenshot?

hard heath
#

apwc_0NEasOUmS57H7yUMKaOMDQr2

wind nebula
#

The one I looked up was related to one of the URLS that I see in your dashboard anyway

#

Okay I'm seeing that one too, created 37 minutes ago

hard heath
#

interesting, but I can not see it in the dashboard?

wind nebula
#

Neither can I

#

Oh wait... ๐Ÿคฆ

#

We only display the LIve ones

#

Of which you only have 2

#

Even in Test mode

#

When I look at the Apple Pay domains for your account (in Admin) I can see this

hard heath
#

ok thats good news, so it is working. I'm wondering if there is any way to confirm this on our end... if there is a domain registered that shows as test on your admin tool, will we be able to see apple pay on the payment element? even though we can not see it in our dashboard?

#

we have some development to do, conditionally adding and removing the domain registrations, and if we can't see it, I am not sure how to confirm our implementation works

torpid furnaceBOT
orchid reef
#

๐Ÿ‘‹ hopping in here since snufkin has to head out soon

hard heath
#

ok great thanks!

orchid reef
#

The domains that are only registered in test mode will not show up at all/work with payment element - it's only the livemode registered domains that will work

hard heath
#

interesting, will we get the same responses from stripe in test v live? Curioud how we should handle any errors but I can't seem to trigger an error in test. I would except that you wouldnt be able to register a domain repeatedly and get successful responses, but that is the behavior in test

orchid reef
#

What errors are you specifically talking about? Payment errors?

hard heath
#

if something should go wrong with the registration, or if the domain is already registered... I dont know specifically what errors are possible

orchid reef
#

Ah, so you're specifically worried about domain registration - yeah you should be seeing the same errors in live and test mode

hard heath
#

interesting! so you are able to register the same domain more than once, and will always get a successful response?

orchid reef
#

Yeah I believe there's no issue with registering the same domain twice (but I don't see a reason why you'd want to do that)

hard heath
#

we have sites that are able to change their subdomain, or set a custom domain, so they could set it to 'abc' ,change to 'def', and then back to 'abc'... should we be concerned with deleting registrations if the subdomain is no longer in use, or can we register and just leave it?

orchid reef
#

You can just leave it (although you'd probably want to clean up every once in a while so it doesn't get cluttered)

hard heath
#

ok thats good.... thanks for your help... I think the only problem we have is that we won't be able to test the registration until its in production... because we can add the code to register subdomains, but we won't be able to see it on the dashboard, and it actually won't enable apple pay in test, if it was registered in test, right?

orchid reef
#

You can still test the registration in test mode! Let me clarify - you register the domains in test mode, but you can still use them for testmode payments

#

Apple pay in test mode will work fine with a registered domain that was registered in livemode

hard heath
#

ahh ok, thats great. Are there any common errors we can expect to have to handle when registering a domain? If something goes wrong, we would want to know and retry

orchid reef
#

There aren't really any errors that would warrant a programmatic retry - usually when you get errors it means something is wrong with your registration file, which is something you'd have to go and fix before retrying again

hard heath
#

ahh that makes sense, do you have a sample of what that response would look like so we can notify ourselves to update the file?

orchid reef
#

I don't have that on hand, but you can just try this out yourself with a domain you know won't work and see what that response looks like