cscart でカスタム ペイメント ゲートウェイ アドオンを開発するためのテストを行っています。
開発は非常にシンプルで直感的でしたが、1 週間夢中になることがあります。トランザクションが完了した後、ユーザーは index.php?dispatch=checkout.complete&order_id=20036 にリダイレクトされますが、他の支払いのように緑色のポップアップ通知が表示されません....
コードは通常のように見えます..他のすべての支払いスクリプトを見て、すべてが通常です
/core/fn.cart.php fn_order_placement_routines の最終関数は、通知データ fn_set_notification('N',.....
これがコードです
if (!defined('AREA') ) { die('Access denied'); }
if (defined('PAYMENT_NOTIFICATION')) {
if ($mode == 'notify' && !empty($_REQUEST['order_id'])) {
if (fn_check_payment_script('gateway.php', $_REQUEST['order_id'], $processor_data)) {
$order_id = $_REQUEST['order_id'];
$order_info = fn_get_order_info($order_id);
$pp_response = array(
'reason_text' => '',
'order_status' => 'F'
);
if (empty($processor_data)) {
$processor_data = fn_get_processor_data($order_info['payment_id']);
}
$returnvalue = $_POST['PROCESSING_RESULT'];
if ($returnvalue && strstr($returnvalue,"ACK")) {
$pp_response['order_status'] = "E";
$pp_response['reason_text'] .= "Status: OK";
}else {
$pp_response['order_status'] = "N";
$pp_response["reason_text"] = fn_get_lang_var('text_transaction_cancelled');
}
if (isSet($_REQUEST['IDENTIFICATION_UNIQUEID'])) {
$pp_response['transaction_id'] = $_REQUEST['IDENTIFICATION_UNIQUEID'];
}
[b] fn_finish_payment($_REQUEST['order_id'], $pp_response, false);
fn_order_placement_routines($_REQUEST['order_id'], true);[/b]
}
}
} else {
if ($mode == 'place_order') {
//call the gateway, assign response url etc
// $current_location."/".$index_script."?dispatch=payment_notification.notify&payment=gateway.php&order_id=".$order_id;
}
}
fn_order_place_routine は、デフォルトで、注文のステータスに基づいて緑または赤のポップアップを表示する必要があります..何も..表示されません
前もって感謝します