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); } }
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); } }
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); } }