ecomlogic/mws-sdk
Composer 安装命令:
composer require ecomlogic/mws-sdk
包简介
Amazon MWS Orders PHP API client
README 文档
README
-
Open
/Samples/.config.inc.php -
Edit the following lines replacing the
<>values with your credentialsdefine('AWS_ACCESS_KEY_ID', '<Your Access Key ID>'); define('AWS_SECRET_ACCESS_KEY', '<Your Secret Key>'); define('APPLICATION_NAME', '<Your Application Name>'); define('APPLICATION_VERSION', '<Your Application Version or Build Number>'); define('MERCHANT_ID', '<Your Merchant Id>'); // If you are making calls on another seller's behalf, put their merchantID here. define('MARKETPLACE_ID', '<Your Marketplace Id>');
Edit the samples
In the /Samples folder you will find files that correspond to a particular
Amazon Marketplace Web Service (Amazon MWS) operation. These files serve as
examples to illustrate the code required to make the call for that particular
operation. We will be using the SubmitFeed operation from the Feeds API section
as an example.
-
Open
/Samples/SubmitFeedSample.php -
Uncomment the appropriate
$serviceURLfor the marketplace that you want to sell in. Example:$serviceUrl = "https://mws.amazonservices.com"; -
Populate the
$feedvariable with the feed contents. Examples:// From a string $feed = "Feed content"; // From a file $feed = file_get_contents("feed.txt"); -
Uncomment
$marketplaceIdArrayand fill the array with the MarketplaceId values that you want to submit the feed to. -
Uncomment one of the two Amazon MWS request building methods between lines 126 - 170.
-
Uncomment the following lines:
invokeSubmitFeed($service, $request); @fclose($feedHandle); -
Start your server and navigate to the script's address to run it.
FAQ
Why does cURL return Error Response Status Code: 0?
If you receive the error Error Response Status Code: 0 from cURL when
attempting to send a request to Amazon MWS using cURL, find and set
CURLOPT_SSL_VERIFYPEER to false.
Why is FeedSubmissionResult being cut off?
This occurs when the server response is saved to memory. To avoid this, save the response to a file.
$responseFile = fopen("response.xml", "w");
fwrite($responseFile, $dom->saveXML());
fclose($responseFile);
What is in the /Mock folder?
The mock folder contains canned responses that simulate an Amazon MWS response. Mock responses are useful for testing without actually sending a request to Amazon MWS.
ecomlogic/mws-sdk 适用场景与选型建议
ecomlogic/mws-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.71k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 10 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「amazon」 「mws」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ecomlogic/mws-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ecomlogic/mws-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ecomlogic/mws-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package includes a script and fail2ban configuration that allows you to use fail2ban when utilizing AWS elastic load balancer (ELB) and an apache webserver.
A PSR-7 compatible library for making CRUD API endpoints
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Use Amazon's MWS web services with Laravel 5.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).
A simple Laravel 5/6/7/8 service provider for including the AWS SDK for PHP.
NinjaImg PHP SDK.
统计信息
- 总下载量: 3.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-10-23