-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for iDEAL payments being completed in Safari instead of the WKWebView #215
Conversation
Hey @joshgare 👋 Thanks for the PR. Offsite payments is something we're currently working on.
Can you walk me through the flow here? I would expect the following, by which the customer would start in the sheet kit, get redirected to iDeal but never get redirected back to your app. Instead they would be redirected to Safari, but since Safari is most likely missing the session cookies, checkout will not render the thank you page. Does iDeal ever redirect back to your app? sequenceDiagram
participant Customer
participant CheckoutSheetKit
participant Safari
participant iDeal
Customer ->> CheckoutSheetKit: Opens Checkout Sheet
Customer ->> CheckoutSheetKit: Fills customer details
Customer ->> CheckoutSheetKit: Chooses iDeal payment method
Customer ->> CheckoutSheetKit: Clicks "Pay Now"
CheckoutSheetKit ->> Safari: Redirects to Safari with custom URL scheme
Safari ->> iDeal: Redirects to iDeal
Customer ->> iDeal: Completes payment
iDeal ->> Safari: Redirects back to Safari
|
@markmur your sequence diagram is spot on with how iDEAL works within this PR. You've also spotted the major flaw in this flow which is the user ends up in Safari and not the native app. It's unlikely to get iDEAL to push back to the native app as they subsequently hand over to a bank's native app e.g. ING. This would then require ING to update their iOS app to include a Queried URL Scheme that allows the banking app to open a Shopify Merchant's native app. For now, our Dutch client is happy with the flow above as the payment completes and the order is placed. Not perfect, as the user will need return to the app manually. |
@markmur just following up here to see if you have anymore oversight as to what the plan is for offsite payments? do you need any further information from myself? |
Hey @joshgare, we've added support for handling custom URL schemes in 3.1.0. Payment providers such as iDeal use buttons with deep links on their web pages which link to other mobile apps. These links will now be propagated to the checkout lifecycle method, where they will be handled by default: if UIApplication.shared.canOpenURL(url) {
/// Allow OS to open URL and route the request
UIApplication.shared.openURL(url)
} We've also shipped improvements to the processing page by capturing the completion status of the payment to show the confirmation page. See the Offsite Payments and Universal Links guides for more information. Closing this PR for now, but happy to answer any questions you have. |
Thanks @markmur What are your thoughts on custom url schemes? e.g. if the offsite url returns as Unless I'm missing something, this flow would break as |
What changes are you making?
How to test
Before you merge
Important
Checklist for releasing a new version
podspec
file.Tip
See the Contributing documentation for instructions on how to publish a new version of the library.