Update ordercomplete.pgkcp.php
This commit is contained in:
parent
d746bf15c6
commit
b8af7b66e7
|
@ -26,9 +26,9 @@ $pay_method_alias = get_requested_value("pay_method_alias");
|
||||||
// A001: free plan (무료)
|
// A001: free plan (무료)
|
||||||
// A002: hand-writing payment (수기결제, 무통장입금 등)
|
// A002: hand-writing payment (수기결제, 무통장입금 등)
|
||||||
$action = "cancel";
|
$action = "cancel";
|
||||||
if(in_array($res_cd, array("0000", "A001")) {
|
if(in_array($res_cd, array("0000", "A001"))) {
|
||||||
$action = "complete";
|
$action = "complete";
|
||||||
} elseif(in_array($res_cd, array("A002")) {
|
} elseif(in_array($res_cd, array("A002"))) {
|
||||||
$action = "hold";
|
$action = "hold";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,14 +51,43 @@ if(!$fw) {
|
||||||
show_errors();
|
show_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// response
|
||||||
|
$_token = get_session_token();
|
||||||
|
if(empty($redirect_url)) {
|
||||||
|
$jscontent = <<<EOF
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript">//<!--<![CDATA[
|
||||||
|
if(window.opener && !window.opener.closed) {
|
||||||
|
window.opener.payman_callback({
|
||||||
|
"token": "$_token",
|
||||||
|
"ordr_idxx": "$ordr_idxx",
|
||||||
|
"res_cd": "$res_cd",
|
||||||
|
"pay_method_alias": "$pay_method_alias"
|
||||||
|
});
|
||||||
|
window.close();
|
||||||
|
self.close();
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
//]]>--></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF;
|
||||||
|
echo $jscontent;
|
||||||
|
} else {
|
||||||
// redirect
|
// redirect
|
||||||
redirect_uri(get_final_link($redirect_url, array(
|
redirect_uri(get_final_link($redirect_url, array(
|
||||||
"_token" => get_session_token(),
|
"_token" => $_token,
|
||||||
"_route" => get_requested_value("route"),
|
"_route" => get_requested_value("route"),
|
||||||
"_action" => $action,
|
"_action" => $action,
|
||||||
"_ordr_idxx" => $ordr_idxx,
|
"_ordr_idxx" => $ordr_idxx,
|
||||||
"_res_cd" => $res_cd,
|
"_res_cd" => $res_cd,
|
||||||
"_pay_method_alias" => $pay_method_alias
|
"_pay_method_alias" => $pay_method_alias
|
||||||
), false), array(
|
), false), array(
|
||||||
"check_origin" => true
|
"check_origin" => true
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user