第三方请求
This commit is contained in:
@@ -51,7 +51,7 @@ class JK8Services
|
||||
// 'name' => $nickname,
|
||||
'referrerCode' => $referrerCode,
|
||||
]);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class JK8Services
|
||||
$params = $this->createParam('/users/getAllUsers', [
|
||||
'id' => $userId,
|
||||
]);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
@@ -86,7 +86,7 @@ class JK8Services
|
||||
$params = $this->createParam('/users/getPromotionList', [
|
||||
'userId' => $userId,
|
||||
]);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
@@ -106,7 +106,28 @@ class JK8Services
|
||||
'username' => $username,
|
||||
'amount' => $amount
|
||||
]);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
return $result['data']['transactionId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动发红包
|
||||
* @param string $username
|
||||
* @param float $amount
|
||||
* @return array|mixed|null
|
||||
* @throws Exception
|
||||
*/
|
||||
public function manualAngPao(string $username, float $amount): mixed
|
||||
{
|
||||
$params = $this->createParam('/users/manualAngPao', [
|
||||
'userId' => $username,
|
||||
'amount' => $amount,
|
||||
'promotionId' => 254385
|
||||
]);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
@@ -121,7 +142,7 @@ class JK8Services
|
||||
public function getGameCategory(): mixed
|
||||
{
|
||||
$params = $this->createParam('/games/getGameCategory', []);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
@@ -161,7 +182,7 @@ class JK8Services
|
||||
foreach ($sites as $site) {
|
||||
$post['site'] = $site;
|
||||
$params = $this->createParam('/games/getGameList', $post);
|
||||
$result = doCurl($this->domain, $params);
|
||||
$result = third_party_form_request($this->domain, $params);
|
||||
if (($result['status'] ?? '') === 'ERROR') {
|
||||
throw new Exception($result['data']['message'] ?? 'Remote API Error');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user