示例#1
0
        public PaymentResponse InvokePaymentRequest(PaymentRequest PaymentRequest)
        {
            _Urls               = new URLs(this.IsSandBox);
            _HttpCore.URL       = _Urls.GetPaymentRequestURL();
            _HttpCore.Method    = Method.POST;
            _HttpCore.Raw       = PaymentRequest;
            this.PaymentRequest = PaymentRequest;
            String response = _HttpCore.Get();

            JavaScriptSerializer j         = new JavaScriptSerializer();
            PaymentResponse      _Response = j.Deserialize <PaymentResponse>(response);

            _Response.PaymentURL = _Urls.GetPaymenGatewayURL(_Response.Authority);

            return(_Response);
        }
        public PaymentResponse InvokePaymentRequest(PaymentRequest PaymentRequest)
        {
            URLs url = new URLs(this.IsSandBox);

            _HttpCore.URL       = url.GetPaymentRequestURL();
            _HttpCore.Method    = Method.POST;
            _HttpCore.Raw       = PaymentRequest;
            this.PaymentRequest = PaymentRequest;
            String response = _HttpCore.Get();

            PaymentResponse _Response = Newtonsoft.Json.JsonConvert.DeserializeObject <PaymentResponse>(response);

            _Response.PaymentURL = url.GetPaymenGatewayURL(_Response.Authority);

            return(_Response);
        }