|
|
|
@ -85,13 +85,20 @@ class LeyouClient
|
|
|
|
|
|
|
|
|
|
public function apply($order, $role)
|
|
|
|
|
{
|
|
|
|
|
$result = $this->api('provide', [
|
|
|
|
|
$data = [
|
|
|
|
|
'role_id' => $role['role_id'],
|
|
|
|
|
'money' => intval($order['ref_amount']) * 10,
|
|
|
|
|
'type' => 2,
|
|
|
|
|
// 'goods_id' => 0,
|
|
|
|
|
'server_no' => $role['server_id'],
|
|
|
|
|
]);
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if ($order['ref_id'] < 100) {
|
|
|
|
|
$data['money'] = intval($order['ref_amount']) * 10;
|
|
|
|
|
$data['type'] = 2;
|
|
|
|
|
} else {
|
|
|
|
|
$data['goods_id'] = $order['ref_id'];
|
|
|
|
|
$data['type'] = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$result = $this->api('provide', $data);
|
|
|
|
|
if ($result == 'SUCCESS') {
|
|
|
|
|
return [
|
|
|
|
|
'status' => true,
|
|
|
|
@ -133,6 +140,18 @@ class LeyouClient
|
|
|
|
|
12 => ['ref_id' => 12, 'name' => '100000元宝', 'amount' => 10000],
|
|
|
|
|
13 => ['ref_id' => 13, 'name' => '200000元宝', 'amount' => 20000],
|
|
|
|
|
14 => ['ref_id' => 14, 'name' => '680元宝', 'amount' => 68],
|
|
|
|
|
121246 => ['ref_id' => 121246, 'name' => '私人定制30元激活卡', 'amount' => 30],
|
|
|
|
|
121247 => ['ref_id' => 121247, 'name' => '私人定制68元激活卡', 'amount' => 68],
|
|
|
|
|
121248 => ['ref_id' => 121248, 'name' => '私人定制128元激活卡', 'amount' => 128],
|
|
|
|
|
121249 => ['ref_id' => 121249, 'name' => '私人定制198元激活卡', 'amount' => 198],
|
|
|
|
|
121250 => ['ref_id' => 121250, 'name' => '私人定制328元激活卡', 'amount' => 328],
|
|
|
|
|
121251 => ['ref_id' => 121251, 'name' => '私人定制648元激活卡', 'amount' => 648],
|
|
|
|
|
121252 => ['ref_id' => 121252, 'name' => '68元礼包激活卡', 'amount' => 68],
|
|
|
|
|
121253 => ['ref_id' => 121253, 'name' => '98元礼包激活卡', 'amount' => 98],
|
|
|
|
|
121254 => ['ref_id' => 121254, 'name' => '128元礼包激活卡', 'amount' => 128],
|
|
|
|
|
121255 => ['ref_id' => 121255, 'name' => '198元礼包激活卡', 'amount' => 198],
|
|
|
|
|
121256 => ['ref_id' => 121256, 'name' => '328元礼包激活卡', 'amount' => 328],
|
|
|
|
|
121257 => ['ref_id' => 121257, 'name' => '648元礼包激活卡', 'amount' => 648],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/* return [
|
|
|
|
|