elf 1 year ago
parent f082399caf
commit 447d9eb1ad

@ -46,6 +46,8 @@ class MineCommand extends HyperfCommand
public function handle(): void
{
$this->unbindWithdrawEntrust();
return;
$this->getBalance();
$this->getRequestData();
return;
@ -529,4 +531,13 @@ class MineCommand extends HyperfCommand
];
$baofu->transferWithdraw($data);
}
protected function unbindWithdrawEntrust($userId = 'ELF1990') {
/**
* @var UserService $userService
*/
$userService = $this->container->make(UserService::class);
$url = $userService->unbindWithdrawEntrust(['userId' => $userId], $this->getApp(), $this->getToken());
echo $url;
}
}

@ -633,13 +633,13 @@ class PaymentService extends AbstractService
$withdraw->save();
if ($withdrawType == 'entrust') {
return $this->doEntrustWithdraw($data, $withdraw);
return $this->doEntrustWithdraw($data, $withdraw, $token);
} else {
return $this->doWithdraw($data, $withdraw);
return $this->doWithdraw($data, $withdraw, $token);
}
}
private function doWithdraw(array $data, Withdraw $withdraw) {
private function doWithdraw(array $data, Withdraw $withdraw, string $token) {
try {
$baofu = new Baofu();
$result = $baofu->withdraw([
@ -662,7 +662,7 @@ class PaymentService extends AbstractService
}
}
private function doEntrustWithdraw(array $data, Withdraw $withdraw) {
private function doEntrustWithdraw(array $data, Withdraw $withdraw, string $token) {
try {
$baofu = new Baofu();
$result = $baofu->entrustWithdraw([

Loading…
Cancel
Save