定制 shopgate/connect-integration-sdk-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

shopgate/connect-integration-sdk-php

最新稳定版本:v2.1.1

Composer 安装命令:

composer require shopgate/connect-integration-sdk-php

包简介

A PHP framework supporting the integration with the Shopgate Connect Platform.

README 文档

README

Build Status Coverage Status License GitHub (pre-)release

The Shopgate Connect Integration SDK is a compilation of classes to manage the communication between your shop system and Shopgate Connect.

Create a developer account at https://developer.shopgate.com

Requirements

  • PHP 5.6 and above

Installation

composer require shopgate/connect-integration-sdk-php

Or download and unzip from the releases page.

Migration to 2.x

If you're upgrading from 1.x to 2.x, read the migration guide.

Quick Start

Order creation example (see Order API docs for full request spec):

<?php
use Shopgate\ConnectSdk\ShopgateSdk;

$order = [
    'localeCode' => 'de-de',
    'currencyCode' => 'EUR',
    'addressSequences' => [...],
    'primaryBillToAddressSequenceIndex' => 0,
    'lineItems' => [...],
    'subTotal' => 109.99,
    'total' => 115.89,
    'submitDate' => '2019-09-02T09:02:57.733Z',
    'imported' => true
];

$config = [
    'merchantCode'  => 'MERCHANT_CODE',
    'clientId'      => 'my-client',
    'clientSecret'  => '*******',
    'username'      => 'my.address@my-domain.com',
    'password'      => '*******',
    'env'           => 'pg' // Optional. "dev", "pg" or empty (= production)
];

$sgSdk = new ShopgateSdk($config);

try {
    $response = $sgSdk->getOrderService()->addOrders([$order]);
    var_dump($resonse);
} catch (\Exception $e) {
    var_dump($e);
}

Configuration Parameters

  • clientId (string) - oAuth2 client ID
  • clientSecret (string) - oAuth2 client secret
  • merchantCode (string) - merchant code provided to you upon registration
  • username - (string) - the email address of the user called "Api Credentials" at Shopgate Next Admin
  • password - (string) - the password of the user called "Api Credentials" at Shopgate Next Admin
  • env (string, default: production) - one of "dev", "staging", "production"

Changelog

See CHANGELOG.md file for more information.

Contributing

See CONTRIBUTING.md file for more information.

About Shopgate

Shopgate is the leading mobile commerce platform.

License

The Shopgate Connect Integration SDK is available under the Apache License, Version 2.0.

See the LICENSE.md file for more information.

Advanced

"baseUri" Configuration

For testing against an echo service the baseUri config can be overridden. It defaults to https://{service}.shopgate{env}.io/{version}/merchants/{merchantCode}/, supporting template variables:

  • service - the service name, different for each request
  • env - the Shopgate environment-dependent domain suffix; this will automatically be replaced with one of "dev", "pg" (staging) or "" (production)
  • version - the API version, may be different for each request
  • merchantCode - the merchant code set in the configuration

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固