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

Allow refund() to raise RedirectNeeded? #307

Open
Natureshadow opened this issue Mar 22, 2022 · 3 comments
Open

Allow refund() to raise RedirectNeeded? #307

Natureshadow opened this issue Mar 22, 2022 · 3 comments
Assignees

Comments

@Natureshadow
Copy link
Contributor

Natureshadow commented Mar 22, 2022

I am writing a payment provider where the user needs to interact to do a refund.

Could we allow providers to raise RedirectNeeded in their refund method, and make BasePayment pass this exception on to the calling view?

Actually, no code changes are needed to d othat I could just let my payment provider raise RedirectNeeded, and tell users of my provider that their views need to expect that.

So this issue is mainly to discuss whether there is something I should consider (instead, or in addition).

@WhyNotHugo
Copy link
Member

Who is redirected in this case, the client or the merchant?

@Natureshadow
Copy link
Contributor Author

Natureshadow commented Mar 23, 2022 via email

@WhyNotHugo
Copy link
Member

I can't imagine any scenario where the client initiates the flow on the merchant's website, so this seems reasonable.

I don't know if the merchant actively starting a refund is the expected workflow

It is.

This is a slight API change, but not backwards incompatible, since the change only applies to a new feature, so no objections on my part; BasePayment.refund may raise RedirectNeeded

@Natureshadow Natureshadow self-assigned this Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants