private PaymentOrderMultiParamT GetPaymentGEPOrderMultiParam() { PaymentProcessQuery paymentProcessQuery = new PaymentProcessQuery(); PaymentRequestInfoT paymentParam = GetpaymentParam(); PaymentOrderMultiParamT orderParam = PaymentProcessHelper.ConvertRequestInfo2OrderParam(paymentParam); return orderParam; }
public void GetAutoCashReceiptInfo() { PaymentProcessQueryBiz biz = new PaymentProcessQueryBiz(); PaymentProcessQuery paymentProcessQuery = new PaymentProcessQuery(); PaymentRequestInfoT paymentParam = GetpaymentParam(); PaymentOrderMultiParamT orderParam = PaymentProcessHelper.ConvertRequestInfo2OrderParam(paymentParam); PaymentAutoCashReceiptInfoT autoCashReceiptInfo = biz.GetAutoCashReceiptInfo(orderParam); Trace.DumpBusinessEntity(paymentParam); Trace.DumpBusinessEntity(autoCashReceiptInfo); }
/// <summary> /// GEP 주문 /// </summary> /// <param name="paymentRequestInfo"></param> /// <returns></returns> public PaymentResultT Payment(PaymentRequestInfoT paymentRequestInfo) { #region 내부 변수 PaymentRequestInfoT requestInfo = paymentRequestInfo; PaymentRequestInfoT orgRequestInfo = paymentRequestInfo; PaymentBiz paymentBiz = new PaymentBiz(); PaymentResultT paymentResult = new PaymentResultT(); paymentResult.Result = new GEPBaseResultT(); //string oType = "N"; int packNo = 0; #endregion #region 주문 파라메터 체크 try { ValidateRequestInfo(paymentRequestInfo); } catch { throw new PaymentProcessBizException(-1101, "주문 정보가 올바르지 않습니다. 확인후 다시 주문해 주시기 바랍니다."); } #endregion #region 파라메터 초기화 try { requestInfo = InitPaymentRequestInfo(requestInfo); } catch (PaymentProcessBizException pEx) { new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT"); throw pEx; } catch (Exception ex) { throw new PaymentProcessBizException(-1170, ex.Message); //throw new PaymentProcessBizException(-1170, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다."); } #endregion #region Policy 입력 try { PaymentOrderItemT paymentOrderItem = new PaymentPolicyInfo().SetPaymentOrderItem(orgRequestInfo, requestInfo); requestInfo.OrderNo = paymentOrderItem.OrderNo; packNo = paymentOrderItem.PolicyInfoList[0].PackNo; } catch (PaymentProcessBizException pEx) { new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT"); throw pEx; } catch { throw new PaymentProcessBizException(-1171, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다"); } #endregion #region 주문!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PaymentGEPPaymentProcessResultT paymentProcessResult = new PaymentGEPPaymentProcessResultT(); try { PaymentOrderMultiParamT orderParam = PaymentProcessHelper.ConvertRequestInfo2OrderParam(requestInfo); // 추가 내용 orderParam.PackNo = packNo; paymentProcessResult = new PaymentProcessQuery().GEPOrderDomesticMulti(orderParam); paymentResult.OrderParam = orderParam; // convert : 여기까지가 line 2194 if (paymentProcessResult.Result.RetCode != 0) { paymentResult.Result = paymentProcessResult.Result; return paymentResult; } // fix : 아래는 임시임 paymentResult.OrderResultList.AddRange(paymentProcessResult.OrderResultList); // 임시 끝 } catch (PaymentProcessBizException pEx) { new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT"); throw pEx; } catch { throw new PaymentProcessBizException(-1172, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다"); } #endregion #region 주문 후 뒷처리 // fix : [skip] 프로모션 상품 처리 // convert : 여기까지가 line 2273 try { PaymentProcessFollowUp(paymentProcessResult, requestInfo); } catch (PaymentProcessBizException pEx) { new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT"); throw pEx; } catch (Exception ex) { throw new PaymentProcessBizException(-1173, ex.Message); //throw new PaymentProcessBizException(-1173, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다"); } #endregion ////////////////////////////// paymentResult.PaymentRequestInfo = requestInfo; return paymentResult; }