From 9335d0b9d5fb681a8ab48ea625017da02ef0d16d Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Thu, 3 Aug 2023 01:58:13 +0800 Subject: [PATCH] yh --- 20230522/20230522.cer | 14 - 20230522/20230522.key | 15 - 20230522/20230522.pfx | Bin 1549 -> 0 bytes 20230522/20230522.pri.key | 15 - 20230522/20230522.pri1.key | 15 - 20230522/20230522.pub.key | 6 - 20230522/pubAndPri.key | 19 - app/Controller/Payment/NotifyController.php | 171 ++---- app/Controller/Payment/PayController.php | 24 +- app/Controller/Payment/ReturnController.php | 27 + app/Helper/Baofu/ApiList.php | 149 +++++ app/Helper/Baofu/BFRSA.php | 160 ++++++ app/Helper/Baofu/Baofu.php | 529 ++++++++++++++++++ app/Helper/Baofu/Common.php | 227 ++++++++ app/Helper/Baofu/H5List.php | 97 ++++ app/Helper/Baofu/HttpClient.php | 109 ++++ app/Helper/Baofu/NotifyList.php | 101 ++++ app/Helper/Baofu/PcList.php | 19 + app/Helper/Baofu/Rsa.php | 143 +++++ app/Helper/Baofu/SdkXML.php | 45 ++ app/Helper/Baofu/SignatureUtil.php | 61 ++ app/Helper/Baofu/Tool.php | 92 +++ app/Helper/Baofu/cert/master/baofu.cer | 21 + app/Helper/Baofu/cert/master/bofumiyao.pfx | Bin 0 -> 4666 bytes .../cert/test/bfkey_100026136@@200001259.cer | 13 + .../cert/test/bfkey_100026136@@200001259.pfx | Bin 0 -> 1796 bytes app/Helper/RedisKey.php | 8 + app/Helper/StringHelper.php | 18 +- app/Middleware/RequestLogMiddleware.php | 1 + app/Model/RequestLog.php | 17 + app/Service/PaymentService.php | 2 +- app/Service/RequestService.php | 15 + app/Service/UserService.php | 168 ++++++ payment.sql | 470 ++-------------- sha256/openssl_pri.key | 27 - sha256/openssl_pub.key | 9 - sha256/pkcs12 | 0 sha256/private-rsa.key | 30 - sha256/pubAndPri.key | 32 -- sha256/public-rsa.cer | 22 - sha256/user-rsa.pfx | Bin 2560 -> 0 bytes 41 files changed, 2133 insertions(+), 758 deletions(-) delete mode 100644 20230522/20230522.cer delete mode 100644 20230522/20230522.key delete mode 100644 20230522/20230522.pfx delete mode 100644 20230522/20230522.pri.key delete mode 100644 20230522/20230522.pri1.key delete mode 100644 20230522/20230522.pub.key delete mode 100644 20230522/pubAndPri.key create mode 100644 app/Controller/Payment/ReturnController.php create mode 100644 app/Helper/Baofu/ApiList.php create mode 100644 app/Helper/Baofu/BFRSA.php create mode 100644 app/Helper/Baofu/Baofu.php create mode 100644 app/Helper/Baofu/Common.php create mode 100644 app/Helper/Baofu/H5List.php create mode 100644 app/Helper/Baofu/HttpClient.php create mode 100644 app/Helper/Baofu/NotifyList.php create mode 100644 app/Helper/Baofu/PcList.php create mode 100644 app/Helper/Baofu/Rsa.php create mode 100644 app/Helper/Baofu/SdkXML.php create mode 100644 app/Helper/Baofu/SignatureUtil.php create mode 100644 app/Helper/Baofu/Tool.php create mode 100644 app/Helper/Baofu/cert/master/baofu.cer create mode 100644 app/Helper/Baofu/cert/master/bofumiyao.pfx create mode 100644 app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.cer create mode 100644 app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.pfx create mode 100644 app/Service/RequestService.php create mode 100644 app/Service/UserService.php delete mode 100644 sha256/openssl_pri.key delete mode 100644 sha256/openssl_pub.key delete mode 100644 sha256/pkcs12 delete mode 100644 sha256/private-rsa.key delete mode 100644 sha256/pubAndPri.key delete mode 100644 sha256/public-rsa.cer delete mode 100644 sha256/user-rsa.pfx diff --git a/20230522/20230522.cer b/20230522/20230522.cer deleted file mode 100644 index 5451d0f..0000000 --- a/20230522/20230522.cer +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICDjCCAXegAwIBAgIUQUeIOIQA9BTBrFUWQtn4XBmRa4wwDQYJKoZIhvcNAQEL -BQAwGTEXMBUGA1UEAwwOMTQ2LjcwLjExMy4xNjUwHhcNMjMwNTIyMTMxMjE0WhcN -MjQwNTE2MTMxMjE0WjAZMRcwFQYDVQQDDA4xNDYuNzAuMTEzLjE2NTCBnzANBgkq -hkiG9w0BAQEFAAOBjQAwgYkCgYEAwCPaaIJ3HYe+oMI4iC6lKz9acPMgAXqpjnm8 -gxbLviGN9Iuec2u6ps4CIfu4fbR6CjABchYxCXKDRVlivqDeQIG4JPozR6KQnexP -4/xLzE2ZcT/isAC60lXVb/yseJ7QqIk3iTGoUFO6P6OU8UchzI9mBkpErxZELlt8 -/WfkwhkCAwEAAaNTMFEwHQYDVR0OBBYEFLWYBOU89B+dVyOWq3onEtwzMBkzMB8G -A1UdIwQYMBaAFLWYBOU89B+dVyOWq3onEtwzMBkzMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQELBQADgYEATliJx0Lb/Kdp9l24ccRGJEUe144c4fPo93Wb6HQ1 -zBSf/aetY1LGjHEV/0Vqavlj8cshya3gxkpPm1aW1t2qGZsKFsK+wY0r6SplxoxT -kDB3ZJHBIAKwIxoAwmXA/Hg9YlRUbBk8J2PR4JDbp1fJ9+Ecako9gD+Z1uv3I/r2 -Nac= ------END CERTIFICATE----- diff --git a/20230522/20230522.key b/20230522/20230522.key deleted file mode 100644 index 6a560ac..0000000 --- a/20230522/20230522.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDAI9pogncdh76gwjiILqUrP1pw8yABeqmOebyDFsu+IY30i55z -a7qmzgIh+7h9tHoKMAFyFjEJcoNFWWK+oN5Agbgk+jNHopCd7E/j/EvMTZlxP+Kw -ALrSVdVv/Kx4ntCoiTeJMahQU7o/o5TxRyHMj2YGSkSvFkQuW3z9Z+TCGQIDAQAB -AoGAeAht84g9vdcFwgxToM/zI3dqmtFoF0R4FKf8mrBtDBSOSE3I6TZN3tMoBe7p -rK5I54BiBtHSRKKjW3mh9JEvBmvHQLudbYL2YAW6OLiuLFFZRQRZVqXkKiRSmgGN -nIN4caYVEHTL5yOmERofR99mhKFpzd/MKVutbf7YRBCdyOECQQDtOl8klQfhk8ir -mL2Ww8Z8Rt1EQZUxwzDiJOZV/iwWUtMGUbL2zwFXGbWYA7lpFNMRNdb4+tUtVyyA -S9K4Ms41AkEAz1gdlIBELak9eROAEWBS9F2UoraIbIgOcl8zLLRjgvIT/3xP5Y8j -i6hM6sm31PTtI07dglKCopChllKZyshw1QJBAOLakgc6mMnHd/tYWdylpNZNMeTG -znRC0yk+3iFXqTNDytbdI8XPGNoBFN2kmhZ5uolXshZwT5FHLqAVYhGRTA0CQQC/ -wzr4UPi9UjzsccCMUY3nO3VwV2ktF1hlJu7pdZxjSwh7zbkHEq9JRsp8iztd1XhM -o2/yS+VN/H21zYc3KNJRAkAkwJvz7KyoZyoUIxrdynSuLYdOS71zm4jYLxumqQ2H -4UNFdQ4Jzx4sUgP6qgT3gs0Ovo9Jjn6A8UnvvCvpFl1h ------END RSA PRIVATE KEY----- diff --git a/20230522/20230522.pfx b/20230522/20230522.pfx deleted file mode 100644 index 5e2b67c78712e21bffbdeb07cc8d157adedf2776..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1549 zcmY+?do&XY90zclS@V`gk+;0&HLtrx*exBd8Ob}zTVAC|#4g<(HeELAs!(J#c{Hxq zj65>sv1~#!E~Pw@N0~c|WO3Iy_ulUP<9B}Ne81=S`|AV8fhBcfoJU z0`>sPaT47ioJ5BxZiVB3^zRk890#ltMHC=FOtebBHvqUASnBT&G5|1K4g_hv{W5Og zW_LRf2obxA172vcx``S5`OS_^lA;6K$a#c4ds`3xBz7PDP`@byfe-4!GuaabwNUWE zQ_BX7=91WbUAjfP^*rVIXlAE2Y^~;ty@sA;QSoU{-V67S@l{&}tz~l#ynyZKyAzSz zbQ_Nk2fGYz-TTyRC%&UQdyCvJn`Iq-mQs0VSUdSHmYtp`GaB^X1p8T9c%!08Tzc9H zp$N+sAQIYwqALc?CSv;fI#(@)wc9aKb8k0>Mnh`xExPS(G!tUTB)0lyyocB4M;Dif z1g+}SS%P8kWLFbI$@4LajB5udx3BO)OwJN=rGJz(qZp^#|D0>jc)BaRSYYI;fRi;862h}>Na0`hAYFo{d5w;Weo~QNZ$S~rgnJO2~V8qBwR%rE0 z0k2`-m9DG`?{hEmpQ@?S=#*El@|OyUJh++E~7EjsSl9CHC;jQdsl5vzee!BKlGo) zYi4YcKq8=9{{bqZy9~ks7ew)_Xr{r^|8SK807d0PQF#AG-|kP<|g?2*#U$3592*fC+h zwr#kBmgJ(mKe+d33LZi_xlu+PmZ>OSd&gCE+f+O*1JLk8OY|9*cx9V$a?&t0 zs`bc2N}U$ZVG25Io;kuylZbnbNz6LUqLc8RjycCO2T-X_lHRpW*LHdU|*u4zqI&u?Zs%8Z~maBHFLSj+yS z-BkynRKJ>`b`3vw0sdq&u8MWK@O7AOK=gcg)y{sUO&<@Bdtu84Jp|upluN2CfhO+# z@CDk_xORozaYfepDfK;QbB4@T6y^LolKR^#O()*0wpkB zYDzzr^-4eQLP(Ez3uh6pdi;!9(%_V@?Cpp)n>)N{7^Y>>^+H^)6bs@>69NjIHIk-2 zeD&khW`lfzDwz1s2l93+D&=f?bB`I#j>Rf?7ySrTi8H0IV`^e>(-j(L%o$SV3eL~n zTGLE0it%9`Y&zLO53c*KYDpyvWf0Vj+kCvu#dAWb0?9+eXe*cP>z>0c;M#CWu!OOk qI8aqW3XBf5RueDXRy1F>Yx*a8R=1@em$Q{G ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMAj2miCdx2HvqDC -OIgupSs/WnDzIAF6qY55vIMWy74hjfSLnnNruqbOAiH7uH20egowAXIWMQlyg0VZ -Yr6g3kCBuCT6M0eikJ3sT+P8S8xNmXE/4rAAutJV1W/8rHie0KiJN4kxqFBTuj+j -lPFHIcyPZgZKRK8WRC5bfP1n5MIZAgMBAAECgYB4CG3ziD291wXCDFOgz/Mjd2qa -0WgXRHgUp/yasG0MFI5ITcjpNk3e0ygF7umsrkjngGIG0dJEoqNbeaH0kS8Ga8dA -u51tgvZgBbo4uK4sUVlFBFlWpeQqJFKaAY2cg3hxphUQdMvnI6YRGh9H32aEoWnN -38wpW61t/thEEJ3I4QJBAO06XySVB+GTyKuYvZbDxnxG3URBlTHDMOIk5lX+LBZS -0wZRsvbPAVcZtZgDuWkU0xE11vj61S1XLIBL0rgyzjUCQQDPWB2UgEQtqT15E4AR -YFL0XZSitohsiA5yXzMstGOC8hP/fE/ljyOLqEzqybfU9O0jTt2CUoKikKGWUpnK -yHDVAkEA4tqSBzqYycd3+1hZ3KWk1k0x5MbOdELTKT7eIVepM0PK1t0jxc8Y2gEU -3aSaFnm6iVeyFnBPkUcuoBViEZFMDQJBAL/DOvhQ+L1SPOxxwIxRjec7dXBXaS0X -WGUm7ul1nGNLCHvNuQcSr0lGynyLO13VeEyjb/JL5U38fbXNhzco0lECQCTAm/Ps -rKhnKhQjGt3KdK4th05LvXObiNgvG6apDYfhQ0V1DgnPHixSA/qqBPeCzQ6+j0mO -foDxSe+8K+kWXWE= ------END PRIVATE KEY----- diff --git a/app/Controller/Payment/NotifyController.php b/app/Controller/Payment/NotifyController.php index 65e2082..0b98f99 100644 --- a/app/Controller/Payment/NotifyController.php +++ b/app/Controller/Payment/NotifyController.php @@ -4,144 +4,93 @@ declare(strict_types=1); namespace App\Controller\Payment; -use App\Helper\Efps\Result; -use App\Helper\Efps\Signer; +use App\Helper\Baofu\Baofu; use App\Helper\Log; use App\Helper\Platform\Notification; use App\Helper\Platform\Signer as PlatformSigner; use App\Helper\StringHelper; -use App\Model\App; -use App\Model\Order; -use App\Model\RefundOrder; use App\Service\PaymentService; +use App\Service\RequestService; +use App\Service\UserService; use Hyperf\HttpServer\Contract\RequestInterface; class NotifyController extends AbstractController { private PaymentService $paymentService; - - public function __construct(PaymentService $paymentService) - { + private UserService $userService; + private RequestService $requestService; + + public function __construct( + PaymentService $paymentService, + UserService $userService, + RequestService $requestService + ) { $this->paymentService = $paymentService; + $this->userService = $userService; + $this->requestService = $requestService; } - public function payment(RequestInterface $request) + public function register(RequestInterface $request) { + $token = $request->route('token'); + $requestLog = $this->requestService->getRequestLogByToken($token); + $params = $request->all(); - Log::info('paymentNotifyToOut params:', $params); - $sign = $request->getHeader('x-efps-sign'); - $data = json_encode($params, JSON_UNESCAPED_UNICODE); - if (!Signer::verify($data, $sign[0])) { - Log::info('paymentNotifyToOut data: ' . $data . ' sign: ' . serialize($sign)); - return [ - 'returnCode' => '0001', - 'returnMsg' => '签名验证失败' - ]; - } - $params = json_decode($data, true); - $outTradeNo = $params['outTradeNo'] ?: ''; - $order = Order::where('order_no', $outTradeNo)->first(); - if (!$order) { - Log::info('paymentNotifyToOut: ' . '订单号不存在[' . $outTradeNo . ']'); - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; - } - $app = App::where('app_id', $order->app_id)->first(); - if (!$app) { - Log::info('paymentNotifyToOut: ' . 'APP不存在[' . $outTradeNo . '][' . $order->app_id . ']'); - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; - } - if ($order->status != Order::STATUS_WAIT_PAY && $order->status != Order::STATUS_FAILED) { - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; + Log::info('registerNotifyParams:', $params); + $baofu = new Baofu(); + if (!$baofu->notifyVerify($params, 'register')) { + Log::info('registerNotifyVerifyFail: ' . $params); + return $baofu->notifySuccess(); } - $params['returnCode'] = '0000'; - $params['returnMsg'] = '成功'; - $result = new Result($params); - $this->paymentService->handlePayResult($result, $order); - - $result = $this->notify($order->notify_url, $app, [ - 'outOrderNo' => $order->out_order_no ?: '', - 'orderNo' => $params['outTradeNo'] ?: '', - 'payState' => $params['payState'], - 'amount' => $params['amount'] ?: 0, - ]); - Log::info('paymentNotifyToOut result: ' . '订单[' . $outTradeNo . '][' . $result . ']'); - - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; + $userId = $requestLog->getDataValue('userId'); + $appId = $requestLog->app_id; + $this->userService->rsyncUser($params['loginNo'], $appId, $userId); + + $result = $this->notify( + $requestLog->getDataValue('notify_url'), + $requestLog->app, + [ + 'user_id' => $params['loginNo'], + ] + ); + + $baofu->notifySuccess(); } - public function refund(RequestInterface $request) + public function bindCard(RequestInterface $request) { + $token = $request->route('token'); + $requestLog = $this->requestService->getRequestLogByToken($token); + $params = $request->all(); - Log::info('refundNotifyToOut params:', $params); - $sign = $request->getHeader('x-efps-sign'); - $data = json_encode($params); - if (!Signer::verify($data, $sign[0])) { - Log::info('refundNotifyToOut data: ' . $data . ' sign: ' . serialize($sign)); - return [ - 'returnCode' => '0001', - 'returnMsg' => '签名验证失败' - ]; - } - $outRefundNo = $params['outRefundNo'] ?: ''; - $order = RefundOrder::where('out_refund_order_no', $outRefundNo)->first(); - if (!$order) { - Log::info('refundNotifyToOut: ' . '订单号不存在[' . $outRefundNo . ']'); - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; - } - $app = App::where('app_id', $order->app_id)->first(); - if (!$app) { - Log::info('refundNotifyToOut: ' . 'APP不存在[' . $outRefundNo . '][' . $order->app_id . ']'); - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; + Log::info('registerNotifyParams:', $params); + $baofu = new Baofu(); + if (!$baofu->notifyVerify($params, 'register')) { + Log::info('registerNotifyVerifyFail: ' . $params); + return $baofu->notifySuccess(); } - if ($order->status != RefundOrder::STATUS_APPLY_SUCCESS) { - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; + + $bindCardFlag = $params['bindCardFlag'] && $params['bindCardFlag'] != 'false' ? true : false; + if ($bindCardFlag) { + $this->userService->rsyncBankCards($params['loginNo']); } - $params['returnCode'] = '0000'; - $params['returnMsg'] = '成功'; - $refundState = $params['refundState'] ?? null; - $refundState = is_null($refundState) ? ($params['payState'] ?? null) : $refundState; - $result = new Result($params); - $this->paymentService->handleRefundResult($result, $order); - - $result = $this->notify($order->notify_url, $app, [ - 'outRefundNo' => $params['outRefundNo'] ?: '', - 'transactionNo' => $params['transactionNo'] ?: '', - 'payState' => $refundState, - 'amount' => $params['amount'] ?: 0, - 'refundAmount' => $params['refundAmount'] ?: 0, - ]); - Log::info('paymentNotifyToOut result: ' . '订单[' . $outRefundNo . '][' . $result . ']'); - return [ - 'returnCode' => '0000', - 'returnMsg' => '处理成功' - ]; + $result = $this->notify( + $requestLog->getDataValue('notify_url'), + $requestLog->app, + [ + 'bind_card_flag' => $bindCardFlag, + 'user_id' => $params['loginNo'], + ] + ); + + $baofu->notifySuccess(); } - protected function notify($url, $app, $data) { + protected function notify($url, $app, $data) + { if (empty($url)) { return 'empty url'; } diff --git a/app/Controller/Payment/PayController.php b/app/Controller/Payment/PayController.php index 3304439..97dfcfd 100644 --- a/app/Controller/Payment/PayController.php +++ b/app/Controller/Payment/PayController.php @@ -6,31 +6,37 @@ namespace App\Controller\Payment; use Hyperf\HttpServer\Contract\RequestInterface; use App\Service\PaymentService; +use App\Service\UserService; +use Hyperf\Context\Context; class PayController extends AbstractController { + private UserService $userService; private PaymentService $paymentService; - public function __construct(PaymentService $paymentService) + public function __construct(PaymentService $paymentService, UserService $userService) { + $this->userService = $userService; $this->paymentService = $paymentService; } - public function bindCard(RequestInterface $request) + public function register(RequestInterface $request) { - $data = $this->paymentService->bindCard($request->all()); - return $this->success($data); + $requestLog = Context::get('requestLog'); + $url = $this->userService->register($request->all(), $requestLog->request_token); + return $this->success(['url' => $url]); } - public function bindCardConfirm(RequestInterface $request) + public function bindCard(RequestInterface $request) { - $data = $this->paymentService->bindCardConfirm($request->all()); - return $this->success($data); + $requestLog = Context::get('requestLog'); + $url = $this->userService->bindCard($request->all(), $requestLog->request_token); + return $this->success(['url' => $url]); } - public function unBindCard(RequestInterface $request) + public function unbindCard(RequestInterface $request) { - $data = $this->paymentService->unBindCard($request->all()); + $data = $this->userService->unbindCard($request->all()); return $this->success($data); } diff --git a/app/Controller/Payment/ReturnController.php b/app/Controller/Payment/ReturnController.php new file mode 100644 index 0000000..d2b537a --- /dev/null +++ b/app/Controller/Payment/ReturnController.php @@ -0,0 +1,27 @@ +requestService = $requestService; + } + + public function go(RequestInterface $request, ResponseInterface $response): Psr7ResponseInterface + { + $token = $request->route('token'); + $requestLog = $this->requestService->getRequestLogByToken($token); + return $response->redirect($requestLog->getDataValue('return_url')); + } +} diff --git a/app/Helper/Baofu/ApiList.php b/app/Helper/Baofu/ApiList.php new file mode 100644 index 0000000..bb68ffe --- /dev/null +++ b/app/Helper/Baofu/ApiList.php @@ -0,0 +1,149 @@ + [ + 'description' => '个人实名开户', + 'url' => '/api/cust/v3.0.0/openAccount', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|customerName|certificateNo' + ], + 'bindCard' => [ + 'description' => '个人银行卡签约-获取短信验证码', + 'url' => '/api/cust/v3.0.0/bindCard', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|cardNo|bankMobile', + ], + 'bindCardCheck' => [ + 'description' => '个人银行卡签约-确认绑卡', + 'url' => '/api/cust/v3.0.0/bindCardCheck', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|requestNo|verifyCode', + ], + 'unbindCard' => [ + 'description' => '个人银行卡解约', + 'url' => '/api/cust/v3.0.0/unbindCard', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|requestNo|agreementNo', + ], + 'queryCustomerInfo' => [ + 'description' => '客户信息查询', + 'url' => '/api/cust/v2.0.0/queryCustomerInfo', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestNo', + ], + 'findBindBankCards' => [ + 'description' => '获取已绑定卡信息', + 'url' => '/api/cust/v2.0.0/findBindBankCards', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|contractNo', + ], + 'assurePaymentSplit' => [ + 'description' => '个人担保支付-余额和卡', + 'url' => '/api/order/v3.0.0/assurePaymentSplit', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|outOrderNo|amount|paidType|splitInfoList', + ], + 'payment' => [ + 'description' => '个人担保支付-聚合支付', + 'url' => '/api/wallet/v3.0.0/payment', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|dataContent', + ], + 'withdraw' => [ + 'description' => '个人提现', + 'url' => '/api/order/v3.0.0/withdraw', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|outOrderNo|amount|agreementNo', + ], + 'enterpriseWithdraw' => [ + 'description' => '企业提现', + 'url' => '/api/order/v3.0.0/merchantWithdraw', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|outOrderNo|amount|agreementNo', + ], + 'getBalanceNew' => [ + 'description' => '账户余额查询', + 'url' => '/api/wallet/v3.0.0/getBalanceNew', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|accountType', + ], + 'recharge' => [ + 'description' => '个人充值', + 'url' => '/api/order/v3.0.0/recharge', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|outOrderNo|amount|agreementNo', + ], + 'merchantTransferRecharge' => [ + 'description' => '企业充值', + 'url' => '/api/order/v3.0.0/merchantTransferRecharge', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|outOrderNo|amount|agreementNo|notifyUrl', + ], + 'unifyPay' => [ + 'description' => '匿名支付-聚合支付', + 'url' => '/api/order/v3.0.0/unifyPay', + 'signParams' => 'orgNo|merchantNo|terminalNo|requestDate|loginNo|orderType|dataContent', + ], + 'cloudB2cAssureRecharge' => [ + 'description' => '担保支付-网银支付', + 'url' => '/api/order/v3.0.0/cloudB2cAssureRecharge', + 'signParams' => 'orgNo|merchantNo|loginNo|terminalNo|requestDate|dataContent', + ], + 'confirmAssurePay' => [ + 'description' => '担保支付-确认分账', + 'url' => '/api/wallet/v3.0.0/confirmAssurePay', + 'signParams' => 'orgNo|merchantNo|loginNo|terminalNo|requestDate|dataContent', + ], + 'refundRequest' => [ + 'description' => '担保支付-分账前退款', + 'url' => '/api/trade/v3.0.0/refundRequest', + 'signParams' => 'orgNo|merchantNo|terminalNo|requestDate|refundTradeId|orgTradeId|refundMoney|refundReason|notifyUrl', + ], + 'profitShareRefundApply' => [ + 'description' => '担保支付-分账后退款-退款申请', + 'url' => '/api/trade/v3.0.0/profitShareRefundApply', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|refundTradeId|orgTradeId|refundAmount|refundSplitInfoList', + ], + 'profitShareRefundConfirm' => [ + 'description' => '担保支付-分账后退款-退款确认', + 'url' => '/api/trade/v3.0.0/profitShareRefundConfirm', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|refundTradeId|refundAmount', + ], + 'profitShareRefundCancel' => [ + 'description' => '担保支付-分账后退款-退款撤销', + 'url' => '/api/trade/v3.0.0/profitShareRefundCancel', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|refundTradeId', + ], + 'modifyLoginNo' => [ + 'description' => '信息维护-客户登录号变更', + 'url' => '/api/cust/v3.0.0/modifyLoginNo', + 'signParams' => 'orgNo|merchantNo|terminalNo|requestDate|loginNo|origLoginNo', + ], + 'mEnterpriseUnbindCard' => [ + 'description' => '企业对公卡解绑', + 'url' => '/api/cust/v3.0.0/applyUnbindCard', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|agreementNo' + ], + 'EnterpriseUnbindCard' => [ + 'description' => '企业对公卡解绑', + 'url' => '/api/cust/v3.0.0/applyUnbindCard', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|agreementNo' + ], + 'sendBindCardEmail' => [ + 'description' => '企业认证重发邮件', + 'url' => '/api/merchant/v1/sendBindCardEmail', + 'signParams' => 'orgNo|terminalNo|requestDate|loginNo' + ], + 'applyBindCard' => [ + 'description' => '企业对公卡绑定', + 'url' => '/api/merchant/v1/applyBindCard', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|requestDate|cardName|bankName|provinceName|cityName|branchName' + ], + 'merchantReportCreate' => [ + 'description' => '企业注册-聚合交易商户报备-v3.1版本-商户录入', + 'url' => '/api/aggregationReport/v3.1.0/merchantReportCreate', + 'signParams' => 'orgNo|merchantNo|terminalNo|requestDate|uniqueId|loginNo|bizContent' + ], + 'authBind' => [ + 'description' => '企业注册-聚合交易商户报备-v3.1版本-授权目录报备', + 'url' => '/api/aggregationReport/v3.1.0/authBind', + 'signParams' => 'orgNo|merchantNo|terminalNo|simId|authType|authContent' + ] + ]; + + public static function get($apiName) + { + return self::$list[$apiName] ?: null; + } +} diff --git a/app/Helper/Baofu/BFRSA.php b/app/Helper/Baofu/BFRSA.php new file mode 100644 index 0000000..da18470 --- /dev/null +++ b/app/Helper/Baofu/BFRSA.php @@ -0,0 +1,160 @@ +getTraceAsString(); + } + } + + + /** + * 私钥解密 + * @param type $Data 解密数据 + * @param type $PublicPath 解密公钥路径 + * @return type + * @throws Exception + */ + public static function decryptByPFXFile($Data,$PfxPath,$PrivateKPASS){ + try { + if (!function_exists( 'hex2bin')) { + throw new Exception("hex2bin PHP5.4及以上版本支持此函数,也可自行实现!"); + } + $KeyObj = self::ReadPrivateKey($PfxPath,$PrivateKPASS); + $DecryptRsult=""; + $blockSize=256;//分段长度 + $totalLen = strlen($Data); + $EncryptSubStarLen = 0; + $DecryptTempData=""; + while ($EncryptSubStarLen < $totalLen) { + openssl_private_decrypt(hex2bin(substr($Data, $EncryptSubStarLen, $blockSize)), $DecryptTempData, $KeyObj); + $DecryptRsult .= $DecryptTempData; + $EncryptSubStarLen += $blockSize; + } + return base64_decode($DecryptRsult); + } catch (Exception $exc) { + echo $exc->getTraceAsString(); + } + } +} +?> \ No newline at end of file diff --git a/app/Helper/Baofu/Baofu.php b/app/Helper/Baofu/Baofu.php new file mode 100644 index 0000000..6b26e7a --- /dev/null +++ b/app/Helper/Baofu/Baofu.php @@ -0,0 +1,529 @@ + 2,//'微信公众号支付', + // 'WECHAT_JSXCX' => '微信小程序支付', + // 'ALIPAY_ALSHH' => '支付宝生活号支付', + // 'ALIPAY_ALXCX' => '支付宝小程序支付', + 'ALIPAY_NATIVE' => 1 //'支付宝主扫' + ]; + + public function apply($loginNo, $email, $returnUrl = 'apply'){ + $data = []; + $data['loginNo'] = $loginNo; + $data['email'] = $email; + $data['notifyUrl'] = NotifyList::getNotifyUrl('apply'); + return $this->pc($returnUrl, $data); + } + + public function register($loginNo, $token) + { + $data = []; + $data['loginNo'] = $loginNo; + $data['dataContent'] = NotifyList::getNotifyUrl('register', $token); + return $this->h5('register', $data, $token); + } + + public function cardBind($loginNo, $token) + { + $data = []; + $data['loginNo'] = $loginNo; + $data['dataContent'] = NotifyList::getNotifyUrl('cardBind', $token); + return $this->h5('cardBind', $data); + } + + public function cardUnbind($loginNo, $agreementNo, $requestNo = '') + { + if (empty($requestNo)) { + $requestNo = StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_UNBIND_CARD); + } + $data = []; + $data['loginNo'] = $loginNo; + $data['requestNo'] = $requestNo; + $data['agreementNo'] = $agreementNo; + return $this->api('unbindCard', $data); + } + + public function getBalance($loginNo) + { + $data = []; + $data['loginNo'] = $loginNo; + $data['accountType'] = 'BALANCE'; + return $this->api('getBalanceNew', $data); + } + + public function withdraw($params, $returnUrl = 'withdraw') + { + $data = []; + $data['amount'] = $params['amount']; + $data['loginNo'] = $params['loginNo']; + $data['agreementNo'] = Rsa::encryptByCERFile($params['agreementNo'], $this->getCerFilePath()); + $data['outOrderNo'] = $params['outOrderNo']; + $data['notifyUrl'] = NotifyList::getNotifyUrl($params['notifyUrl']); + return $this->withReturnUrl($this->api($params['notifyUrl'], $data), $returnUrl); + } + + public function assurePaymentSplit($params, $returnUrl = 'assurePaymentSplit') + { + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['amount'] = $params['amount']; + $data['outOrderNo'] = $params['outOrderNo']; + $data['paidType'] = $params['paidType'] ?: 'CARD'; + $data['agreementNo'] = Rsa::encryptByCERFile($params['agreementNo'], $this->getCerFilePath()); + $data['splitInfoList'] = json_encode($params['splitInfoList']); + $data['expireDate'] = date('YmdHis', time() + 15*60); + $data['validDate'] = date('Ymd'); + $data['notifyUrl'] = $params['notifyUrl']; + return $this->withReturnUrl($this->api('assurePaymentSplit', $data), $returnUrl, ['oid' => $params['oid']]); + } + + public function unifyPay($params){ + $dataContent = [ + 'goodsName' => $params['goodsName'], + 'amount' => $params['amount'], + 'outOrderNo' => $params['outOrderNo'], + 'expireDate' => date('YmdHis', time() + 15*60), + 'notifyUrl' => $params['notifyUrl'], + 'splitInfoList' => $params['splitInfoList'], + 'paidType' => $params['paidType'], + 'validDate' => date('Ymd'), + ]; + + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['orderType'] = 'SPLIT_PAY'; + $data['dataContent'] = json_encode($dataContent); + // 1.微信支付(公众号、小程序)需填公众号授权获取微信用户openid + // 2.支付宝支付(生活号、小程序)需填生活号授权获取支付宝用户userid + // 3.支付宝主扫可不填写 + $data['channelId'] = $params['channelId'] ?: ''; + $data['forbidCredit'] = $params['forbidCredit'] ? 1 : 0; + $data['simId'] = $params['simId'] ?: $this->getSimID($params['paidType']); + $data['isRaw'] = 0; + $data['appId'] = $params['appId'] ?: ''; + $data['anonymityPayRemark'] = $params['anonymityPayRemark']; + + $res = base64_decode($this->api('unifyPay', $data)['data']); + if(self::PEYMENT_PAID_TYPE[$params['paidType']]){ + $res = json_decode($res, true); + if($res['body']){ + return $res['body']; + } + } + } + + public function cloudB2cAssureRecharge($params){ + $dataContent = [ + 'goodsName' => $params['goodsName'], + 'amount' => $params['amount'], + 'outOrderNo' => $params['outOrderNo'], + 'notifyUrl' => $params['notifyUrl'], + 'splitInfoList' => $params['splitInfoList'], + 'expireDate' => date('YmdHis', time() + 15*60), + 'validDate' => date('Ymd'), + ]; + + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['payId'] = $params['payId']; + $data['dataContent'] = json_encode($dataContent); + return $this->api('cloudB2cAssureRecharge', $data); + } + + public function payment($params, $type = 'ASSURE_PAYMENT') + { + $dataContent = [ + 'goodsName' => $params['goodsName'], + 'amount' => $params['amount'], + 'outOrderNo' => $params['outOrderNo'], + 'expireDate' => date('YmdHis', time() + 15*60), + 'notifyUrl' => $params['notifyUrl'], + 'splitInfoList' => $params['splitInfoList'], + 'paidType' => $params['paidType'], + 'validDate' => date('Ymd'), + ]; + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['simId'] = $this->getSimID($params['paidType']); + // 1.微信支付(公众号、小程序)需填公众号授权获取微信用户openid + // 2.支付宝支付(生活号、小程序)需填生活号授权获取支付宝用户userid + // 其余时间不传 + $data['chanalId'] = $params['chanalId'] ?: ''; + $data['dataContent'] = json_encode($dataContent); + // 1.微信支付(公众号、小程序)需填公众号授权获取微信的appid + // 2.支付宝支付(生活号、小程序)需填生活号授权获取支付宝的appid + // 支付宝主扫 不需要 + $data['appId'] = $params['appId'] ?: ''; + $data['isRaw'] = 0; + $data['callType'] = $type; + + $res = base64_decode($this->api('payment', $data)); + if(self::PEYMENT_PAID_TYPE[$params['paidType']]){ + $res = json_decode($res, true); + if($res['body']){ + return $res['body']; + } + } + } + + public function recharge($params, $returnUrl = 'recharge') + { + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['amount'] = $params['amount']; + $data['outOrderNo'] = $params['outOrderNo']; + $data['agreementNo'] = Rsa::encryptByCERFile($params['agreementNo'], $this->getCerFilePath()); + $data['notifyUrl'] = NotifyList::getNotifyUrl('recharge'); + return $this->withReturnUrl($this->api('recharge', $data), $returnUrl); + } + + public function merchantTransferRecharge($params, $returnUrl = 'recharge') + { + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['amount'] = $params['amount']; + $data['outOrderNo'] = $params['outOrderNo']; + $data['agreementNo'] = Rsa::encryptByCERFile($params['agreementNo'], $this->getCerFilePath()); + $data['notifyUrl'] = NotifyList::getNotifyUrl('recharge'); + return $this->api('merchantTransferRecharge', $data); + } + + public function confirmAssurePay($params) + { + $dataContent = [ + 'amount' => $params['amount'], + 'outOrderNo' => $params['outOrderNo'], + 'assureConfirmSplitInfoList' => $params['assureConfirmSplitInfoList'], + 'oldOutOrderNo' => $params['oldOutOrderNo'], + ]; + + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['dataContent'] = json_encode($dataContent); + $data['notifyUrl'] = $params['notifyUrl']; + return $this->api('confirmAssurePay', $data); + } + + public function findBindBankCards($params) + { + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['contractNo'] = $params['contractNo']; + $data['tradeType'] = 'BASE_LIST'; + return $this->api('findBindBankCards', $data); + } + + public function queryCustomerInfo($loginNo, $customerType = 'PERSON') + { + $requestNo = StringHelper::generateOrderNo(StringHelper::ORDER_NO_TYPE_QUERY_CUSTOMER_INFO); + $data = []; + $data['loginNo'] = $loginNo; + $data['customerType'] = $customerType; + $data['requestNo'] = $requestNo; + $result = $this->api('queryCustomerInfo', $data); + return json_decode($result, true); + } + + public function pwdModify($loginNo, $returnUrl = 'pwdModify') + { + $data = []; + $data['loginNo'] = $loginNo; + return $this->h5($returnUrl, $data); + } + + public function mEnterprisePwdModify($loginNo, $returnUrl = 'mEnterprisePwdModify') + { + $data = []; + $data['loginNo'] = $loginNo; + return $this->h5($returnUrl, $data); + } + + public function pwdForget($loginNo, $returnUrl = 'pwdForget') + { + $data = []; + $data['loginNo'] = $loginNo; + return $this->h5($returnUrl, $data); + } + + public function mPwReset($loginNo, $returnUrl = 'mPwReset') + { + $data = []; + $data['loginNo'] = $loginNo; + return $this->h5($returnUrl, $data); + } + + public function refund($params, $returnUrl = 'refund') + { + $data = []; + $data['loginNo'] = $params['loginNo']; + $data['refundTradeId'] = $params['refundTradeId']; + $data['orgTradeId'] = $params['orgTradeId']; + $data['refundMoney'] = $params['refundMoney']; + $data['refundReason'] = $params['refundReason']; + $data['oldSubOutOrderNo'] = $params['oldSubOutOrderNo']; + // $data['refundSplitInfoList'] = json_encode($params['refundSplitInfoList']); + $data['notifyUrl'] = NotifyList::getNotifyUrl($returnUrl); + return $this->api('refundRequest', $data); + } + + public function modifyLoginNo($origLoginNo, $loginNo) + { + $data = []; + $data['loginNo'] = $loginNo; + $data['origLoginNo'] = $origLoginNo; + return $this->api('modifyLoginNo', $data); + } + + public function mEnterpriseUnbindCard($loginNo, $agreementNo, $returnUrl = 'mEnterpriseUnbindCard') + { + $data = []; + $data['loginNo'] = $loginNo; + $data['agreementNo'] = $agreementNo; + $data['notifyUrl'] = NotifyList::getNotifyUrl($returnUrl); + return $this->api($returnUrl,$data); + } + + public function sendBindCardEmail($loginNo, $returnUrl = 'sendBindCardEmail') + { + $data = []; + $data['loginNo'] = $loginNo; + return $this->api($returnUrl,$data); + } + + public function applyBindCard($loginNo, $info, $returnUrl = 'applyBindCard') + { + $data = []; + $data['loginNo'] = $loginNo; + $data['cardNo'] = BFRSA::encryptByCERFile($info['cardNo'], EXTEND_PATH . Env::get('BAOFOO_CER_FILE_PATH')); + $data['cardName'] = $info['cardName']; + $data['bankName'] = $info['bankName']; + $data['branchName'] = $info['branchName']; + $data['provinceName'] = $info['provinceName']; + $data['cityName'] = $info['cityName']; + $data['notifyUrl'] = NotifyList::getNotifyUrl($returnUrl); + return $this->api($returnUrl,$data); + } + + public function openAccount($loginNo, $info, $returnUrl = 'openAccount') + { + $data = []; + $data['loginNo'] = $loginNo; + $data['customerName'] = BFRSA::encryptByCERFile($info['customerName'], EXTEND_PATH . Env::get('BAOFOO_CER_FILE_PATH')); + $data['certificateNo'] = BFRSA::encryptByCERFile($info['certificateNo'], EXTEND_PATH . Env::get('BAOFOO_CER_FILE_PATH')); + $data['base64imageFront'] = $info['imageFront']; + $data['base64imageBack'] = $info['imageBack']; + return $this->api($returnUrl,$data); + } + + public function shortMessage($loginNo, $info, $returnUrl = 'bindCard') + { + $data = []; + $data['loginNo'] = $loginNo; + $data['cardNo'] = BFRSA::encryptByCERFile($info['cardNo'], EXTEND_PATH . Env::get('BAOFOO_CER_FILE_PATH')); + $data['bankMobile'] = BFRSA::encryptByCERFile($info['bankMobile'], EXTEND_PATH . Env::get('BAOFOO_CER_FILE_PATH')); + $data['notifyUrl'] = NotifyList::getNotifyUrl('cardBind'); + return $this->api($returnUrl,$data); + } + + public function fixedBinding($loginNo, $info, $returnUrl = 'bindCardCheck') + { + $data = []; + $data['loginNo'] = $loginNo; + $data['requestNo'] = $info['requestNo']; + $data['verifyCode'] = $info['verifyCode']; + $res = $this->api('bindCardCheck', $data); + return $this->withReturnUrl($res['url'], $returnUrl); + } + + // 分账后退款-退款申请-请求示例 + // { + // "merchantNo": "100026136", + // "terminalNo": "200001259", + // "orgNo": "100026136", + // "refundTradeId": "TID16317806300773", + // "refundTradeType": "REFUND_APPLY", + // "refundReason": "默认退款", + // "requestDate": "20210916162350", + // "loginNo": "13111111111", + // "refundSplitInfoList": [{ + // "orgSubOutOrderNo": "subAH66EXyRAYP2SwGZ8663", + // "refundAmount": "250" + // }, { + // "orgSubOutOrderNo": "sub5dAfxGcncXPfD5AmRYDr", + // "refundAmount": "250" + // }], + // "orgTradeId": "TID16317805680623", + // "refundAmount": "500", + // "signData": "414875aa3a2c4c8ed4ded198ea1f4025277ab239a73c3d7d4f1a8aed2d918f7fb660328bd54c47770579e181cf76fa7ab653c8d0b28bad8bfdf161bc8dfb32184d1b9ce041baa2395761e70267d7f4a56721ae509510a5293237e8a93614ad25227e146c8a4d16097db852fb216841f50c43aaaaca3cdd33effc283f33bfc6ab" + // } + public function profitShareRefundApply($params){ + $data = []; + $data['loginNo'] = $params['loginNo'] ?: "";// 匿名支付不需要传 + $data['refundTradeId'] = $params['refundTradeId']; + $data['refundTradeType'] = 'REFUND_APPLY'; + $data['orgTradeId'] = $params['orgTradeId']; + $data['refundAmount'] = $params['refundAmount']; // 单位:分 + $data['refundReason'] = $params['refundReason']; + $data['refundSplitInfoList'] = $params['refundSplitInfoList']; + + // 响应示例 + // { + // "success": true, + // "result": { + // "refundOrderId": "21091600000002659", + // "refundTradeId": "TID16317806300773", + // "refundAmount": "500", + // "refundSplitResultList": [{ + // "orgSubOutOrderNo": "subAH66EXyRAYP2SwGZ8663", + // "status": "P", + // "message": null + // }, { + // "orgSubOutOrderNo": "sub5dAfxGcncXPfD5AmRYDr", + // "status": "P", + // "message": null + // }] + // }, + // "errorCode": null, + // "errorMsg": null + // } + return $this->api('profitShareRefundApply', $data); + } + + // 分账后退款-退款确认-请求示例 + // { + // "merchantNo": "100026136", + // "terminalNo": "200001259", + // "orgNo": "100026136", + // "refundTradeId": "TID16317806300773", + // "refundTradeType": "REFUND_CONFIRM", + // "requestDate": "20210916163026", + // "notifyUrl": "http://10.0.60.55:8080/BF_BHT_DEMO_V1/notifyUrl.action?ct=profitShareRefundConfirm", + // "loginNo": "13111111111", + // "orgTradeId": "TID16317805680623", + // "refundAmount": "500", + // "signData": "b5d1d2fe99cdafd24cb77aabc29a4b361a5c83fcd218d98b729220dc720a0479e8ffe1a362074cb8b1cf3ad0bd843c52c54a1e44299f8b6e1d5cbaf140b9d4ac356e271b5ad56551a996271d23075a2637daf35376486d0623a884273d45dfcb50596d124a47cbda4f52d204daf25dddc274239f98c010b6a980d074064fd2ab" + // } + public function profitShareRefundConfirm($params){ + $data = []; + $data['loginNo'] = $params['loginNo'] ?: "";// 匿名支付不需要传 + $data['refundTradeId'] = $params['refundTradeId']; // 与退款申请中的退款请求订单号一致 + $data['refundTradeType'] = 'REFUND_CONFIRM'; + $data['orgTradeId'] = $params['orgTradeId']; // 原始支付商户订单号 + $data['refundAmount'] = $params['refundAmount']; // 单位:分 + $data['notifyUrl'] = $params['notifyUrl']; + + // 响应示例 + // { + // "success": true, + // "result": { + // "refundOrderId": "21091600000002659", + // "refundTradeId": "TID16317806300773", + // "refundMoney": "500", + // "refundStatus": "P", + // "refundType": "BALANCE", + // "message": null + // }, + // "errorCode": null, + // "errorMsg": null + // } + return $this->api('profitShareRefundConfirm', $data); + } + + // 分账后退款-退款撤销-请求示例 + // { + // "merchantNo": "100026136", + // "terminalNo": "200001259", + // "refundTradeId": "TID16317811945423", + // "orgNo": "100026136", + // "refundTradeType": "REFUND_CANCEL", + // "requestDate": "20210916163400", + // "loginNo": "13111111111", + // "signData": "618d70be82967ff6b7b8821446df9476b32ea8442fae4283f3bbfa80034fbb2c42a7f0098522a4729a75182ba51e176401279f0a702a7e0b2a3581f62238ed9cb8e7cbc1295a640506d0fbce5d98b20536c9a46994d5a8f590d7492d9f10b561183307798630ddf74669cddbdf45bcc3c090b28925a4ed1b1353b4c3c798a2af" + // } + public function profitShareRefundCancel($params){ + $data = []; + $data['loginNo'] = $params['loginNo'] ?: "";// 匿名支付不需要传 + $data['refundTradeId'] = $params['refundTradeId']; // 与退款申请中的退款请求订单号一致 + $data['refundTradeType'] = 'REFUND_CANCEL'; + + // 响应示例 + // { + // "success": true, + // "result": true, + // "errorCode": null, + // "errorMsg": null + // } + return $this->api('profitShareRefundCancel', $data); + } + + public function merchantReportCreate($params){ + $data = []; + $data['uniqueId'] = $params['uniqueId']; + $data['loginNo'] = $params['loginNo']; + $data['reportType'] = $params['reportType']; + $data['bizContent'] = json_encode([ + "servicePhone" => $params['servicePhone'], + "businessLicense" => $params['businessLicense'], + "businessLicenseType" => $params['businessLicenseType'], + "merchantName" => $params['merchantName'], + "merchantShortName" => $params['merchantShortName'], + "channelId" => $this->getChannelId(), + "channelName" => $this->getChannelName(), + "business" => $params['business'], + "contactWechatIdType" => $params['contactWechatIdType'], + "contactWechatId" => $params['contactWechatId'], + "serviceCodes" => $params['serviceCodes'], + "addressInfo" => $params['addressInfo'], + "bankCardInfo" => $params['bankCardInfo'] + ]); + + // 响应示例(成功) + // {"success":true,"result":{"state":"SUCCESS","simId":"472688640"},"errorCode":null,"errorMsg":null} + // 响应示例(失败) + // {"success":false,"result":null,"errorCode":"PARAMETER_VALID","errorMsg":"uniqueId格式不合法"} + return $this->api('merchantReportCreate', $data); + } + + public function authBind($params){ + $data = []; + $data['simId'] = $params['simId']; + $data['authType'] = $params['authType']; + $data['authContent'] = $params['authContent']; + + // 响应示例(成功) + // {"success":true,"result":{"state":"SUCCESS"},"errorCode":null,"errorMsg":null} + // 响应示例(失败) + // {"success":false,"result":null,"errorCode":"FAILED","errorMsg":"商户报备记录不存在"} + return $this->api('authBind', $data); + } + + public function setToken($token, $apiName, $params) { + $key = RedisKey::getRequestTokenKey($token); + Redis::set($key, json_encode([ + 'appName' => $apiName, + 'params' => $params, + ])); + Redis::expire($key, 60 * 60); + } + + public function getToken($token) { + $key = RedisKey::getRequestTokenKey($token); + Redis::set($key); + Redis::expire($key, 15 * 60); + } +} diff --git a/app/Helper/Baofu/Common.php b/app/Helper/Baofu/Common.php new file mode 100644 index 0000000..4d83b6e --- /dev/null +++ b/app/Helper/Baofu/Common.php @@ -0,0 +1,227 @@ +config)) { + $this->config = Config::get('baofu'); + } + if (is_null($this->config)) { + throw new BusinessException('宝付未配置'); + } + return $this->config; + } + + private function getBaseUrl() + { + return $this->getConfig()['baseUrl'] ?: ''; + } + + private function getMerchantNo() + { + return $this->getConfig()['merchantNo'] ?: ''; + } + + public function getOrgNo() + { + return $this->getConfig()['orgNo'] ?: ''; + } + + private function getTerminalNo() + { + return $this->getConfig()['terminalNo'] ?: ''; + } + + private function getPrivateKeyPassword() + { + return $this->getConfig()['privateKeyPassword'] ?: ''; + } + + private function getSimIDWx() + { + return $this->getConfig()['simIDWx'] ?: ''; + } + + private function getSimIDAli() + { + return $this->getConfig()['simIDAli'] ?: ''; + } + + private function getChannelId() + { + return $this->getConfig()['channelId'] ?: ''; + } + + private function getChannelName() + { + return $this->getConfig()['channelName'] ?: ''; + } + + private function getSimID($type){ + switch($type){ + case 'ALIPAY_ALSHH': + case 'ALIPAY_ALXCX': + case 'ALIPAY_NATIVE': + $simId = $this->getSimIDAli(); + break; + case 'WECHAT_JSGZH': + case 'WECHAT_JSXCX': + $simId = $this->getSimIDWx(); + break; + default: + throw new BusinessException('未选择类型'); + break; + } + return $simId; + } + + private function getPfxFilePath() + { + return $this->getConfig()['pfxFilePath'] ?: ''; + } + + private function getCerFilePath() + { + return $this->getConfig()['cerFilePath'] ?: ''; + } + + private function pc($pcName, $data) + { + $pcItem = PcList::get($pcName); + if (is_null($pcItem)) { + throw new BusinessException('未定义PC接口'); + } + $response = $this->post($data, $pcItem, 'form'); + return $this->parseResponse($response, 'pc'); + } + + private function h5($h5Name, $data, $token) + { + $h5Item = H5List::get($h5Name); + if (is_null($h5Item)) { + throw new BusinessException('未定义H5接口'); + } + $response = $this->post($data, $h5Item); + return $this->withReturnUrl($this->parseResponse($response, 'h5'), $token); + } + + private function api($apiName, $data) + { + $apiItem = ApiList::get($apiName); + if (is_null($apiItem)) { + throw new BusinessException('未定义API接口'); + } + if ($apiName == 'mEnterpriseUnbindCard'|| $apiName == 'EnterpriseUnbindCard') { + $response = $this->post($data, $apiItem, 'json'); + $res = $this->parseResponse($response, 'api'); + return $this->withReturnUrl($res['checkPwdUrl'], $apiName); + }else{ + $response = $this->post($data, $apiItem, 'json'); + return $this->parseResponse($response, 'api'); + } + } + + private function post($data, $apiOrH5Item, $dataType = 'form') + { + $url = $this->getBaseUrl() . $apiOrH5Item['url']; + $data = $this->buildData($data, $apiOrH5Item); + $response = ''; + try { + Log::write('BaofuPost{time: ' . date('Y-m-d H:i:s') . ', url: '. $url . ', data: '. json_encode(new \ArrayObject($data)) . ', dataType: '. $dataType . '}'); + $response = HttpClient::post($url, $data, $dataType); + Log::write('BaofuPost{response: '. $response . '}'); + } catch (BusinessException $e) { + throw new BusinessException('网络错误'); + } + + return $response; + } + + private function parseResponse($response, $mode) + { + $result = json_decode($response, true); + if (is_null($result)) { + throw new BusinessException('接口返回数据异常'); + } + + if ($mode == 'api') { + if (!$result['success']) { + throw new BusinessException($result['errorMsg']); + } + return $result['result']; + } elseif ($mode == 'pc') { + if (!$result['success']) { + throw new BusinessException($result['errorMsg']); + } + return $result['result']; + } elseif ($mode == 'h5') { + if ($result['retCode'] != 'SUCCESS') { + throw new BusinessException($result['retMsg']); + } + return $result['redirectUrl']; + } + + throw new BusinessException('error parse response mode!!!'); + } + + private function buildData($data, $apiOrH5Item) + { + $needSignParams = $apiOrH5Item['signParams']; + $commonData = []; + $commonData['orgNo'] = $this->getOrgNo(); + $commonData['merchantNo'] = $this->getMerchantNo(); + $commonData['terminalNo'] = $this->getTerminalNo(); + $commonData['requestDate'] = Tool::getTime(); + if (isset($apiOrH5Item['callType'])) { + $commonData['callType'] = $apiOrH5Item['callType']; + } + $data = array_merge($commonData, $data); + return $this->withSignData($data, $needSignParams); + } + + private function withSignData($data, $needSignParams) + { + $signData = $this->sign($data, $needSignParams); + $data['signData'] = $signData; + return $data; + } + + private function sign($data, $needSignParams) + { + $paramList = explode('|', $needSignParams); + $signString = Tool::getSignStr($needSignParams, $paramList, $data, 'request'); + Log::write('BaofuPost{signString: '. $signString . '}'); + return SignatureUtil::sign($signString, $this->getPfxFilePath(), $this->getPrivateKeyPassword()); + } + + public function notifyVerify($data, $notifyName) + { + $notifyItem = NotifyList::get($notifyName); + if (is_null($notifyItem)) { + throw new BusinessException('回调未定义'); + } + $needSignParams = $notifyItem['signParams']; + $paramList = explode('|', $needSignParams); + $signString = Tool::getSignStr($needSignParams, $paramList, $data, 'response'); + return SignatureUtil::verifySign($signString, $this->getCerFilePath(), $data['signature'] ?: ''); + } + + public function notifySuccess() + { + return 'ok'; + } + + public function withReturnUrl($url, $token) + { + return $url . '?redirect_url=' . urlencode(env('WEB_HOST') . '/return/' . $token); + } +} \ No newline at end of file diff --git a/app/Helper/Baofu/H5List.php b/app/Helper/Baofu/H5List.php new file mode 100644 index 0000000..d973134 --- /dev/null +++ b/app/Helper/Baofu/H5List.php @@ -0,0 +1,97 @@ + [ + 'description' => '企业实名开户', + 'url' => '/api/merchant/v1/apply', + 'signParams' => 'orgNo|terminalNo|loginNo|requestDate|email' + ], + 'register' => [ + 'description' => '个人实名开户', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|dataContent', + 'callType' => 'REGISTER', + ], + 'cardBind' => [ + 'description' => '个人银行卡签约', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|dataContent', + 'callType' => 'CARDBIND', + ], + 'cardUnbind' => [ + 'description' => '个人银行卡解约', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|dataContent', + 'callType' => 'CARDUNBIND', + ], + 'withdraw' => [ + 'description' => '个人提现', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|null', + 'callType' => 'WITHDRAW', + ], + 'pwdModify' => [ + 'description' => '个人支付密码修改', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|', + 'callType' => 'PWDMODIFY', + ], + 'mPwdModify' => [ + 'description' => '个人支付密码修改', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|', + 'callType' => 'PWDMODIFY', + ], + 'pwdForget' => [ + 'description' => '个人支付密码设置', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|', + 'callType' => 'PWDFORGET', + ], + 'mPwdForget' => [ + 'description' => '个人支付密码设置', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|', + 'callType' => 'PWDFORGET', + ], + 'pwdForgetWebView' => [ + 'description' => '个人支付密码设置', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|', + 'callType' => 'PWDFORGET', + ], + 'mPwReset' => [ + 'description' => '企业支付密码设置', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|null', + 'callType' => 'BM_PWRESET', + ], + 'PwReset' => [ + 'description' => '企业支付密码设置', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|null', + 'callType' => 'BM_PWRESET', + ], + 'mEnterprisePwdModify' => [ + 'description' => '企业支付密码修改', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|null', + 'callType' => 'BM_PWDMODIFY' + ], + 'EnterprisePwdModify' => [ + 'description' => '企业支付密码修改', + 'url' => '/api/wallet/v3.0.0/login', + 'signParams' => 'orgNo|merchantNo|terminalNo|callType|loginNo|requestDate|null', + 'callType' => 'BM_PWDMODIFY' + ], + ]; + + public static function get($h5Name) + { + return self::$list[$h5Name] ?: null; + } +} diff --git a/app/Helper/Baofu/HttpClient.php b/app/Helper/Baofu/HttpClient.php new file mode 100644 index 0000000..d1fd77d --- /dev/null +++ b/app/Helper/Baofu/HttpClient.php @@ -0,0 +1,109 @@ +'; + + $inputType = 'hidden'; + if ($isAutoSubmit) { + $html .= '正在处理请稍候............................'; + } else { + $inputType = 'text'; + $html .= ''; + } + + $html .= '
'; + + foreach($data as $feild => $value){ + $html .= ''; + } + $html .= '
'; + + return $html; + } +} \ No newline at end of file diff --git a/app/Helper/Baofu/NotifyList.php b/app/Helper/Baofu/NotifyList.php new file mode 100644 index 0000000..ad6282a --- /dev/null +++ b/app/Helper/Baofu/NotifyList.php @@ -0,0 +1,101 @@ + [ + 'description' => '企业实名开户-小额鉴权', + 'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|customerName|email|mobile|authFlag' + ], + 'apply_open_card' => [ + 'description' => '企业实名开户-小额打款', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|applyNo|noticeType|successFlag' + ], + 'apply' => [ + 'description' => '企业实名开户成功通知(待激活)', + 'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|customerName|email|mobile' + ], + 'register' => [ + 'description' => '注册(H5)', + 'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo', + ], + 'cardBind' => [ + 'description' => '绑卡(H5/API)', + 'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|bindCardFlag', + ], + 'recharge' => [ + 'description' => '个人充值(API)', + 'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg', + ], + 'withdraw' => [ + 'description' => '个人提现(API)', + 'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg', + ], + 'enterpriseWithdraw' => [ + 'description' => '企业提现(API)', + 'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|orderStatus|loginId|finishTime', + ], + 'confirmSplit' => [ + 'description' => '确认分账', + 'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|subOutOrderNo|orderStatus|loginId|finishTime|confirmType', + ], + 'confirmEscrowSplit' => [ + 'description' => '自助交易确认分账', + 'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|subOutOrderNo|orderStatus|loginId|finishTime|confirmType', + ], + 'refund' => [ + 'description' => '退款', + 'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg', + ], + 'escrowRefund' => [ + 'description' => '退款', + 'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg', + ], + 'unifyRefund' => [ + 'description' => '匿名支付退款', + 'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg', + ], + 'payment' => [ + 'description' => '支付', + 'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg', + ], + 'escrowPayment' => [ + 'description' => '自助交易支付', + 'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg', + ], + 'unifyPayment' => [ + 'description' => '匿名支付', + 'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|finishTime|orderId|errorMsg', + ], + 'mEnterpriseUnbindCard' => [ + 'description' => '企业对公卡解绑', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|noticeType|successFlag|agreementNo' + ], + 'EnterpriseUnbindCard' => [ + 'description' => '企业对公卡解绑', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|noticeType|successFlag|agreementNo' + ], + 'applyBindCard' => [ + 'description' => '企业对公卡绑定', + 'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|applyNo|noticeType|successFlag' + ] + ]; + + public static function get($notifyName) + { + return self::$list[$notifyName] ?: null; + } + + public static function getNotifyUrl($notifyName, $token) + { + $notifyItem = self::get($notifyName); + if (is_null($notifyItem)) { + throw new Exception('回调不存在'); + } + return env('WEB_HOST') . '/notify/' . ($notifyItem['url'] ?: $notifyName) . '/' . $token; + } +} \ No newline at end of file diff --git a/app/Helper/Baofu/PcList.php b/app/Helper/Baofu/PcList.php new file mode 100644 index 0000000..e163927 --- /dev/null +++ b/app/Helper/Baofu/PcList.php @@ -0,0 +1,19 @@ + [ + 'description' => '企业实名开户', + 'url' => '/api/merchant/v1/apply', + 'signParams' => 'orgNo|terminalNo|loginNo|requestDate|email' + ], + ]; + + public static function get($pcName) + { + return self::$list[$pcName] ?: null; + } +} diff --git a/app/Helper/Baofu/Rsa.php b/app/Helper/Baofu/Rsa.php new file mode 100644 index 0000000..f8142df --- /dev/null +++ b/app/Helper/Baofu/Rsa.php @@ -0,0 +1,143 @@ +getTraceAsString(); + } + } + + + /** + * 私钥解密 + * @param string $data 解密数据 + * @param string $pfxPath 私钥路径 + * @param string $privateKeyPwd 私钥密码 + * @return string + * @throws Exception + */ + public static function decryptByPFXFile($data, $pfxPath, $privateKeyPwd) + { + try { + $keyObj = self::readPrivateKey($pfxPath, $privateKeyPwd); + $decryptRsult = ''; + $blockSize=256;//分段长度 + $totalLen = strlen($data); + $encryptSubStarLen = 0; + $decryptTempData = ''; + while ($encryptSubStarLen < $totalLen) { + openssl_private_decrypt(hex2bin(substr($data, $encryptSubStarLen, $blockSize)), $decryptTempData, $keyObj); + $decryptRsult .= $decryptTempData; + $encryptSubStarLen += $blockSize; + } + return base64_decode($decryptRsult); + } catch (Exception $exc) { + echo $exc->getTraceAsString(); + } + } +} \ No newline at end of file diff --git a/app/Helper/Baofu/SdkXML.php b/app/Helper/Baofu/SdkXML.php new file mode 100644 index 0000000..474a51f --- /dev/null +++ b/app/Helper/Baofu/SdkXML.php @@ -0,0 +1,45 @@ +xml = new XMLWriter(); + } + + public function toXml($data, $eIsArray = false) + { + if (!$eIsArray) { + $this->xml->openMemory(); + $this->xml->startDocument($this->version, $this->encoding); + $this->xml->startElement($this->root); + } + foreach ($data as $key => $value) { + if (is_array($value)) { + $this->xml->startElement($key); + $this->toXml($value, TRUE); + $this->xml->endElement(); + continue; + } + $this->xml->writeElement($key, $value); + } + if (!$eIsArray) { + $this->xml->endElement(); + return $this->xml->outputMemory(true); + } + } + + public static function XTA($xmlstring) + { + return json_decode(json_encode((array) simplexml_load_string($xmlstring)), true); + } +} diff --git a/app/Helper/Baofu/SignatureUtil.php b/app/Helper/Baofu/SignatureUtil.php new file mode 100644 index 0000000..f3e2734 --- /dev/null +++ b/app/Helper/Baofu/SignatureUtil.php @@ -0,0 +1,61 @@ +fw*L+c-AD-1jnvRRv>*+lAOg}QFtl_G&5#aVN_RA|?c3y@P}QK;YnG2m>zR|H7EdNx}Fsi8%Z1 zpr1ZiSa>sFICv&ClWBJUJNZu2kW+d_vlODLc+Kbzq)i@OD4T0(2)#@bU-o1Jz~$+5 zl_RN4Q{~FrLnka*6W4`iFABcSJXt~v30){X+;-n;WoaMwCZv}ye(6uL|8?p~&z1}wC2&OUO9fgUzJ>`SvIFe8Ge;7C8FyMxZ zCs@1;LELv12K|;tmR4kiKFFTO=0>Ya8WvJpW;;n_%W%w5c6Q~i!48bvjR#nwCq%cj zLDr%EF}=AmjhtCSfe#f*!UofGRGPhOw5DRKeER!_b!eH_&&sIM#t16a;j#CtjJTuR z!^X!2TnG;t-5JafWz!}rMD}3;eJ`BLye(r4$XR&3N_@q?06TFD)dthQ2}mmx2}_WB z=7#7fog7wp;^wl1$Uyo>gYA-^$;XAefrf{#9NLpA3X??9=v3dYI6`Iyf3pIwIdGn{ zPIa4kAZ1e!q$>o4>4$!4Hmxv4juYR|B4ou~vi(5K6BS;HVWuo7Dto1>koWZW)kURC z*G{vXw*CPX(CguYelueGU|i+mzC2kl>k^CH!dm%Gr4XHeXCx|UL2DvXYFdvKYKLX| zAirgngpc;wRZkbUn#!F*sB6R)dsT(8e?P6nE+5*C2Y1X zzvNt~>?*&H{U-fNiBL^7 zueu5FQ88W|QE)NPtF7Y=6X1qDuzr+iKljqafhk^0o60kVI9N3BW>0VXnl5h1w_)tQ z7_x!9zv+;3S&gVZ z$symiPLswGpYr<+Ub-d4PLN%EOVllRgX11w7#D*eN^%q>Q&Z-$I3|KyJ`f-c;?L4^ z)rO8f61(V%MTb+mme6RtCp~|8$P=lD`zx^33>>~1cuDLZdWmuj_&x7mqP|7H|D#PQ zVg&GfPUpkRP_nx}IF;D568Y%wI&V24X!IA$MfOfDaluZ~7xgvBOP9OF!Qc{EhSYg# za;o@0KWhySlts#xQG7;~8Wtb_ij7_nK;vDXsOXg#uoQn$d10s?XFKwqpqr;+@TJlj zzCiVv97S0@)n?owkY)DTE-*L0Zt)}?)r=6<&umfO zui8T7BdCmI8DU$x49dj}Rx6b9d`UNNWwX8yc&(Iis0o-7DZ=vt=vefVtk)}MgOUlj z?7@S(Q1PmkQscRmCX?zPQnGa4O#RlJRS3>^iS-;w(59N;+L)!})rXoY7gh$vY#nk&MS;eVgcC^D5<@k|GXw(|?QDup( zY9TgSrxtOrvQzYeDtY|bAK%&ZO21x6#uVf_tf~zu&_ooQe02P9(J^OwX6w*#`NBe7 zUvx8N#gqXO3Q!GPo_@l6QFTVJApPeS(so-LU)m%|Y~J${cU>%TRhkZsqf@RexGPp! zoxf_)G6gpdYCNVmh|r{)bF=CgI3Z>g-e89cn{TAqq=*2H*gq~Oxi#opazHml7K28f{EgQG#~&-VQL5l5x^iSfD*<8 z0A&m&jBx=BM;v&B$<;8G2!~+wirYO!|(^(FjT4e;#Ep!w;i*i=?l_wv}6k$)t>9$cpdIjOxXBM zk_sKN!UnoU_^^KE_BA>8?HaXojCAusHWo;=Z_+7=FfgL;ERLi-hiF>_pd8+Q0LVMsneeGJ5E~%ov&jJ;-6+A#InT${)IlxFFZisAL<*> z74ZAW@7Av@9LUoX=BoQ<4DW_L=x?lYn5PIc`8l*H<)><=Bb#8_E76Yb>^fgNx5pV~ zckQ2WzYq%EVSW+`b{}}+qtX|Yl_+Mi<^OwxdagX!;6svZ@J~_Cx zm%$~ox5~WU+~m#j9ZK)X-mpk7e(+vrk^^^qtHzY_K#kIHh@cWRg$kQseTg1_MHi%n z+4;#aQVsDIStw5z0wZ@hXterf+@EToA+gue_>>|i%c3>7#yBuN0o?!m<zGB%6vh`C6d~t*pukLRXl03;@EtgJNLHyywwdD zixrp4jR1Z5tB!hAG*P`c=My$nkVI8L)@(UOmKNMM#n)_*xT&FYrheWb-$i(Cf26U- z!!;i|3b2RV+@^>XC8v+0VcE0?rS+|+4U%R}!eqlKo!c@Eu{Ei2Rh!%)er|(5X1V4x zVLrxDqS&kwB8Q14$QdRpnaybkyOhLvg0@dk2`;kSjhoUTRDqP$A1)Sg#{e?FhY}%8 zuKdtg-`kS=!|HL8E31t|_&S&L8qIHw=L=6&s2yKN)?9l)?gkTr7#Z;Fl*syzW7%h8 z+c?zbg7+8r*~ zz0G?WRJ5cu%9*fuG82R7`pNz;KFc!=&Of~JrD~B!PI*>^0#1WlJfp6dRwR<(5G!#yd`DazJVoWU!KMZ z2q**(Utk?Fr044SG>Th9%8s|#RoK&x}Q1E_`hCbPP_B#9S$h!fK5m|`3qC{mD?v$M>`+3B0inj4dW z9bnD0yfyPl6h!kSY5_)@KdFv%A#@OW_biIz&kRQ)ej?NFdnsS0Rw1q0kVLP8)`NZ; z^-yx2`(qTT8K;|E0!wkFOauE3TMr9fKl9#J8u4iY3d>gN@C8CRI0a!SUWHh>jStf+ zK%Qq0^ShD3f-Nh(TP`Ep79wQZx6|dYPy(|_LiLTh}{DO}>6MS)`n1`uWUQCQb;=(!lVhCVuO{K#nxINxuhL^8!n) zv${}lz9TY!YHcR#n^|A|0-qH_9eKJEsnAyjC32Dmgj}ViAkot6ar*E)P=^*3@q6Z5 zcMp732G)12ob|5ho++I|GTtrxOte2A`=%}FepL)6XBJ$||8-l0mf1cHKnZ|J>g>&uKj){+tho7c7LT)PO z?Q?gdnzu~fIT-08HM!`jh+Uv1!MbnCRM`)tNT{ui{9fB=p`M_Y?)a(WKS|3)IQU@? zpTu9(RUF`6x;D~hVLx%+(A_I&yrv#$%Z=zo%Nf=n7?mzX2&Kte9mY{A#a;b@8gE)i~n6brW_5;p8+8 zhbSJ}#`r%~`XGe+xtu$QwB|%W`MAEv+#bFVDV;|tT*p=Z?J=^RjQi}oHE1m)!&Bhn%|T}_a^?Em%FO=&M5-Tq%c63y}@lSC-B_cWVCtSr`fZ}erJbdDu^ldNby)8;(+sfJeO zvbAusJoS(7L0GBN4buu@xySnxl~7oLrQoeQ7nq4RFEU`AGv&=4(b1{=Cspk;@dy4F zZrN_MRk7>}0Y4p-Bt3S|0&Y94rs6;7XhEuQV`@`>Y(zd&;X^?Jq#PdF5UuKqJW3;- zB)Cnm;}oS?Qp%(}tW#eLU6|NA_e6Dq@=Cp(e}ngs?>8zmi@L40yL9VZLYnS3rRA%t)<;z)WTse&aD4DywDCcKkvC+>dmo1EA9AM=U zaU`=78%_|vY%+%l@zNIesaLm7dgiMBi%WY$=jg)_eg;3yYwBA0WD{IBtwb{l*~4}A z+WsSM=+Gqih1ou^lh?mg@VWh!BvmI-cSKF!~b#t*7WP>45g)_ zY>aS?7&Q-lm@h@O&)&yKxWc+QE;P%v5WA=0C!eqsB|20h_?IlAdq|D@Y^OF~QIRiY zK;Gn3!pc;jn(UNPQID7IQ@ta|y(<;Z7H;TXR}n49<8jU^fPL>-GUQMoPJzDX&##)s zAEk6V>yv0Lk|Z|yySD)ec8+hFUXT%095{LGNQ1qdR&NQv>V$UDZ&nNzJKmG2=+Ai( z`3uF@E?Khtpc1=IH`DypLT9T&EUvK}rO@M27z+oA^!MU`F?WgBqxwhh75!7Bn_ML? ztnJKbnlAO2-_o>gdh*}27VKHqhq4^+4ittp*6V!s!wPu5>=ArDZUU-kPpEn2T)(YD zptVLVj{g_xb3;w=CXpkM^Kf_+I!Q(mFyC=e9AwZHrb>io+klp*;LSqL)(4;P1z6dQ{k zOm&xf)|TNpyEoi8`KFd)nG2~VmI0>fV?n*vUs{(Ch4Yi?-t|yVi13R3v&jDokBFp2 literal 0 HcmV?d00001 diff --git a/app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.cer b/app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.cer new file mode 100644 index 0000000..62bdcd5 --- /dev/null +++ b/app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.cer @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICWTCCAcKgAwIBAgIGAWmff/EAMA0GCSqGSIb3DQEBDQUAMHAxHTAbBgNVBAMMFDEwMDAyNjEz +NkBAMjAwMDAxMjU5MREwDwYDVQQHDAhzaGFuZ2hhaTERMA8GA1UECAwIU2hhbmdIYWkxCzAJBgNV +BAYTAkNOMQswCQYDVQQKDAJiZjEPMA0GA1UECwwGYmFvZm9vMB4XDTE5MDMyMTA5MDU1NVoXDTI5 +MDMzMTA5MDU1NVowcDEdMBsGA1UEAwwUMTAwMDI2MTM2QEAyMDAwMDEyNTkxETAPBgNVBAcMCHNo +YW5naGFpMREwDwYDVQQIDAhTaGFuZ0hhaTELMAkGA1UEBhMCQ04xCzAJBgNVBAoMAmJmMQ8wDQYD +VQQLDAZiYW9mb28wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMXgePGIUnUfOvK8YUaMfW6r +mDeG8TdP0ldFo/eIRU8iOamxYujcpd1OfY++xO42h4Pv0g7ZzIFOWc3NCkRTvWg02ycMd00uaDBo +w0d1W4XCKpV22JUo1fseHF8Jzpa59nXQ+sSmQjTsNjfbMcpek8GXeqlpDFX5AYHgt3FirbDVAgMB +AAEwDQYJKoZIhvcNAQENBQADgYEAvtayiw6G2GNSm2d6qQzQLm2Ra9OgjzlzSUuTMh4G3rxkfn/N +6a2wBcraay+TMrqaxzoy5HTemAL3qzGPe3O7btp2ZAFF/emiPGw9OtschLHUft2gaSvJAP704IWw +25k02n8r3MgdngbcY5tyaNTIQW4ViSkDhtWnqeI+Nna2aEk= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.pfx b/app/Helper/Baofu/cert/test/bfkey_100026136@@200001259.pfx new file mode 100644 index 0000000000000000000000000000000000000000..bb8fc12bb5bc1718f1512e5a48da30ffcfc0f52f GIT binary patch literal 1796 zcmY+Ddpy&7AHaXRI5pC1G;QWy>Wxr$yTu zi!()+lTdS#%T{i=#CeiMGNH1_{aMfJJm+|}2KHt~-^ZkDQ`o1wVIRFfTU}*4W zxV&kObIyt~NDfp@gV#Z6@ERFrV`vcPe~cgmC=G&>VXQ38;fjC0Qc?hct7+gy3=Pc3 zn7|eOk7diXp~&i0>b?a0G;yYGC|ISca%jrjVG#_50#F(_0~WC|WUy^La?|>~s-fSAhl>ax7G>EFzGVI|*A z=D#DUe>$9<~+G8rAOmL+_V zl5OSLA-Cuw-QkpS9v&Un%7ZgHP=Bgj3M^W+Pz6J)uytu~)1P&w>sR<5C?T{{wT9o48Z!9fu!(sFVK zV*COwgGxHI1=!qK`M6Ww$|k;C?*s*ENN(^am#eG1{X!Ia)LD3iD<3`KnP!0tk~du} z%kCSQEqjR}c?E@3Ajr8K2h%)h%UM&!x`DMtVV;SmfzfGAwq6aY#$stGIUw{q`O+<~ z$u6O)BwybJzMv&hpstg0Qz;w|+x`%uCoz=gTe)3!*}+WJjctKuaMcbN(TBRH5tle$ zhb83Vdd`mFCHf9(7ZJ9d*mpAAw~>PoSrN_OzG#!UZ%nEH;L!`ZA!~k5RRq1qpZ6hH z34Y6Go~l0|!$h63K>@v-h35dY*3XvdDN^FGbi~S{c64gWQkB=a0#G7r6dQ#(@YfHQ zM`H1MHoyrW5{LmJfU`gdfCVuB3o8IGJ6p>tNfuUrQjCmQ0XTqw(f@miIu;34^@*lL z?8f47)>s@t)(EyXGGV;`x+Dj$ra_!!hy(@!vPSrO0{VwQ@NWXi>2EgP?WwTOR~OI4 z1+Np@R^Na8CQt?q0zCEVVMsZGxm5W6!#A4Tzk4#8j*LHQ(fM0UvOKD4Xmz*?PrAuk zG2Xcw?Q!{QF%i@Bub(2WcS~dA?B31SYkpAO>+Ox?i#9yd*nU4?a339p!e9AYc2~_G zVWez>UH z^6r}j@g4q7x7(iwG1q8*o%s^AY;*z?hO*dIIvGY4*ZMTxaf)0Ve5xFOFflpuMniYT z%sF>;S9+$dv{|5QC*E`95`8(?_1v$+$(vgE~Z}xu{W(CfAY?=0Z zU#X-XN}-H0GdpsXkXaX>ui1UJX+0^NYhqp~Dp(epW$j7wT5rzm>?q!G@AMz11r33| z>T<&?>NhfY?tw+87MM*iN+d9R=ofCE2RZ5N2Otmm@nET|Kc49XxzxOosFR@7Mjm`= zj&Z=~W8~p5GZhF}8wNm;ulJ@GsMfpeJF3`E+}T3!`2*{&21OEjOGu}xN3$Bhzp*r$ NT#>-Xnu>1<{TJgWD5d}a literal 0 HcmV?d00001 diff --git a/app/Helper/RedisKey.php b/app/Helper/RedisKey.php index f237317..2dd0b6d 100644 --- a/app/Helper/RedisKey.php +++ b/app/Helper/RedisKey.php @@ -21,4 +21,12 @@ class RedisKey public static function getGenerateBindCardKey($timestamp) { return 'gennerate_bank_card:' . date('YmdHi', $timestamp); } + + public static function getOrderNoKey($type, $timestamp) { + return 'order_no_of_' . $type . '_' . date('YmdHi', $timestamp); + } + + public static function getRequestTokenKey($token) { + return 'request_token:' . $token; + } } \ No newline at end of file diff --git a/app/Helper/StringHelper.php b/app/Helper/StringHelper.php index 806ddbc..82b6795 100644 --- a/app/Helper/StringHelper.php +++ b/app/Helper/StringHelper.php @@ -6,6 +6,9 @@ namespace App\Helper; class StringHelper { + const ORDER_NO_TYPE_UNBIND_CARD = 'unbind_card'; + const ORDER_NO_TYPE_QUERY_CUSTOMER_INFO = 'query_customer_info'; + public static function getRandomString($length, $withSpecialChar = false) { $chars = array( @@ -36,20 +39,9 @@ class StringHelper return $password; } - public static function generateOrderNo() { - $now = time(); - $key = RedisKey::getGenerateOrderNoKey($now); - $incrId = Redis::incr($key); - $incrId = '' . $incrId; - Redis::expire($key, 5*60); - $padLength = 6 - strlen($incrId); - $incrId = str_pad($incrId, $padLength, '0', STR_PAD_LEFT); - return date('YmdHis', $now) . $incrId; - } - - public static function generateBankCardOrderNo() { + public static function generateOrderNo($type) { $now = time(); - $key = RedisKey::getGenerateBindCardKey($now); + $key = RedisKey::getOrderNoKey($type, $now); $incrId = Redis::incr($key); $incrId = '' . $incrId; Redis::expire($key, 5*60); diff --git a/app/Middleware/RequestLogMiddleware.php b/app/Middleware/RequestLogMiddleware.php index 878b303..5081b2f 100644 --- a/app/Middleware/RequestLogMiddleware.php +++ b/app/Middleware/RequestLogMiddleware.php @@ -38,6 +38,7 @@ class RequestLogMiddleware implements MiddlewareInterface $requestLog = new RequestLog(); $requestLog->app_id = $appId; $requestLog->request_id = $this->generateOrderNo(); + $requestLog->request_token = $requestLog->generateToken(); $requestLog->request_uri = $this->request->getRequestUri(); $requestLog->request_data = json_encode($params, JSON_UNESCAPED_UNICODE); $requestLog->request_time = date('Y-m-d H:i:s'); diff --git a/app/Model/RequestLog.php b/app/Model/RequestLog.php index 879d689..63266f5 100644 --- a/app/Model/RequestLog.php +++ b/app/Model/RequestLog.php @@ -7,4 +7,21 @@ namespace App\Model; class RequestLog extends Model { protected $table = 'request_logs'; + + public function generateToken() { + return md5($this->app_id . '_' . $this->request_id); + } + + public function getDataValue($key, $defaultValue = null) { + $data = $this->getData(); + return $data[$key] ?: $defaultValue; + } + + public function getData() { + $data = $this->request_data['data'] ?: null; + if ($data) { + return json_decode($data, true); + } + return []; + } } \ No newline at end of file diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index e53e34d..b6f3f76 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -295,7 +295,7 @@ class PaymentService extends AbstractService ]); } - public function unBindCard($params) + public function unbindCard($params) { $req = new UnBindCardRequest($params); $app = $req->getApp(); diff --git a/app/Service/RequestService.php b/app/Service/RequestService.php new file mode 100644 index 0000000..f465ec4 --- /dev/null +++ b/app/Service/RequestService.php @@ -0,0 +1,15 @@ +first(); + } +} \ No newline at end of file diff --git a/app/Service/UserService.php b/app/Service/UserService.php new file mode 100644 index 0000000..557134b --- /dev/null +++ b/app/Service/UserService.php @@ -0,0 +1,168 @@ +getApp(); + $reqData = $req->getData(); + + $user = User::where('app_id', $app->app_id)->where('user_id', $reqData['userId'])->first(); + if ($user) { + throw new BusinessException('用户已存在'); + } + + $memberId = $this->generateMemberId($app->app_id, $reqData['userId']); + + $baofu = new Baofu(); + $url = $baofu->register($memberId, $token); + return $url; + } + + public function rsyncUser($memberId, $appId, $userId) { + $baofu = new Baofu(); + $userInfo = $baofu->queryCustomerInfo($memberId); + return $this->saveUser($userInfo, $appId, $userId); + } + + public function saveUser($userInfo, $appId, $userId) { + $user = User::where('app_id', $appId)->where('member_id', $userInfo['loginNo'])->first(); + if ($user) { + $user->contract_no = $userInfo['contractNo']; + $user->realname_flag = $userInfo['realNameFlag'] ?: 'Y'; + $user->bind_card_flag = $userInfo['bindCardFlag']; + $user->set_pwd_flag = $userInfo['setPwdFlag']; + $user->status = $userInfo['operatorStatus'] ?: $userInfo['status']; + $user->email = $userInfo['email'] ?: ''; + $user->mobile = $userInfo['mobile'] ?: ''; + $user->real_name = $userInfo['customerName'] ?: ''; + $user->certificate_no = $userInfo['certificateNo'] ?: ''; + $user->user_type = $userInfo['customerType']; + $user->apply_no = $userInfo['applyNo'] ?: ''; + } else { + $user = new User(); + $user->user_id = $userId; + $user->member_id = $this->generateMemberId($appId , $userId); + $user->contract_no = $userInfo['contractNo']; + $user->realname_flag = $userInfo['realNameFlag'] ?: 'Y'; + $user->bind_card_flag = $userInfo['bindCardFlag']; + $user->set_pwd_flag = $userInfo['setPwdFlag']; + $user->status = $userInfo['operatorStatus'] ?: $userInfo['status']; + $user->email = $userInfo['email'] ?: ''; + $user->mobile = $userInfo['mobile'] ?: ''; + $user->real_name = $userInfo['customerName'] ?: ''; + $user->certificate_no = $userInfo['certificateNo'] ?: ''; + $user->user_type = $userInfo['customerType']; + $user->apply_no = $userInfo['applyNo'] ?: ''; + } + $user->save(); + return $user; + } + + public function rsyncBankCards($memberId) { + $user = User::where('member_id', $memberId)->first(); + + $baofu = new Baofu(); + $bankCards = $baofu->findBindBankCards([ + 'loginNo' => $memberId, + 'contractNo' => $user->contract_no, + ]); + foreach ($bankCards as $bankCard) { + $this->saveBankCard($bankCard, $user->app_id, $user->user_id); + } + } + + public function saveBankCard($data, $appId, $userId) { + $bankCard = BankCard::where('app_id', $appId) + ->where('member_id', $data['loginNo']) + ->where('agreement_no', $data['agreementNo']) + ->first(); + if ($bankCard) { + $bankCard->agreement_no = $data['agreementNo']; + $bankCard->card_user_name = $data['cardUserName']; + $bankCard->last_card_no = $data['lastCardNo']; + $bankCard->bank_mobile = $data['bankMobile'] ?: ''; + $bankCard->bank_code = $data['bankCode']; + $bankCard->bank_name = $data['bankName']; + $bankCard->card_type = $data['cardType']; + $bankCard->cnaps_code = $data['cnapsCode'] ?: ''; + $bankCard->public_flag = $data['publicFlag']; + $bankCard->repayment_date = $data['repaymentDate'] ?: ''; + $bankCard->main_flag = $data['mainFlag']; + $bankCard->status = $data['status']; + $bankCard->ava_flag = $data['avaFlag'] ?: ''; + $bankCard->remark = $data['remark'] ?: ''; + } else { + $bankCard = new BankCard(); + $bankCard->user_id = $userId; + $bankCard->member_id = $this->generateMemberId($appId , $userId); + $bankCard->agreement_no = $data['agreementNo']; + $bankCard->card_user_name = $data['cardUserName']; + $bankCard->last_card_no = $data['lastCardNo']; + $bankCard->bank_mobile = $data['bankMobile'] ?: ''; + $bankCard->bank_code = $data['bankCode']; + $bankCard->bank_name = $data['bankName']; + $bankCard->card_type = $data['cardType']; + $bankCard->cnaps_code = $data['cnapsCode'] ?: ''; + $bankCard->public_flag = $data['publicFlag']; + $bankCard->repayment_date = $data['repaymentDate'] ?: ''; + $bankCard->main_flag = $data['mainFlag']; + $bankCard->status = $data['status']; + $bankCard->ava_flag = $data['avaFlag'] ?: ''; + $bankCard->remark = $data['remark'] ?: ''; + } + $bankCard->save(); + return $bankCard; + } + + public function generateMemberId($appId, $userId) { + return md5($appId . '-' . $userId); + } + + public function bindCard($params, $token) { + $req = new BindCardRequest($params); + $app = $req->getApp(); + $reqData = $req->getData(); + + $user = User::where('app_id', $app->app_id)->where('user_id', $reqData['userId'])->first(); + if (empty($user)) { + throw new BusinessException('用户不存在'); + } + + $baofu = new Baofu(); + $url = $baofu->cardBind($user->member_id, $token); + return $url; + } + + public function unbindCard($params) { + $req = new UnBindCardRequest($params); + $app = $req->getApp(); + $reqData = $req->getData(); + + $user = User::where('app_id', $app->app_id)->where('user_id', $reqData['userId'])->first(); + if (empty($user)) { + throw new BusinessException('用户不存在'); + } + + $baofu = new Baofu(); + $result = $baofu->cardUnbind($user->member_id, $reqData['agreementNo']); + if ($result && $result != 'false') { + $this->rsyncBankCards($user->member_id) ; + return true; + } + return false; + } +} \ No newline at end of file diff --git a/payment.sql b/payment.sql index 82bfd10..722ed68 100644 --- a/payment.sql +++ b/payment.sql @@ -1,420 +1,50 @@ -/* - Navicat Premium Data Transfer - - Source Server : payment - Source Server Type : MySQL - Source Server Version : 80033 - Source Host : 146.70.113.165:3306 - Source Schema : payment - - Target Server Type : MySQL - Target Server Version : 80033 - File Encoding : 65001 - - Date: 17/06/2023 15:31:15 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for apps --- ---------------------------- -DROP TABLE IF EXISTS `apps`; -CREATE TABLE `apps` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'appId', - `app_key` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'appKey', - `merchant_id` int(0) NOT NULL COMMENT '商户ID', - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `udx_appid`(`app_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '应用表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of apps --- ---------------------------- -INSERT INTO `apps` VALUES (1, '202305270000001', 'lsHKbuFngCXhN8Ue1s8QHAgzPvOL3u9O', 1, 1, '2023-04-27 13:37:32', '2023-04-27 13:37:32'); -INSERT INTO `apps` VALUES (2, '202306140000001', 'nM2bUJT89njQGzoeDyK8cLmEYJloUsJX', 2, 1, '2023-06-14 14:02:05', '2023-06-14 14:02:05'); - --- ---------------------------- --- Table structure for bank_cards --- ---------------------------- -DROP TABLE IF EXISTS `bank_cards`; -CREATE TABLE `bank_cards` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户编号', - `out_member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `card_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `real_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `mobile` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `bank_card_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `bank_card_type` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `sms_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `protocol` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `expired` varchar(4) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `cvn` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_mobile`(`mobile`) USING BTREE, - INDEX `idx_bankcardno`(`bank_card_no`) USING BTREE, - INDEX `idx_realname`(`real_name`) USING BTREE, - INDEX `idx_cardno`(`card_no`) USING BTREE, - INDEX `idx_smsno`(`sms_no`) USING BTREE, - INDEX `idx_protocol`(`protocol`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '银行卡' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of bank_cards --- ---------------------------- -INSERT INTO `bank_cards` VALUES (1, '202305270000001', 'c001605d9441b295ca056b93e05118c4', '', '350125199405014958', '鲍云辉', '18259196978', '6212261402030943143', 'debit', 'QY202306101807394532525', 'p202306101810656765139', '', '', 2, '2023-06-10 18:08:03', '2023-06-10 18:07:39'); -INSERT INTO `bank_cards` VALUES (2, '202305270000001', '8ff10aeb194a5abf74c3a227116fce75', '', '350722198210070916', '陈斌', '18621982052', '6222021001099508811', 'debit', 'QY202306111403564531851', 'p202306119727581784343', '', '', 2, '2023-06-11 14:06:28', '2023-06-11 14:03:56'); -INSERT INTO `bank_cards` VALUES (3, '202305270000001', 'f657592d076330ccbb226daf259c38b9', '', '350722198207071619', '邓和云', '13795457158', '6222081001018891253', 'debit', 'QY202306111411534532837', '', '', '', 1, '2023-06-11 14:11:53', '2023-06-11 14:11:53'); -INSERT INTO `bank_cards` VALUES (4, '202305270000001', 'f657592d076330ccbb226daf259c38b9', '', '350722198207071619', '邓和云', '13795457158', '6222081001018891253', 'debit', 'QY202306111412284532838', '', '', '', 1, '2023-06-11 14:12:29', '2023-06-11 14:12:29'); -INSERT INTO `bank_cards` VALUES (5, '202305270000001', '71ec26dce84b49a6274c194955d1b8d6', '', '350722198207295719', '付林', '18621537716', '6222081001015068681', 'debit', 'QY202306111414454531855', '', '', '', 1, '2023-06-11 14:14:47', '2023-06-11 14:14:47'); -INSERT INTO `bank_cards` VALUES (6, '202305270000001', '71ec26dce84b49a6274c194955d1b8d6', '', '350722198207295719', '付林', '18621537716', '6222081001015068681', 'debit', 'QY202306111414524531856', 'p202306114309297154239', '', '', 2, '2023-06-11 14:16:00', '2023-06-11 14:14:53'); -INSERT INTO `bank_cards` VALUES (7, '202305270000001', 'b7eaecadec45b5f5de2d46f18e3c62d5', '', '310228199401290813', '费贤峰', '13761957914', '6217920162596287', 'debit', 'QY202306111419324531859', 'p202306113683037151322', '', '', 2, '2023-06-11 14:19:54', '2023-06-11 14:19:33'); -INSERT INTO `bank_cards` VALUES (8, '202305270000001', 'f657592d076330ccbb226daf259c38b9', '', '350722198207071619', '邓和云', '13795457158', '6222081001018891253', 'debit', 'QY202306111424114532844', 'p202306119726263987349', '', '', 2, '2023-06-11 14:24:43', '2023-06-11 14:24:12'); -INSERT INTO `bank_cards` VALUES (9, '202306140000001', '348e93a2410f57861226083d1c03824f', 'T001', '350824199001045864', '饶丽秀', '13817896134', '6212261402022689613', 'debit', 'QY202306162235034551046', '', '', '', 1, '2023-06-16 22:35:04', '2023-06-16 22:35:04'); -INSERT INTO `bank_cards` VALUES (10, '202306140000001', '348e93a2410f57861226083d1c03824f', 'T001', '350824199001045864', '饶丽秀', '13817896134', '6212261402022689613', 'debit', 'QY202306162247164551553', '', '', '', 1, '2023-06-16 22:47:17', '2023-06-16 22:47:17'); -INSERT INTO `bank_cards` VALUES (11, '202306140000001', '348e93a2410f57861226083d1c03824f', 'T001', '350824199001045864', '饶丽秀', '13817896134', '6212261402022689613', 'debit', 'QY202306162254144551597', 'p202306165934444352396', '', '', 2, '2023-06-16 22:55:02', '2023-06-16 22:54:15'); -INSERT INTO `bank_cards` VALUES (12, '202306140000001', 'e2cdf12c6370eda77d7e64395ee1ad2a', 'M1638352613', '350125199805154132', '鲍沣', '18120905661', '6222031402003511735', 'debit', 'QY202306171416194553113', 'p202306179445530889924', '', '', 2, '2023-06-17 14:16:59', '2023-06-17 14:16:20'); - --- ---------------------------- --- Table structure for merchants --- ---------------------------- -DROP TABLE IF EXISTS `merchants`; -CREATE TABLE `merchants` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `username` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户名', - `password` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '密码', - `email` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '用户邮箱', - `mobile` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '用户手机', - `register_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '注册时间', - `register_ip` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '注册IP', - `last_login_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '最后登录时间', - `last_login_ip` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '最后登录IP', - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用户状态', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `username`(`username`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of merchants --- ---------------------------- -INSERT INTO `merchants` VALUES (1, 'abooohmygod', '123456', 'none@gmail.com', '', '2023-04-27 13:36:39', '', '2023-04-27 13:36:39', '', 1, '2023-04-27 13:36:39', '2023-04-27 13:36:39'); -INSERT INTO `merchants` VALUES (2, 'nowlxxpsdbaba', '123456', 'haha@gmail.com', '', '2023-06-14 14:00:34', '', '2023-06-14 14:00:34', '', 1, '2023-06-14 14:00:34', '2023-06-14 14:00:34'); - --- ---------------------------- --- Table structure for orders --- ---------------------------- -DROP TABLE IF EXISTS `orders`; -CREATE TABLE `orders` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `out_member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `order_info` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '商品信息', - `out_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '外部订单号', - `pay_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '支付订单号', - `channel_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '渠道上游订单号', - `amount` int(0) NOT NULL DEFAULT 0 COMMENT '支付金额', - `fee` int(0) NOT NULL DEFAULT 0 COMMENT '手续费', - `redirect_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '跳转地址', - `notify_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '通知地址', - `pay_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '支付地址', - `token` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `protocol` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `payed_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '支付时间', - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '订单状态', - `error_code` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '错误码', - `error_msg` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '错误信息', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_outorderno`(`out_order_no`) USING BTREE, - INDEX `idx_token`(`token`) USING BTREE, - INDEX `idx_protocol`(`protocol`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '订单表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of orders --- ---------------------------- -INSERT INTO `orders` VALUES (1, '202305270000001', '', '', '', '[]', '2023061018080300001', '32202306102881341174762', '2023061016326911986931600110901', 5000, 23, '', '', '', '543cf21602bf4727aee3dea966702c15', 'p202306101810656765139', '2023-06-10 20:02:37', 6, '', '', '2023-06-10 20:02:37', '2023-06-10 18:08:05'); -INSERT INTO `orders` VALUES (2, '202305270000001', '', '', '', '[]', '2023061114062800001', '32202306112017243201331', '2023061110045578578907350110406', 299200, 1346, '', '', '', '78e84b2f516540a2bbdeccb491fe6c03', 'p202306119727581784343', '2023-06-11 14:07:19', 6, '', '', '2023-06-11 14:07:19', '2023-06-11 14:06:29'); -INSERT INTO `orders` VALUES (3, '202305270000001', '', '', '', '[]', '2023061114160000001', '32202306110519028334510', '2023061123411620241923990110907', 299200, 1346, '', '', '', '9c8179c45f124eed97cbdb9631e7c815', 'p202306114309297154239', '2023-06-11 14:16:46', 6, '', '', '2023-06-11 14:16:46', '2023-06-11 14:16:02'); -INSERT INTO `orders` VALUES (4, '202305270000001', '', '', '', '[]', '2023061114195400001', '32202306113510645466551', '2023061133961170128409110110500', 299200, 1346, '', '', '', 'fae081d1049b43e1ac2c0128bd6c60e7', 'p202306113683037151322', '2023-06-11 14:20:29', 6, '', '', '2023-06-11 14:20:29', '2023-06-11 14:19:56'); -INSERT INTO `orders` VALUES (5, '202305270000001', '', '', '', '[]', '2023061114210700001', '32202306113810074682477', '2023061193689959089089400111001', 299200, 1346, '', '', '', '7091030024e1470cbf26c79047111a2d', 'p202306119727581784343', '2023-06-11 14:21:43', 6, '', '', '2023-06-11 14:21:43', '2023-06-11 14:21:09'); -INSERT INTO `orders` VALUES (6, '202305270000001', '', '', '', '[]', '2023061114222600001', '32202306118415026228805', '2023061119939811664328100110500', 299200, 1346, '', '', '', '2343455cba114694ab403169049fe111', 'p202306114309297154239', '2023-06-11 14:23:18', 6, '', '', '2023-06-11 14:23:18', '2023-06-11 14:22:29'); -INSERT INTO `orders` VALUES (7, '202305270000001', '', '', '', '[]', '2023061114244300001', '32202306114656683651484', '2023061164007970913141880111000', 299200, 1346, '', '', '', '87363d25cc21484a8c71705e8f699479', 'p202306119726263987349', '2023-06-11 14:25:05', 6, '', '', '2023-06-11 14:25:05', '2023-06-11 14:24:45'); -INSERT INTO `orders` VALUES (8, '202305270000001', '', '', '', '[]', '2023061114252200001', '32202306119337557466900', '2023061101239845656634030110809', 299200, 1346, '', '', '', '064d8dfc18114ce9a135003856c6d044', 'p202306113683037151322', '2023-06-11 14:25:56', 6, '', '', '2023-06-11 14:25:56', '2023-06-11 14:25:23'); -INSERT INTO `orders` VALUES (9, '202305270000001', '', '', '', '[]', '2023061114374800001', '32202306110913453801379', '2023061110674634313788740110607', 299200, 1346, '', '', '', '9f9511fca01442da855fb12bab29b7d4', 'p202306119727581784343', '2023-06-11 14:38:38', 6, '', '', '2023-06-11 14:38:38', '2023-06-11 14:37:50'); -INSERT INTO `orders` VALUES (10, '202305270000001', '', '', '', '[]', '2023061114385900001', '32202306110398946124528', '2023061151220850744205690110507', 299200, 1346, '', '', '', '4d5659eb9fda4c1f95254242dc340c3f', 'p202306114309297154239', '2023-06-11 14:39:45', 6, '', '', '2023-06-11 14:39:45', '2023-06-11 14:39:02'); -INSERT INTO `orders` VALUES (11, '202305270000001', '', '', '', '[]', '2023061114395800001', '32202306113887201441389', '2023061153204826012590090110403', 299200, 1346, '', '', '', '532d057d420145498e54ffdb4244989e', 'p202306119726263987349', '2023-06-11 14:40:52', 6, '', '', '2023-06-11 14:40:52', '2023-06-11 14:40:00'); -INSERT INTO `orders` VALUES (12, '202305270000001', '', '', '', '[]', '2023061114410200001', '32202306117134950356263', '2023061100901201549083860110004', 299200, 1346, '', '', '', '36b7b765569949a49806573a7bc01b44', 'p202306113683037151322', '2023-06-11 14:41:31', 6, '', '', '2023-06-11 14:41:31', '2023-06-11 14:41:05'); -INSERT INTO `orders` VALUES (13, '202305270000001', '', '', '', '[]', '2023061115074900001', '32202306112877012473198', '2023061141249369621611980110502', 299200, 1346, '', '', '', '362583bc74c24afb9f96d4217c8fcd23', 'p202306119726263987349', '2023-06-11 15:08:51', 6, '', '', '2023-06-11 15:08:51', '2023-06-11 15:07:52'); -INSERT INTO `orders` VALUES (14, '202305270000001', '', '', '', '[]', '2023061115091000001', '32202306110763555493076', '2023061103139644526708010110609', 299200, 1346, '', '', '', '902ebfb6abfd4c1e8222505f3d3fc2eb', 'p202306113683037151322', '2023-06-11 15:09:47', 6, '', '', '2023-06-11 15:09:47', '2023-06-11 15:09:14'); -INSERT INTO `orders` VALUES (15, '202305270000001', '', '', '', '[]', '2023061115291300001', '32202306112963832100050', '2023061198947871386246370110001', 299200, 1346, '', '', '', 'baf40f58b426444b9c8eda87a2567ebb', 'p202306113683037151322', '2023-06-11 15:30:10', 6, '', '', '2023-06-11 15:30:10', '2023-06-11 15:29:15'); -INSERT INTO `orders` VALUES (16, '202305270000001', '', '', '', '[]', '2023061215384000001', '32202306123567578246124', '2023061264670641635959390110302', 299200, 1346, '', '', '', '23630df703f4430d9620590e6b8f3662', 'p202306119727581784343', '2023-06-12 15:39:27', 6, '', '', '2023-06-12 15:39:27', '2023-06-12 15:38:45'); -INSERT INTO `orders` VALUES (17, '202305270000001', '', '', '', '[]', '2023061215393900001', '32202306124599088761574', '2023061270031840405957940110506', 299200, 1346, '', '', '', 'c92f69ce2e3e4cc0adb28bfa672be43c', 'p202306119726263987349', '2023-06-12 15:40:17', 6, '', '', '2023-06-12 15:40:17', '2023-06-12 15:39:40'); -INSERT INTO `orders` VALUES (18, '202305270000001', '', '', '', '[]', '2023061215402400001', '32202306125102124572569', '2023061226077982018737110110706', 299200, 1346, '', '', '', '142b686ca1624b0ab945911b2b52cba5', 'p202306114309297154239', '2023-06-12 15:41:26', 6, '', '', '2023-06-12 15:41:26', '2023-06-12 15:40:25'); -INSERT INTO `orders` VALUES (19, '202305270000001', '', '', '', '[]', '2023061215444100001', '32202306122493017953156', '2023061288375036667566490110205', 299800, 1349, '', '', '', '3519dd5436fa4264b040de7f53ca3bd8', 'p202306113683037151322', '2023-06-12 15:45:04', 6, '', '', '2023-06-12 15:45:04', '2023-06-12 15:44:43'); -INSERT INTO `orders` VALUES (20, '202305270000001', '', '', '', '[]', '2023061216030700001', '32202306127281106211993', '2023061251382821092149470110202', 299200, 1346, '', '', '', '2ac9185cfd664b9ba1bffd10a62a7d3e', 'p202306119727581784343', '2023-06-12 16:04:18', 6, '', '', '2023-06-12 16:04:18', '2023-06-12 16:03:10'); -INSERT INTO `orders` VALUES (21, '202305270000001', '', '', '', '[]', '2023061216042400001', '32202306127908078233956', '2023061204245083990042850111105', 299200, 1346, '', '', '', '396eb2d3fcf94add866d7aad09dd22a0', 'p202306119726263987349', '2023-06-12 16:05:22', 6, '', '', '2023-06-12 16:05:22', '2023-06-12 16:04:26'); -INSERT INTO `orders` VALUES (22, '202305270000001', '', '', '', '[]', '2023061216052600001', '32202306121032823417435', '2023061235056295844173470110908', 299200, 1346, '', '', '', '35c2b63b7aed4b889dd55a2cfb316709', 'p202306114309297154239', '2023-06-12 16:06:05', 6, '', '', '2023-06-12 16:06:05', '2023-06-12 16:05:27'); -INSERT INTO `orders` VALUES (23, '202305270000001', '', '', '', '[]', '2023061216061700001', '32202306127369299724208', '2023061295151667493150150110102', 299800, 1349, '', '', '', 'e86a50e3b7c04242a5f05d1d0c758e10', 'p202306113683037151322', '2023-06-12 16:06:44', 6, '', '', '2023-06-12 16:06:44', '2023-06-12 16:06:18'); -INSERT INTO `orders` VALUES (24, '202305270000001', '', '', '', '[]', '2023061216441800001', '32202306121329100994833', '2023061270190332761849900110508', 299200, 1346, '', '', '', '645457d238b5472c9cf2be5a07396d36', 'p202306119727581784343', '2023-06-12 16:45:17', 6, '', '', '2023-06-12 16:45:17', '2023-06-12 16:44:20'); -INSERT INTO `orders` VALUES (25, '202305270000001', '', '', '', '[]', '2023061216452300001', '32202306120706028850132', '2023061223577516618370720111403', 299200, 1346, '', '', '', '2a73b396fb164b519324ceb21d3dcf99', 'p202306119726263987349', '2023-06-12 16:46:21', 6, '', '', '2023-06-12 16:46:21', '2023-06-12 16:45:26'); -INSERT INTO `orders` VALUES (26, '202305270000001', '', '', '', '[]', '2023061216462900001', '32202306128589354432478', '2023061221035988070493480110408', 299200, 1346, '', '', '', '31beff014b214f65a0298b6eb6a46836', 'p202306114309297154239', '2023-06-12 16:47:17', 6, '', '', '2023-06-12 16:47:17', '2023-06-12 16:46:32'); -INSERT INTO `orders` VALUES (27, '202305270000001', '', '', '', '[]', '2023061216472200001', '32202306121386918941337', '2023061294499138358947750110809', 299800, 1349, '', '', '', '3a7f9667d09d42039efb57d3ee3c1fcc', 'p202306113683037151322', '2023-06-12 16:47:47', 6, '', '', '2023-06-12 16:47:47', '2023-06-12 16:47:24'); -INSERT INTO `orders` VALUES (28, '202305270000001', '', '', '', '[]', '2023061216582500001', '32202306120721978279513', '2023061227884949560913180110001', 299800, 1349, '', '', '', '8ea5861533574181a5adc23051d305b1', 'p202306113683037151322', '2023-06-12 16:59:45', 6, '', '', '2023-06-12 16:59:45', '2023-06-12 16:58:27'); -INSERT INTO `orders` VALUES (29, '202305270000001', '', '', '', '[]', '2023061217102800001', '', '', 299800, 0, '', '', '', '', '', '2023-06-12 05:10:39', 3, '', '', '2023-06-12 17:10:39', '2023-06-12 17:10:39'); -INSERT INTO `orders` VALUES (30, '202305270000001', '', '', '', '[]', '2023061217104300003', '', '', 299800, 0, '', '', '', '04ab3b884e3f47ccb04c3241d3a0ef3c', 'p202306113683037151322', '2023-06-12 17:11:33', 9, '9998', '网络错误', '2023-06-12 17:11:33', '2023-06-12 17:10:44'); -INSERT INTO `orders` VALUES (31, '202305270000001', '', '', '', '[]', '2023061217103600002', '', '', 299800, 0, '', '', '', '', '', '2023-06-12 05:10:46', 3, '', '', '2023-06-12 17:10:46', '2023-06-12 17:10:46'); -INSERT INTO `orders` VALUES (32, '202305270000001', '', '', '', '[]', '2023061316325500001', '', '', 289000, 0, '', '', '', '', '', '2023-06-13 04:33:06', 3, '', '', '2023-06-13 16:33:06', '2023-06-13 16:33:06'); -INSERT INTO `orders` VALUES (33, '202305270000001', '', '', '', '[]', '2023061316331400001', '', '', 289000, 0, '', '', '', '', '', '2023-06-13 04:33:24', 3, '', '', '2023-06-13 16:33:24', '2023-06-13 16:33:24'); -INSERT INTO `orders` VALUES (34, '202305270000001', '', '', '', '[]', '2023061316333800002', '32202306137074124405050', '2023061301285660911982520111107', 289000, 1301, '', '', '', '0ad181e0fbb840b5b5d7902ff3e8567a', 'p202306119727581784343', '2023-06-13 16:35:45', 6, '', '', '2023-06-13 16:35:45', '2023-06-13 16:33:40'); -INSERT INTO `orders` VALUES (35, '202305270000001', '', '', '', '[]', '2023061316344300001', '32202306136655776410720', '2023061305554106168383980110401', 289000, 1301, '', '', '', '34110fd843bd43f48d548a12ed7bb101', 'p202306114309297154239', '2023-06-13 16:35:49', 6, '', '', '2023-06-13 16:35:49', '2023-06-13 16:34:45'); -INSERT INTO `orders` VALUES (36, '202305270000001', '', '', '', '[]', '2023061316360000001', '32202306134217323438139', '2023061364268148672738820110702', 289000, 1301, '', '', '', 'a1cb27cdaed347ac863479567603a1cf', 'p202306113683037151322', '2023-06-13 16:36:34', 6, '', '', '2023-06-13 16:36:34', '2023-06-13 16:36:02'); -INSERT INTO `orders` VALUES (37, '202305270000001', '', '', '', '[]', '2023061316543700001', '', '', 289000, 0, '', '', '', '', '', '2023-06-13 04:54:48', 3, '', '', '2023-06-13 16:54:48', '2023-06-13 16:54:48'); -INSERT INTO `orders` VALUES (38, '202305270000001', '', '', '', '[]', '2023061316550000001', '32202306134429418921414', '2023061369785212696804660110000', 289000, 1301, '', '', '', '417d2db3286c4fa3be105f4b0dba1f5e', 'p202306119727581784343', '2023-06-13 16:56:45', 6, '', '', '2023-06-13 16:56:45', '2023-06-13 16:55:02'); -INSERT INTO `orders` VALUES (39, '202305270000001', '', '', '', '[]', '2023061316553600002', '', '', 289000, 0, '', '', '', 'c187f93769ab450ab50a9bdc075e4a95', 'p202306114309297154239', '2023-06-13 16:56:57', 9, '9998', '网络错误', '2023-06-13 16:56:57', '2023-06-13 16:55:38'); -INSERT INTO `orders` VALUES (40, '202305270000001', '', '', '', '[]', '2023061316572100001', '', '', 289000, 0, '', '', '', '', '', '2023-06-13 04:57:31', 3, '', '', '2023-06-13 16:57:31', '2023-06-13 16:57:31'); -INSERT INTO `orders` VALUES (41, '202305270000001', '', '', '', '[]', '2023061316573300002', '', '', 289000, 0, '', '', '', '', '', '2023-06-13 04:57:43', 3, '', '', '2023-06-13 16:57:43', '2023-06-13 16:57:43'); -INSERT INTO `orders` VALUES (42, '202305270000001', '', '', '', '[]', '2023061316575300003', '', '', 289000, 0, '', '', '', '77bde4e1d36a4350b764c171888bc02a', 'p202306113683037151322', '2023-06-13 16:59:23', 9, '9998', '网络错误', '2023-06-13 16:59:23', '2023-06-13 16:57:54'); -INSERT INTO `orders` VALUES (43, '202305270000001', '', '', '', '[]', '2023061317501800001', '32202306132806576984787', '2023061360842356031629070111004', 289000, 1301, '', '', '', '382ace92316746ab924e65d2996c7a2d', 'p202306119727581784343', '2023-06-13 17:51:15', 6, '', '', '2023-06-13 17:51:15', '2023-06-13 17:50:21'); -INSERT INTO `orders` VALUES (44, '202305270000001', '', '', '', '[]', '2023061317510100001', '32202306134117807905707', '2023061349813001450876250110404', 289000, 1301, '', '', '', 'be0b6d27de4a404ba0659cb563d72ddd', 'p202306114309297154239', '2023-06-13 17:53:15', 6, '', '', '2023-06-13 17:53:15', '2023-06-13 17:51:03'); -INSERT INTO `orders` VALUES (45, '202305270000001', '', '', '', '[]', '2023061317520600001', '32202306135511754479863', '2023061336950277392192810110508', 292600, 1317, '', '', '', 'b2f30251e7b8491e88e3732fe9a6ba5c', 'p202306119726263987349', '2023-06-13 17:52:58', 6, '', '', '2023-06-13 17:52:58', '2023-06-13 17:52:07'); -INSERT INTO `orders` VALUES (46, '202305270000001', '', '', '', '[]', '2023061318024100001', '32202306130600325113281', '2023061372432744709358950110809', 292600, 1317, '', '', '', '6565aae0f99741ea859b464cafbecf8a', 'p202306119726263987349', '2023-06-13 18:03:45', 6, '', '', '2023-06-13 18:03:45', '2023-06-13 18:02:43'); -INSERT INTO `orders` VALUES (47, '202305270000001', '', '', '', '[]', '2023061416343500001', '', '', 289000, 0, '', '', '', '', '', '2023-06-14 04:34:46', 3, '', '', '2023-06-14 16:34:46', '2023-06-14 16:34:46'); -INSERT INTO `orders` VALUES (48, '202305270000001', '', '', '', '[]', '2023061416344600002', '32202306145559279450229', '2023061447936743917286660110704', 289000, 1301, '', '', '', 'aa316599aec04c23af1d4e5c5e75dea8', 'p202306119727581784343', '2023-06-14 16:36:45', 6, '', '', '2023-06-14 16:36:45', '2023-06-14 16:34:48'); -INSERT INTO `orders` VALUES (49, '202305270000001', '', '', '', '[]', '2023061416353900001', '32202306144278546534221', '2023061454449594115759750110906', 292600, 1317, '', '', '', '2bac806127ce409fbf9a59efb425f085', 'p202306119726263987349', '2023-06-14 16:37:00', 6, '', '', '2023-06-14 16:37:00', '2023-06-14 16:35:42'); -INSERT INTO `orders` VALUES (50, '202305270000001', '', '', '', '[]', '2023061416364000001', '', '', 289000, 0, '', '', '', '', '', '2023-06-14 04:36:50', 3, '', '', '2023-06-14 16:36:50', '2023-06-14 16:36:50'); -INSERT INTO `orders` VALUES (51, '202305270000001', '', '', '', '[]', '2023061416365100002', '32202306143948618877606', '2023061479992563363403270110802', 289000, 1301, '', '', '', 'f53ad44693164922a959a248b9b739c9', 'p202306114309297154239', '2023-06-14 16:38:17', 6, '', '', '2023-06-14 16:38:17', '2023-06-14 16:36:52'); -INSERT INTO `orders` VALUES (52, '202305270000001', '', '', '', '[]', '2023061416583900001', '32202306146277171329753', '2023061414853699885569560111207', 289000, 1301, '', '', '', '564b46591d47489dbcf6d0ac44837e3a', 'p202306119727581784343', '2023-06-14 17:01:15', 6, '', '', '2023-06-14 17:01:15', '2023-06-14 16:58:43'); -INSERT INTO `orders` VALUES (53, '202305270000001', '', '', '', '[]', '2023061417005000001', '', '', 287200, 0, '', '', '', '', '', '2023-06-14 05:01:00', 3, '', '', '2023-06-14 17:01:00', '2023-06-14 17:01:00'); -INSERT INTO `orders` VALUES (54, '202305270000001', '', '', '', '[]', '2023061417010300001', '', '', 287200, 0, '', '', '', '', '', '2023-06-14 05:01:14', 3, '', '', '2023-06-14 17:01:14', '2023-06-14 17:01:14'); -INSERT INTO `orders` VALUES (55, '202305270000001', '', '', '', '[]', '2023061417012000002', '32202306142686046456763', '2023061444309050034413050110602', 287200, 1292, '', '', '', 'cb9c8f5132704e0c9617e3f4aec5d0bd', 'p202306119726263987349', '2023-06-14 17:13:30', 6, '', '', '2023-06-14 17:13:30', '2023-06-14 17:01:22'); -INSERT INTO `orders` VALUES (56, '202305270000001', '', '', '', '[]', '2023061417021000001', '', '', 289000, 0, '', '', '', 'd9535cb235754dd985fc6afa07a1e86c', 'p202306114309297154239', '2023-06-14 17:03:40', 9, '9998', '网络错误', '2023-06-14 17:03:40', '2023-06-14 17:02:12'); -INSERT INTO `orders` VALUES (57, '202305270000001', '', '', '', '[]', '2023061417413000001', '', '', 289000, 0, '', '', '', '', '', '2023-06-14 05:41:40', 3, '', '', '2023-06-14 17:41:40', '2023-06-14 17:41:40'); -INSERT INTO `orders` VALUES (58, '202305270000001', '', '', '', '[]', '2023061417413900002', '', '', 289000, 0, '', '', '', '8bb1961c0e884e94a629c6ef67442291', 'p202306119727581784343', '2023-06-14 17:43:05', 9, '9998', '网络错误', '2023-06-14 17:43:05', '2023-06-14 17:41:41'); -INSERT INTO `orders` VALUES (59, '202305270000001', '', '', '', '[]', '2023061417433000002', '32202306148500756125157', '2023061495461638942683610110604', 287200, 1292, '', '', '', '58212e949174445098e18516bfa34a58', 'p202306119726263987349', '2023-06-14 17:44:28', 6, '', '', '2023-06-14 17:44:28', '2023-06-14 17:43:32'); -INSERT INTO `orders` VALUES (60, '202305270000001', '', '', '', '[]', '2023061417432300001', '', '', 287200, 0, '', '', '', '', '', '2023-06-14 05:43:33', 3, '', '', '2023-06-14 17:43:33', '2023-06-14 17:43:33'); -INSERT INTO `orders` VALUES (61, '202305270000001', '', '', '', '[]', '2023061417444100002', '32202306149837935442843', '2023061433748189421683710110104', 289000, 1301, '', '', '', 'd95be84f54c546468379a32d8c37b1f5', 'p202306114309297154239', '2023-06-14 17:45:29', 6, '', '', '2023-06-14 17:45:29', '2023-06-14 17:44:43'); -INSERT INTO `orders` VALUES (62, '202305270000001', '', '', '', '[]', '2023061417443300001', '', '', 289000, 0, '', '', '', '', '', '2023-06-14 05:44:43', 3, '', '', '2023-06-14 17:44:43', '2023-06-14 17:44:43'); -INSERT INTO `orders` VALUES (63, '202306140000001', '2023061622550300001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869255153745', '', '', 100, 0, '', '', '', '', '', '2023-06-16 10:55:23', 3, '', '', '2023-06-16 22:55:23', '2023-06-16 22:55:23'); -INSERT INTO `orders` VALUES (64, '202306140000001', '2023061622565900001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869274017889', '', '', 100, 0, '', '', '', '68153f587ddb47019facf50ceffdec94', 'p202306165934444352396', '2023-06-16 22:57:25', 9, '0227', 'PB520011-借方账户余额不足', '2023-06-16 22:57:25', '2023-06-16 22:57:00'); -INSERT INTO `orders` VALUES (65, '202306140000001', '2023061623003200001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869276223513', '', '', 100, 0, '', '', '', '0859186c538a4c9797d24e6a9134ed4e', 'p202306165934444352396', '2023-06-16 23:01:14', 9, '9998', '网络错误', '2023-06-16 23:01:14', '2023-06-16 23:00:35'); -INSERT INTO `orders` VALUES (66, '202306140000001', '2023061623013300001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869276834288', '32202306165630914833017', '2023061664758323196351080110404', 100, 0, '', '', '', '0bc5d1561fda43cdb76c2e771ffaa79a', 'p202306165934444352396', '2023-06-16 23:01:52', 6, '', '', '2023-06-16 23:01:52', '2023-06-16 23:01:36'); -INSERT INTO `orders` VALUES (67, '202306140000001', '2023061623123500001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869283291812', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-16 11:12:57', 3, '', '', '2023-06-16 23:12:57', '2023-06-16 23:12:57'); -INSERT INTO `orders` VALUES (68, '202306140000001', '2023061623131500001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869283846036', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-16 11:13:36', 3, '', '', '2023-06-16 23:13:36', '2023-06-16 23:13:36'); -INSERT INTO `orders` VALUES (69, '202306140000001', '2023061623135400002', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869284225664', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-16 11:14:14', 3, '', '', '2023-06-16 23:14:14', '2023-06-16 23:14:14'); -INSERT INTO `orders` VALUES (70, '202306140000001', '2023061623194500001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869287675506', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-16 11:20:06', 3, '', '', '2023-06-16 23:20:06', '2023-06-16 23:20:06'); -INSERT INTO `orders` VALUES (71, '202306140000001', '2023061623361000001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869297292619', '32202306166550000279626', '2023061620803856909994130110408', 100, 0, '', 'https://www.baidu.com', '', '6e2938b666d84fbead573ea170ad505a', 'p202306165934444352396', '2023-06-16 23:55:29', 6, '', '', '2023-06-16 23:55:29', '2023-06-16 23:36:14'); -INSERT INTO `orders` VALUES (72, '202306140000001', '2023061700323800001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869331471531', '', '', 100, 0, '', 'https://www.baidu.com', '', '62300c27ab6146b89defd2188f221109', 'p202306165934444352396', '2023-06-16 12:32:42', 2, '', '', '2023-06-17 00:32:42', '2023-06-17 00:32:42'); -INSERT INTO `orders` VALUES (73, '202306140000001', '2023061700515900001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869343091037', '32202306170745217299933', '2023061782282392439260130110703', 100, 0, '', 'https://www.baidu.com', '', '1600ddfc8425487c98beeff098a0ca4d', 'p202306165934444352396', '2023-06-17 00:52:22', 6, '', '', '2023-06-17 00:52:22', '2023-06-17 00:52:02'); -INSERT INTO `orders` VALUES (74, '202306140000001', '2023061701282800001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869364993356', '', '', 100, 0, '', 'https://www.baidu.com', '', '69d5baa5b156415fa3eb6e4d8488c43e', 'p202306165934444352396', '2023-06-16 13:28:33', 2, '', '', '2023-06-17 01:28:33', '2023-06-17 01:28:33'); -INSERT INTO `orders` VALUES (75, '202306140000001', '2023061712255700001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869759433385', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-17 00:26:19', 3, '', '', '2023-06-17 12:26:19', '2023-06-17 12:26:19'); -INSERT INTO `orders` VALUES (76, '202306140000001', '2023061712264400001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869759901483', '', '', 100, 0, '', 'https://www.baidu.com', '', '181dce461a7b40f781455f6c725e6837', 'p202306165934444352396', '2023-06-17 12:28:22', 9, '9998', '网络错误', '2023-06-17 12:28:22', '2023-06-17 12:26:46'); -INSERT INTO `orders` VALUES (77, '202306140000001', '2023061712295200001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869761846050', '32202306175558820403700', '2023061723714712209959490110901', 100, 0, '', 'https://www.baidu.com', '', 'affe4fe37a814f40a8c98ffa2cba9aa2', 'p202306165934444352396', '2023-06-17 12:30:19', 6, '', '', '2023-06-17 12:30:19', '2023-06-17 12:29:56'); -INSERT INTO `orders` VALUES (78, '202306140000001', '2023061712322000001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869763092905', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-17 00:32:41', 3, '', '', '2023-06-17 12:32:41', '2023-06-17 12:32:41'); -INSERT INTO `orders` VALUES (79, '202306140000001', '2023061712331000001', '348e93a2410f57861226083d1c03824f', 'T001', '[]', '16869763798044', '', '', 100, 0, '', 'https://www.baidu.com', '', '', '', '2023-06-17 00:33:30', 3, '', '', '2023-06-17 12:33:30', '2023-06-17 12:33:30'); - --- ---------------------------- --- Table structure for pre_pay_logs --- ---------------------------- -DROP TABLE IF EXISTS `pre_pay_logs`; -CREATE TABLE `pre_pay_logs` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `out_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '外部订单号', - `out_member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '外部用户ID', - `amount` int(0) NOT NULL DEFAULT 0 COMMENT '金额', - `redirect_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '跳转地址', - `notify_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '通知地址', - `token` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_outorderno`(`out_order_no`) USING BTREE, - INDEX `idx_token`(`token`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '预支付表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of pre_pay_logs --- ---------------------------- -INSERT INTO `pre_pay_logs` VALUES (1, '202306140000001', '16868087924514', 'T001', 0, '', 'https://www.baidu.com', 'a791a1374dfda00bd267dac47a67b015', '2023-06-15 13:59:56', '2023-06-15 13:59:56'); -INSERT INTO `pre_pay_logs` VALUES (2, '202306140000001', '16868088084942', 'T001', 0, '', 'https://www.baidu.com', 'a6f2335b03e37a0f2518aa1c7f8224f2', '2023-06-15 14:00:11', '2023-06-15 14:00:11'); -INSERT INTO `pre_pay_logs` VALUES (3, '202306140000001', '16868088372484', 'T001', 0, '', 'https://www.baidu.com', '764e3a550ed7b5179eace04c2a3f61fc', '2023-06-15 14:00:41', '2023-06-15 14:00:41'); -INSERT INTO `pre_pay_logs` VALUES (4, '202306140000001', '16868115688687', 'T001', 0, '', 'https://www.baidu.com', '04ca0ba83b9846dd48b79eb0a4752192', '2023-06-15 14:46:12', '2023-06-15 14:46:12'); -INSERT INTO `pre_pay_logs` VALUES (5, '202306140000001', '16868115809573', 'T001', 0, '', 'https://www.baidu.com', '98ae118659322a07b87680ec6b0459de', '2023-06-15 14:46:24', '2023-06-15 14:46:24'); -INSERT INTO `pre_pay_logs` VALUES (6, '202306140000001', '16868116154565', 'T001', 0, '', 'https://www.baidu.com', '4ba65c4049d1403dade0fd66e7ffab0d', '2023-06-15 14:46:58', '2023-06-15 14:46:58'); -INSERT INTO `pre_pay_logs` VALUES (7, '202306140000001', 'P202306161903005300000', 'M1638352613', 10000, '', 'http://154.23.187.206:9216/api/pay/notify/aboypay/P202306161903005300000', '60b06ca3b984d9867993f67086280ffc', '2023-06-16 19:03:01', '2023-06-16 19:03:01'); -INSERT INTO `pre_pay_logs` VALUES (8, '202306140000001', 'P202306162029440240001', 'M1638352613', 10000, '', 'http://154.23.187.206:9216/api/pay/notify/aboypay/P202306162029440240001', 'f3a01afc9ccd066906e6fdfabfbdb38f', '2023-06-16 20:29:44', '2023-06-16 20:29:44'); -INSERT INTO `pre_pay_logs` VALUES (9, '202306140000001', 'P202306162037109100002', 'M1638352613', 10000, '', 'http://154.23.187.206:9216/api/pay/notify/aboypay/P202306162037109100002', 'c3d2b73818640f4cd2c8fb51ab755420', '2023-06-16 20:37:11', '2023-06-16 20:37:11'); -INSERT INTO `pre_pay_logs` VALUES (10, '202306140000001', '16869247443089', 'T001', 1000, '', 'https://www.baidu.com', '31613ecc52501cf901ee725321a6191d', '2023-06-16 22:12:24', '2023-06-16 22:12:24'); -INSERT INTO `pre_pay_logs` VALUES (11, '202306140000001', '16869248961234', 'T001', 100, '', 'https://www.baidu.com', '45237ebe1c4f0769cda4e66dc90d1565', '2023-06-16 22:14:56', '2023-06-16 22:14:56'); -INSERT INTO `pre_pay_logs` VALUES (12, '202306140000001', '16869249451688', 'T001', 100, '', 'https://www.baidu.com', '55f301372cd4df323da4541fe125cc85', '2023-06-16 22:15:46', '2023-06-16 22:15:46'); -INSERT INTO `pre_pay_logs` VALUES (13, '202306140000001', '16869255153745', 'T001', 100, '', 'https://www.baidu.com', 'e43b81f358c4b69dc9015ba363d20b02', '2023-06-16 22:25:16', '2023-06-16 22:25:16'); -INSERT INTO `pre_pay_logs` VALUES (14, '202306140000001', '16869258728071', 'T001', 100, '', 'https://www.baidu.com', 'f229340b68d8c64bb60c7df2585e6450', '2023-06-16 22:31:12', '2023-06-16 22:31:12'); -INSERT INTO `pre_pay_logs` VALUES (15, '202306140000001', '16869274017889', 'T001', 100, '', 'https://www.baidu.com', 'ea5dfe575f530533233e544c30bea59b', '2023-06-16 22:56:41', '2023-06-16 22:56:41'); -INSERT INTO `pre_pay_logs` VALUES (16, '202306140000001', '16869276223513', 'T001', 100, '', 'https://www.baidu.com', 'f8c90c7488a0eda43ce75a41aba041fe', '2023-06-16 23:00:23', '2023-06-16 23:00:23'); -INSERT INTO `pre_pay_logs` VALUES (17, '202306140000001', '16869276834288', 'T001', 100, '', 'https://www.baidu.com', 'bd7102457175d3dfdea8551b4f86f2ba', '2023-06-16 23:01:23', '2023-06-16 23:01:23'); -INSERT INTO `pre_pay_logs` VALUES (18, '202306140000001', '16869283291812', 'T001', 100, '', 'https://www.baidu.com', 'e5f021f76d88093776ec3c89aa54ff0d', '2023-06-16 23:12:09', '2023-06-16 23:12:09'); -INSERT INTO `pre_pay_logs` VALUES (19, '202306140000001', '16869283846036', 'T001', 100, '', 'https://www.baidu.com', 'efbd5041c5b2ca50d3017e0edcb4c66c', '2023-06-16 23:13:04', '2023-06-16 23:13:04'); -INSERT INTO `pre_pay_logs` VALUES (20, '202306140000001', '16869284225664', 'T001', 100, '', 'https://www.baidu.com', '58fe534086428e6c68b63213e74692e8', '2023-06-16 23:13:42', '2023-06-16 23:13:42'); -INSERT INTO `pre_pay_logs` VALUES (21, '202306140000001', '16869287675506', 'T001', 100, '', 'https://www.baidu.com', '9276b759977319f399a553f2745e21d9', '2023-06-16 23:19:27', '2023-06-16 23:19:27'); -INSERT INTO `pre_pay_logs` VALUES (22, '202306140000001', '16869297292619', 'T001', 100, '', 'https://www.baidu.com', '5a1d2d0bc1268be6bb59eb2d9317f0ee', '2023-06-16 23:35:29', '2023-06-16 23:35:29'); -INSERT INTO `pre_pay_logs` VALUES (23, '202306140000001', '16869331471531', 'T001', 100, '', 'https://www.baidu.com', 'a8305925242350cf69d0d085edeb08cb', '2023-06-17 00:32:28', '2023-06-17 00:32:28'); -INSERT INTO `pre_pay_logs` VALUES (24, '202306140000001', '16869343091037', 'T001', 100, '', 'https://www.baidu.com', 'a6090fcda0ddcdf526f62a7bec72718b', '2023-06-17 00:51:49', '2023-06-17 00:51:49'); -INSERT INTO `pre_pay_logs` VALUES (25, '202306140000001', '16869364993356', 'T001', 100, '', 'https://www.baidu.com', '8b9f5f00cf6550ba1544d4df3ca97d8e', '2023-06-17 01:28:20', '2023-06-17 01:28:20'); -INSERT INTO `pre_pay_logs` VALUES (26, '202306140000001', '16869759433385', 'T001', 100, '', 'https://www.baidu.com', 'aa51a2de2d74fb4305723755b72d179b', '2023-06-17 12:25:44', '2023-06-17 12:25:44'); -INSERT INTO `pre_pay_logs` VALUES (27, '202306140000001', '16869759901483', 'T001', 100, '', 'https://www.baidu.com', '94753f1f73d03a256e169f06de736d4f', '2023-06-17 12:26:31', '2023-06-17 12:26:31'); -INSERT INTO `pre_pay_logs` VALUES (28, '202306140000001', '16869761846050', 'T001', 100, '', 'https://www.baidu.com', 'ea0053b216b96aaafaa6d6452e012ae3', '2023-06-17 12:29:44', '2023-06-17 12:29:44'); -INSERT INTO `pre_pay_logs` VALUES (29, '202306140000001', '16869763092905', 'T001', 100, '', 'https://www.baidu.com', '57ec78629da5dc6751647b56bebbe7cf', '2023-06-17 12:31:49', '2023-06-17 12:31:49'); -INSERT INTO `pre_pay_logs` VALUES (30, '202306140000001', '16869763798044', 'T001', 100, '', 'https://www.baidu.com', '3d168a3bff589e34b0ee8fe87b04da2b', '2023-06-17 12:32:59', '2023-06-17 12:32:59'); - --- ---------------------------- --- Table structure for refund_orders --- ---------------------------- -DROP TABLE IF EXISTS `refund_orders`; -CREATE TABLE `refund_orders` ( - `id` int(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `out_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '外部订单号', - `out_refund_order_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '外部退款订单号', - `order_amount` int(0) NOT NULL DEFAULT 0 COMMENT '订单金额', - `refund_amount` int(0) NOT NULL DEFAULT 0 COMMENT '退款金额', - `fee` int(0) NOT NULL DEFAULT 0 COMMENT '手续费', - `notify_url` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '通知地址', - `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '备注', - `refunded_at` datetime(0) NULL DEFAULT NULL COMMENT '退款时间', - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '订单状态', - `error_code` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '错误码', - `error_msg` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '错误信息', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_outrefundorderno`(`out_refund_order_no`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '退款订单表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for request_logs --- ---------------------------- -DROP TABLE IF EXISTS `request_logs`; -CREATE TABLE `request_logs` ( - `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', - `request_id` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '请求ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `request_uri` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '请求URI', - `request_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '请求内容', - `response_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '响应内容', - `request_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `response_time` datetime(0) NULL DEFAULT NULL, - `third_request_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '第三方请求内容', - `third_response_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '第三方响应内容', - `third_request_time` datetime(0) NULL DEFAULT NULL, - `third_response_time` datetime(0) NULL DEFAULT NULL, - `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '订单状态', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `udx_requestid`(`request_id`) USING BTREE, - INDEX `idx_appid`(`app_id`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of request_logs --- ---------------------------- -INSERT INTO `request_logs` VALUES (1, '202306151359560000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686808792,\"nonce_str\":\"KuAqel2IkWZpkegHJtDJcH02XZDSpUWc\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868087924514\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"42cf5e63b68de99e684ef92906496b5f\"}', NULL, '2023-06-15 13:59:56', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 13:59:56', '2023-06-15 13:59:56'); -INSERT INTO `request_logs` VALUES (2, '202306151400110000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686808808,\"nonce_str\":\"SXDMe2xFSdrh6ufbKnhmvKOWcCfSxwnu\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868088084942\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"9c478e20dfb6cdfc8d9fdcbc48fb3344\"}', NULL, '2023-06-15 14:00:11', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 14:00:11', '2023-06-15 14:00:11'); -INSERT INTO `request_logs` VALUES (3, '202306151400410000002', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686808837,\"nonce_str\":\"hVFfLuchzFcuJPWXTLj18B4wRIzVFzs2\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868088372484\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"ae03f3f85b9e714d532f23c66a284c30\"}', NULL, '2023-06-15 14:00:41', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 14:00:41', '2023-06-15 14:00:41'); -INSERT INTO `request_logs` VALUES (4, '202306151446120000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686811568,\"nonce_str\":\"PCHJdkIdYy6JgArZsIWakIWXhQPfG5bf\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868115688687\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"336acd57a9696592f7fb61f9ebe1d06c\"}', NULL, '2023-06-15 14:46:12', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 14:46:12', '2023-06-15 14:46:12'); -INSERT INTO `request_logs` VALUES (5, '202306151446240000002', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686811580,\"nonce_str\":\"pqtkyMKu4MXUU1BpgG9UzTTdrcN8im54\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868115809573\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"6eafc07b99f26e913fcfdb4c0f3d6a77\"}', NULL, '2023-06-15 14:46:24', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 14:46:24', '2023-06-15 14:46:24'); -INSERT INTO `request_logs` VALUES (6, '202306151446580000003', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686811615,\"nonce_str\":\"PjBXzweQNwfLr4lCB0Mv8pUGbgmRcfLT\",\"data\":\"{\\\"outOrderNo\\\":\\\"16868116154565\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"ec8b350c7ec92b720f455e88e8e36d7d\"}', NULL, '2023-06-15 14:46:58', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-15 14:46:58', '2023-06-15 14:46:58'); -INSERT INTO `request_logs` VALUES (7, '202306152340570000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":{\"outMemberId\":\"202306140000001\",\"amount\":10000,\"notifyUrl\":\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306152340565850000\",\"outOrderNo\":\"P202306152340565850000\"},\"nonce_str\":1686843656627,\"sign\":\"cc93444e56c27443744cff0283879e2a\",\"timestamp\":1686843656}', '{\"code\":2000,\"message\":\"验签错误\",\"data\":{}}', '2023-06-15 23:40:57', '2023-06-15 23:40:57', NULL, NULL, NULL, NULL, 0, '2023-06-15 23:40:57', '2023-06-15 23:40:57'); -INSERT INTO `request_logs` VALUES (8, '202306161359100000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":\"1686843656\",\"nonce_str\":\"1686843656627\",\"data\":\"{\\\"outMemberId\\\":\\\"202306140000001\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\\\\\/\\\\\\/154.23.187.206:9216\\\\\\/api\\\\\\/pay\\\\\\/notify\\\\\\/aboypay\\\\\\/P202306152340565850000\\\",\\\"outOrderNo\\\":\\\"P202306152340565850000\\\"}\",\"sign\":\"b2e352136ca3c58fc360a3f7d48a4108\"}', '{\"code\":2000,\"message\":\"请求已过期\",\"data\":{}}', '2023-06-16 13:59:10', '2023-06-16 13:59:10', NULL, NULL, NULL, NULL, 0, '2023-06-16 13:59:10', '2023-06-16 13:59:10'); -INSERT INTO `request_logs` VALUES (9, '202306161403320000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":\"1686843656\",\"nonce_str\":\"1686843656627\",\"data\":\"{\\\"outMemberId\\\":\\\"202306140000001\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\\\\\/\\\\\\/154.23.187.206:9216\\\\\\/api\\\\\\/pay\\\\\\/notify\\\\\\/aboypay\\\\\\/P202306152340565850000\\\",\\\"outOrderNo\\\":\\\"P202306152340565850000\\\"}\",\"sign\":\"b2e352136ca3c58fc360a3f7d48a4108\"}', '{\"code\":2000,\"message\":\"请求已过期\",\"data\":{}}', '2023-06-16 14:03:32', '2023-06-16 14:03:32', NULL, NULL, NULL, NULL, 0, '2023-06-16 14:03:32', '2023-06-16 14:03:32'); -INSERT INTO `request_logs` VALUES (10, '202306161403360000002', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":\"1686843656\",\"nonce_str\":\"1686843656627\",\"data\":\"{\\\"outMemberId\\\":\\\"202306140000001\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\\\\\/\\\\\\/154.23.187.206:9216\\\\\\/api\\\\\\/pay\\\\\\/notify\\\\\\/aboypay\\\\\\/P202306152340565850000\\\",\\\"outOrderNo\\\":\\\"P202306152340565850000\\\"}\",\"sign\":\"b2e352136ca3c58fc360a3f7d48a4108\"}', '{\"code\":2000,\"message\":\"请求已过期\",\"data\":{}}', '2023-06-16 14:03:36', '2023-06-16 14:03:36', NULL, NULL, NULL, NULL, 0, '2023-06-16 14:03:36', '2023-06-16 14:03:36'); -INSERT INTO `request_logs` VALUES (11, '202306161858280000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":{\"outMemberId\":\"202306140000001\",\"amount\":10000,\"notifyUrl\":\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306161858275170000\",\"outOrderNo\":\"P202306161858275170000\"},\"nonce_str\":1686913107573,\"sign\":\"d9f04fa069ac876ae8796e510848ab41\",\"timestamp\":1686913107}', '{\"code\":2000,\"message\":\"验签错误\",\"data\":{}}', '2023-06-16 18:58:28', '2023-06-16 18:58:28', NULL, NULL, NULL, NULL, 0, '2023-06-16 18:58:28', '2023-06-16 18:58:28'); -INSERT INTO `request_logs` VALUES (12, '202306161900100000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":{\"outMemberId\":\"202306140000001\",\"amount\":10000,\"notifyUrl\":\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306161900097630000\",\"outOrderNo\":\"P202306161900097630000\"},\"nonce_str\":1686913209857,\"sign\":\"06a56df380f191ffa9f3206cc8fb21dd\",\"timestamp\":1686913209}', '{\"code\":2000,\"message\":\"验签错误\",\"data\":{}}', '2023-06-16 19:00:10', '2023-06-16 19:00:10', NULL, NULL, NULL, NULL, 0, '2023-06-16 19:00:10', '2023-06-16 19:00:10'); -INSERT INTO `request_logs` VALUES (13, '202306161903010000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":\"{\\\"outMemberId\\\":\\\"M1638352613\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306161903005300000\\\",\\\"outOrderNo\\\":\\\"P202306161903005300000\\\"}\",\"nonce_str\":1686913380586,\"sign\":\"2911f23a198c4a27d20ce973a9a9f553\",\"timestamp\":1686913380}', NULL, '2023-06-16 19:03:01', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 19:03:01', '2023-06-16 19:03:01'); -INSERT INTO `request_logs` VALUES (14, '202306162029440000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":\"{\\\"outMemberId\\\":\\\"M1638352613\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306162029440240001\\\",\\\"outOrderNo\\\":\\\"P202306162029440240001\\\"}\",\"nonce_str\":1686918584080,\"sign\":\"da17643d939fdeb41c7a53b93978a20f\",\"timestamp\":1686918584}', NULL, '2023-06-16 20:29:44', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 20:29:44', '2023-06-16 20:29:44'); -INSERT INTO `request_logs` VALUES (15, '202306162037110000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"data\":\"{\\\"outMemberId\\\":\\\"M1638352613\\\",\\\"amount\\\":10000,\\\"notifyUrl\\\":\\\"http:\\/\\/154.23.187.206:9216\\/api\\/pay\\/notify\\/aboypay\\/P202306162037109100002\\\",\\\"outOrderNo\\\":\\\"P202306162037109100002\\\"}\",\"nonce_str\":1686919030935,\"sign\":\"756abe89ef503a49eb1f87264234e95c\",\"timestamp\":1686919030}', NULL, '2023-06-16 20:37:11', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 20:37:11', '2023-06-16 20:37:11'); -INSERT INTO `request_logs` VALUES (16, '202306162211260000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686924685,\"nonce_str\":\"UiBAr3LD8pvSBooZDuKcy9INk9SEBUsz\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869246852994\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"cf013df3dd519e6fa1025649bc049201\"}', '{\"code\":2000,\"message\":\"验签错误\",\"data\":{}}', '2023-06-16 22:11:26', '2023-06-16 22:11:26', NULL, NULL, NULL, NULL, 0, '2023-06-16 22:11:26', '2023-06-16 22:11:26'); -INSERT INTO `request_logs` VALUES (17, '202306162212020000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686924722,\"nonce_str\":\"2zlOm4fYeovhF0EZ4rmLSCB3XQvuzvs3\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869247223899\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"ceb224b19e4980ff014ad3b88e98f2c4\"}', '{\"code\":2000,\"message\":\"充值金额必须为100~300000\",\"data\":{}}', '2023-06-16 22:12:02', '2023-06-16 22:12:02', NULL, NULL, NULL, NULL, 0, '2023-06-16 22:12:02', '2023-06-16 22:12:02'); -INSERT INTO `request_logs` VALUES (18, '202306162212240000002', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686924744,\"nonce_str\":\"kHleekUnhMTBWENgKP7vB7V5bp5FpX8h\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869247443089\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":1000,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"40996731c24d65ed835b886cf04f9506\"}', NULL, '2023-06-16 22:12:24', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:12:24', '2023-06-16 22:12:24'); -INSERT INTO `request_logs` VALUES (19, '202306162214560000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686924896,\"nonce_str\":\"yuIWgN00C83JpbataQJ0W38AALuBimtl\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869248961234\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"6f34ac89f9bfb73a3c3fb092c45ee576\"}', NULL, '2023-06-16 22:14:56', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:14:56', '2023-06-16 22:14:56'); -INSERT INTO `request_logs` VALUES (20, '202306162215460000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686924945,\"nonce_str\":\"Tl7RCfz2uPl7m3cjy4JIJx1A6mzHcGad\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869249451688\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"baed4e57d0f862bcc60d284a9a7790f1\"}', NULL, '2023-06-16 22:15:46', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:15:46', '2023-06-16 22:15:46'); -INSERT INTO `request_logs` VALUES (21, '202306162225160000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686925515,\"nonce_str\":\"01lv0KMpCePds49HH9bQl4jOnycJPUC6\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869255153745\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"1a4708e089565363840f591df71fd000\"}', NULL, '2023-06-16 22:25:16', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:25:16', '2023-06-16 22:25:16'); -INSERT INTO `request_logs` VALUES (22, '202306162231120000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686925872,\"nonce_str\":\"VIuTO3ZVkASzPY4wsaNnjyYJBkipHR0Q\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869258728071\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"80632986d144ce9c1c38de1d31b03fd4\"}', NULL, '2023-06-16 22:31:12', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:31:12', '2023-06-16 22:31:12'); -INSERT INTO `request_logs` VALUES (23, '202306162256410000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686927401,\"nonce_str\":\"QOgOt1tyTY3flZi6PN6IzEwBanDWqpKg\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869274017889\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"34a106ac591c17114e21eca616318bf8\"}', NULL, '2023-06-16 22:56:41', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 22:56:41', '2023-06-16 22:56:41'); -INSERT INTO `request_logs` VALUES (24, '202306162300220000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686927622,\"nonce_str\":\"qnws4aXSqbWNN6S0T7sthzdMALoqvbN1\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869276223513\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"2ae109f75d07dccf050b3391ee26af12\"}', NULL, '2023-06-16 23:00:22', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:00:22', '2023-06-16 23:00:22'); -INSERT INTO `request_logs` VALUES (25, '202306162301230000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686927683,\"nonce_str\":\"yj5kqFJvlIwd21pjufzdrDqrwAXaDkxr\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869276834288\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"87858122b47427f860939fda8ce11d8e\"}', NULL, '2023-06-16 23:01:23', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:01:23', '2023-06-16 23:01:23'); -INSERT INTO `request_logs` VALUES (26, '202306162312090000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686928329,\"nonce_str\":\"XS2NHRVarwuG5hCnVnD0Rgdzoa6tv9Iz\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869283291812\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"583d2a4965d63b3e7980703cf0c813a7\"}', NULL, '2023-06-16 23:12:09', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:12:09', '2023-06-16 23:12:09'); -INSERT INTO `request_logs` VALUES (27, '202306162313040000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686928384,\"nonce_str\":\"InaKYzq0HZ2NAhFXrC1KIMyf7Puzrw0R\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869283846036\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"3ada373754794e145023e40e0fa8f231\"}', NULL, '2023-06-16 23:13:04', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:13:04', '2023-06-16 23:13:04'); -INSERT INTO `request_logs` VALUES (28, '202306162313420000002', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686928422,\"nonce_str\":\"e5QRWL0ZtBtcIPQlKtls85F291iFN12z\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869284225664\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"1347e54dbaa73dd869347d5a5b683892\"}', NULL, '2023-06-16 23:13:42', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:13:42', '2023-06-16 23:13:42'); -INSERT INTO `request_logs` VALUES (29, '202306162319270000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686928767,\"nonce_str\":\"iLIxWOWPYu6JVXFxKzh8Bsti5W3PWSl9\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869287675506\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"e9f861bf9d359f47d1c2c0607c106e9d\"}', NULL, '2023-06-16 23:19:27', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:19:27', '2023-06-16 23:19:27'); -INSERT INTO `request_logs` VALUES (30, '202306162335290000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686929729,\"nonce_str\":\"MAmlGGAcvClS2THSzwL0azyzv3ZrAQeU\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869297292619\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"8fde7fce2c1d61db927bee7086384c56\"}', NULL, '2023-06-16 23:35:29', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:35:29', '2023-06-16 23:35:29'); -INSERT INTO `request_logs` VALUES (31, '202306162345420000001', '202306140000001', '/payment/query', '{\"app_id\":\"202306140000001\",\"timestamp\":1686930336,\"nonce_str\":\"tIe9B8p1rj4BAefQeyW95DcuDZP4BCuh\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869297292619\\\"}\",\"sign\":\"a3160a2b41ea17fc00959cd9baecd976\"}', '{\"code\":2000,\"message\":\"订单不存在\",\"data\":{}}', '2023-06-16 23:45:42', '2023-06-16 23:45:42', NULL, NULL, NULL, NULL, 0, '2023-06-16 23:45:42', '2023-06-16 23:45:42'); -INSERT INTO `request_logs` VALUES (32, '202306162345470000002', '202306140000001', '/payment/query', '{\"app_id\":\"202306140000001\",\"timestamp\":1686930346,\"nonce_str\":\"ZdlSg7P0UqFyQQYcJic35JyqET2PlX6r\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869297292619\\\"}\",\"sign\":\"417ae267006463b2eb5bca967ce1f7a2\"}', '{\"code\":2000,\"message\":\"订单不存在\",\"data\":{}}', '2023-06-16 23:45:47', '2023-06-16 23:45:47', NULL, NULL, NULL, NULL, 0, '2023-06-16 23:45:47', '2023-06-16 23:45:47'); -INSERT INTO `request_logs` VALUES (33, '202306162355270000001', '202306140000001', '/payment/query', '{\"app_id\":\"202306140000001\",\"timestamp\":1686930926,\"nonce_str\":\"4OyPAlM2jnMeHmuDPg5KVdcK5LqFbZzA\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869297292619\\\"}\",\"sign\":\"4b7e2be8b2677eeb416bd2e482e5fed5\"}', NULL, '2023-06-16 23:55:27', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-16 23:55:27', '2023-06-16 23:55:27'); -INSERT INTO `request_logs` VALUES (34, '202306170027530000001', ' 202305270000001', '/payment/pay', '{\"app_id\":\" 202305270000001\",\"timestamp\":1686932873,\"nonce_str\":\"21sk14r9tbbwlalb\",\"data\":\"{\\\"outOrderNo\\\":\\\"202306170027532751245752515078\\\",\\\"outMemberId\\\":\\\"\\\\u00a0202305270000001\\\",\\\"notifyUrl\\\":\\\"http:\\\\\\/\\\\\\/doiqh.rspay.amxpay.co\\\\\\/Pay_UqdnTqojahs_notifyurl.html\\\"}\",\"sign\":\"64db0794535d9656104782fae7f59bbd\"}', '{\"code\":2000,\"message\":\"APP错误\",\"data\":{}}', '2023-06-17 00:27:53', '2023-06-17 00:27:53', NULL, NULL, NULL, NULL, 0, '2023-06-17 00:27:53', '2023-06-17 00:27:53'); -INSERT INTO `request_logs` VALUES (35, '202306170032280000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686933147,\"nonce_str\":\"JTTV9Jyys4HyKYDvJk860aPGxddw09lu\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869331471531\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"6d9ec051926449d82b1503faae84b395\"}', NULL, '2023-06-17 00:32:28', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 00:32:28', '2023-06-17 00:32:28'); -INSERT INTO `request_logs` VALUES (36, '202306170051490000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686934309,\"nonce_str\":\"ndxrggcexq2Bxyz0SjMLRtoD5cmajluY\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869343091037\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"7de6cc3febec3901f0e9d3a2b40b1030\"}', NULL, '2023-06-17 00:51:49', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 00:51:49', '2023-06-17 00:51:49'); -INSERT INTO `request_logs` VALUES (37, '202306170128200000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686936499,\"nonce_str\":\"LRJCav5zeS4wBPksrzkyYXt79bfGBe9Y\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869364993356\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"2bbe10c011aa0e8366a221a3aebc6311\"}', NULL, '2023-06-17 01:28:20', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 01:28:20', '2023-06-17 01:28:20'); -INSERT INTO `request_logs` VALUES (38, '202306171225440000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686975943,\"nonce_str\":\"bSW5DM12xnSoLEED0NXr6QhwcY0E9eWf\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869759433385\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"a89982031eacef41a3e9bd9c3f5f7d4e\"}', NULL, '2023-06-17 12:25:44', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 12:25:44', '2023-06-17 12:25:44'); -INSERT INTO `request_logs` VALUES (39, '202306171226310000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686975990,\"nonce_str\":\"M3JIbXHL0XAwA6Lbcqw34Y3A1M6FhtFS\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869759901483\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"f1879dedde43a5beed5955acf33c0924\"}', NULL, '2023-06-17 12:26:31', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 12:26:31', '2023-06-17 12:26:31'); -INSERT INTO `request_logs` VALUES (40, '202306171229440000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686976184,\"nonce_str\":\"9fGNygvCJAasK8Obf9rRW9PLOcnDZbjP\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869761846050\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"34bc84dc87da39bf681ced80617b9fa5\"}', NULL, '2023-06-17 12:29:44', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 12:29:44', '2023-06-17 12:29:44'); -INSERT INTO `request_logs` VALUES (41, '202306171231490000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686976309,\"nonce_str\":\"RQ4GKP0eTliVbq18zQo0YuAmtfHgo4Nk\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869763092905\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"d79df1e3d439bd93600e66eb1e9cb8e6\"}', NULL, '2023-06-17 12:31:49', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 12:31:49', '2023-06-17 12:31:49'); -INSERT INTO `request_logs` VALUES (42, '202306171232590000001', '202306140000001', '/payment/pay', '{\"app_id\":\"202306140000001\",\"timestamp\":1686976379,\"nonce_str\":\"5csIUJLiYzczutJZ0cgPiNLapOyaRqQt\",\"data\":\"{\\\"outOrderNo\\\":\\\"16869763798044\\\",\\\"outMemberId\\\":\\\"T001\\\",\\\"amount\\\":100,\\\"notifyUrl\\\":\\\"https:\\\\\\/\\\\\\/www.baidu.com\\\"}\",\"sign\":\"dc42497d338410a6d969358d1eb54be2\"}', NULL, '2023-06-17 12:32:59', NULL, NULL, NULL, NULL, NULL, 0, '2023-06-17 12:32:59', '2023-06-17 12:32:59'); - --- ---------------------------- --- Table structure for users --- ---------------------------- -DROP TABLE IF EXISTS `users`; -CREATE TABLE `users` ( - `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', - `app_id` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '应用ID', - `member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `out_member_id` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `real_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `card_no` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `mobile` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_appid`(`app_id`) USING BTREE, - INDEX `idx_memberid`(`member_id`) USING BTREE, - INDEX `idx_cardno`(`card_no`) USING BTREE, - INDEX `idx_createdat`(`created_at`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of users --- ---------------------------- -INSERT INTO `users` VALUES (1, '202305270000001', 'c001605d9441b295ca056b93e05118c4', '', '鲍云辉', '350125199405014958', '18259196978', '2023-06-10 18:07:39', '2023-06-10 18:07:39'); -INSERT INTO `users` VALUES (2, '202305270000001', '8ff10aeb194a5abf74c3a227116fce75', '', '陈斌', '350722198210070916', '18621982052', '2023-06-11 14:03:56', '2023-06-11 14:03:56'); -INSERT INTO `users` VALUES (3, '202305270000001', 'f657592d076330ccbb226daf259c38b9', '', '邓和云', '350722198207071619', '13795457158', '2023-06-11 14:11:53', '2023-06-11 14:11:53'); -INSERT INTO `users` VALUES (4, '202305270000001', '71ec26dce84b49a6274c194955d1b8d6', '', '付林', '350722198207295719', '18621537716', '2023-06-11 14:14:47', '2023-06-11 14:14:47'); -INSERT INTO `users` VALUES (5, '202305270000001', 'b7eaecadec45b5f5de2d46f18e3c62d5', '', '费贤峰', '310228199401290813', '13761957914', '2023-06-11 14:19:33', '2023-06-11 14:19:33'); -INSERT INTO `users` VALUES (6, '202306140000001', 'e2cdf12c6370eda77d7e64395ee1ad2a', 'M1638352613', '鲍沣', '350125199805154132', '18120905661', '2023-06-16 20:30:25', '2023-06-16 20:30:25'); -INSERT INTO `users` VALUES (7, '202306140000001', '348e93a2410f57861226083d1c03824f', 'T001', '饶丽秀', '350824199001045864', '13817896134', '2023-06-16 22:26:25', '2023-06-16 22:26:25'); - -SET FOREIGN_KEY_CHECKS = 1; - -QY202306171931554554488 -p202306174082063342469 \ No newline at end of file +CREATE TABLE `users` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `app_id` varchar(16) NOT NULL COMMENT '应用ID', + `member_id` varchar(32) NOT NULL, + `user_id` varchar(32) NOT NULL, + `contract_no` varchar(32) NOT NULL, + `realname_flag` char(1) NOT NULL DEFAULT 'N', + `bind_card_flag` char(1) NOT NULL DEFAULT 'N', + `set_pwd_flag` char(1) NOT NULL DEFAULT 'N', + `status` varchar(20) NOT NULL DEFAULT 'NORMAL', + `mobile` varchar(15) NOT NULL DEFAULT '', + `email` varchar(32) NOT NULL DEFAULT '', + `real_name` varchar(16) NOT NULL DEFAULT '', + `certificate_no` varchar(20) NOT NULL DEFAULT '', + `user_type` varchar(20) NOt NULL, + `apply_no` varchar(32) NOT NULL DEFAULT '', + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_appid` (`app_id`) USING BTREE, + KEY `idx_memberid` (`member_id`) USING BTREE, + KEY `idx_createdat` (`created_at`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC; + +CREATE TABLE `bank_cards` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `app_id` varchar(16) NOT NULL COMMENT '应用ID', + `member_id` varchar(32) NOT NULL, + `user_id` varchar(32) NOT NULL, + `agreement_no` varchar(32) NOT NULL, + `last_card_no` varchar(4) NOT NULL DEFAULT '', + `card_user_name` varchar(16) NOT NULL DEFAULT '', + `bank_mobile` varchar(15) NOT NULL DEFAULT '', + `bank_code` varchar(10) NOT NULL DEFAULT '', + `bank_name` varchar(32) NOT NULL DEFAULT '', + `card_type` tinyint(1) NOT NULL DEFAULT '1', + `cnaps_code` varchar(16) NOT NULL DEFAULT '', + `public_flag` char(1) NOT NULL DEFAULT 'N', + `repayment_date` varchar(20) NOt NULL DEFAULT '', + `main_flag` char(1) NOT NULL DEFAULT 'N', + `status` varchar(16) NOT NULL DEFAULT '', + `ava_flag` varchar(10) NOT NULL DEFAULT '', + `remark` varchar(255) NOT NULL DEFAULT '', + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_appid` (`app_id`) USING BTREE, + KEY `idx_memberid` (`member_id`) USING BTREE, + KEY `idx_createdat` (`created_at`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC; \ No newline at end of file diff --git a/sha256/openssl_pri.key b/sha256/openssl_pri.key deleted file mode 100644 index 5603919..0000000 --- a/sha256/openssl_pri.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAu4mzx0gHNoJVuWRyoUiUfEh08JAJTfR9CoYl/jc8bmYq1HfF -YcjyhXDnkr3/pUaPD+xB3dh7H5ct/Urk2b+C1KrFNDg8NG17gu8rNT+pHLVHPD4u -WYO5dhaVUGSMMZLM3r7mJo0kOzUwOxgEv+KWV+guMsgzm0AVeZ5kp4Rl8ypP893O -jvNvY4FZWxTACihf/0OEwYqKDnmaWK4JBrWmUjedKbjPlg5+0vxE8GRCwYto0Q6o -OmySmLAlTx1v8j3ZzEtATEHA4SbCPNwcDbwYiUKOMmdEZi8N0piI3E4YnqO+H3Bx -9C3tExWUQ9XZdjjoDzuJQhcRVegTNMAEbHqnXQIDAQABAoIBAQCF2W9lwUPcpMN4 -UXf7IulPlwtXkwYBDImeVEaTnWrVRLg28tD+zMRDd2TgeBkZJjX/YFlWdCbUUjtx -t92EiEphbQzZC3X02Vs5BWiqVahmo/+WwK6mFvzsiovBWDIzQ5pTNJ7hTwVX+MtW -sfrZ1WgGj+FBP2CN4vww1Fr0sOtu1D6kwABBHiYutuFLFSFS24lkJGs7YrrT0GE8 -TjWCrdcXCNzlFARE70cuttXM5ViITiP2204WsMruMS6zfHg2uikng/i7wt7uSLpq -6AwoKCqzkrmNxnrFje6z5tblUzAg3gmnEJHNjcdvD4okRY/F4lc0nRxSBIjaKS6R -5SL+lPuhAoGBAPQ5QYamaF/KcXNjarZvjC13mNepa/Vtt3pvudUyBIAZzEp3tvsm -OPp4tG+MdG7hV4B+20dpkqB81Q74yZ2APNmJWLSiOkIklLClNFg38z1qlK035Ldi -VIyMAQRTeL2NO9CnLt21ewrKFy4NhBOk4bUZ+1QkP/vEf7slPpLlg18ZAoGBAMSU -tNPK2C3w5ejKreIAVnV9DjpnJPo0O50+XP7D4IIttts95GvkRlkREWxuNBF4j+sS -9ABEORiYWCEyjg53fF5njkMjJ5RcD7g993I4cHToR9hGE1uylLpqNQ3NWXz04TZN -0p1S70zwQ/XJYuL27FO92Ib0KfwQwN2sN0YbHAblAoGBAOQCeJy/y/5ywQzbqot9 -BUCFwhrGwFY5Au26VaMnuW/npgV4U0uTWeruunbSiPnkRI9g4FSByjUvlrMNrx3u -1eC7DChItV9/S5rIAmDCi8OxN/Gol05m7UzygRiK3dUKgOfCzkyL3L4sAwwp7j9w -1pEAGtdpqJrjz+TnVs5KnSYxAoGBAMNZG1EUVDtjFrV9I8pgl4ptWYREF4Tj/xHF -dVhegm4ay4mXObTVxeqggXYFFYz/B9WMohjZsvtz+LAUswJBTr/pnH+vIZfW3HA0 -c/93gplKcorDKF2JWy7ceBhdJj58gokaUN+yGMeWQ5KuK6xrwHF/SPrjDA3HAEHI -76ylJ/bZAoGAHMf1LMe3bCcqvardMZz68hZBqA41IOFOVhbzeHeHreKDAwLwOIhZ -D8XS5RqJGLSwtHBLAJihKlSlbP2X2hcqnDmWUn4MunPdGJm105hByGskdOSMVUay -9E/vwhrZ2BrDTyxjQki/XlO88QPkFh3iZ7nxaN1Zkc6jkHKqy34v7HE= ------END RSA PRIVATE KEY----- diff --git a/sha256/openssl_pub.key b/sha256/openssl_pub.key deleted file mode 100644 index 03b8260..0000000 --- a/sha256/openssl_pub.key +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4mzx0gHNoJVuWRyoUiU -fEh08JAJTfR9CoYl/jc8bmYq1HfFYcjyhXDnkr3/pUaPD+xB3dh7H5ct/Urk2b+C -1KrFNDg8NG17gu8rNT+pHLVHPD4uWYO5dhaVUGSMMZLM3r7mJo0kOzUwOxgEv+KW -V+guMsgzm0AVeZ5kp4Rl8ypP893OjvNvY4FZWxTACihf/0OEwYqKDnmaWK4JBrWm -UjedKbjPlg5+0vxE8GRCwYto0Q6oOmySmLAlTx1v8j3ZzEtATEHA4SbCPNwcDbwY -iUKOMmdEZi8N0piI3E4YnqO+H3Bx9C3tExWUQ9XZdjjoDzuJQhcRVegTNMAEbHqn -XQIDAQAB ------END PUBLIC KEY----- diff --git a/sha256/pkcs12 b/sha256/pkcs12 deleted file mode 100644 index e69de29..0000000 diff --git a/sha256/private-rsa.key b/sha256/private-rsa.key deleted file mode 100644 index e3c697e..0000000 --- a/sha256/private-rsa.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,BF0326F2AE68617E - -ycxcKNiA9nLz3isWeEpICoUXclwtbQqQVTOjZgfP+qnqKfxolmSGG6SBAIMtYfed -AM7Ktcz/9ggBfWR6PiTUlg1b8sc/bCmJ26NE3VAAlSS0UU566ARdXAT6Mug+xoKc -kPoKY7PsNPHSWfLGJG5d7xlxyFo3R+cDAU6cyReX1S2wdGjyJhnP/Yw9x7Ut6AFa -QvyfeP99EuAPX2rG3bwk7J4TYhN3iEOFCGyM9vKlAUqQ82GRvEti5P+EsGsH7B2y -2+i+omBLj9XkwUdlR9R23pq6z/xRABCxZIMW4wyDJV8xwMK3/N3U5wOdwetTk+Zz -yNgXz4tvc5JWe5DkBvHD9ZJNmxR7QN0Xq6A635Mvwd0ssSBnL3EzmubmSL6WDwhi -n+wb9sZgQXZZSN+rdEy44C7RD6mxhqNmJNyEyyPqnMqI1H4fy75IoWk2ldib9in0 -u53PwxKAg6fogAjjtXIR8cuPKdGS1XtAvonY4o2kpf2ySudQwhYK+7rAv5bPiUDL -Xlna8sHP3l+5c0K/yg0mW2AiCYCpj++sXmS9xHT+0sTPHRw8jp2tCe8bH0iOZLZ6 -ZVOlfXBlDa3FbiluKRM7qy6Kki/Sz09Jc1rmS4tt7XXz3Xbu+edNdC7HducoXEVc -QL36k+KVwQWFWgwPbEEED12+J6KFKTckP7GgbQS05ZQCAHj+PduI+MRtu6n8kOrr -35rtSdTj20YPqC2mf1gnSNUT8c5Ewc4wuCkGDhsxKhcq2NSKrnquq+Ty6kq9aTal -imlRcREcygaYU072/Y3DhOawbqW2l8j9wCQfYut8gU3cpsspjClxP+7liGJodG+/ -jTRPziEjnCqqKo468nIuGb9O298g8Y+/Y5YZcUgapRcURc6r4j+dpneNqNoaMBt/ -s0qX8K2wZjTIe8NdJOPpJz4k9TAQ/PNb7tv7Ms8DvsuOSZTH0foxl2xyhyPNZOWo -FE5zKCG5ABZsrqExROmCbQ1WZQCFknFXF7gbbk4uXNXphHHXumm1K140er0gZ85n -DsiO7M6mCjDTWl05d/lLpGsocJp0u+jg9hbMHaOoM4lPC/vUDpFY/yGrRzrq5W9z -ogG/FmKp2RUMS1PCG2PikhMd+wIGACze0v0LbMA9dBbjkSv3EWa4tOKWwsxIr3/I -ZAIdu8bnYtBSO1mw/l9QxhKAvX8Ug8/df/0VqaefNaU+y9hlaXMheGFmri5MmreB -7zloIpoQp5BkwaJZZ81qic3QOFn0ST1VlT6EzeFDnJgIHAlcvzUjuqA2cCQPZsLP -m5sMv9CY5tSYR1hq0QvVdi+AO+egruiBv+k+TGQlIwCdHD+wlBRpo4aET9bK15KQ -KjmYebGbVlP1ef5RZGDGGUb3udBCbXkUDsWR+ijZFSfcjPdz42NN9qU/WRqRcW1b -xQspsloH8DFb+KzvFEKOdJQZdIWS6u6OlXbKGP8P25L7CkxbeZ6ezsywgARd66wB -VYYACR4ysx6o7alOhFUMs69e8c7kqCPz+fiDTG9rqG67dksS1RBXxWulhKaWDn19 -33CWXaXoVoGwSCKLjszv7FpdrWLqwPiI9n55QeqwhP2uP/857loLUUrJlORwiJYB ------END RSA PRIVATE KEY----- diff --git a/sha256/pubAndPri.key b/sha256/pubAndPri.key deleted file mode 100644 index de871d0..0000000 --- a/sha256/pubAndPri.key +++ /dev/null @@ -1,32 +0,0 @@ -Bag Attributes - friendlyName: Y - localKeyID: 8B 08 86 6E 88 FC CF C6 CB D2 F8 91 4F 88 D4 70 CB FB 77 BA -Key Attributes: ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7ibPHSAc2glW5 -ZHKhSJR8SHTwkAlN9H0KhiX+NzxuZirUd8VhyPKFcOeSvf+lRo8P7EHd2Hsfly39 -SuTZv4LUqsU0ODw0bXuC7ys1P6kctUc8Pi5Zg7l2FpVQZIwxkszevuYmjSQ7NTA7 -GAS/4pZX6C4yyDObQBV5nmSnhGXzKk/z3c6O829jgVlbFMAKKF//Q4TBiooOeZpY -rgkGtaZSN50puM+WDn7S/ETwZELBi2jRDqg6bJKYsCVPHW/yPdnMS0BMQcDhJsI8 -3BwNvBiJQo4yZ0RmLw3SmIjcThieo74fcHH0Le0TFZRD1dl2OOgPO4lCFxFV6BM0 -wARseqddAgMBAAECggEBAIXZb2XBQ9ykw3hRd/si6U+XC1eTBgEMiZ5URpOdatVE -uDby0P7MxEN3ZOB4GRkmNf9gWVZ0JtRSO3G33YSISmFtDNkLdfTZWzkFaKpVqGaj -/5bArqYW/OyKi8FYMjNDmlM0nuFPBVf4y1ax+tnVaAaP4UE/YI3i/DDUWvSw627U -PqTAAEEeJi624UsVIVLbiWQkaztiutPQYTxONYKt1xcI3OUUBETvRy621czlWIhO -I/bbThawyu4xLrN8eDa6KSeD+LvC3u5IumroDCgoKrOSuY3GesWN7rPm1uVTMCDe -CacQkc2Nx28PiiRFj8XiVzSdHFIEiNopLpHlIv6U+6ECgYEA9DlBhqZoX8pxc2Nq -tm+MLXeY16lr9W23em+51TIEgBnMSne2+yY4+ni0b4x0buFXgH7bR2mSoHzVDvjJ -nYA82YlYtKI6QiSUsKU0WDfzPWqUrTfkt2JUjIwBBFN4vY070Kcu3bV7CsoXLg2E -E6ThtRn7VCQ/+8R/uyU+kuWDXxkCgYEAxJS008rYLfDl6Mqt4gBWdX0OOmck+jQ7 -nT5c/sPggi222z3ka+RGWRERbG40EXiP6xL0AEQ5GJhYITKODnd8XmeOQyMnlFwP -uD33cjhwdOhH2EYTW7KUumo1Dc1ZfPThNk3SnVLvTPBD9cli4vbsU73YhvQp/BDA -3aw3RhscBuUCgYEA5AJ4nL/L/nLBDNuqi30FQIXCGsbAVjkC7bpVoye5b+emBXhT -S5NZ6u66dtKI+eREj2DgVIHKNS+Wsw2vHe7V4LsMKEi1X39LmsgCYMKLw7E38aiX -TmbtTPKBGIrd1QqA58LOTIvcviwDDCnuP3DWkQAa12momuPP5OdWzkqdJjECgYEA -w1kbURRUO2MWtX0jymCXim1ZhEQXhOP/EcV1WF6CbhrLiZc5tNXF6qCBdgUVjP8H -1YyiGNmy+3P4sBSzAkFOv+mcf68hl9bccDRz/3eCmUpyisMoXYlbLtx4GF0mPnyC -iRpQ37IYx5ZDkq4rrGvAcX9I+uMMDccAQcjvrKUn9tkCgYAcx/Usx7dsJyq9qt0x -nPryFkGoDjUg4U5WFvN4d4et4oMDAvA4iFkPxdLlGokYtLC0cEsAmKEqVKVs/Zfa -FyqcOZZSfgy6c90YmbXTmEHIayR05IxVRrL0T+/CGtnYGsNPLGNCSL9eU7zxA+QW -HeJnufFo3VmRzqOQcqrLfi/scQ== ------END PRIVATE KEY----- diff --git a/sha256/public-rsa.cer b/sha256/public-rsa.cer deleted file mode 100644 index 642cb90..0000000 --- a/sha256/public-rsa.cer +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDlzCCAn+gAwIBAgIUbeOvQXeD5BI4jOTpkUv+70RShvcwDQYJKoZIhvcNAQEL -BQAwWzELMAkGA1UEBhMCQ04xDzANBgNVBAgMBkZ1SmlhbjEPMA0GA1UEBwwGWGlh -TWVuMQ4wDAYDVQQKDAVGdXN1bzEMMAoGA1UECwwDY3d4MQwwCgYDVQQDDANjd3gw -HhcNMjMwNTIyMTQ0MjE4WhcNMzMwNTE5MTQ0MjE4WjBbMQswCQYDVQQGEwJDTjEP -MA0GA1UECAwGRnVKaWFuMQ8wDQYDVQQHDAZYaWFNZW4xDjAMBgNVBAoMBUZ1c3Vv -MQwwCgYDVQQLDANjd3gxDDAKBgNVBAMMA2N3eDCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBALuJs8dIBzaCVblkcqFIlHxIdPCQCU30fQqGJf43PG5mKtR3 -xWHI8oVw55K9/6VGjw/sQd3Yex+XLf1K5Nm/gtSqxTQ4PDRte4LvKzU/qRy1Rzw+ -LlmDuXYWlVBkjDGSzN6+5iaNJDs1MDsYBL/illfoLjLIM5tAFXmeZKeEZfMqT/Pd -zo7zb2OBWVsUwAooX/9DhMGKig55mliuCQa1plI3nSm4z5YOftL8RPBkQsGLaNEO -qDpskpiwJU8db/I92cxLQExBwOEmwjzcHA28GIlCjjJnRGYvDdKYiNxOGJ6jvh9w -cfQt7RMVlEPV2XY46A87iUIXEVXoEzTABGx6p10CAwEAAaNTMFEwHQYDVR0OBBYE -FF9zWOWuZ8LYknEJf5MfrFIP/HGqMB8GA1UdIwQYMBaAFF9zWOWuZ8LYknEJf5Mf -rFIP/HGqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAEC4LnW7 -J69MLiUt2ypYjSmhyauJixINdG6r53JUaKw2d0Dd73PmYmU1lyTFJEOOFhK3w9hU -5cgExxcn1AZdb2vtzwETv7dgRJHbxVVhl6JsPvFw82b9ALGgFbq5d2Kyewa5eLBh -2IiThu19BBbvs0H6MjP7Kim1fx0z/aIK9F5b9zJxFw35t35Jz1cziXbpS2ha2HDS -0EKrqESbX37iZ8jzO4sMb5hPDZ+BuugFOmZbbPoHqqKZw1l9EWO4Lm36PezMTpwP -1dGRRjcxRWcZ9k4zbdmxzNGL+yxSjl4kvTDjr8ygQmTGBrH7f2z/5LaU48IeNZtl -eEM6UAUyVJDtLl4= ------END CERTIFICATE----- diff --git a/sha256/user-rsa.pfx b/sha256/user-rsa.pfx deleted file mode 100644 index 777eb7825ed47e11f6f0f9fea8b366c67eee3f88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2560 zcmY+^c{CJ?9>8(T(hSCuEo7O5Yb-OeRFj=CcCt%uj6Fixud+;8vNM(F>txHGy|HC&kf(Frd-uIRe&=`2_jk_k&kqU@Jz`-7pzzQSU??KaAZ{PVe1^FQ z4K? zKNn_`G90Jk2}b>7A_BAhUL@=z)wV=8{)ow{XUn=8Gj0EcX#&h2c-?wq;ZX_LECrsp z(2KXp`Uud=&9e%AFE^4oP^*f_X!xo3xOpfm_MYenXLxh;{R{USKBHCPMmfctEY$om z=X24b?xRy2cCp#5-unLBHpq2o@#`_EH!Ez#7vIIEbmg=ne6&O$m=H}}pO;Q5lCZ-Q z;&WrdoME~=q-$Z*jn5e-l8m(0kBBx~&a~l<1wod}{3#e$kEgYpE9Mf~4NqpdBzl7? zC}|zLp>$!WmPe;E4%6MS0PRGwM~JrTLK#?za9Q@Nfu{}4vgGjL((@|8o>DH7nv_nKtExp^0h=C26Tivwh)WD$DjUZ(AhWGyg(j z(ekqA(V&$df|BSKOLaQm?_8)E(Pkql<#e{;mx)Q&)iu5sZ59uO;A%`jq5f}as$6y!MOF$W@{hgq#2MXQ z9`3@ZfraQ46W=Z~-L5X+9bKCi?u#%A$MC@|{!K+X<`&(^1|j?MXCZXb!p*0d0rAxf31?%nX5cN;Z$`{*&?Epg=a&=gxw^=Z@W7nZF1(V$kVux%% zs3+^3-pV|c--$En@+^VKhx0{0O11Tz=oak7J+~h}uKzB^Xu|pGXjwjad~#>Y1x>jb zWH_&nqrCTP9 zI!0Uo=5r9L)zS;1eERy4t6}K|WGIGQKEl@*d)b-+>f60M`re{W zC_99DX5KD)RE?yTUj*>`Gq*WVu1waYNmVcPuu7&Ppg>scqgJ~v>7^G-q`5&I3J(mu`Vr*jp|_8&%AnORP~SwDql_5XAM{L&?A%E0OaMuYrI7a$(^iAzj_ zBTmHFq&|V*RlI)f>j0MJyXSD#RyAqO*T5nBidXQavdFxl$0y6*LSb8eGZc88`C+p> zBivvo!BtLeam4;SxnWoZvJzFkRRUhaUv)KQdOCAYe%3Rp!?MPBLoZ;ov29+6a%0E8 zVAuENfn^X>FP`+{)oh-^HfUzL{*{m0;uf8;!mGU8Yfw;X`+-DY@IPH8eKjs{ou7$e-=UF1zg}Z zNvnXXy}fwQn#4xuOV`|ew)9cmUZls$QZ@rsglN{TvCA%BeE*^dD}MJ)Vn3I#&7VX* z?+HOk(+bg7q8@ZfxzaTLLZ3^B7y4euR>Ip!Utn2W#0u5ipk!tHuysxU&k{G)^~i;j zfB{Yn$I!!fnU4HdrFY0MTR|i8l@XS)%8>i(~^(dYmyd!Y6+S9 z@`N{$edw7eao8+s0lbfS&y3)mtx3WTmAM(;ip!OSP%t?;x2x`%g_~Q3=wNMw%BEn* zPb;Q%{1kf_7iXo=c77I44hwEbpECOsBsSCd1woO7IHI=pNSt39X)De9WM|m6NN$tBfmXL?;y2^4ISI^?x^zZ+C0Rh zhv=JlK>;8FA5?b@JKuq`C}&AcBt9FC83U%4{1U* z+Ie?Kl&1Rhzdox+n?Dg9Yvs$~;(duTe|seh!^fj_xh^R;B84A?o0TOUe#kIt08 z|Bf!E^*k6O3ed}@(_LJsl|k3vBC8}LM#mlNg}PB>HmLtTovk<^_|E0Uhbl*AP7<5$ zycLz|QggqDA=nPVVvBH7sH{8QF^(c-e(mqx zm%b9dcHs_$UcCF$A{n}XtVRhQrxY$r&SbqJg|0N8cx*oK$MS8P6<9v2IT$pjUwbPx z4H#o4bH+c2%WT+b4ov%?*{;tz$-ftDnpAzG1c#w~&u7}f78s##jM(a?063hxPU@GW zjo!57E5{9$W8YOVZRJ+h77|*x;$!ux0|iE{++6w=ZwYDN7b#dlPA>+v3iH|Ew(bXPM({WB&2$aXk=EoFiD1=W;eIvIUf8j828s}eZGtKUw z}_QN1}up-$tE$iw5sK6fG416c7??({RIQflNE(r2MP z0!v1g#Jo%*yfe}L@M@@$2J0ooD=6;&>Imgk1d6gSIiMu|Nqma@K;9%soL|CGUq|=g zL56t(Eui}_v;n1vf}@~dkSqs)MF_+M