public ApproveRes approve([System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] ApproveReq req)
        {
            object[] results = this.Invoke("approve", new object[] {
                req
            });

            return((ApproveRes)(results[0]));
        }
 /// <remarks/>
 public void approveAsync(ApproveReq req, object userState)
 {
     if ((this.approveOperationCompleted == null))
     {
         this.approveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnapproveOperationCompleted);
     }
     this.InvokeAsync("approve", new object[] {
         req
     }, this.approveOperationCompleted, userState);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            string site_cd    = Request["site_cd"];       // 사이트코드
            string ordr_idxx  = Request["ordr_idxx"];     // 주문번호
            string good_mny   = Request["good_mny"];      // 결제금액
            string pay_method = Request["pay_method"];    // 결제수단
            string escw_used  = Request["escw_used"];     // 에스크로
            string good_name  = Request["good_name"];     // 상품평
            string Ret_URL    = Request["Ret_URL"];       // 리턴URL

            KCPPaymentService kcpPaymentService = new KCPPaymentService();
            ApproveRes        approveRes        = null;
            BaseResponseType  baseResponseType  = null;

            /**
             * AccessCredentialType 은 현재버전에서는 지원하지 않습니다.
             */
            AccessCredentialType accessCredentialType = new AccessCredentialType();

            accessCredentialType.accessLicense = "";
            accessCredentialType.signature     = "";
            accessCredentialType.timestamp     = "";

            /**
             * BaseRequestType 은 모든요청전문에 공통으로 처리입력되는 데이타 입니다.
             */
            BaseRequestType baseRequestType = new BaseRequestType();

            baseRequestType.detailLevel = "Full";            // Full
            baseRequestType.requestApp  = "APP";             // 웹:WEB, 앱:APP
            baseRequestType.requestID   = "1234567890";      // 메세지식별 아이디
            baseRequestType.userAgent   = Request.UserAgent; // 클라이언트의 UserAgent
            baseRequestType.version     = "0.1";             // 버전:0.1

            /**
             * ApproveReq 은 결제전인증에 필요한 데이타 입니다.
             */
            ApproveReq approveReq = new ApproveReq();

            approveReq.accessCredentialType = accessCredentialType;
            approveReq.baseRequestType      = baseRequestType;
            approveReq.siteCode             = site_cd;
            approveReq.orderID       = ordr_idxx;
            approveReq.paymentAmount = good_mny;
            approveReq.paymentMethod = pay_method;
            approveReq.returnUrl     = Ret_URL;
            approveReq.productName   = good_name;

            bool isEscrow = false;

            if (escw_used == "Y")
            {
                isEscrow = true;
            }


            approveReq.escrow          = isEscrow;
            approveReq.escrowSpecified = isEscrow;

            Console.WriteLine("escw_used:" + escw_used);
            Console.WriteLine("approveReq.escrow:" + approveReq.escrow);

            // 인증요청
            approveRes       = kcpPaymentService.approve(approveReq);
            baseResponseType = approveRes.baseResponseType;

            string result = baseResponseType.error.code + "," + approveRes.approvalKey + "," + approveRes.payUrl + "," + baseResponseType.error.message;

            Response.ContentType = "text/html";
            Response.Write(result);
            Response.End();
        }
 /// <remarks/>
 public void approveAsync(ApproveReq req)
 {
     this.approveAsync(req, null);
 }
 /// <remarks/>
 public System.IAsyncResult Beginapprove(ApproveReq req, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("approve", new object[] {
         req
     }, callback, asyncState));
 }