付款完成后如何触发 zen cart 中的事件?
我编写了一些自定义内容,以便在订单完成后向客户发送包含一些各种数据的电子邮件。问题是,我似乎无法找到在哪里或何时可以验证付款是否已成功处理。
我尝试使用以下方式触发该事件:
payment::after_process()
但这似乎是在处理订单时触发的,而不是付款时触发的。我需要确保客户在触发此事件之前已付款。
我可以在哪里执行此操作?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不直接自定义includes/classes/order.php并修改send_order_email()。您拥有订单 ID,以便可以验证状态是否为“正在处理”(或“待处理”以外的状态),以便您知道付款已被接受。
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.
DrByte 位于 zen-cart.com 回答了我的问题。
DrByte over at zen-cart.com answered my question.