Paypal SetExpressCheckout(快速结账) 10731错误,请有经验的人帮忙
环境:C#.NET + Paypal SOAP API 版本:72.0
由于Paypal卖家保护策略要求商家必须提供一个发货地址 以下为我的代码:
var expResponse = client.SetExpressCheckout(ref csh, new SetExpressCheckoutReq() { SetExpressCheckoutRequest = new SetExpressCheckoutRequestType() { SetExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType() { ReturnURL = returnurl, CancelURL = cancelurl, BuyerEmail = CustomerHandle.GetIdentityName(), PaymentDetails = new PaymentDetailsType[] { new PaymentDetailsType() { OrderTotal=OrderToal, PaymentDetailsItem=new PaymentDetailsItemType[] { new PaymentDetailsItemType { Amount = OrderToal, Number = "", Quantity = "1", Name =string.Format("#{0}#",orderNum) } }, PaymentAction=PaymentActionCodeType.Sale, ShipToAddress=new AddressType { Name=string.Format("{0} {1}",shippingaddr.FirstName,shippingaddr.LastName), Street1=shippingaddr.ADD1, Street2=shippingaddr.ADD2, CityName=shippingaddr.City, StateOrProvince=shippingaddr.State, PostalCode=shippingaddr.Postcode, //Country=countrycode, /*paypal文档中说Country是必要的*/ Country=CountryCodeType.NL, CountryName="Netherlands", Phone=shippingaddr.Postcode } } }, AllowNote = "0", cppheaderimage = ConfigurationManager.AppSettings["LOGOURL"], BrandName = ConfigurationManager.AppSettings["BrandName"], NoShipping = "0", /*此外设置为1总是返回错误,设置为0无错误*/ AddressOverride = "1", ReqConfirmShipping = "0" }, Version = API_VERSION } });