PayPal 第 3 方购物车 - 如何为购物车添加一笔固定运费

标签 paypal cart

我想对整个购物车收取固定运费。我可以通过使用“tax_cart”变量来处理税收,但找不到相当于运费的金额。我的代码如下所示。任何帮助将不胜感激。

<form class="paypalform"
      action="https://www.sandbox.paypal.com/bn/cgi-bin/webscr"
      method="post">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="business" value="business@gmail.com">
    @foreach (var item in Model)
        {
        <input type="hidden" name="item_name_@count" value="@item.ProductName">
        <input type="hidden" name="amount_@count" value="@item.Price">
        
        count++;
        cartTotal += @item.Price;
    }  
    <input type="hidden" name="currency_code" value="USD">             
    <input type="hidden" name="tax_cart" value="@ViewBag.TaxAmount" />           
    <input type="image"
           src="http://www.sandbox.paypal.com/en_US/i/btn/x-click-but01.gif"
           name="submit"
           alt="Make payments with PayPal - it's fast, free and secure!">
</form>

最佳答案

您可以设置变量“shipping”和“shipping2”来定义运费。

Magento - PayPal Plus and Zero Subtotal Checkout

关于PayPal 第 3 方购物车 - 如何为购物车添加一笔固定运费,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48150212/

相关文章:

ruby-on-rails - 使用 rails 中的 REST API 在 paypal 中预先验证和拆分付款

php - WooCommerce 按钮可清除购物车、添加一件商品并前往结帐

php - 在 Woocommerce 中更改 wc_cart_totals_shipping_method_label 函数

css - 更改颜色按钮 WooCommerce 产品页面

php - 在 WooCommerce 中的购物车和结账页面上显示购买备注和属性

php - 使用 joomla 插件文件中的函数

PayPal 托管结账页面未显示 paypal 选项

jquery - 将 PayPal 按钮变成图像标题

php - 在 Woocommerce 3 中隐藏购物车中特定产品的数量字段

ruby-on-rails - 如何在 Ruby 中将 Mass Pay API 与新的 REST API 结合使用?