Hello, just checking back in to see if anyone worked on this?
I have a working development version - however since the card processing results come in via a separate endpoint I had to work around the usual Zen Cart payment flow process. The accepted or declined transaction result comes in on a backend endpoint which needs to update the customer's transaction. This versus the usual Zen Cart flow of having the customer's payment go through a more rigid step-by-step process where you can use session variables and redirect if there's an issue.
I need to process and complete the Zen Cart order after results come into my endpoint from payeezy. This would be instead of the usual Zen Cart order processing flow in includes/modules/pages/checkout_process.php which uses methods like
Code:
$payment_class->after_process()
and
Code:
$payment_class->after_order_create()
for example.
I looked, can't find - docs in regards to payment modules. I have reviewed quite a few other payment modules to learn what's up while developing this solution but since there's no official docs for payment modules (I'm aware of) I can't feel 100% confident. (Maybe even though everything is fine). Bonus points if you know of a payment module that does this that I haven't reviewed. For example, I think the core ipn_main_handler.php has a similar process.
Question for the forum, which I may start a new thread with:
Are there payment module developer docs? I've just been reviewing and adapting other payment modules to get to my solution.
Also ,can anyone bullet point me what steps they know are required in the checkout process? I have been using includes/modules/pages/checkout_process.php as the guide as to what happens post-checkout for processing an order. This functionality has largely moved to my payment module class's after_process() function.
For example:
- Upon successful transaction, new classes are created for the processing; order_total, order, payment, and shipping classes
- Need to run $payment_class->after_process() to update the order status history (and in my case save the results from Payeezy)
- Need to run $order->create_add_products()
- Next run $order->send_order_email($insert_id, 2);
- Empty out the customer's cart if the transaction was successful
- Save the "order_summary" so it can be used on the checkout success page (Zen Cart saves this in session variables but that isn't an option here since results are processed outside of the customer's session)
Maybe it's simpler than I thought or maybe I'm missing something obvious. Any reply to this post is greatly appreciated. Sometimes it helps to just lay it all out anyway.
Bookmarks