Suggestion: Notify third party service if defined
-
Hi ??
In the VirtueMart module for QuickPay there is a field where we can define a 3. party url.
If defined the callback from QuickPay runs this 3. party call after it has ended what it needs to do (updating the webshop order and so one).
We use this feature to call our accounting integration (E-conomic in our case) meaning that the shoppers get their order confirmation (or invoice if case of virtual products) in a few seconds after they have paid.
In other words the last part of the callback feature ends in call an accounting integration so it can create an order or even invoice it and send it to the shopper.
This creates a live and quick connection to the accounting system and we can send orders and invoices from E-conomic (and any other online accounting system) to the shoppers.
It looks so much more professional – and the bookkeeper does not need to do anything.
Can the code belov be converted into the WooCommerce module for QuickPay too?
And where can I place it. I have tried looking in the files but have not yet found the right place.
And can it perhaps become a feature in the official version (like is it for VirtueMart)?
Here is the code:
// Now notify any third party services if ($method->quickpay_thirdpartyapi != '' && $request->accepted && $operation->qp_status_code == "20000") { $apiurl = $method->quickpay_thirdpartyapi; $lang = JFactory::getLanguage(); $lang_code_explode = explode("-", $lang->getTag()); $lang_code = strtolower($lang_code_explode[1]); $apiurl = str_replace('[LANGUAGE]', $lang_code, $apiurl); $apiurl = str_replace('[ORDER_ID]', $virtuemart_order_id, $apiurl); $apiurl = str_replace('[TRANSACTION_ID]', $request->id, $apiurl); $apiurl = str_replace('[PAYMENT_METHOD_ID]', $payment->virtuemart_paymentmethod_id, $apiurl); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiurl); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Important for HTTPS curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); }
- The topic ‘Suggestion: Notify third party service if defined’ is closed to new replies.