1

When you implement your own payment method, you can set the order action to authorize, or authorize and capture (sale). I’m quite clear on how they fit into the order management scheme of things. I.e. when you choose authorize, creating an invoice will capture the funds. When you choose sale, the invoice will be created automatically, and an admin will only have to create a shipment to make the order complete.

However, I just found out that there’s a third payment action, called “order” (in \Magento\Sales\Model\Order\Payment::processAction). What does it do?

  • I don't think it is a duplicate because it doesn't have anything to do with Paypal. I guess the correct answer is that Magento needed a payment action that's neither authorize, nor sale. It's not documented either: devdocs.magento.com/guides/v2.2/payments-integrations/… (possible values for payment_action is only authorize and authorize_capture). If you look at the code, you can see that the order action doesn't have an opinion on what happens, and it seems that you need to implement/kick off any auths yourself. (Probably for Paypal). – Erfan Jan 18 '18 at 10:48
  • Another piece of info: "order does not invoice, so it's authorize-like, but beyond that I believe it depends on the payment method (there's no standard for what it does or should do). i.e. you can use it for a store-the-card-but-dont-authorize method". – Erfan Jan 19 '18 at 2:00
  • So... if I look at the answer, is order only used for PayPal? I don't think so because if you look at \Magento\Sales\Model\Order\Payment::canCapture() it seems that you are only able to capture online of there already exists a transaction of type order. – Giel Berkers Apr 17 '19 at 15:24