我遇到了一个来自贝宝的奇怪问题。当我的购物车传递带有小数位的值(如 1.15)时,它不起作用并显示错误:您用于进入 PayPal 系统的链接包含格式不正确的项目金额。
这是没有十进制数字的输出,有效:
paypal_class->dump_fields() Output:
Field Name Value
amount_1 70.00
business xxxxxxxxxxxxxxxx
cancel_return xxxxxxxxxxxxxxxxxx
cmd _cart
currency_code HUF
invoice 171SPLINTERCELLCONVICTIONxxxxxxxxxxxxxxxxxxx
item_name_1 Apple
item_number_1 211
notify_url xxxxxxxxxxxxxxxxxxxxxxxx
on0_1 Option
os0_1 Default
quantity_1 1
return xxxxxxxxxxxxxxxxxxxxxxxxx
rm 2
shipping_1 5
tax_cart 0.00
upload 1
这是带小数位的输出,它不起作用(出于安全原因,我删除了一些变量)。
paypal_class->dump_fields() Output:
Field Name Value
amount_1 70.15
business xxxxxxxxxxxxxxxxxx
cancel_return xxxxxxxxxxxxxxxxxxx
cmd _cart
currency_code HUF
invoice 172SPLINTERCELLCONVICTIONxxxxxxx
item_name_1 Apple
item_number_1 211
notify_url xxxxxxxxxxx
on0_1 Option
os0_1 Default
quantity_1 1
return xxxxxxxxxxx
rm 2
shipping_1 5
tax_cart 0.00
upload 1
它不适用于三种货币:匈牙利福林、日元、新台币。
有什么帮助吗?将不胜感激。