0

如何实现这个 Laravel-mws 库?我已经按照 github 中的安装指南进行操作,但仍然无法正常工作。我还尝试在路由中运行他们的示例仍然不起作用。有人请使用 laravel 帮助我解决这个问题。谢谢你。

路线代码

<?php

use Sonnenglas\AmazonMws\AmazonOrderList;

Route::get('/', function () {
    return view('welcome');
});



Route::get('/getorders', function() {
  $amz = new AmazonOrderList("store1"); //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();
});
4

1 回答 1

0

我知道已经有一段时间了,但我最近在我的那个包的 fork 中解决了这个问题。

问题是您不能设置 root marketplaceId 和 marketplaceId.Id.1 参数。如果您想自己修复它,只需unset($this->options['marketplaceId']);在调用发送到亚马逊之前添加某个位置,例如AmazonOrderList.php.

于 2020-05-07T15:38:16.743 回答