카드 영수증 출력, 현금영수증 출력 수정
테스트 영수증관련 js url 변경 https://pgweb.tosspayments.com:7085/WEB_SERVER/js/receipt_link.js -> https://pgweb.tosspayments.com:7086/WEB_SERVER/js/receipt_link.js
This commit is contained in:
parent
2d198c36c5
commit
123701b40b
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -464,4 +465,17 @@ public static class Helpers
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string MD5Hash(string data)
|
||||||
|
{
|
||||||
|
var mdHash = MD5.Create();
|
||||||
|
byte[] hash = mdHash.ComputeHash(Encoding.UTF8.GetBytes(data));
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
foreach (byte b in hash)
|
||||||
|
{
|
||||||
|
stringBuilder.AppendFormat("{0:x2}", b);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stringBuilder.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ using System.Web.Mvc;
|
||||||
using NP.Model;
|
using NP.Model;
|
||||||
using NP.Base;
|
using NP.Base;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace NP.FO.Controllers
|
namespace NP.FO.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -245,8 +247,7 @@ namespace NP.FO.Controllers
|
||||||
return Redirect("/My/Paies");
|
return Redirect("/My/Paies");
|
||||||
}
|
}
|
||||||
vm.Pay.mid = (("test".Equals(GetConfig("CST_PLATFORM").Trim())) ? "t" : "") + GetConfig("CST_MID");
|
vm.Pay.mid = (("test".Equals(GetConfig("CST_PLATFORM").Trim())) ? "t" : "") + GetConfig("CST_MID");
|
||||||
|
vm.Pay.authdata = Helpers.MD5Hash(vm.Pay.mid + vm.Pay.pgkey + GetConfig("LGD_MERTKEY"));
|
||||||
String authdata = vm.Pay.mid + vm.Pay.pgkey + GetConfig("LGD_MERTKEY");
|
|
||||||
vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } });
|
vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } });
|
||||||
vm.PayItem = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault();
|
vm.PayItem = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault();
|
||||||
vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno }/*,{ "rstatus", 0}*/, { "withoutrstatus" , "4" } }).Count();
|
vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno }/*,{ "rstatus", 0}*/, { "withoutrstatus" , "4" } }).Count();
|
||||||
|
|
|
||||||
|
|
@ -111,13 +111,13 @@
|
||||||
}
|
}
|
||||||
else if (item.ptype == 1 && item.ispg == 1) /*신용카드*/
|
else if (item.ptype == 1 && item.ispg == 1) /*신용카드*/
|
||||||
{
|
{
|
||||||
<a href="#" onclick="viewtax('@(item.pgkey)')">[인쇄]</a>
|
<a href="#" onclick="viewtax('@(item.pgkey)', '@(Helpers.MD5Hash(ViewBag.mid + item.pgkey + ViewBag.mertkey))')">[인쇄]</a>
|
||||||
}
|
}
|
||||||
else if (item.ptype == 3 && item.ispg == 1) /*가상계좌*/
|
else if (item.ptype == 3 && item.ispg == 1) /*가상계좌*/
|
||||||
{
|
{
|
||||||
if (item.iscashrct == 1) /*현금영수증신청*/
|
if (item.iscashrct == 1) /*현금영수증신청*/
|
||||||
{
|
{
|
||||||
<a href="#" onclick="viewtax('@(item.pgkey)')">[인쇄]</a>
|
<a href="#" onclick="viewtaxcash('@(item.payno)')">[인쇄]</a>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
}
|
}
|
||||||
else if (item.iscancel == 1) /*취소시 일반영수증*/
|
else if (item.iscancel == 1) /*취소시 일반영수증*/
|
||||||
{
|
{
|
||||||
<a href="#" onclick="viewtax('@(item.pgkey)')">[인쇄]</a>
|
<a href="#" onclick="viewtax('@(item.pgkey)', '@(Helpers.MD5Hash(ViewBag.mid + item.pgkey + ViewBag.mertkey))')">[인쇄]</a>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<a href="#" onclick="viewtax('@(item.pgkey)')">[인쇄]</a>
|
<a href="#" onclick="viewtax('@(item.pgkey)', '@(Helpers.MD5Hash(ViewBag.mid + item.pgkey + ViewBag.mertkey))')">[인쇄]</a>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -419,8 +419,14 @@ else
|
||||||
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function viewtax(pgkey) {
|
function viewtax(pgkey, authdata) {
|
||||||
showReceiptByTID('@(ViewBag.mid)', pgkey, '@(ViewBag.mid)+pakey+@(ViewBag.mertkey)');
|
showReceiptByTID('@(ViewBag.mid)', pgkey, authdata);
|
||||||
|
}
|
||||||
|
function viewtaxcash(payno) {
|
||||||
|
var seqno = '001';
|
||||||
|
var LGD_OID = "@(@System.Web.Configuration.WebConfigurationManager.AppSettings["PAYMENT_CLASSIFICATION"])" + String(payno);
|
||||||
|
var service_type = "@(@System.Web.Configuration.WebConfigurationManager.AppSettings["CST_PLATFORM"])";
|
||||||
|
showCashReceipts('@(ViewBag.mid)', LGD_OID, seqno, 'CAS', service_type);
|
||||||
}
|
}
|
||||||
function viewtaxinvoice(payno) {
|
function viewtaxinvoice(payno) {
|
||||||
capp('/fcommon/paytaxinvoiceview', { payno: payno }, 'cbviewtaxinvoice');
|
capp('/fcommon/paytaxinvoiceview', { payno: payno }, 'cbviewtaxinvoice');
|
||||||
|
|
@ -576,7 +582,7 @@ else
|
||||||
@if (ViewBag.isPayTest == "1")
|
@if (ViewBag.isPayTest == "1")
|
||||||
{
|
{
|
||||||
//테스트일 경우
|
//테스트일 경우
|
||||||
<script language="JavaScript" src="http://pgweb.tosspayments.com:7085/WEB_SERVER/js/receipt_link.js"></script>
|
<script language="JavaScript" src="https://pgweb.tosspayments.com:7086/WEB_SERVER/js/receipt_link.js"></script>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -698,7 +698,7 @@
|
||||||
@if (ViewBag.isPayTest == "1")
|
@if (ViewBag.isPayTest == "1")
|
||||||
{
|
{
|
||||||
//테스트일 경우
|
//테스트일 경우
|
||||||
<script language="JavaScript" src="http://pgweb.tosspayments.com:7085/WEB_SERVER/js/receipt_link.js"></script>
|
<script language="JavaScript" src="https://pgweb.tosspayments.com:7086/WEB_SERVER/js/receipt_link.js"></script>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue