|
|
@@ -131,6 +131,7 @@ class Wallet extends BaseController
|
|
|
$recharge->type = 2;
|
|
|
$recharge->image = $params['image'];
|
|
|
$recharge->save();
|
|
|
+ return $this->success($recharge,'提交成功');
|
|
|
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error($e->validator->errors()->first());
|
|
|
@@ -152,11 +153,12 @@ class Wallet extends BaseController
|
|
|
return $this->success($data);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
- * 提现(自动到账): DF001 支付宝转卡/DF002 支付宝转支付宝
|
|
|
+ * 提现(手动到账): DF001 支付宝转卡; DF002 支付宝转支付宝; DF005数字人民币
|
|
|
*/
|
|
|
- public function autoPayout()
|
|
|
- {
|
|
|
+ public function payout() {
|
|
|
try {
|
|
|
$params = request()->validate([
|
|
|
'amount' => ['required', 'numeric', 'min:0.01'],
|
|
|
@@ -166,22 +168,23 @@ class Wallet extends BaseController
|
|
|
'card_no' => ['required', 'string'],
|
|
|
]);
|
|
|
$member_id = request()->user->member_id;
|
|
|
- $res = PaymentOrderService::autoCreatePayout($member_id, $params['amount'], $params['channel'], $params['bank_name'], $params['account'], $params['card_no']);
|
|
|
+ $res = QianBaoWithdrawService::createOrder($member_id, $params['amount'], $params['channel'], $params['bank_name'], $params['account'], $params['card_no']);
|
|
|
if (empty($res['text'])) {
|
|
|
- return $this->success($res);
|
|
|
+ return $this->success($res,'提交成功');
|
|
|
}
|
|
|
return $this->error($res['text']);
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error($e->validator->errors()->first());
|
|
|
- } catch (Exception $e) {
|
|
|
+ } catch (\Exception $e) {
|
|
|
return $this->error($e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 提现(手动到账): DF001 支付宝转卡; DF002 支付宝转支付宝; DF005数字人民币
|
|
|
+ * 提现(自动到账): DF001 支付宝转卡/DF002 支付宝转支付宝
|
|
|
*/
|
|
|
- public function payout() {
|
|
|
+ public function autoPayout()
|
|
|
+ {
|
|
|
try {
|
|
|
$params = request()->validate([
|
|
|
'amount' => ['required', 'numeric', 'min:0.01'],
|
|
|
@@ -191,14 +194,14 @@ class Wallet extends BaseController
|
|
|
'card_no' => ['required', 'string'],
|
|
|
]);
|
|
|
$member_id = request()->user->member_id;
|
|
|
- $res = QianBaoWithdrawService::createOrder($member_id, $params['amount'], $params['channel'], $params['bank_name'], $params['account'], $params['card_no']);
|
|
|
+ $res = PaymentOrderService::autoCreatePayout($member_id, $params['amount'], $params['channel'], $params['bank_name'], $params['account'], $params['card_no']);
|
|
|
if (empty($res['text'])) {
|
|
|
- return $this->success($res);
|
|
|
+ return $this->success($res,'提交成功');
|
|
|
}
|
|
|
return $this->error($res['text']);
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error($e->validator->errors()->first());
|
|
|
- } catch (\Exception $e) {
|
|
|
+ } catch (Exception $e) {
|
|
|
return $this->error($e->getMessage());
|
|
|
}
|
|
|
}
|