james-and-james-fulfilment/amazon-sp-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

james-and-james-fulfilment/amazon-sp-api

Composer 安装命令:

composer require james-and-james-fulfilment/amazon-sp-api

包简介

README 文档

README

The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the Listings Items API Use Case Guide.

This PHP package is automatically generated by the Swagger Codegen project:

Usage

public function getAccessToken($channel_account): string
{
    $refresh_token = $channel_account->getAuthDetail('refresh_token');

    if (!$refresh_token) {
        throw new AmazonSPAPIOAuthException('Invalid refresh_token');
    }

    return AmazonSPAPIOAuth::getAccessTokenFromRefreshToken(
        $refresh_token,
        $this->client_id,
        $this->client_secret
    );
}

public function prepareRequestConfig($channel_account, $token): array
{
    $auth_details = $channel_account->getAuthDetail();
    $region_key   = $auth_details['region'];
    $region       = AmazonSPAPIRegion::$$region_key;
    $endpoint     = AmazonSPAPIEndpoint::$$region_key;
    $assumedRole  = AssumeRole::assume(
        $region,
        $this->iam_user_access_key,
        $this->iam_user_secret_key,
        $this->iam_role_arn,
    );

    $config = Configuration::getDefaultConfiguration();
    $config->setAccessToken($token);
    $config->setAccessKey($assumedRole->getAccessKeyId());
    $config->setSecretKey($assumedRole->getSecretAccessKey());
    $config->setRegion($region);
    $config->setSecurityToken($assumedRole->getSessionToken());

    return $config;
}

统计信息

  • 总下载量: 15.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-03-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固