如何设置贝宝SOAP API快速结帐运费
问题描述:
我加入的20.00的项目,订单总额设置为22.00如何设置贝宝SOAP API快速结帐运费
paymentDetails.OrderTotal = new PayPalSandboxWS.BasicAmountType()
{
currencyID = ConvertProgramCurrencyToPayPalSandbox(currency),
Value = "22.00"
};
和航运总设置为2.00
paymentDetails.ShippingTotal = new PayPalSandboxWS.BasicAmountType()
{
currencyID = ConvertProgramCurrencyToPayPalSandbox(currency),
Value = "2.00"
};
但我收到此错误:The totals of the cart item amounts do not match order amounts.
请协助
答
幽秘ssed设定值为ItemTotal
!这导致这个错误:
double itemTot = 20.0;
double tot = 22.0;
double shipping = 2.0;
string desc = "";
var paymentDetailsItemTypes = new List<PaymentDetailsItemType>();
PaymentDetailsType pdt = new PaymentDetailsType()
{
OrderDescription = desc,
OrderTotal = new BasicAmountType()
{
currencyID = CurrencyCodeType.EUR,
Value = tot.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture)
},
PaymentDetailsItem = paymentDetailsItemTypes.ToArray(),
ShippingTotal = new BasicAmountType()
{
currencyID = CurrencyCodeType.EUR,
Value = shipping.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture)
},
ItemTotal = new BasicAmountType()
{
currencyID = CurrencyCodeType.EUR,
Value = itemTot.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture)
}
};
我有完全相同的,想知道如果你找到了解决方案?在文档中找不到关于它的任何内容:https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout – 2012-08-17 12:22:23
您是否还拥有:SetExpressCheckoutRequestDetailsType sdt = new SetExpressCheckoutRequestDetailsType() ; sdt.ShippingMethod = ShippingServiceCodeType.CustomCode; sdt.ShippingMethodSpecified = true; – 2012-08-17 12:29:23