承接 ireisaac/mws 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ireisaac/mws

最新稳定版本:v0.0.3

Composer 安装命令:

composer require ireisaac/mws

包简介

mws api

README 文档

README

package to help simplify requests to MWS. Heavily relys on GuzzleHttp.

Make sure to add the .env file in the root of your project, or add to your .env file, the following lines. There is also .env.example file included.

MWS_SELLER_ID=
MWS_MARKETPLACE_ID=
MWS_DEVELOPER_ACCOUNT_NUMBER=
MWS_SECRET_KEY=
MWS_SIGNATURE_METHOD=
MWS_SIGNATURE_VERSION=

AWS_ACCESS_KEY_ID=

Installation In Laravel with Composer

composer require ireisaac\mws
// in your config/app.php

'providers' => [
	...
	IreIsaac\Mws\Support\MwsServiceProvider::class,
],

'aliases' => [
	...
	'Mws'       => IreIsaac\Mws\Support\MwsFacade::class,
],

DON'T FORGET

after adding the service provider, in the root of your laravel project run:

php artisan vendor:publish

Laravel Example:

The goal is to be able to call any MWS operation as a static method and pass any query params needed/wanted as an associative array.

use Mws;
use Carbon\Carbon;

public function search($query)
{
	$response = Mws::listMatchingProducts(['Query' => $query]);

	return $response->xml();
}

public function orders()
{
	// Orders from the last week
	$response = Mws::ListOrders([
		'CreatedAfter' => Carbon::now()->subWeek()->toIso8601String()
	]);

	return $response->xml();
}

Notice you can call operations formatted with the first letter capitalized (studly case), or lowercase (snake case).

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-12