thirdpayment
elf 11 months ago
parent eaa50d7c4d
commit 6579590481

@ -147,14 +147,15 @@ class AccountController extends AbstractController
$userInfo = $this->checkUser($request); $userInfo = $this->checkUser($request);
$userId = $this->resetUserId($userInfo['userId']); $userId = $this->resetUserId($userInfo['userId']);
$bankCard = BankCard::where('user_id', $userId)->first(); $bankCard = BankCard::where('user_id', $userId)->first();
$outOrderNo = StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_ACCOUNT_PAY);
$requestLog = $this->createRequestLog([ $requestLog = $this->createRequestLog([
'userId' => $userId, 'userId' => $userId,
'goodsName' => '充值', 'goodsName' => '充值',
'agreementNo' => $bankCard->agreement_no, 'agreementNo' => $bankCard->agreement_no,
'notifyUrl' => 'http://www.baidu.com', 'notifyUrl' => '',
'returnUrl' => 'http://www.baidu.com', 'returnUrl' => 'http://124.223.222.61:9701/account.html',
'amount' => intval($request->input('amount') * 100), 'amount' => intval($request->input('amount') * 100),
'outOrderNo' => time() . rand(1000, 9999), 'outOrderNo' => $outOrderNo,
'validDate' => date('Y-m-d', time() + 12*3600), 'validDate' => date('Y-m-d', time() + 12*3600),
'marketInfo' => [ 'marketInfo' => [
'amount' => 0, 'amount' => 0,
@ -164,13 +165,13 @@ class AccountController extends AbstractController
[ [
'splitUserId' => 'RLX1990', 'splitUserId' => 'RLX1990',
'sellerFlag' => 1, 'sellerFlag' => 1,
'splitAmount' => 100, 'splitAmount' => 1,
'subOutOrderNo' => time() . rand(1000, 9999), 'subOutOrderNo' => time() . rand(1000, 9999),
] ]
] ]
]); ]);
$acsNo = $this->paymentService->transferPay($requestLog->getData(), $requestLog->app, $requestLog->request_token); $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) public function getUserInfo(RequestInterface $request)

@ -16,6 +16,7 @@ class StringHelper
const ORDER_NO_TYPE_WITHDRAW_APPLY_BATCH_NUM = 'withdraw_apply_batch_num'; 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_APPLY_NO = 'withdraw_apply_no';
const ORDER_NO_TYPE_WITHDRAW_NO = 'withdraw_no'; const ORDER_NO_TYPE_WITHDRAW_NO = 'withdraw_no';
const ORDER_NO_TYPE_ACCOUNT_PAY = 'account_pay';
public static function getRandomString($length, $withSpecialChar = false) public static function getRandomString($length, $withSpecialChar = false)
{ {

@ -10,6 +10,8 @@
<div id="app"> <div id="app">
<el-container> <el-container>
<el-main> <el-main>
<el-tabs v-model="activeName">
<el-tab-pane label="账户信息" name="user">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-descriptions title="用户信息"> <el-descriptions title="用户信息">
@ -39,8 +41,42 @@
</el-descriptions> </el-descriptions>
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane>
<el-tab-pane label="充值" name="recharge">
<div>
<el-form ref="loginForm" :model="loginForm" label-width="80px">
<el-form-item label="金额">
<el-input v-model="loginForm.username"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="transferPay">充值</el-button>
</el-form-item>
</el-form>
</div>
<div>
<h2>充值流程</h2>
<p>1. 输入金额,点击充值按钮</p>
<p>2. 按提示转转</p>
</div>
</el-tab-pane>
</el-tabs>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog title="转账信息" :visible.sync="payInfoVisible" width="30%">
<div>
<h3>您可通过网银或手机银行app向专属打款账户进行转账其中</h3>
<p><el-tag type="success">订单号:{{outOrderNo}}</el-tag></p>
<p><el-tag type="success">户名:宝付网络科技(上海)有限公司</el-tag></p>
<p><el-tag type="success">银行:支付机构备付金集中存管账户</p>
<p><el-tag type="success">开户城市:上海</el-tag></p>
<p><el-tag type="success">开户网点:宝付网络-备付金账户</el-tag></p>
<p><el-tag type="success">行号991290000793</el-tag></p>
<p><el-tag type="success">专属打款账户:{{acsNo}}</el-tag></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="payInfoVisible = false">确 定</el-button>
</div>
</el-dialog>
</div> </div>
</body> </body>
<!-- import Vue before Element --> <!-- import Vue before Element -->
@ -53,7 +89,7 @@
el: '#app', el: '#app',
data() { data() {
return { return {
activeName: 'register', activeName: 'user',
username: '', username: '',
userInfo: { userInfo: {
realname_flag: '', realname_flag: '',
@ -69,7 +105,10 @@
id: 0, id: 0,
bank_name: '', bank_name: '',
card_user_name: '' card_user_name: ''
} },
acsNo: '',
outOrderNo: '',
payInfoVisible: false
} }
}, },
created() { created() {
@ -201,13 +240,9 @@
if (result.code != 1000) { if (result.code != 1000) {
return this.$message.error(response.data.message); return this.$message.error(response.data.message);
} }
this.payConfirmVisible = false; this.acsNo = result.data.acsNo;
this.$message.success('支付成功'); this.outOrderNo = result.data.outOrderNo;
this.$alert('请记住您的订单号:' + result.data.bizData.outOrderNo , '支付成功', { this.payInfoVisible = true;
confirmButtonText: '确定',
callback: action => {
}
});
}) })
.catch((error) => { .catch((error) => {
this.$message.error('请求错误'); this.$message.error('请求错误');

Loading…
Cancel
Save