hmazonderland / php-amazon-mws
一个开源库,用于以面向对象的方式连接到亚马逊的MWS网络服务,注重直观的使用。
2.0.1
2016-01-11 13:40 UTC
Requires
- php: >=5.4
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is not auto-updated.
Last update: 2023-10-10 13:36:57 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(); }