anubhavpsit/aniphp-shopify 问题修复 & 功能扩展

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

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

anubhavpsit/aniphp-shopify

最新稳定版本:v1.0.0

Composer 安装命令:

composer require anubhavpsit/aniphp-shopify

包简介

PHP library for the Shopify API

README 文档

README

Build Status codecov

Getting started

<?php
require 'vendor/autoload.php'; 

use Shopify\ShopifyClient;

$client = new ShopifyClient($access_token, "yourshop.myshopify.com");
$products = $client->products->readList();

Creating orders

$newOrder = ['line_items' => [['title' => 'cool', 'price' => 4]]];
$response = $client->orders->create($newOrder);

Reading orders

$response = $client->orders->read($orderId);
$object = $response->parsedResponse();
$orders = $client->orders->readList();
foreach ($order in $orders->parsedResponse()) {
    var_dump($order->id);
}

Updating orders

$response = $client->orders->update($orderId, ["note" => "cool order"]);

Counting open orders

$response = $client->orders->readCount(["status" => "open"]);

Deleting orders

$response = $client->orders->delete($orderId);

Testing phpunit

phpunit

Running PHP CodeSniffer

./vendor/bin/phpcs ./src/ --standard=PSR2
./vendor/bin/phpcs ./test/ --standard=PSR2

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-02