Closed Abbotton closed 3 years ago
$config
parameter to OrdersApi
needs to be a Configuration
object, per the documentation.getOrderAddress
via the sandbox. I think this may be an error on Amazon's end? Here's the code I'm using:
use SellingPartnerApi\Api\OrdersApi;
use SellingPartnerApi\Configuration;
use SellingPartnerApi\Endpoint;
$config = new Configuration([ 'lwaClientId' => 'amzn1.application-oa2-client....', 'lwaClientSecret' => 'df4e....', 'lwaRefreshToken' => 'Atzr|IwEB....', 'awsAccessKeyId' => 'AKIA....', 'awsSecretAccessKey' => '4oi1q....', 'endpoint' => Endpoint::NA_SANDBOX, ]); $ordersApi = new OrdersApi($config); $response = $ordersApi->getOrderAddress('TEST_CASE_200'); var_dump($response);
OK, thanks jlevers.
Hi, jlevers. Sorry, my English is very bad.
In the SP-API sandbox environment, I can get the order list and order details, but I cannot get the buyer information and delivery address information. Below I list some relevant information, please help me. Thank you.
These are the permissions of my app:
This is the code that I ran while testing (using the parameters provided by the official documentation):
This is the information returned by SP-API:
At the same time, I checked this issue, but the amazon support team hasn't responded yet.
In addition, my seller account did not get access to PII when applying for MWS.
Now I want to ask three questions: 1, Is this situation related to my account not having access to PII? 2, Is the code running during my test correct?
Thank you very much.