定制 netoholic/store-integrator 二次开发

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

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

netoholic/store-integrator

Composer 安装命令:

composer require netoholic/store-integrator

包简介

Can be used to publish products and retrieve and handle orders from different shopping platforms.

README 文档

README

Goals

  • Allow seamless integrations with popular selling/shopping platforms.

Current Support

  • Ebay (product publishing and rtrieveing, order retrieving and handling)
  • Amazon (initial level)

Configuration

For eBay

The configuration can be passed directly to the eBay SDK before the integrator is composed, or preferably they can be taken from environment variables.

List of variables for eBay

  • EBAY-TRADING-API-VERSION - The version of the eBay API.
  • EBAY-DEV-ID - The Developer ID key. Taken from eBay.
  • EBAY-APP-ID - App ID key, again taken from eBay. Used to identify CloudCart before the users.
  • EBAY-CERT-ID - Another Key taken from eBay.

Usage

Currently the Integrator objects need to be instantiated directly. To reduce complexity the services are grouped in several smaller API wrapper classes, which are then used to compose the main Integrator class.

In future this will be hidden from the end user of the package.

    $integrator = new StoreIntegrator\Factory([
        'ebay' => [
            'userToken' => 'token'
            // more data needed 
        ]
    ]);
    
    $integrator->provider('ebay')->products->getProducts();
    
    $integrator->provider('ebay')->factory->makeShippingService($data = []);
    $integrator->provider('ebay')->factory->makeProduct($data = []);
    $integrator->provider('ebay')->factory->makeProduct($data = []);
   

Added methdos to get user tokens with a few requirements to the application using the package.

Flow;

1 . Get an instance of the eBay provider

    $integrator = new StoreIntegrator\Factory();
    
    $ebay = $integrator->provider('ebay', [ ... ]);
    

2 . Set the RuName of the app (special identificator from eBay for the application)

    $ebay->auth->setRuName($ruName);

3 . Get a special session id from eBay and store it somewhere (e.g. in the session)

    $sessionId = $ebay->auth->getSessionID();
    
    // save the session id

4 . Build a special eBay url to show the user a dialog, where they can agree

    $url = $ebay->auth->buildRedirectUrl($sessionId);

5 . Redirect the user to the built url (or leave it as link on a page somewhere)

6 . If the user agrees eBay redirects them to a predefined url in the application (https is mandatory) (same happens when they do not agree, but for another url)

7 . When the redirect from eBay is received, get the token and save it for future use

    $token = $ebay->auth->getToken($sessionId);
    
    // Save the token

Limitations

  • eBay does not allow variation images for multiple properties. Currently accepts only images on product (parent for variations) level

TODO

Contributors

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固