- Posts: 10
- Thank you received: 0
After payment is confirmed
10 years 8 months ago #228448
by Tsunoo
After payment is confirmed was created by Tsunoo
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5.29
Hello,
I wish to perform some actions using my own PHP script after the payment is confirmed. I need to get all information about the order : customer (name, address, mail...), products, order id. Where can I call my PHP script ? How do I get the order's information ? Is it in the processPaymentNotification function of hikashoppayment.php ?
Thanks a lot !
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5.29
Hello,
I wish to perform some actions using my own PHP script after the payment is confirmed. I need to get all information about the order : customer (name, address, mail...), products, order id. Where can I call my PHP script ? How do I get the order's information ? Is it in the processPaymentNotification function of hikashoppayment.php ?
Thanks a lot !
Please Log in or Create an account to join the conversation.
10 years 8 months ago #228454
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic After payment is confirmed
Hi,
You must use the "onAfterOrderUpdate" trigger and check the "order status" value.
You can also compare it with the $order->old->order_status if you want to check that the order status has changed.
www.hikashop.com/support/support/documen...l#onAfterOrderUpdate
Regards,
You must use the "onAfterOrderUpdate" trigger and check the "order status" value.
You can also compare it with the $order->old->order_status if you want to check that the order status has changed.
www.hikashop.com/support/support/documen...l#onAfterOrderUpdate
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 8 months ago #228516
by Tsunoo
Replied by Tsunoo on topic After payment is confirmed
Thank you for your answer, but I need more information : where in the atos.php script should I insert a line "include 'myscript.php';" ? I am NOT trying to write a new plugin, so I do NOT use triggers. Or should I ?
Thanks a lot !
Thanks a lot !
Please Log in or Create an account to join the conversation.
10 years 8 months ago #228576
by nicolas
Replied by nicolas on topic After payment is confirmed
Hi,
It would be better to write a separate plugin. That way, you wouldn't loose all your changes each time you update HikaShop.
But you can also directly write your PHP code in the onPaymentNotification function of the plugins/hikashoppayment/atos/atos.php, just after the line:
$this->modifyOrder($order_id, $order_status, $history, $email);
But again I don't recommend it.
To load all the data of an order, it's explained here:
www.hikashop.com/support/support/documen...umentation.html#code
It would be better to write a separate plugin. That way, you wouldn't loose all your changes each time you update HikaShop.
But you can also directly write your PHP code in the onPaymentNotification function of the plugins/hikashoppayment/atos/atos.php, just after the line:
$this->modifyOrder($order_id, $order_status, $history, $email);
But again I don't recommend it.
To load all the data of an order, it's explained here:
www.hikashop.com/support/support/documen...umentation.html#code
The following user(s) said Thank You: Tsunoo
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds