使用贝宝API问题

使用贝宝API问题

问题描述:

我想在我的应用程序中使用贝宝,但我所有的尝试失败。我已将所有罐子连接到我的应用程序。 现在,我已经在https://developer.paypal.com/创建了一个帐户,我试图按照here所述的步骤进行操作,但是当我按下“个人资料”时,会将我发送到“概览”页面。所以问题是,我如何获得帐户userId,帐户签名,贝宝applicationId和其他信息? ps。我正在使用java。 UPD。 这里是我的代码:使用贝宝API问题

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; 
    } 

,这里是一个问题:我应该设置电子邮件,通过贝宝(只有数字)或通过给定的,这是我用于注册?这里

UPD是一个图像我在沙箱中得到: enter image description here

登录https://developer.paypal.com/。您正在查找的信息位于“API凭证凭证”标签中的“API凭证”部分。如果您尚未创建卖家测试帐户,则必须先创建一个。

在未来,您可能会发现有用的PayPal's Integration Wizards,它会生成您需要的所有代码。

编辑:

您不必既不使用您的电子邮件或密码,只能通过贝宝提供的信息。例如,在下面的图像中,用户名将为gemccu_1229982509_biz_api1.cs.com,密码为QR9WVHAD2PYGC2P9。您的凭证应与此类似。

enter image description here

编辑:

就像之前说的,你可以在https://developer.paypal.com/发现在“API和支付卡凭证”选项卡中的所有信息。在这里,你有什么,我在我看到的截图:

enter image description here

+0

感谢,我发现它,但我的应用程序仍然无法正常工作。看起来贝宝没有返回任何东西或错误 – Helgus 2012-08-06 14:12:29

+0

粘贴您的应用程序的一些代码,以便我们可以更有帮助。无论如何,如果您使用我之前提到的PayPal集成向导,您应该没有任何问题。 – admenva 2012-08-06 14:15:24

+0

查看更新 – Helgus 2012-08-06 14:30:09