Stephen Fuhry
Stephen Fuhry

Reputation: 13019

How can I trigger an event in zen cart when a payment is complete?

I wrote some custom stuff so I can send an email with some various data to a customer when their order has completed. The problem is, I can't seem to find where or when I can verify that the payment has been processed successfully.

I tried triggering the event using:

payment::after_process()

but that appears to fire when the order has processed, not the payment. I need to be sure the customer has paid before triggering this event.

Where can I do this?

Upvotes: 0

Views: 259

Answers (2)

Stephen Fuhry
Stephen Fuhry

Reputation: 13019

DrByte over at zen-cart.com answered my question.

Upvotes: 0

Scott C Wilson
Scott C Wilson

Reputation: 20026

Why not just customize includes/classes/order.php and modify send_order_email(). You have the order id so you can verify that the status is Processing (or something other than Pending) so you know the payment has been accepted.

Upvotes: 1

Related Questions