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

doesn't use default config #30

Closed
ghost opened this issue Nov 22, 2016 · 6 comments
Closed

doesn't use default config #30

ghost opened this issue Nov 22, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 22, 2016

I would like to use this library for setting up notifications.
After I entered my api keys into the configuration.php I get this error:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Cannot read credentials from /.ebay_sdk/credentials' in C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php:132 Stack trace: #0 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php(83): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #1 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php(58): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #2 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\functions.php(61): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #3 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\ConfigurationResolver.php(55): DTS\eBaySDK\applyCredentials(Object(Closure), Array) #4 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Services\BaseService.php(53): DTS\eBaySDK\ConfigurationResolver->resolve(Array) #5 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Shoppin in C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php on line 132

my structure of folder:

  • index.php
  • ebay-sdk
  • configuration.php
  • all other sdk files

Config looks like: Screenshot

@davidtsadler
Copy link
Owner

Without seeing how you are creating the service object I can only guess what is going wrong. What I can tell you is that the SDK does not automatically load the credentials from configuration.php. You need to load that file yourself and pass it's contents to the SDK.

Have you read the guide on how to pass credentials to the SDK?

http://devbay.net/sdk/guides/guide/credentials.html

@davidtsadler
Copy link
Owner

davidtsadler commented Nov 22, 2016

One thing I can see from the error message is that the SDK may be trying to load your credentials from /.ebay_sdk/credentials Ensure that the file exists and that it's a valid ini file format.

@ghost
Copy link
Author

ghost commented Nov 22, 2016

by the way, this seems to be the old branch.
I've used the latest version now. I use this code to create the service object:

// Create te service object.
$service = new Services\ShoppingService([
'authToken' => '',
'credentials' => [
'appId' => ',
'certId' => '',
'devId' => ''
],
'siteId' => 0
]);

What's the "sideId"? Can't find this in the ebay API settings area? And authToken is this endless long token, correct Screenshot

@davidtsadler
Copy link
Owner

If you are using the Shopping service you won't need the authToken.

@davidtsadler
Copy link
Owner

Information about siteId can be found in the guide http://devbay.net/sdk/guides/guide/configuration.html#siteid

@ghost
Copy link
Author

ghost commented Nov 22, 2016

Okay fine, solved, big thanks. Will drop you an email regarding something other (question of design).

@ghost ghost closed this as completed Nov 22, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant