Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

APIContext looses the clientID information #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rlfnb
Copy link

@rlfnb rlfnb commented Jan 3, 2018

https://github.com/paypal/PayPal-REST-API-issues/issues/178

  • Environment: each and every environment
  • Language, language version, and OS: MacOS, Oracle-Java 1.8.0-b132 (does not matter at all)

<dependency> <groupId>com.paypal.sdk</groupId> <artifactId>rest-api-sdk</artifactId> <version>1.14.0</version> </dependency>

Issue description

com.paypal.base.rest.APIContext context = new com.paypal.base.rest.APIContext("myClientID", "myBla", "sandbox");

fails with missing client id credentials, i was able to workaround via:

APIContext context = new APIContext("myClientID", "myBla", "sandbox"); context.addConfiguration(com.paypal.base.Constants.CLIENT_ID, "myClientID");

I suppose, its a bug?

@bluk
Copy link
Contributor

bluk commented Jan 3, 2018

Thanks for the PR. Which API are you trying to call after you create the APIContext?

@rlfnb
Copy link
Author

rlfnb commented Jan 3, 2018

Login with PayPal

`
TokenInfo info = Tokeninfo.createFromAuthorizationCode(context, code);

`

@jaypatel512
Copy link
Contributor

Hey @rlfnb !

  • I see that we extract the clientID from apiContext, and set it to params at TokenInfo.
  • Which then later is checked if it exists here.
  • And is used to initialize OauthTokenCredential here.

@jaypatel512
Copy link
Contributor

Would you mind sharing the exact error you were getting. That should help us locate exactly where the exception is being thrown.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants