GithubHelp home page GithubHelp logo

amazonmwscomplete's People

Contributors

adrianadamiec avatar anhvn avatar billhance avatar bretto36 avatar caponica avatar codebymikey avatar colinmollenhour avatar cw-24 avatar iozkn avatar jasonhebert avatar josh8k avatar kelkholy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazonmwscomplete's Issues

getNonAmazonMarketplaceIds SITE_TURKEY value

Hello,

I have an error with callListOrdersByCreateDate method. When I call it gives me an error 'No Non-Amazon marketplace id known for site code "TR"'. I try to fix and, When I change the value in MwsClientPoolConfig/getNonAmazonMarketplaceIds function. It works. Can you add this please?

MwsCilentPoolConfig.php line 211

I want to delete the product but I can not

I am call submitFeed in MwsFeedAndReportClient and add to request array 'FeedContent' => ['SKU' => $ sku],.
And I get the answer "Missing stream resource.", Why does this happen? He expects a file from me? Here's the data that I'm passing [ 'MarketplaceId', 'SellerId', 'MWSAuthToken', 'FeedContent' => ['SKU' => $sku], 'FeedType' => '_POST_PRODUCT_DATA_', 'OperationType' => 'Delete', ]

echo calls messing up the output buffer.

When using this library in a Symfony controller for example.

All the echo debug functions will mess up the response and output buffer especially if you're expecting a simple JSON response.

e.g.

echo "\nAdding fake entry #{$i} to Throttle log to fill a slot";

I'd recommend using a simple Psr\Log\LoggerInterface or Monolog to handle all your logging or at least provide the ability to disable logs.

Parameter must be an array or an object that implements Countable

Hello Caponica,

First, thank you for your great work on this Bundle, it help me a lot.

At the moment i have no problem on the first part of my work (Get better price of products ), but now i start to try push a product on Amazon with callSubmitFeed() and i have this error "Parameter must be an array or an object that implements Countable".

You can show my code below:
`$mwsClientPoolUsa = new MwsClientPool();
$mwsClientPoolUsa->setConfig([
'amazon_site' => MwsClientPoolConfig::SITE_FRANCE,
'access_key' => 'my_access_key',
'secret_key' => 'my_secret_key',
'application_name' => 'testAmazon',
'application_version' => '1.01',
'seller_id' => 'my_seller_id',
]);

    $productClientPackUsa = $mwsClientPoolUsa->getFeedAndReportClientPack();

$feed = <<<EOD
1.01 xxxxxxxxxx Product false 1 Update 9782013224055 R+ POCHE JEUNESSE 3 EAN 9782013224055 G_GEN_NOTAX <Title>Example Product Title</Title> Example Product Brand This is an example product description. Example Bullet Point 1 Example Bullet Point 2 100.00 Example Product Manufacturer example-item-type Example Ingredients Example Directions EOD;
    $feedHandle = @fopen('php://temp', 'rw+');
    fwrite($feedHandle, $feed);
    rewind($feedHandle);

    $productClientPackUsa->callSubmitFeed('_POST_PRODUCT_DATA_', $feedHandle);

    @fclose($feedHandle);`

Can you help me a little bit ?
Thank you.

How to create FbaInboundClient via MwsClientPool?

This is the best mws sdk I've seen.

My question is that, If I use "CaponicaAmazonMwsComplete\ClientPool\MwsClientPool" , how to create "FbaInboundClient".
It seems that there is no FbaInboundClientPack in "CaponicaAmazonMwsComplete\ClientPack".

Error in SubmitFeed Request.

Hi,

I'm getting this error for SubmitFeed request. I suspect this could be because of PHP versions. Any idea how to solve this?

Symfony\Component\Debug\Exception\ContextErrorException: Warning: count(): Parameter must be an array or an object that implements Countable in /home/roopak/Desktop/p5/vendor/caponica/amazon-mws-complete/src/AmazonPhpClientLibrary/MarketplaceWebService/Model/ContentType.php:67
Stack trace:
#0 /home/roopak/Desktop/p5/vendor/caponica/amazon-mws-complete/src/AmazonPhpClientLibrary/MarketplaceWebService/Model/ContentType.php(73): MarketplaceWebService_Model_ContentType->isSetParameters()
#1 /home/roopak/Desktop/p5/vendor/caponica/amazon-mws-complete/src/AmazonPhpClientLibrary/MarketplaceWebService/Client.php(1452): MarketplaceWebService_Model_ContentType->toString()
#2 /home/roopak/Desktop/p5/vendor/caponica/amazon-mws-complete/src/AmazonPhpClientLibrary/MarketplaceWebService/Client.php(379): MarketplaceWebService_Client->convertSubmitFeed(Object(MarketplaceWebService_Model_SubmitFeedRequest))
#3 /home/roopak/Desktop/p5/vendor/caponica/amazon-mws-complete/src/CaponicaAmazonMwsComplete/ClientPack/MwsFeedAndReportC

My code is like below.

$feedHandle = @fopen('/home/roopak/Desktop/p5/web/uploads/documents/' . $file_name, 'r');
$fileOpnenSuccess = true;
if (! $feedHandle) {
$fileOpnenSuccess = false;
}

            if ($fileOpnenSuccess) {

                $mwsClientPoolIN = new MwsClientPool();
                $mwsClientPoolIN->setConfig([
                    MwsClientPoolConfig::PARAM_AMAZON_SITE => MwsClientPoolConfig::SITE_INDIA,
                    MwsClientPoolConfig::PARAM_ACCESS_KEY => 'AKIAJKGPNP5IM7Y3W5FA',
                    MwsClientPoolConfig::PARAM_SECRET_KEY => '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',
                    MwsClientPoolConfig::PARAM_APP_NAME => 'pimcore',
                    MwsClientPoolConfig::PARAM_APP_VERSION => '1',
                    MwsClientPoolConfig::PARAM_SELLER_ID => 'AKW0X0EX07WGD'
                ]);

                $productClientPackIN = $mwsClientPoolIN->getFeedAndReportClientPack();
                $mwsResponse = $productClientPackIN->callSubmitFeed(MwsFeedAndReportClientPack::FEED_TYPE_PAI_PRODUCT, $feedHandle);

                return new JsonResponse(array(
                    "success" => true,
                    "file" => $_FILES
                ));
            }

Please help.

iconv.output_encoding is deprecated since PHP 5.6

When I call the API it throws the deprecated error in the line 899 in Client.php so I cannot use this

iconv_set_encoding('output_encoding', 'UTF-8');

You should check the PHP Version to something like this

if (PHP_VERSION_ID < 50600) {
    iconv_set_encoding('input_encoding', 'UTF-8');
    iconv_set_encoding('output_encoding', 'UTF-8');
    iconv_set_encoding('internal_encoding', 'UTF-8');
} else {
   ini_set('default_charset', 'UTF-8');
}

Thanks

Make private methods protected

Thanks for your work on this library, Christian!

What are your thoughts on replacing all private method declarations with protected?

We're having a strange issue where some XML responses from Amazon are partially corrupt, like XML tags that are combined with each other, nested incorrectly, etc. Since the Amazon library only returns the parsed XML and not the raw response text we can't log this to see exactly what is getting returned and since it uses private methods we can't easily override the Amazon code to inject our logger code.

OrdersList API alway returning null values for "x-mws-quota-max", "x-mws-quota-remaining" and "x-mws-quota-resetsOn" in ResponseHeaderMetadata

Hii Friend,
I am integrating this package for ordersList API but it is alway returning null values for "x-mws-quota-max", "x-mws-quota-remaining" and "x-mws-quota-resetsOn" in ResponseHeaderMetadata.

here are request codes:

$todayDate =Carbon::today();
$mwsClientPoolUsa = new MwsClientPool();
        $mwsClientPoolUsa->setConfig([
        'amazon_site'         => MwsClientPoolConfig::SITE_USA,
        'access_key'          => env('AWS_ACCESS_KEY_ID'),
        'secret_key'          => env('AWS_SECRET_ACCESS_KEY'),
        'application_name'    => env('APPLICATION_NAME'),
        'application_version' => env('APPLICATION_VERSION'),
        'seller_id'           => env('SELLER_ID'),
        'marketplace_id'      => env('MARKETPLACE_ID')      
        ]);
$orderClientPack    = $mwsClientPoolUsa->getOrderClientPack(); 
$mwsResponse = $orderClientPack->callListOrdersByLastUpdatedDate($todayDate,[],['MWSAuthToken'=> env('MWS_AUTH_TOKEN')]);
dd($mwsResponse);

and here are response:

MarketplaceWebServiceOrders_Model_ListOrdersResponse {#306 ▼
  #_fields: array:3 [▼
    "ListOrdersResult" => array:2 [▶]
    "ResponseMetadata" => array:2 [▼
      "FieldValue" => MarketplaceWebServiceOrders_Model_ResponseMetadata {#309 ▶}
      "FieldType" => "MarketplaceWebServiceOrders_Model_ResponseMetadata"
    ]
    "ResponseHeaderMetadata" => array:2 [▼
      "FieldValue" => MarketplaceWebServiceOrders_Model_ResponseHeaderMetadata {#301 ▼
        -metadata: array:6 [▼
          "x-mws-request-id" => "xxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
          "x-mws-response-context" => "T71b8VB2qL4JJSpv1dLxs4doOHt7OUbak7YHfgftggt5Zmic7Nwg5g67jhf46H98F8e1K28+MUA="
          "x-mws-timestamp" => "2017-10-25T06:32:58.535Z"
          "x-mws-quota-max" => null
          "x-mws-quota-remaining" => null
          "x-mws-quota-resetsOn" => null
        ]
      }
      "FieldType" => "MarketplaceWebServiceOrders_Model_ResponseHeaderMetadata"
    ]
  ]
}

and also can you please guide me how to manage throttling flow.

--
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.