Open Arsenalist opened 1 year ago
Submitted this: https://github.com/medusajs/medusa/pull/5015
@olivermrbl mentionning you here so that you have the full context of the origin of the pr
For the record, I believe the correct behaviour is for the gift card to cover everything (sub total, tax, shipping). So Stripe should not be getting charged at all if gift card is worth like $40
To reproduce:
Discord Link: https://discord.com/channels/876835651130097704/1150475042669465692
Medusa version (including plugins): 1..14 Node.js version: 16
Cart screen
Order screen
Stripe is getting charged
Database: Postgres 12 Operating system: Linux
This piece of code in cart.ts decorateTotals() does not check if region has gift card taxable when calculating gift cardable amount:
While this one in order.ts createFromCart() does:
I also don't think this is correct
decorateTotals()
is correct since gift card applies to whole amount in the cart, not just subtotal-discount_total. I mentioned that in Discord as well.