【发布时间】:2012-08-03 11:41:53
【问题描述】:
我正在尝试在我的应用中使用 Paypal,但我的所有尝试都失败了。我已将所有罐子连接到我的应用程序。 现在,我已经在https://developer.paypal.com/ 创建了一个帐户,并且我正在尝试按照here 描述的步骤进行操作,但是当我按下“个人资料”时,它会将我发送到“概览”页面。那么问题来了,我怎样才能得到账户的userId、账户签名、paypal applicationId 和其他信息呢? 附言。我正在使用java。 UPD。 这是我的代码:
public boolean verifyAddress(String email) throws PayPalException {
boolean isValid;
CallerServices caller = new CallerServices();
APIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.setAPIUsername("myUsername");
profile.setAPIPassword("myPass");
profile.setSignature("sign");
profile.setEnvironment("sandbox");
caller.setAPIProfile(profile);
AddressVerifyRequestType req = new AddressVerifyRequestType();
req.setEmail(email);
req.setStreet("test");
req.setZip("12345");
AddressVerifyResponseType resp = (AddressVerifyResponseType) caller
.call("AddressVerify", req);//throws exception here
System.out.println(resp.getBuild());
isValid = resp.getErrors() == null;
return isValid;
}
还有一个问题:我应该设置由payPal(仅数字)提供的电子邮件还是用于注册的通行证?
UPD 这是我在沙盒中获得的图像:
【问题讨论】:
标签: java paypal paypal-ipn paypal-sandbox