#Steve1662
1 messages · Page 1 of 1 (latest)
Hello 👋
Not sure as I haven't tested this myself
are you using async-await to work with promises?
Also, is this page publicly accessible? If so, can you share the direct URL?
Async await... technically yes. I'll post code next. Publicly can be hit via trytn.dev and click a 'book now' button. Add any item to your cart and punch thru to the review step.
export function canPaymentAttemptContinue(prePurchaseCheckResult) {
if (prePurchaseCheckResult.isOk) {
const formData = settings.$form.serialize();
stripe.confirmPayment({
elements: elements,
confirmParams: {
payment_method_data: {
billing_details: {
address: {
country: settings.fields.$country.val()
}
}
},
return_url: ${settings.domain}/${window.globalSettings.shop.shopUrl}/Pay/PaymentConfirmedRedirect?${formData}
},
redirect: 'if_required'
}).then(wasPaymentConfirmed);
} else {
handleError(prePurchaseCheckResult.errorMessage);
}
}
Hello, hanzo had to step out but I can help here. Catching up and checking out your code
Yeah some errors like this aren't public facing if there isn't anything the user can do about them. In client side code we mostly expose errors that can be shown directly to the user, even if it is just instructions like "try again later". This may mean that this is more of an issue with the setup here
Will try that flow on your site
Can you send me your account ID as well (acct_123) I can check the apple pay setup and all that
sent dm
I actually don't see an Apple Pay button here. Is this where it should be?
Understand it is an account setup error. The problem is our code does not handle it. We're a SasS though so if an account happens not to be setup... and we leave the user stuck we're out the money.
Also FWIW, account IDs are safe to share here
Oh is this a test page for a connected account?
Got it it on the account id. I assume you're using Safari and you have a valid card in your apple wallet?
Correct, I can make apple pay payments on other sites
This site consume a staging version of our code. The Stripe account associated with that site is in test mode.
And yes we're dealing with connected accounts.
I'm a PC guy and captured these images via a screen share session with a col
... colleague this morning. So Apple Pay shows.
An alternative site to try is https://trytn-webapp-booking-scus-staging.azurewebsites.net/stripeshop .... which is actually where the screen shots came from.
Gotcha, will try that
So I may see the config issue at least
Apple Pay has a very finnicky setup with connect. Basically, the platform account needs to register the domain on the connected account. The connected account can't register the domain itself. It looks like on that account the domains were registered by the account itself
Finding the way to correct that...
So you will want to remove the domain on the connected account and then register it again by making this call from the platform account https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-using-with-connect
Ok. Will give that a go quick.
I deleted them from the connected account. Looks like they're in the platform account. I internally messaged someone to test it.
To be clear, did you re-register them on the connected account via that API call? Or are the domains registered on the platform now?
They were registered via the Stripe Dashboard in the stripe account that is the platform account.
acct_1B9HzmHwo6MMOJYv
Right, I was more checking on what happened after you deleted them from the connected account. Did you re-register on that connected account with that API call (instead of the dashboard)?
No... I did not use the API call. Rereading your post.
That will take a bit more effort and need to check where that fits into our setup flow.
Assume that we achieve that. Where in the dashboard would we see the domain? Would it be in the platform account or in the connected account?
Good question. Checking in on that. I think it should still show up on the connected account's dashboard
Yes it will still be on the connected account here
Ok. I assume this thread will still be good to post findings after those changes are made? .... assuming we still have issues?
We typically keep these threads open for about an hour of no response. If you have to come back after that you can just message in #dev-help and mention this thread and we can reopen this thread or start a new one if that would be easier
Perfect. Thank you for your help. Can't overstate how helpful having this channel to experts is to us.
Of course! Thank you, will pass that on to the rest of the team. We really do like helping people on this channel