PayPal Pro NVP API 错误本地化
我正在创建一个英语和法语网站,将使用贝宝进行付款处理。 我的所有 PayPal API 都正常工作,目前我只是向用户输出任何错误消息 (L_LONGMESSAGEX)。然而这始终是英语,有没有办法将错误消息输出为法语?
我看到了一个 LOCALECODE 参数,但这似乎是别的东西。
或者我是否必须根据错误代码设置自己的查找表?
I am creating an english and french website that will be using paypal for payment processing.
I have all of the PayPal API working properly, and currently I am just outputting any error messages to the user (L_LONGMESSAGEX). However this is always english, is there a way to output the error messages as french?
I saw a LOCALECODE parameter but that seems to be something else.
Or am I going to have to setup my own lookup table based off the error codes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,这是不可能的。
PayPal API 错误消息仅供您使用;您应该在自己的应用程序中正确处理这些异常,并向买家输出更有意义的消息。
(例如;“L_LONGMESSAGE0=此交易已被批准”对您的买家来说没有任何意义。但是“此交易之前已处理过。您订购了两次吗?如果您对订单有任何疑问,请致电我们的支持团队!”就清楚多了。)
No. This is not possible.
The PayPal API error messages are intended for your use only; you're supposed to properly handle these exceptions within your own application, and output a more meaningful message to the buyer.
(For example; "L_LONGMESSAGE0=This transaction has already been approved" means nothing to your buyers. Yet "This transaction has been processed previously. Did you order twice? Give our support team a call if you have any questions regarding your order!" is a lot clearer.)