|
|
|
@ -16,13 +16,19 @@ class XyyClient
|
|
|
|
|
const SIGN_KEY = '51a447dc409b785af03e41a2d5014879';
|
|
|
|
|
|
|
|
|
|
protected $client;
|
|
|
|
|
private $platformId = 600;
|
|
|
|
|
|
|
|
|
|
private $apis = [
|
|
|
|
|
'provide' => ['uri' => '/Api/Statis/sendgold', 'method' => 'post'],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
public function __construct($game = null)
|
|
|
|
|
{
|
|
|
|
|
if ($game && ($game['id'] == 293 || $game['id'] == 294)) {
|
|
|
|
|
$this->platformId = 602;
|
|
|
|
|
} else {
|
|
|
|
|
$this->platformId = 600;
|
|
|
|
|
}
|
|
|
|
|
$this->client = new Client([
|
|
|
|
|
'base_uri' => 'http://x3wm.dgcgame.com:82',
|
|
|
|
|
'timeout' => 10.0,
|
|
|
|
@ -112,7 +118,7 @@ class XyyClient
|
|
|
|
|
public function apply($order, $role)
|
|
|
|
|
{
|
|
|
|
|
$data = [
|
|
|
|
|
'pfrom_id' => 600,
|
|
|
|
|
'pfrom_id' => $this->platformId,
|
|
|
|
|
'server_id' => $role['server_id'],
|
|
|
|
|
'actors' => $role['role_id'],
|
|
|
|
|
'sendnum_yb' => intval($order['ref_amount']) * 10,
|
|
|
|
|