| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace common\components\delivery\platform\shansong;
- class Shansong
- {
- protected $baseUrl;
- protected $appSecret;
- protected $clientId;
- protected $accessToken;
- protected $storeId;
- public function __construct($accessToken, $storeId)
- {
- if ( getenv('YII_ENV') == 'production') {
- $cfg = [
- 'base_url' => 'https://open.ishansong.com',
- 'secret' => 'mUa1uLQkybm6cGaUa4AW4krn4i5QROpD',
- 'client_id' => 'sswoXlqJvk7Be9GN3', // App-key
- ];
- } else {
- $cfg = [
- 'base_url' => 'http://open.s.bingex.com',
- 'secret' => 'mUa1uLQkybm6cGaUa4AW4krn4i5QROpD',
- 'client_id' => 'sswoXlqJvk7Be9GN3', // App-key
- ];
- }
- $this->baseUrl = $cfg['base_url'];
- $this->appSecret = $cfg['secret'];
- $this->clientId = $cfg['client_id'];
- $this->accessToken = $accessToken;
- $this->storeId = $storeId;
- }
- }
|