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

Joanie - Manage Free Product #2148

Open
jbpenrath opened this issue Nov 30, 2023 · 1 comment
Open

Joanie - Manage Free Product #2148

jbpenrath opened this issue Nov 30, 2023 · 1 comment

Comments

@jbpenrath
Copy link
Member

jbpenrath commented Nov 30, 2023

Problematic behavior

Joanie allows to create free product. In this case, when order is submitted, api returns a payment_info sets to null.

Currently, Richie frontend codebase does not manage this case, so the SaleTunnel crashed.

Expected behavior

When a product is free, the SaleTunnel should submit the order then instead of instantiate the PaymentInterface, it should poll the related order to ensure its state has been transitioned from draft or pending to validated.

So the payment step should be skip.

@rlecellier
Copy link
Collaborator

I think the backend order's submit endpoint should return

payment_infos: { is_paid: true }

And then everyting would work fine in our frontend.

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