Skip to content
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

HELP NEEDED: Missing return_url parameter for IDEAL payments #609

Closed
ayushin opened this issue Mar 2, 2022 · 4 comments
Closed

HELP NEEDED: Missing return_url parameter for IDEAL payments #609

ayushin opened this issue Mar 2, 2022 · 4 comments
Labels
needs triage Needs triage

Comments

@ayushin
Copy link
Contributor

ayushin commented Mar 2, 2022

This is not a duplicate of #225

While you can set urlScheme this does not work with universal links - we really do need to be able to pass return_url to IDEAL payment confirmation in order to be able to handle payments across platforms.

Stripe example:

    } = await stripe.confirmIdealPayment(clientSecret, {
      payment_method: {
        ideal: elements.getElement(IdealBankElement),
        billing_details: {
          name: 'Jenny Rosen',
        },
      },
      return_url: `${window.location.origin}/ideal?return=true`,
@ayushin ayushin added the needs triage Needs triage label Mar 2, 2022
@ayushin
Copy link
Contributor Author

ayushin commented Mar 2, 2022

Also window.location.href should not be used as return_url blindly in stripe_web.dart if return_url is specified

@ayushin
Copy link
Contributor Author

ayushin commented Mar 2, 2022

I could use some help to implement this workaround on Android:

#610

@ayushin ayushin changed the title Missing return_url parameter for IDEAL payments HELP NEEDED: Missing return_url parameter for IDEAL payments Mar 2, 2022
@remonh87
Copy link
Member

fixed as part of 2.4.0.

@davidmigloz
Copy link
Contributor

davidmigloz commented Nov 17, 2022

I see that you can specify a returnUrl if you are using the payment sheet:

String? get returnURL => throw _privateConstructorUsedError;

But if you are using the sdk's webview you don't have any option to specify a returnUrl.
So, in iOS we are forced to use custom URL scheme instead of being able to use universal links.

class func mapToReturnURL(urlScheme: String) -> String {
return urlScheme + "://safepay"
}

Also for web, returnUrl is still hardcoded to window.location.href:

return_url: window.location.href,

Would it be possible to expose returnUrl in confirmPayment() method so that we can use universal links in iOS and have more flexibility in web?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants