贝宝:托管的按钮付款失败,代码为= AMOUNT_ERROR [英] Paypal : hosted button payments fail with code=AMOUNT_ERROR

查看:99
本文介绍了贝宝:托管的按钮付款失败,代码为= AMOUNT_ERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,我一直在使用贝宝(paypal)按钮,并使用IPN来处理付款.

I've been using paypal buttons for years, using IPN to process the payment.

其中一些按钮已在几天前停止工作.它们会产生错误,如下图所示: (截图)

Some of these buttons have stopped working a couple of days ago. They produce an error as can be seen on the following image : (screenshot)

这些按钮是使用Paypal在线工具创建的,它们的HTML代码引用了一些在paypal网站上编辑过的paypal UR3ZPGJAT7M数据(希望正确吗?)(注意:UR3ZPGJAT7M是已编辑的值).

These buttons have been created using Paypal online tools and their HTML code refers to some paypal UR3ZPGJAT7M data that is edited on the paypal site (and that should hopefully be correct ?)(Note : UR3ZPGJAT7M is an edited value).

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="UR3ZPGJAT7M">
<table>
<tr><td><input type="hidden" name="on0" value="Expédition">Expédition</td></tr><tr><td><select name="os0">
    <option value="Expédition en France">Expédition en France €25,00 EUR</option>
    <option value="Expédition en Europe">Expédition en Europe €27,00 EUR</option>
    <option value="Reste du Monde">Reste du Monde €30,00 EUR</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src="https://www.paypalobjects.com/fr_FR/FR/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal, le réflexe sécurité pour payer en ligne">
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
</form>

如屏幕截图所示,反馈URL包含以下查询字符串:& code = AMOUNT_ERROR"

As can be seen in the screenshot, the feedback url contains the following query string : "&code=AMOUNT_ERROR"

我试图在定义UR3ZPGJAT7M代码的贝宝在线按钮编辑表单中更改金额值. 我尝试了十进制分隔符的各种值:

I tried to change the amount value in the paypal online button edit form that defines the UR3ZPGJAT7M code. I tried various values for the decimal separator :

  • 25.00
  • 25,00
  • 25

但全部失败.

我环顾四周,但找不到解决此问题的任何方法. 贝宝支持根本无法解决问题.

I have looked around but couldnt find any solution for this issue. Paypal support doesnt answer at all.

我该如何解决?

  • Paypal几天前更改了付款方式的用户界面,因此可能与此更改有关.
  • 当我从头开始创建新按钮并将其与Paypal的在线按钮创建表单中的所有相同参数一起输入时,新按钮可以正常工作.因此,有一种启用我的按钮的方法:从头开始将它们重新创建为购物车按钮.但是我有30多个这样的注册按钮,希望避免重新创建所有按钮!
  • 其他一些按钮也可以正常工作.我注意到一些可以使用的按钮会导致英文形式,其中小数点分隔符为.". .在托管按钮"创建页面中,自动将欧元和法语的分隔符添加为,".
  • 我在Paypal支持网站上发现了一个相关问题:
  • Paypal changed their payment forms UI some days ago so it is probably related to this change.
  • When i create a new button from scratch and feeds it with all same parameters in Paypal's online button creation forms, the new button works fine. So there is a way to enable my buttons : create them anew from scratch as cart buttons. But I have 30+ such registered buttons and i'd appreciate to avoid to recreate all of them anew !
  • Some other buttons work fine. I notice some of the buttons that work lead to an english form, where decimal separator is '.' . In the "hosted buttons" creation page, the separator for EUR and french langage is automaticaly added as ','.
  • I found a related issue on paypal support site : https://www.paypal-community.com/t5/PayPal-HTML-Buttons/Update-your-PayPal-buttons-before-29th-March-2017/m-p/1127596 The user found out why his buttons failed : because of inventory. He had to cancel inventory request. But my buttons doent use inventory.

推荐答案

在默认情况下,Paypal似乎在值字段中存在特殊字符的问题.通过添加用于UTF-8的声明,表单验证似乎可以完美地工作.这对我有用:

Paypal seems to have problems with special characters within the value fields by default. By adding the declaration for UTF-8 the form validation seems to work flawless. This did the trick for me:

<input type="hidden" name="charset" value="utf-8">

另一种解决方法可能是清除值属性的字符,例如:

Another workaround could be the character cleanup of the values attribute like:

value="my_value_1">

这篇关于贝宝:托管的按钮付款失败,代码为= AMOUNT_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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