clsystems/sas-api-client

Share-A-Sale API 库

v1.2.0 2021-02-19 14:42 UTC

This package is auto-updated.

Last update: 2024-09-15 16:21:27 UTC


README

Share-A-Sale API 的 PHP 封装。

此代码是发布商(联盟)特定的。

如果您正在寻找商家特定的代码,请查看 https://github.com/ooglek/shareasale-merchant-api-sdk

安装

安装 https://getcomposer.org.cn/ 并运行以下命令

php composer.phar require clsystems/sas-api-client dev-master

示例

从您的代码中调用

        use CLSystems\ShareASale\Client;
        
        $service = new Client();
        // See https://account.shareasale.com/a-apiManager.cfm for info
        // Remember to whitelist your calling IP
        $service->setServiceUrl('https://api.shareasale.com');
        $service->setVersion('2.3');
        $service->setAffiliateId([your affiliate id]);
        $service->setToken('[your token]');
        $service->setSecretKey('[your secret key]');
        
        $options = [
            'dateStart' => '6/22/2016',
        ];
        
        $records = $service->activity($options);
        
        var_dump($records);
        

实现的服务方法

  • activity
  • activitySummary
  • apitokencount
  • balance
  • dailyActivity
  • couponDeals
  • edittrail
  • getMerchantDescription
  • getProducts
  • invalidLinks
  • ledger
  • merchantCreative
  • merchantDataFeeds
  • merchantGiftCard
  • merchantSearch
  • merchantSearchProduct
  • merchantStatus
  • merchantTimespan
  • monthlySummary
  • orderInquiry
  • paymentSummary
  • traffic
  • voidtrail