richie icon indicating copy to clipboard operation
richie copied to clipboard

Joanie - Manage Free Product

Open jbpenrath opened this issue 1 year ago • 1 comments

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.

jbpenrath avatar Nov 30 '23 13:11 jbpenrath

I think the backend order's submit endpoint should return

payment_infos: { is_paid: true }

And then everyting would work fine in our frontend.

rlecellier avatar Dec 19 '23 13:12 rlecellier