티스토리 뷰
System.Net.HttpWebRequest wReq;
System.Net.HttpWebResponse wRes;
Uri uri = new Uri("https://www.allthegate.com/payment/mobilev2/transaction/ansim.jsp?storeID=" + StoreId + "&trackingID=" + tracking_id + "&type=approve");
wReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri);
wReq.Method = "GET";
wReq.ServicePoint.Expect100Continue = false;
using (wRes = (HttpWebResponse)wReq.GetResponse())
{
System.IO.Stream respPostStream = wRes.GetResponseStream();
System.IO.StreamReader readerPost = new System.IO.StreamReader(respPostStream, Encoding.GetEncoding("utf-8"), true);
JsonResult js = Json(readerPost.ReadToEnd(), JsonRequestBehavior.AllowGet);
System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
AllTheGateMobileResultEntity allTheGateMobileResultEntity = serializer.Deserialize<AllTheGateMobileResultEntity>(js.Data.ToString());
allTheGateMobileResultEntity.JsonData = js.Data.ToString();
#region JsonData
string OrderNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
OrderNo = allTheGateMobileResultEntity.data["OrderNo"];
}
string AgentNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
AgentNo = allTheGateMobileResultEntity.data["AgentNo"];
}
// 성공 여부
string Success = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
Success = allTheGateMobileResultEntity.data["Success"];
}
// 승인 번호
string AdmNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
AgentNo = allTheGateMobileResultEntity.data["AdmNo"];
}
// 승인 시각
string AdmTime = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
AdmTime = allTheGateMobileResultEntity.data["AdmTime"];
}
string DealNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
DealNo = allTheGateMobileResultEntity.data["DealNo"];
}
string EscrowSendNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
EscrowSendNo = allTheGateMobileResultEntity.data["EscrowSendNo"];
}
string CardName = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
CardName = allTheGateMobileResultEntity.data["CardName"];
}
string CardName2 = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
CardName2 = allTheGateMobileResultEntity.data["CardName2"];
}
string CardType = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
CardType = allTheGateMobileResultEntity.data["CardType"];
}
string DealWon = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
DealWon = allTheGateMobileResultEntity.data["DealWon"];
}
string DataCode = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
DataCode = allTheGateMobileResultEntity.data["Code"];
}
string SendNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
SendNo = allTheGateMobileResultEntity.data["SendNo"];
}
string CardType2 = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
CardType2 = allTheGateMobileResultEntity.data["CardType2"];
}
string PayType = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
PayType = allTheGateMobileResultEntity.data["PayType"];
}
string CardPartialMm = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
DataCode = allTheGateMobileResultEntity.data["CardPartialMm"];
}
string DeviId = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
DeviId = allTheGateMobileResultEntity.data["DeviId"];
}
string OrdNo = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
OrdNo = allTheGateMobileResultEntity.data["OrdNo"];
}
// 금액
string Amt = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
Amt = allTheGateMobileResultEntity.data["Amt"];
}
string EscrowYn = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
EscrowYn = allTheGateMobileResultEntity.data["EscrowYn"];
}
string NetCancelId = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
NetCancelId = allTheGateMobileResultEntity.data["NetCancelId"];
}
string AuthTy = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
AuthTy = allTheGateMobileResultEntity.data["AuthTy"];
}
string SubTy = string.Empty;
if (allTheGateMobileResultEntity.data != null)
{
SubTy = allTheGateMobileResultEntity.data["SubTy"];
}
#endregion
if ("y".Equals(Success))
{
#region 결제 정보 로그 작성
AllTheGateResultLogEntity allTheGateResultLogEntity = new AllTheGateResultLogEntity();
allTheGateResultLogEntity.Amt = Amt;
allTheGateResultLogEntity.ApprNo = AdmNo;
allTheGateResultLogEntity.ApprTm = AdmTime;
allTheGateResultLogEntity.AuthTy = "card";
allTheGateResultLogEntity.BusiCd = string.Empty; // 전문 코드
allTheGateResultLogEntity.CardCd = string.Empty; // 카드사 코드
allTheGateResultLogEntity.CardNm = CardName;
allTheGateResultLogEntity.mTId = EscrowSendNo;
allTheGateResultLogEntity.ResMsg = allTheGateMobileResultEntity.message;
allTheGateResultLogEntity.SuccYn = Success;
allTheGateResultLogEntity.VirNo = string.Empty;
allTheGateResultLogEntity.VIRTUAL_CENTERCD = string.Empty;
allTheGateResultLogEntity.VIRTUAL_DEPODT = string.Empty;
allTheGateResultLogEntity.OrderNo = OrderNo;
string message = OrderSheetWriteComplete(allTheGateResultLogEntity);
#endregion
return Content(string.Format(this.javascriptRedirect, Url.Action("OrderSheetWriteResult", "ShoppingCart"), "text/html"));
}
else
{
return Content(string.Format(javascriptAlert, "[ErrorCode : M-000] 모바일 결제 오류"), "text/html");
}
}
- Total
- Today
- Yesterday
- MainActor
- java-개발 환경 설정하기
- 스프링 시큐리티(spring security)
- React
- .submit()
- 진수 변환
- error-java
- jstl(java standard tag library)-core
- system.io
- java.sql
- 표현 언어(expression language)
- 제품 등록
- 스프링 프레임워크(spring framework)
- REST API
- java web-mvc
- 메이븐(maven)
- 스프링 프레임워크(spring framewordk)
- docker
- 인텔리제이(intellij)
- 특정 문자를 기준으로 자르기
- In App Purchase
- 스프링 시큐리티(spring security)-http basic 인증
- jsp 오픈 소스
- 람다식(lambda expression)
- System.Diagnostics
- jstl(java standard tag library)
- nl2br
- 문자 자르기
- await
- java 키워드 정리
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |