Reputation: 1
I am creating a credit card payment module for prestashop 1.7
I don't know how to send my post values on an external url and receive its response if the transaction is success or failed.
Upvotes: 0
Views: 2003
Reputation: 1311
You have to make things like this :
Register interesting hooks (http://build.prestashop.com/news/module-development-changes-in-17/) and make a function like this in your module :
public function hookHookName($params) {
// Do things here
}
Play with this Hook specially (first part is hook name and second are $params) :
Hook::exec('actionValidateOrder', array(
'cart' => $this->context->cart,
'order' => $order,
'customer' => $this->context->customer,
'currency' => $this->context->currency,
'orderStatus' => $order_status
));
Upvotes: 3