diff --git a/route/ordercomplete.pgkcp.php b/route/ordercomplete.pgkcp.php index 9e18896..7a73033 100644 --- a/route/ordercomplete.pgkcp.php +++ b/route/ordercomplete.pgkcp.php @@ -19,7 +19,18 @@ set_session_token(); $redirect_url = get_requested_value("redirect_url"); $ordr_idxx = get_requested_value("ordr_idxx"); $res_cd = get_requested_value("res_cd"); -$action = in_array($res_cd, array("0000", "9999")) ? "complete" : "cancel"; +$pay_method_alias = get_requested_value("use_pay_method_alias"); + +// set action +// 0000: completed payment (완료된 결제) +// A001: free plan (무료) +// A002: hand-writing payment (수기결제, 무통장입금 등) +$action = "cancel"; +if(in_array($res_cd, array("0000", "A001")) { + $action = "complete"; +} elseif(in_array($res_cd, array("A002")) { + $action = "hold"; +} // check ordr_idxx if(empty($ordr_idxx)) { @@ -36,7 +47,7 @@ $fw = write_storage_file($fd, array( // check write-protected if(!$fw) { - set_error("your storage is write-protected!"); + set_error("maybe, your storage is write-protected."); show_errors(); } @@ -45,7 +56,9 @@ redirect_uri(get_final_link($redirect_url, array( "_token" => get_session_token(), "_route" => get_requested_value("route"), "_action" => $action, - "_ordr_idxx" => $ordr_idxx + "_ordr_idxx" => $ordr_idxx, + "_res_cd" => $res_cd, + "_pay_method_alias" => $pay_method_alias ), false), array( "check_origin" => true ));