PayPal的折扣不能使它的工作 [英] PayPal discount can't make it work

查看:203
本文介绍了PayPal的折扣不能使它的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用PayPal + Codeigniter为整个购物车设置折扣,我得到了折扣。



阅读我唯一需要做的是设置一个隐藏字段 discount_amount_cart ,因为我看到这里



这是我的表单:

 < form method =postaction =https://www.sandbox.paypal.com/cgi-bin/webscrname =paypal_form> ; 
< input type =hiddenname =rmvalue =2/>
< input type =hiddenname =cmdvalue =_ cart/>
< input type =hiddenname =uploadvalue =1/>
< input type =hiddenname =currency_codevalue =EUR/>
< input type =hiddenname =businessvalue =biz_1271300483_biz@xxxx.xx/>
< input type =hiddenname =returnvalue =http://xxxxxx.com/website/pt/paypal/success/8/4c237a03897e0/>
< input type =hiddenname =cancel_returnvalue =http://xxxxxxx.com/website/pt/paypal/cancel/8/4c237a03897e0/>
< input type =hiddenname =notify_urlvalue =http://xxxxxx.com/website/pt/paypal/ipn/>
< input type =hiddenname =customvalue =/>
< input type =hiddenname =no_shippingvalue =1/>
< input type =hiddenname =cpp_header_imagevalue =http://xxxxxxxxx.com/images/logo.png/>
< input type =hiddenname =image_urlvalue =http://xxxxxxxxx.com/images/logo.png/>
< input type =hiddenname =invoicevalue =4c237a03897e0/>
< input type =hiddenname =no_notevalue =1/>
< input type =hiddenname =discount_rate_cartvalue =10.00/>
< input type =hiddenname =first_namevalue =Foo Bar/>
< input type =hiddenname =cityvalue =xxxx/>
< input type =hiddenname =address1value =xxxxxx/>
< input type =hiddenname =zipvalue =xxxxxx/>
< input type =hiddenname =lcvalue =pt/>
< input type =hiddenname =emailvalue =xxxxx@xxx.pt/>
< input type =hiddenname =countryvalue =PT/>
< input type =hiddenname =item_name_1value =Cloud Hosting WIN Business 25GB/>
< input type =hiddenname =item_number_1value =200.00000003/>
< input type =hiddenname =amount_1value =156/>
< input type =hiddenname =quantity_1value =1/>
< input type =hiddenname =tax_rate_1value =20/>
< p>< input type =submitname =pp_submitvalue =Pagarclass =submit/>< / p&
< / form>



但是当我发布



干杯



从PayPal文件:


使用合并折扣金额时,应在tax_cart中指定合并税金值。如果您没有指定税金值,而且您的个人资料指定了税率,则在应用合并折扣值后应用您的个人资料税率。


因此,我需要使用 tax_cart 定义我的全球税额。


I'm trying to setup a discount for a the whole cart using PayPal + Codeigniter, I got this working withouth the discounts.

As far as I've read the only thing that I would need to do is set a hidden field discount_amount_cart as I saw here

Here is my form:

<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" name="paypal_form">
     <input type="hidden" name="rm" value="2" />
     <input type="hidden" name="cmd" value="_cart" />
     <input type="hidden" name="upload" value="1" />
     <input type="hidden" name="currency_code" value="EUR" />
     <input type="hidden" name="business" value="biz_1271300483_biz@xxxx.xx" />
     <input type="hidden" name="return" value="http://xxxxxx.com/website/pt/paypal/success/8/4c237a03897e0" />
     <input type="hidden" name="cancel_return" value="http://xxxxxxx.com/website/pt/paypal/cancel/8/4c237a03897e0" />
     <input type="hidden" name="notify_url" value="http://xxxxxx.com/website/pt/paypal/ipn" />
     <input type="hidden" name="custom" value="" />
     <input type="hidden" name="no_shipping" value="1" />
     <input type="hidden" name="cpp_header_image" value="http://xxxxxxxxx.com/images/logo.png" />
     <input type="hidden" name="image_url" value="http://xxxxxxxxx.com/images/logo.png" />
     <input type="hidden" name="invoice" value="4c237a03897e0" />
     <input type="hidden" name="no_note" value="1" />
     <input type="hidden" name="discount_rate_cart" value="10.00" />
     <input type="hidden" name="first_name" value="Foo Bar" />
     <input type="hidden" name="city" value="xxxx" />
     <input type="hidden" name="address1" value="xxxxxx" />
     <input type="hidden" name="zip" value="xxxxxx" />
     <input type="hidden" name="lc" value="pt" />
     <input type="hidden" name="email" value="xxxxx@xxx.pt" />
     <input type="hidden" name="country" value="PT" />
     <input type="hidden" name="item_name_1" value="Cloud Hosting WIN Business 25GB" />
     <input type="hidden" name="item_number_1" value="200.00000003" />
     <input type="hidden" name="amount_1" value="156" />
     <input type="hidden" name="quantity_1" value="1" />
     <input type="hidden" name="tax_rate_1" value="20" />
     <p><input type="submit" name="pp_submit" value="Pagar" class="submit" /></p>
    </form>

But when I "post" the fields the discount line won't appear, do I need to activate something in the merchant account, am I doing something wrong?

Cheers

解决方案

Got it,

From the PayPal documentation:

When you use consolidated discount amounts, you should specify a consolidated tax value in tax_cart. If you do not specify a tax value and your profile specifies a tax rate, your profile tax rate is applied after the consolidated discount value is applied.

So I need to define my "global" tax amount for the cart with tax_cart.

这篇关于PayPal的折扣不能使它的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆