63 lines
2.5 KiB
Plaintext
63 lines
2.5 KiB
Plaintext
@model NP.Model.VMPay
|
|
@if (ViewBag.isPayTest == "1")
|
|
{
|
|
//테스트일 경우
|
|
<script language="javascript" src="https://pretest.tosspayments.com:9443/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
|
}
|
|
else
|
|
{
|
|
//서비스일 경우
|
|
<script language="javascript" src="https://xpayvvip.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
|
}
|
|
<br />
|
|
<div style="border: 1px solid #ddd; color: red; font-weight: bold; font-size: 13px; text-align: center; padding: 15px;">결제 진행중입니다. 잠시만 기다려주세요.</div>
|
|
<br />
|
|
|
|
<form method="post" id="LGD_PAYINFO" action="">
|
|
@foreach (System.Collections.DictionaryEntry data in Model.payParams)
|
|
{
|
|
<input type="hidden" name="@data.Key" id="@data.Key" value="@data.Value" /><br />
|
|
@*@(data.Key + "-" + data.Value)*@
|
|
}
|
|
<input @*type="hidden"*@ name="CM.cmino" id="becmino" value="@Model.CM.cmino" />
|
|
<input @*type="hidden"*@ name="CM.cmisno" id="becmisno" value="@Model.CM.cmisno" />
|
|
</form>
|
|
|
|
<script>
|
|
$(function () {
|
|
launchCrossPlatform();
|
|
});
|
|
/* 수정불가 */
|
|
function launchCrossPlatform() {
|
|
if (ismobile()) {
|
|
lgdwin = open_paymentwindow(document.getElementById('LGD_PAYINFO'), val("CST_PLATFORM"), val("CST_WINDOW_TYPE"));
|
|
} else {
|
|
lgdwin = openXpay(document.getElementById('LGD_PAYINFO'), val("CST_PLATFORM"), val("LGD_WINDOW_TYPE"), null, "", "");
|
|
}
|
|
}
|
|
|
|
/* FORM 명만 수정 가능 */
|
|
function getFormObject() {
|
|
return document.getElementById("LGD_PAYINFO");
|
|
}
|
|
|
|
/* 인증결과 처리 */
|
|
function payment_return() {
|
|
var fDoc;
|
|
fDoc = lgdwin.contentWindow || lgdwin.contentDocument;
|
|
document.getElementById("LGD_PAYINFO").target = "_self";
|
|
if (fDoc.document.getElementById('LGD_RESPCODE').value == "0000") {
|
|
document.getElementById("LGD_PAYKEY").value = fDoc.document.getElementById('LGD_PAYKEY').value;
|
|
document.getElementById("LGD_PAYINFO").action = "/Course/OnPayReturn";
|
|
document.getElementById("LGD_PAYINFO").submit();
|
|
}
|
|
else {
|
|
document.getElementById("rsMsg").value = fDoc.document.getElementById('rsMsg').value;
|
|
document.getElementById("LGD_PAYINFO").action = "/Course/ApplyPay";
|
|
closeIframe();
|
|
document.getElementById("LGD_PAYINFO").submit();
|
|
}
|
|
}
|
|
|
|
</script>
|