From 65795904814509852a1fd7ba9aa143a3c2126a2c Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Thu, 21 Dec 2023 23:00:17 +0800 Subject: [PATCH] yh --- app/Controller/Payment/AccountController.php | 11 +- app/Helper/StringHelper.php | 1 + public/account.html | 111 ++++++++++++------- 3 files changed, 80 insertions(+), 43 deletions(-) diff --git a/app/Controller/Payment/AccountController.php b/app/Controller/Payment/AccountController.php index 4a2772a..50304a7 100644 --- a/app/Controller/Payment/AccountController.php +++ b/app/Controller/Payment/AccountController.php @@ -147,14 +147,15 @@ class AccountController extends AbstractController $userInfo = $this->checkUser($request); $userId = $this->resetUserId($userInfo['userId']); $bankCard = BankCard::where('user_id', $userId)->first(); + $outOrderNo = StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_ACCOUNT_PAY); $requestLog = $this->createRequestLog([ 'userId' => $userId, 'goodsName' => '充值', 'agreementNo' => $bankCard->agreement_no, - 'notifyUrl' => 'http://www.baidu.com', - 'returnUrl' => 'http://www.baidu.com', + 'notifyUrl' => '', + 'returnUrl' => 'http://124.223.222.61:9701/account.html', 'amount' => intval($request->input('amount') * 100), - 'outOrderNo' => time() . rand(1000, 9999), + 'outOrderNo' => $outOrderNo, 'validDate' => date('Y-m-d', time() + 12*3600), 'marketInfo' => [ 'amount' => 0, @@ -164,13 +165,13 @@ class AccountController extends AbstractController [ 'splitUserId' => 'RLX1990', 'sellerFlag' => 1, - 'splitAmount' => 100, + 'splitAmount' => 1, 'subOutOrderNo' => time() . rand(1000, 9999), ] ] ]); $acsNo = $this->paymentService->transferPay($requestLog->getData(), $requestLog->app, $requestLog->request_token); - return $this->success(['acsNo' => $acsNo]); + return $this->success(['acsNo' => $acsNo, 'outOrderNo' => $outOrderNo]); } public function getUserInfo(RequestInterface $request) diff --git a/app/Helper/StringHelper.php b/app/Helper/StringHelper.php index 86a48d6..f0d8999 100644 --- a/app/Helper/StringHelper.php +++ b/app/Helper/StringHelper.php @@ -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_PAY = 'account_pay'; public static function getRandomString($length, $withSpecialChar = false) { diff --git a/public/account.html b/public/account.html index 513fb4b..7bc918c 100644 --- a/public/account.html +++ b/public/account.html @@ -10,37 +10,73 @@
- - - - {{username}} 退出登录 - - - - - - - {{userInfo.real_name}} - 开户 - {{userInfo.certificate_no}} - -- - ********** 修改 - 设置 - - - - - - - {{bankCard.bank_name}} 解绑 - 绑卡 - {{bankCard.card_user_name}} - -- - - - + + + + + + {{username}} 退出登录 + + + + + + + {{userInfo.real_name}} + 开户 + {{userInfo.certificate_no}} + -- + ********** 修改 + 设置 + + + + + + + {{bankCard.bank_name}} 解绑 + 绑卡 + {{bankCard.card_user_name}} + -- + + + + + +
+ + + + + + 充值 + + +
+
+

充值流程

+

1. 输入金额,点击充值按钮

+

2. 按提示转转

+
+
+
+ +
+

您可通过网银或手机银行app向专属打款账户进行转账,其中:

+

订单号:{{outOrderNo}}

+

户名:宝付网络科技(上海)有限公司

+

银行:支付机构备付金集中存管账户

+

开户城市:上海

+

开户网点:宝付网络-备付金账户

+

行号:991290000793

+

专属打款账户:{{acsNo}}

+
+ +
@@ -53,7 +89,7 @@ el: '#app', data() { return { - activeName: 'register', + activeName: 'user', username: '', userInfo: { realname_flag: '', @@ -69,7 +105,10 @@ id: 0, bank_name: '', card_user_name: '' - } + }, + acsNo: '', + outOrderNo: '', + payInfoVisible: false } }, created() { @@ -201,13 +240,9 @@ if (result.code != 1000) { return this.$message.error(response.data.message); } - this.payConfirmVisible = false; - this.$message.success('支付成功'); - this.$alert('请记住您的订单号:' + result.data.bizData.outOrderNo , '支付成功', { - confirmButtonText: '确定', - callback: action => { - } - }); + this.acsNo = result.data.acsNo; + this.outOrderNo = result.data.outOrderNo; + this.payInfoVisible = true; }) .catch((error) => { this.$message.error('请求错误');