亚马逊 接口开发 php,亚马逊 MWS接口

在MarketplaceWebServiceProducts/Model/ResponseHeaderMetadata.php文件中,发现了一个参数定义错误,即quotaMax被重复定义。修复方法是删除多余的参数定义,正确地将quotaRemaining参数插入到构造函数中。更新后的构造函数能正确地初始化quotaMax和quotaRemaining的值。
摘要由CSDN通过智能技术生成

Redefinition of parameter $quotaMax

1. in /home/wwwroot/amz.codecenter.cn/frontend/controllers/MarketplaceWebServiceProducts/Model/ResponseHeaderMetadata.phpat line 31

const REQUEST_ID = 'x-mws-request-id';

const RESPONSE_CONTEXT = 'x-mws-response-context';

const TIMESTAMP = 'x-mws-timestamp';

const QUOTA_MAX = 'x-mws-quota-max';

const QUOTA_REMAINING = 'x-mws-quota-remaining';

const QUOTA_RESETS_AT = 'x-mws-quota-resetsOn';

private $metadata = array();

public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaMax = null, $quotaResetsAt = null) {

// public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaRemaining = null, $quotaResetsAt = null) {

$this->metadata[self::REQUEST_ID] = $requestId;

$this->metadata[self::RESPONSE_CONTEXT] = $responseContext;

$this->metadata[self::TIMESTAMP] = $timestamp;

$this->metadata[self::QUOTA_MAX] = $quotaMax;

$this->metadata[self::QUOTA_REMAINING] = $quotaMax;

$this->metadata[self::QUOTA_RESETS_AT] = $quotaResetsAt;

}

解决办法

修改一下文件

MarketplaceWebServiceProducts/Model/ResponseHeaderMetadata.php

修改前

public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaMax = null, $quotaResetsAt = null) {

$this->metadata[self::REQUEST_ID] = $requestId;

$this->metadata[self::RESPONSE_CONTEXT] = $responseContext;

$this->metadata[self::TIMESTAMP] = $timestamp;

$this->metadata[self::QUOTA_MAX] = $quotaMax;

$this->metadata[self::QUOTA_REMAINING] = $quotaMax;

$this->metadata[self::QUOTA_RESETS_AT] = $quotaResetsAt;

}

修改后

public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaRemaining = null, $quotaResetsAt = null) {

$this->metadata[self::REQUEST_ID] = $requestId;

$this->metadata[self::RESPONSE_CONTEXT] = $responseContext;

$this->metadata[self::TIMESTAMP] = $timestamp;

$this->metadata[self::QUOTA_MAX] = $quotaMax;

$this->metadata[self::QUOTA_REMAINING] = $quotaRemaining;

$this->metadata[self::QUOTA_RESETS_AT] = $quotaResetsAt;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值