Update UserTransfer.php

This commit is contained in:
邹景立 2021-03-18 15:56:00 +08:00
parent ecc38b7e4d
commit 8eedb40308

View File

@ -99,9 +99,12 @@ class UserTransfer extends Command
*/
private function transferWallet(array $item): array
{
$wechat = Transfers::instance($config = $this->getPayment());
$config = $this->getPayment();
$wechat = Transfers::instance($config);
$openid = $this->getUserOpenid($item['uid'], $config);
if (empty($openid)) throw new Exception("提现{$item['code']}获取用户OPENID失败");
return $wechat->create([
'openid' => $this->getUserOpenid($item['uid'], $config),
'openid' => $openid,
'amount' => $item['amount'] * 100,
'partner_trade_no' => $item['code'],
'spbill_create_ip' => '127.0.0.1',