hellojebus / php-amazon-mws
一个开源库,以面向对象的方式连接到亚马逊的MWS网络服务,注重直观易用。由cpigroup/php-amazon-mws分叉而来。
1.6.1
2018-04-13 23:06 UTC
Requires
- php: >=5.4
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-29 05:21:06 UTC
README
一个库,用于以面向对象的方式连接到亚马逊的商户网络服务(MWS),注重直观易用。
这 **不是** 亚马逊网络服务(AWS)- 云计算服务。
示例用法
以下是库使用的几个示例。所有API所需的详细技术信息都在幕后处理,因此用户可以轻松构建代码,向亚马逊发送请求,而无需跳过诸如参数URL格式化和令牌管理等障碍。
以下是一个示例函数,用于获取在过去24小时内更新的所有亚马逊仓库履行的订单。
function getAmazonOrders() { $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file $amz->setLimits('Modified', "- 24 hours"); $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders $amz->setOrderStatusFilter( array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable") ); //no shipped or pending $amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all $amz->fetchOrders(); return $amz->getList(); }
此示例显示了用于将之前创建的XML馈送发送到亚马逊以更新库存数量的函数。
function sendInventoryFeed($feed) { $amz=new AmazonFeed(); //if there is only one store in config, it can be omitted $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation $amz->setFeedContent($feed); $amz->submitFeed(); return $amz->getResponse(); }