我正在尝试将购物车的运费金额发送到贝宝。Paypal 没有收到整个购物车的金额,但如果我对购物车中的每件商品进行运输,它就会起作用。有没有人成功地将整个购物车的运费发送到贝宝而不是每个订单项?
这是我尝试过的:
@Html.Hidden("cmd", "_cart")
@Html.Hidden("upload", "1")
@Html.Hidden("business", ConfigurationManager.AppSettings["BusinessAccountKey"])
@Html.Hidden("first_name", Model.UserShippingInfo.FirstName)
@Html.Hidden("last_name", Model.UserShippingInfo.LastName)
@Html.Hidden("address1", Model.UserShippingInfo.Address)
@Html.Hidden("city", Model.UserShippingInfo.City)
@Html.Hidden("state", Model.UserShippingInfo.State)
@Html.Hidden("zip", Model.UserShippingInfo.Zip)
@Html.Hidden("shipping", @shippingCost.ToString("N2"))
@Html.Hidden("amount", @totalCost.ToString("N2"))
@foreach (CartLine item in Model.Cart.Lines)
{
@Html.Hidden("item_name_" + itemCount, item.Product.Name)
@Html.Hidden("item_number_" + itemCount, item.Product.ProductID)
@Html.Hidden("amount_" + itemCount, item.Product.Price.ToString("N2"))
@Html.Hidden("quantity_" + itemCount, item.Quantity)
@* @Html.Hidden("shipping_" + count, item.Product.Price.ToString())
@Html.Hidden("handling_" + count, 0)*@
itemCount++;
}