medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.45k stars 2.4k forks source link

Capture method does not automatically mark payment as captured. #6438

Open AxeemHaider opened 6 months ago

AxeemHaider commented 6 months ago

Bug report

Payment Plugin support capture a boolean value that indicates whether payment should be captured manually or automatically. This option is working perfectly in plugin (e.g PayPal, Stripe etc) but problem is new order is always created with payment status awaiting it should not be awaiting state when it is already captured this problem is due to hard coded status in newly created order as you see below. https://github.com/medusajs/medusa/blob/1d91b7429beebd6f09d5027f7f7e1fe74ce3a8ff/packages/medusa/src/services/order.ts#L685-L688

System information

Medusa version (including plugins): v1.20.2 Node.js version: v21.6.1 Database: postgres Operating system: macOS Browser (if relevant):

Steps to reproduce the behavior

  1. install medusa2.
  2. set capture true in medusa-config for any payment provider
  3. place order and you will see order is always created with awaiting payment status
lekterable commented 4 months ago

same problem here, would be nice to have it fixed 👍

AxeemHaider commented 4 months ago

It fixed in this PR #6439 but still not merged