[英]Paypal Rest-API Account
I have some troubles using the paypal rest-api with java. 我在使用Paypal Rest-api和Java时遇到一些麻烦。
What i have done so far. 到目前为止我做了什么。
I used some example code from the github examples and my operations are working so far I can see. 我使用了github示例中的一些示例代码,到目前为止,我的操作正在正常进行。
The Problem is when I create a creditcard with the following code: 问题是当我使用以下代码创建信用卡时:
CreditCard creditCard = new CreditCard();
creditCard.setExpireMonth(11);
creditCard.setExpireYear(2018);
creditCard.setNumber("4417119669820331");
creditCard.setType("visa");
APIContext apiContext = new APIContext(accessToken);
CreditCard created = creditCard.create(apiContext);
System.out.println(created.getId());
The print in the console is like "CARD-01E4XXXXXXXXXXXXXXXXBWHI" 控制台中的打印内容类似于“ CARD-01E4XXXXXXXXXXXXXXXXBWHI”
When i use the get Method i recieve a json with alle the creditcard information 当我使用get方法时,我会收到所有带有信用卡信息的json
CreditCard c = CreditCard.get(accessToken, "CARD-01E4XXXXXXXXXXXXXXXXBWHI");
System.out.println(c);
So I think there is no problem with my code and the calls I make. 因此,我认为我的代码和发出的调用没有问题。 But When I watch the profile of my sandbox account via paypal developer site there is no creditcard. 但是,当我通过Paypal开发人员网站查看沙盒帐户的个人资料时,没有信用卡。 Even when I log in via sandbox.paypal into my sandbox account there are no informations about creditcards. 即使当我通过sandbox.paypal登录到我的沙盒帐户时,也没有有关信用卡的信息。 I used the credentials of my Rest-App (same as my sandbox account credentials). 我使用了Rest-App的凭据(与我的沙箱帐户凭据相同)。
My Question: On which Account I added the Creditcard? 我的问题:我在哪个帐户上添加了信用卡? How can I find out on which Account I'm currently working via Rest-Api. 如何通过Rest-Api找出我当前在哪个帐户上工作。 Can i specify on which account I want to work? 我可以指定要使用哪个帐户吗? (I think it's specified by credentials?) (我认为它是由凭据指定的?)
I hope someone can help me, because I tried a lot but I can't figure it out. 我希望有人能帮助我,因为我做了很多尝试,但我不知道如何解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.