thirdpayment
ljl 11 months ago
parent bc52aa15bd
commit 723ff9977c

@ -61,25 +61,24 @@ class WithdrawCommand extends HyperfCommand
$balance = $userService->getBalance($user->member_id);
echo 'before balance' . $balance . PHP_EOL;
$bankCard = BankCard::where('user_id', $user->user_id)->first();
var_dump([
'userId' => $user->user_id,
'withdrawType' => 'entrust',
'agreementNo' => $bankCard->agreement_no,
'outWithdrawNo' => StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_WITHDRAW_NO),
'amount' => $balance
]);
return;
$requestLog = $this->createRequestLog([
'userId' => $user->user_id,
'withdrawType' => 'entrust',
'agreementNo' => $order->out_order_no,
'outWithdrawNo' => $order->amount,
'agreementNo' => $bankCard->agreement_no,
'outWithdrawNo' => StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_ACCOUNT_WITHDRAW),
'amount' => $balance
]);
$url = $paymentService->withdraw($requestLog->getData(), $requestLog->app, $requestLog->request_token);
echo $url;
echo 'result' . $url . PHP_EOL;
$balance = $userService->getBalance($user->member_id);
echo 'after balance' . $balance . PHP_EOL;
}
private function createRequestLog($data) {

@ -16,6 +16,7 @@ class StringHelper
const ORDER_NO_TYPE_WITHDRAW_APPLY_BATCH_NUM = 'withdraw_apply_batch_num';
const ORDER_NO_TYPE_WITHDRAW_APPLY_NO = 'withdraw_apply_no';
const ORDER_NO_TYPE_WITHDRAW_NO = 'withdraw_no';
const ORDER_NO_TYPE_ACCOUNT_WITHDRAW = 'account_withdraw';
const ORDER_NO_TYPE_ACCOUNT_PAY = 'account_pay';
public static function getRandomString($length, $withSpecialChar = false)

Loading…
Cancel
Save