Hello,
I’m converting a payment method from cscart 3.x to 4.x. Its a offline payment method that generates a code to pay at the ATM machines or home banking.
I got it (almost) all working but after the client clicks the final checkout button the order doesnt shows in the backoffice as “Open”.
There is something missing in the fn_order_placement_routines or the fn_finish_payment i really dont know what it is. i’ve searched other payment gateways and the forum with no luck.
Any help or hint would be much apreciated. I feel like i’m so close.
<br />
use Tygh\Http;<br />
use Tygh\Registry;<br />
if (!defined('BOOTSTRAP')) { die('Access denied'); }<br />
if (defined('PAYMENT_NOTIFICATION')) {<br />
<br />
$order_id = $_REQUEST['order_id']; <br />
$pp_response = array(); <br />
fn_order_placement_routines($order_id, true, AREA);<br />
fn_finish_payment($order_id,$pp_response,true); <br />
<br />
}else{ <br />
<br />
$entidade=$processor_data['processor_params']['entidade'];<br />
$subentidade=$processor_data['processor_params']['subentidade'];<br />
$order_total=$order_info['total'];<br />
$current_location = Registry::get('config.current_location'); <br />
$link_script = $current_location . "/app/payments/multibanco/ifmb.php";<br />
$url_return = fn_url("payment_notification.success?payment=multibanco&order_id=$order_id", AREA, 'current'); <br />
<br />
echo <<<EOT<br />
<html><br />
<body onload="document.process.submit();"><br />
<body><br />
<form method="POST" action="{$link_script}" name="process"><br />
<input type="hidden" name="ENTIDADE" value="{$entidade}" /><br />
<input type="hidden" name="SUBENTIDADE" value="{$subentidade}" /><br />
<input type="hidden" name="ID" value="{$order_id}" /><br />
<input type="hidden" name="VALOR" value="{$order_total}" /><br />
<input type="hidden" name="RETURN" value="{$url_return}" /><br />
</form><br />
<br />
</body><br />
</html><br />
<br />
EOT;<br />
<br />
}