public AlipayF2FPrecreateResult tradePrecreate(AlipayTradePrecreateContentBuilder builder, string notify_url)
        {
            AlipayF2FPrecreateResult payResult = new AlipayF2FPrecreateResult();

            try
            {
                AlipayTradePrecreateRequest payRequest = new AlipayTradePrecreateRequest();
                payRequest.BizContent = builder.BuildJson();
                payRequest.SetNotifyUrl(notify_url);
                payResult.response = client.Execute(payRequest);
                return(payResult);
            }
            catch
            {
                payResult.response = null;
                return(payResult);
            }
        }
示例#2
0
        public async Task <AlipayF2FPrecreateResult> TradePrecreateAsync(AlipayTradePrecreateContentBuilder builder)
        {
            AlipayF2FPrecreateResult payResult = new AlipayF2FPrecreateResult();

            try
            {
                AlipayTradePrecreateRequest payRequest = new AlipayTradePrecreateRequest();
                payRequest.BizContent = builder.BuildJson();


                payResult.response = await client.ExecuteAsync(payRequest);

                return(payResult);
            }
            catch
            {
                payResult.response = null;
                return(payResult);
            }
        }
示例#3
0
        public AlipayF2FPrecreateResult tradePrecreate(AlipayTradePrecreateContentBuilder builder)
        {
            AlipayF2FPrecreateResult payResult = new AlipayF2FPrecreateResult();

            try
            {
                AlipayTradePrecreateRequest payRequest = new AlipayTradePrecreateRequest
                {
                    BizContent = builder.BuildJson()
                };

                payResult.response = client.Execute(payRequest);
                return(payResult);
            }
            catch
            {
                payResult.response = null;
                return(payResult);
            }
        }