Skip to main content
edited title
Link
liquidcms
  • 1.3k
  • 1
  • 12
  • 32

What Commcerce event is fiedfired when a payment is made?

Source Link
liquidcms
  • 1.3k
  • 1
  • 12
  • 32

What Commcerce event is fied when a payment is made?

There seem to be a few bugs in Commerce (8.x-2.17) related to admins making payments against a Cart. I am trying to fix some of these in my own custom module (rather than wait for people to agree these are bugs). Some, but not all, include:

  1. payments made are not reflected anywhere.
  2. when paid in full the order is not "completed" (not sure if this is correct term, in D7 i think the term was "checked out").
  3. payments can be made beyond the full amount of the order (or the balance)

I think it should be possible to address some of these by subscribing to a Payment event and going in and cleaning things up (not sure where or how to clean up; but baby steps).

I have seen a post listing: commerce_order.order.paid as an event that is fired when the order is paid in full; but this is not fired (as far as i can tell) when a payment is made which completes the order (neither from admin paying or standard checkout flow).

I have also seen commerce_payment.commerce_payment.insert, which is also not fired during payment or checkout flow. To be honest i don't understand the naming related to payments: add payment, insert, update? Why is this not "make" a payment as this is more grammatically correct.

Does anyone know what event is triggered when a payment is made (or ideally when a payment covers the balance owing on an order)?