richie
richie copied to clipboard
Joanie - Manage Free Product
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.
I think the backend order's submit endpoint should return
payment_infos: { is_paid: true }
And then everyting would work fine in our frontend.