double-break / spapi-php

Amazon Selling Partner API PHP Client
MIT License
56 stars 48 forks source link

Credentials.php updated #16

Closed MST1122 closed 3 years ago

MST1122 commented 3 years ago

Credentials.php updated for generating credentials based on the type of operation like Grantless or Authorized.

For Notification and Authorization API function calls are Grantless and all other API calls need to be authorized by the seller.

So now for the credentials class construct function, the user has to pass one extra parameter $for_api based on Grantless API operations for others function call remain same. like: $credentials = new Credentials($tokenStorage, $signer, $config);

for Authorization API $for_api = 'authorization_api' and Notification API $for_api = 'notification_api'. $credentials = new Credentials($tokenStorage, $signer, $config, $for_api);

lyubo-slavilov commented 3 years ago

Closing it since we already have solution to the problem in the focus of the PR