1
我試圖將運費的購物車發送到paypal。貝寶沒有收到整個購物車的數量,但是如果我在購物車中的每件商品上運送貨物,它都會起作用。有沒有人成功地將整個購物車的運費金額發送到paypal而不是每個訂單項?如何從購物車發送運費到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++;
}