【发布时间】:2014-01-16 16:08:39
【问题描述】:
我们进行快速结帐(在沙盒上),并在创建定期付款资料中设置“zh_CN”
CreateRecurringPaymentsProfileRequestType reqType = new CreateRecurringPaymentsProfileRequestType();
reqType.setVersion(VERSION);
reqType.setErrorLanguage(getLangCode());
我们也碰巧在请求paypal token api以及两个地方设置了它(因为paypal网站显示为中文)...
setExpressCheckoutRequestDetails.setReturnURL(url);
setExpressCheckoutRequestDetails.setCancelURL(url2);
setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);
//This is the first place which works!!!! as the paypal GUI shows up in chinese...
setExpressCheckoutRequestDetails.setLocaleCode(getLangCode());
setExpressCheckoutRequestDetails.setBuyerEmail(user.getEmail());
SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);
setExpressCheckoutRequest.setVersion(VERSION);
//This is the second location which probably doesn't work though this request has never failed :( and I don't know how to force a failure :( as putting amount 105.37 on negative testing did not work
setExpressCheckoutRequest.setErrorLanguage(getLangCode());
然后我们注释掉计费周期的开始日期以导致失败,因为负面测试不起作用(请参阅帖子 how to simulate payment denial in paypal sandbox )。这会导致失败,但返回的错误是英文而不是中文,说“需要开始日期”和长消息“需要订阅开始日期”错误代码 11549。
为什么这不起作用? (我们只是简单地显示贝宝错误,因为它似乎太多,无法一直翻译,但语言不正确)。
谢谢, 院长
【问题讨论】:
标签: java paypal paypal-sandbox