-
Notifications
You must be signed in to change notification settings - Fork 0
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
Payments: redirectURL behaviour #29
Comments
iOS with deepLink: kevin_flutter_ios_deep_link.mp4iOS with valid link: kevin_flutter_ios_valid_link.mp4Android (works same - ignores the redirectURL both ways) kevin_flutter_android.mp4 |
@KestasVenslauskas the issue is that If you really want to achieve that behaviour, you can try to set callback URL Worth noting, that Android app could not be opened automatically, when having Additionally, we added an option to set different kevin_flutter_core: ^1.0.3
kevin_flutter_accounts: ^1.0.2
kevin_flutter_in_app_payments: ^1.0.1 const KevinAccountsConfiguration(
callbackUrl: KevinCallbackUrl(
android: _kevinAccountsCallbackUrlAndroid,
ios: _kevinAccountsCallbackUrlIos,
),
), That comes in handy when you want to set non-http/s |
@antons-zubkovs OK, but this way iOS will ping BE once more because as I mentioned it open it in kevinSDK as a webview blinks for few MS and goes back to the app. It's fine by us but would prefer same flow for both platforms. |
@KestasVenslauskas as I mentioned above, that behaviour is not really supported and designed by us, so you will need to introduce some workarounds. You can try to set different |
It's not called on android it's completely ignored. Where on iOS it is called because iOS always makes a call to to Using different callbackUrls for |
https://api-reference.kevin.eu/public/platform/v0.2#tag/Payment-Initiation-Service/operation/initiatePayment |
@KestasVenslauskas it's not ignored on Android, it is being intercepted. If your payment/linking flow is happening inside the kevin's WebView, then WebView listens to current URL changes, and, in case of I believe, that |
@antons-zubkovs Hi again. As we are starting actual implementation of kevinPayments we face the same issue that iOS does not intercept custom schemas like |
@KestasVenslauskas hello, we went with Universal Links for iOS, because it's:
That's why there is an option in the plugin to define different callbacks for android/iOS. You may try to handle it via custom schemes, but we personally use For android to use |
@antons-zubkovs For now we will stick to the same implementation as in the example app until we have our website ready for universal links. We didn't managed to make it work with custom schemes on iOS. Please mention this somewhere in your documentation so there will be no more confusion for other devs. |
I'm having an issue understanding the correct redirectURL behaviour for payments.
DeepLink way
Let's say I have a deepLink in my app "myApp://app/payment-confirm"
On android:
redirectURL gets ignored and just a simple callback is called on the apps flutter code.
OK if we rely on app pinging the backend for a successful payment
On iOS
Kevin SDK hangs on last step where it says "Redirecting to..." after payment is complete. I think it because it's not valid link like "https://....".
NOT OK!!! Even if the payment was complete I can only close the dialog after which I will receive a callback with "payment was cancelled" status
Now the other part with valid link
On android:
redirectURL gets ignored and just a simple callback is called on the app.
OK if we rely on app pinging the backend for a successful payment
On iOS
redirectURL gets called with correct query parameters I also see website flashing for a few miliseconds and then the callback on flutter side is called. -
Perfect
Can we have a consistency here?
I would prefer having our backend as a redirectUrl consumer instead of deep link.
But I want kevin-flutter SDK to be responsable for calling it on Android aswell.
P.S. Ofcourse I can set redirectUrl to "https://www.google.com" then totaly ignore it and only operate from flutter callback. But I don't think that this is the prefered flow because going back to the app causes additional steps to be taken. More steps = more ways for a crashes to happen. And I think developers would feel safer if your SDK would ping redirectURL instead relying on developers to have a crash free process to notify the backend sistems...
EDIT: Added videos below
The text was updated successfully, but these errors were encountered: