PaymentController.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2017/11/22
  6. * Time: 下午3:23
  7. */
  8. namespace App\Http\Controllers\Manage\Finance;
  9. use App\Http\Controllers\Manage\Finance\Transformers\PaymentDetailTransformer;
  10. use App\Http\Controllers\Manage\Finance\Transformers\PaymentTransformer;
  11. use App\Libs\PayHelper;
  12. use App\Modules\Channel\Services\ChannelService;
  13. use App\Modules\Finance\Models\FinanceMerchantStat;
  14. use App\Modules\Finance\Models\LiquidatedStat;
  15. use App\Modules\Finance\Services\CashAccountService;
  16. use App\Modules\Finance\Services\FinanceMerchantStatService;
  17. use App\Modules\Finance\Services\FinancialConfigService;
  18. use App\Modules\Finance\Services\LiquidatedStatService;
  19. use App\Modules\Finance\Services\PaymentService;
  20. use App\Modules\Finance\Services\WithdrawCashService;
  21. use Illuminate\Http\Request;
  22. use DB;
  23. class PaymentController extends BaseController
  24. {
  25. /**
  26. * @apiDefine Finance 结算提现模块
  27. */
  28. /**
  29. * @apiVersion 1.0.0
  30. * @apiDescription 创建打款信息
  31. * @api {POST} addPayment 创建打款信息
  32. * @apiGroup Finance
  33. * @apiName addPayment
  34. * @apiParam {Number} withdraw_cash_id 提现id.
  35. * @apiParam {Number} amount 打款金额.
  36. * @apiParam {String} [remark] 备注说明.
  37. * @apiParam {String} [source] 打款通道[tl, ll].
  38. * @apiSuccessExample {json} Success-Response:
  39. *
  40. * {
  41. * "code": 0,
  42. * "msg": "",
  43. * "data":{
  44. * }
  45. * }
  46. */
  47. function add_payment(Request $request) {
  48. $withdraw_cash_id = $request->has('withdraw_cash_id') ? $request->input('withdraw_cash_id') : '';
  49. if(!is_numeric($withdraw_cash_id)) {
  50. return response()->error("PARAM_ERROR");
  51. }
  52. $amount = $request->has('amount') ? $request->input('amount') : '';
  53. if(!is_numeric($amount) || (float)$amount <= 0) {
  54. return response()->error("PARAM_ERROR");
  55. }
  56. // $userId = $request->has('user_id') ? $request->input('user_id') : '';
  57. // if(!is_numeric($userId)) {
  58. // return response()->error("PARAM_ERROR");
  59. // }
  60. $userId = $this->getLoginUserId();
  61. $remark = $request->has('remark') ? $request->input('remark') : '';
  62. $withdrawCash = WithdrawCashService::getWithdrawCash($withdraw_cash_id);
  63. if(empty($withdrawCash)) {
  64. return response()->error("PARAM_ERROR");
  65. }
  66. //对公 走手动打款
  67. if($withdrawCash['is_company'] == 1) {
  68. return response()->error("PAYMENT_AUTO_NOT_OPEN");
  69. }
  70. //已打款,判断
  71. if(WithdrawCashService::isEditWithdrawCashStatus($withdraw_cash_id)) {
  72. return response()->error("PAYMENT_WITHDRAW_MONEY_TOO");
  73. }
  74. //判断打款钱核对 提现金额 - 手续费 = 实际打款金额
  75. $money = (float)$withdrawCash['amount'] - (float)$withdrawCash['tallage'];
  76. if($amount != $money) {
  77. return response()->error("PAYMENT_WITHDRAW_MONEY");
  78. }
  79. $channelId = $withdrawCash['distribution_channel_id'];
  80. //判断渠道是否冻结
  81. if(FinancialConfigService::isFrozenDistributionChannel($channelId)) {
  82. return response()->error("WITHDRAW_CASH_AMOUNT_FROZEN");
  83. }
  84. //判断账户是否已经设置
  85. if(!CashAccountService::isCashAccountExits($channelId)) {
  86. return response()->error("WITHDRAW_CASH_AMOUNT_ACCOUNT");
  87. }
  88. //TODO 先关闭自动打款
  89. if(!env('PAYMENT_AUTO_PAY_ON')) {
  90. return response()->error("PAYMENT_AUTO_NOT_OPEN");
  91. }
  92. $isTD = 0;
  93. $source = $request->has('source') ? $request->input('source') : '';
  94. if ("tl" == $source || "ll" == $source) {
  95. if("tl" == $source) {
  96. //通联支付通道账户
  97. $tonglianpayLiquidatedStatData = LiquidatedStatService::getLiquidatedStatSingleBySource(config('common.tonglianpay'));
  98. if(!empty($tonglianpayLiquidatedStatData) && $tonglianpayLiquidatedStatData['account_balance_amount_day'] > ($money - 1)) {
  99. //判断通联支付通道钱余额大于 提现金额 需要算上每次 手续费 【1块钱】
  100. $isTD = 2;
  101. }
  102. }
  103. if("ll" == $source) {
  104. //连连支付通道账户
  105. $lianlianpayLiquidatedStatData = LiquidatedStatService::getLiquidatedStatSingleBySource(config('common.lianlianpay'));
  106. if(!empty($lianlianpayLiquidatedStatData) && $lianlianpayLiquidatedStatData['account_balance_amount_day'] > ($money - 1)) {
  107. //判断连连支付通道钱余额大于 提现金额 需要算上每次 手续费 【1块钱】
  108. $isTD = 1;
  109. }
  110. }
  111. } else {
  112. //通联支付通道账户
  113. $tonglianpayLiquidatedStatData = LiquidatedStatService::getLiquidatedStatSingleBySource(config('common.tonglianpay'));
  114. if($isTD == 0) {
  115. //连连通道钱余额不走,判断通联
  116. if(!empty($tonglianpayLiquidatedStatData) && $tonglianpayLiquidatedStatData['account_balance_amount_day'] > ($money - 1)) {
  117. //判断通联支付通道钱余额大于 提现金额 需要算上每次 手续费 【1块钱】
  118. $isTD = 2;
  119. }
  120. }
  121. //连连支付通道账户
  122. $lianlianpayLiquidatedStatData = LiquidatedStatService::getLiquidatedStatSingleBySource(config('common.lianlianpay'));
  123. if($isTD == 0) {
  124. //默认看连连通道余额
  125. if(!empty($lianlianpayLiquidatedStatData) && $lianlianpayLiquidatedStatData['account_balance_amount_day'] > ($money - 1)) {
  126. //判断连连支付通道钱余额大于 提现金额 需要算上每次 手续费 【1块钱】
  127. $isTD = 1;
  128. }
  129. }
  130. }
  131. if($isTD == 0) {
  132. //连连支付通道,余额不足
  133. //通联支付通道,余额不足
  134. // 返回,支付通道余额不足,请走人工打款
  135. return response()->error("PAYMENT_CHANNEL_AMOUNT_WITHOUT");
  136. }
  137. //正式环境,线上为 2
  138. if(env('PAYMENT_AUTO_PAY_TEST') == 2) {
  139. if($isTD == 1) {
  140. //连连支付通道打款
  141. PaymentService::makeThreeSourcePayment($userId, $withdraw_cash_id, (float)$amount, $remark, $lianlianpayLiquidatedStatData);
  142. return response()->success();
  143. }
  144. if($isTD == 2) {
  145. //通连支付通道打款
  146. PaymentService::makeThreeSourcePayment($userId, $withdraw_cash_id, (float)$amount, $remark, $tonglianpayLiquidatedStatData);
  147. return response()->success();
  148. }
  149. } else {
  150. //测试环境直接修改状态为 成功
  151. $tradeNo = "测试_".$channelId;
  152. $pay_merchant_source = "测试";
  153. if($isTD == 1) {
  154. $pay_merchant_source = $lianlianpayLiquidatedStatData['pay_merchant_source'];
  155. }
  156. if($isTD == 2) {
  157. $pay_merchant_source = $tonglianpayLiquidatedStatData['pay_merchant_source'];
  158. }
  159. //测试环境,直接走逻辑打款成功
  160. $payment = PaymentService::addPayment($withdraw_cash_id, $amount, $remark, $pay_merchant_source, $tradeNo, WithdrawCashService::getWithdrawCashStatusStr(32), "测试", $withdrawCash['is_company'], 0);
  161. //更新单个第三方通道可打款金额
  162. FinanceMerchantStatService::createOrUpdate($channelId, $pay_merchant_source, -$amount);
  163. //更新当前渠道当天当前支付通道可打款余额
  164. LiquidatedStatService::updateAccountBalanceAmountDay($pay_merchant_source, -$amount);
  165. //修改状态
  166. WithdrawCashService::updateWithdrawCashStatus($withdraw_cash_id, $userId, 32, $remark, $tradeNo);
  167. return response()->success();
  168. }
  169. //其他,走人工打款
  170. return response()->error("PAYMENT_CHANNEL_AMOUNT_WITHOUT");
  171. }
  172. /**
  173. * @apiVersion 1.0.0
  174. * @apiDescription 创建人工打款信息
  175. * @api {POST} addPaymentPersonMade 创建人工打款信息
  176. * @apiGroup Finance
  177. * @apiName addPaymentPersonMade
  178. * @apiParam {Number} withdraw_cash_id 提现id.
  179. * @apiParam {Number} amount_person 人工打款金额
  180. * @apiParam {String} trade_no 银行交易流水号.
  181. * @apiParam {String} [remark] 备注说明.
  182. * @apiSuccessExample {json} Success-Response:
  183. *
  184. * {
  185. * "code": 0,
  186. * "msg": "",
  187. * "data":{
  188. * }
  189. * }
  190. */
  191. function add_paymentPersonMade(Request $request) {
  192. $withdraw_cash_id = $request->has('withdraw_cash_id') ? $request->input('withdraw_cash_id') : '';
  193. if(!is_numeric($withdraw_cash_id)) {
  194. return response()->error("PARAM_ERROR");
  195. }
  196. // $userId = $request->has('user_id') ? $request->input('user_id') : '';
  197. // if(!is_numeric($userId)) {
  198. // return response()->error("PARAM_ERROR");
  199. // }
  200. $userId = $this->getLoginUserId();
  201. $amount_person = $request->has('amount_person') ? $request->input('amount_person') : '';
  202. if(!is_numeric($amount_person)) {
  203. return response()->error("PARAM_ERROR");
  204. }
  205. $trade_no = $request->has('trade_no') ? $request->input('trade_no') : '';
  206. if(empty($trade_no)) {
  207. return response()->error("PARAM_ERROR");
  208. }
  209. $remark = $request->has('remark') ? $request->input('remark') : '';
  210. $remark = "[人工打款]{".$remark."}";
  211. $withdrawCash = WithdrawCashService::getWithdrawCash($withdraw_cash_id);
  212. if(empty($withdrawCash)) {
  213. return response()->error("PARAM_ERROR");
  214. }
  215. //已打款,判断
  216. if(WithdrawCashService::isWithdrawCashStatusSuccess($withdraw_cash_id)) {
  217. return response()->error("PAYMENT_WITHDRAW_MONEY_TOO");
  218. }
  219. $channelId = $withdrawCash['distribution_channel_id'];
  220. //判断渠道是否冻结
  221. if(FinancialConfigService::isFrozenDistributionChannel($channelId)) {
  222. return response()->error("ACCOUNT_FRONZEN");
  223. }
  224. //判断打款钱核对 提现金额 - 手续费 = 实际打款金额
  225. $amount = (float)$withdrawCash['amount'] - (float)$withdrawCash['tallage'];
  226. //人工打款成功
  227. //Payment 插入人工
  228. // WithdrawCashStatus
  229. // Liquidation 人工 判断渠道支付通道余额,分别生成
  230. // LiquidatedStat
  231. PaymentService::makePersonMadePayment($userId, $withdraw_cash_id, $amount, $remark, $trade_no, $amount_person);
  232. return response()->success();
  233. }
  234. /**
  235. * @apiVersion 1.0.0
  236. * @apiDescription 打款列表
  237. * @api {GET} payments 打款列表
  238. * @apiGroup Finance
  239. * @apiName payments
  240. * @apiParam {Number} [withdraw_cash_id] 提现id.
  241. * @apiParam {String} [start_time] 开始时间(可不传)
  242. * @apiParam {String} [end_time] 结束时间(可不传)
  243. * @apiSuccess {Number} id 打款 id.
  244. * @apiSuccess {Number} withdraw_cash_id 提现 id.
  245. * @apiSuccess {Number} amount 打款金额.
  246. * @apiSuccess {String} remark 备注
  247. * @apiSuccess {String} pay_time 打款时间
  248. * @apiSuccessExample {json} Success-Response:
  249. *
  250. * {
  251. * "code": 0,
  252. * "msg": "",
  253. * "data":{
  254. * "list": [
  255. * {
  256. * "id": 1,
  257. * "withdraw_cash_id": 1,
  258. * "amount": "1000.0000",
  259. * "remark": "dfsdfssd",
  260. * "pay_time": "2017-11-20 14:28:28"
  261. * }
  262. * ],
  263. * "meta": {
  264. * "total": 1,
  265. * "per_page": 15,
  266. * "current_page": 1,
  267. * "last_page": 1,
  268. * "next_page_url": "",
  269. * "prev_page_url": ""
  270. * }
  271. * }
  272. * }
  273. */
  274. function get_list(Request $request) {
  275. $withdraw_cash_id = $request->has('withdraw_cash_id') ? $request->input('withdraw_cash_id') : '';
  276. $start_time = $request->has('start_time') && !empty($request->input('start_time')) ? date('Ymd',strtotime($request->input('start_time'))) : '';
  277. $end_time = $request->has('end_time') && !empty($request->input('end_time')) ? date('Ymd',strtotime($request->input('end_time'))) : '';
  278. $end_time = self::getMaxDay($end_time);
  279. $payments = PaymentService::getPaymentList($withdraw_cash_id, $start_time, $end_time);
  280. return response()->pagination(new PaymentTransformer(), $payments);
  281. }
  282. /**
  283. * @apiVersion 1.0.0
  284. * @apiDescription 打款列表详情
  285. * @api {GET} listPayments 打款列表详情
  286. * @apiGroup Finance
  287. * @apiName listPayments
  288. * @apiParam {Number} [withdraw_cash_id] 提现id.
  289. * @apiParam {String} [start_time] 开始时间(可不传)
  290. * @apiParam {String} [end_time] 结束时间(可不传)
  291. * @apiParam {Number} [distribution_channel_id] 渠道id.(可不传,获取所有渠道)
  292. * @apiParam {String} [distribution_channel_name] 渠道名称.(可不传,获取所有渠道)
  293. * @apiParam {String} [account_name] 账户名称
  294. * @apiParam {String} [search_name] 搜索名称
  295. * @apiParam {Number} [status] 状态 查看接口 api/getWithdrawCashStatus (可不传,获取所有状态)
  296. * @apiParam {Number} [is_company] 0:对私, 1:对公司.(可不传,获取所有渠道)
  297. * @apiSuccess {Number} id 打款 id.
  298. * @apiSuccess {Number} withdraw_cash_id 提现 id.
  299. * @apiSuccess {Number} amount 打款金额.
  300. * @apiSuccess {String} remark 备注
  301. * @apiSuccess {String} pay_time 打款时间
  302. * @apiSuccess {Number} channel_id 渠道ID
  303. * @apiSuccess {String} channel_name 渠道名称
  304. * @apiSuccess {String} status 打款状态
  305. * @apiSuccess {Number} check_user_id 审核人ID
  306. * @apiSuccess {String} check_user_name 审核人名称
  307. * @apiSuccess {String} account_name 银行卡户主名称
  308. * @apiSuccess {String} identity_card 银行卡户主身份证
  309. * @apiSuccess {String} card_number 银行卡账号
  310. * @apiSuccess {String} account_bank 银行支行
  311. * @apiSuccess {String} bank 银行名称
  312. * @apiSuccess {String} province 银行地址
  313. * @apiSuccessExample {json} Success-Response:
  314. *
  315. * {
  316. * "code": 0,
  317. * "msg": "",
  318. * "data":{
  319. * "list": [
  320. * {
  321. * "id": 1,
  322. * "withdraw_cash_id": 1,
  323. * "amount": "1000.0000",
  324. * "pay_time": "2017-11-20 14:28:28",
  325. * "channel_id": 1,
  326. * "channel_name": "渠道一",
  327. * "status": "已打款",
  328. * "remark": "哈哈哈,有钱",
  329. * "check_user_id": 1,
  330. * "check_user_name": "张大妈",
  331. * "account_name": "宋晓",
  332. * "identity_card": "33038119930901821X",
  333. * "card_number": "6222520177654916",
  334. * "account_bank": "钱江支行",
  335. * "bank": "杭州银行",
  336. * "province": "北京市"
  337. * }
  338. * ],
  339. * "meta": {
  340. * "total": 1,
  341. * "per_page": 15,
  342. * "current_page": 1,
  343. * "last_page": 1,
  344. * "next_page_url": "",
  345. * "prev_page_url": ""
  346. * }
  347. * }
  348. * }
  349. */
  350. function get_listDetail(Request $request) {
  351. $distribution_channel_id = $request->has('distribution_channel_id') ? $request->input('distribution_channel_id') : '';
  352. $distribution_channel_name = $request->has('distribution_channel_name') ? $request->input('distribution_channel_name') : '';
  353. $withdraw_cash_id = $request->has('withdraw_cash_id') ? $request->input('withdraw_cash_id') : '';
  354. $start_time = $request->has('start_time') && !empty($request->input('start_time')) ? date('Ymd',strtotime($request->input('start_time'))) : '';
  355. $end_time = $request->has('end_time') && !empty($request->input('end_time')) ? date('Ymd',strtotime($request->input('end_time'))) : '';
  356. $end_time = self::getMaxDay($end_time);
  357. $account_name = $request->has('account_name') ? $request->input('account_name') : '';
  358. $search_name = $request->has('search_name') ? $request->input('search_name') : '';
  359. $status = $request->has('status') ? $request->input('status') : '';
  360. $is_company = $request->has('is_company') ? $request->input('is_company') : '';
  361. $params = [
  362. 'withdraw_cash_id'=>$withdraw_cash_id,
  363. 'channel_id'=>$distribution_channel_id,
  364. 'channel_name'=>$distribution_channel_name,
  365. 'start_date'=>$start_time,
  366. 'end_date'=>$end_time,
  367. 'account_name'=>$account_name,
  368. 'search_name'=>$search_name,
  369. 'is_company'=>$is_company,
  370. ];
  371. $payments = PaymentService::getPaymentDetailList($params, $status);
  372. return response()->pagination(new PaymentDetailTransformer(), $payments);
  373. }
  374. /**
  375. * 更新打款状态
  376. * id 条目id
  377. * status 状态(10:待打款)
  378. * @param Request $request
  379. * @return mixed
  380. */
  381. function updatePaymentStatus(Request $request)
  382. {
  383. $id = $request->has('id') ? $request->input('id') : '';
  384. // $status = $request->has('status') ? $request->input('status') : '';
  385. if (!$id) {
  386. return response()->error("PARAM_EMPTY");
  387. }
  388. $status = WithdrawCashService::getWithdrawCashStatusStr(10);
  389. $result = PaymentService::updateSimplePaymentStatus($id, $status);
  390. if ($result) {
  391. return response()->success();
  392. } else {
  393. return response()->error("HANDLE_FAILED");
  394. }
  395. }
  396. function test_add_payment(Request $request)
  397. {
  398. $payType = "ALLINPAY";
  399. // $transactionSerialNumber = date('YmdHis').mt_rand(10,99)."_1";
  400. // $bankCode = "102";
  401. // $bankName = '';
  402. // $bankAccountNO = "6222031202001646388";
  403. // $bankAccountName = "宋栋波";
  404. // $amount = 0.01;
  405. // $summary = "summary";
  406. // $remark = "remark";
  407. // $channelId = 1;
  408. // $isCompany = 0;
  409. // $resultPayData = PayHelper::pay($payType, $transactionSerialNumber, $bankCode, $bankName, $bankAccountNO, $bankAccountName, $amount, $summary, $remark, $channelId, $isCompany);
  410. // $resultDataMsg = $remark;
  411. // if(!empty($resultPayData) && !empty($resultPayData['msg'])) {
  412. // $resultDataMsg = $resultDataMsg."_【".$resultPayData['msg']."】";
  413. // }
  414. // dd($transactionSerialNumber);
  415. //// dd($resultPayData);
  416. // if(!empty($resultPayData) && $resultPayData['code'] == 1) {
  417. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  418. // $resultQueryData = PayHelper::payQuery($payType, $transactionSerialNumber, $reqSn);
  419. // if(!empty($resultQueryData) && !empty($resultQueryData['msg'])) {
  420. // $resultDataMsg = $resultDataMsg."_【".$resultQueryData['msg']."】";
  421. // }
  422. // if(!empty($resultQueryData) && $resultQueryData['code'] == 1) {
  423. // }
  424. // }
  425. // dd($resultDataMsg);
  426. // $transactionSerialNumber = '2017122511504564_1';
  427. // $resultDataMsg = '';
  428. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  429. // $resultQueryData = PayHelper::payQuery($payType, $transactionSerialNumber, $reqSn);
  430. // if(!empty($resultQueryData) && !empty($resultQueryData['msg'])) {
  431. // $resultDataMsg = $resultDataMsg."_【".$resultQueryData['msg']."】";
  432. // }
  433. // if(!empty($resultQueryData) && $resultQueryData['code'] == 1) {
  434. // }
  435. // return response()->success($resultQueryData);
  436. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  437. // $resultQueryData = PayHelper::payAccountInfo($payType, $reqSn);
  438. // return response()->success($resultQueryData);
  439. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  440. // $startDay = date('Ymd', strtotime(date("Y-m-d")." -2 day"));
  441. // $endDay = date('Ymd');
  442. // $resultQueryData = PayHelper::payAccountHistoryBalanceAmount($payType, $reqSn, $startDay, $endDay);
  443. // return response()->success($resultQueryData);
  444. // dd(json_encode($resultQueryData));
  445. // dd($resultDataMsg);
  446. // $financeMerchantStat = new FinanceMerchantStat();
  447. // $financeMerchantStat['pay_merchant_source'] = "ALLINPAY";
  448. // $financeMerchantStat['distribution_channel_id'] = 1;
  449. // $withdraw_cash_id = 68;
  450. //
  451. // PaymentService::makeThreeSourcePayment(1, $withdraw_cash_id, 0.01, "测试", $financeMerchantStat);
  452. $payType = "LIANLIANPAY";
  453. // $transactionSerialNumber = date('YmdHis').mt_rand(10,99)."_1";
  454. // $bankCode = "102";
  455. // $bankName = '';
  456. // $bankAccountNO = "6222031202001646388";
  457. // $bankAccountName = "宋栋波";
  458. // $amount = 0.01;
  459. // $summary = "summary";
  460. // $remark = "remark";
  461. // $channelId = 1;
  462. // $isCompany = 0;
  463. // $resultPayData = PayHelper::pay($payType, $transactionSerialNumber, $bankCode, $bankName, $bankAccountNO, $bankAccountName, $amount, $summary, $remark, $channelId, $isCompany);
  464. // $resultDataMsg = $remark;
  465. // if(!empty($resultPayData) && !empty($resultPayData['msg'])) {
  466. // $resultDataMsg = $resultDataMsg."_【".$resultPayData['msg']."】";
  467. // }
  468. //// dd($transactionSerialNumber);
  469. // return response()->success($resultPayData);
  470. // $liquidatedStat = new LiquidatedStat();
  471. // $liquidatedStat['pay_merchant_source'] = $payType;
  472. // $withdraw_cash_id = 392;
  473. // PaymentService::makeThreeSourcePayment(1, $withdraw_cash_id, 1.09, "测试", $liquidatedStat);
  474. // $transactionSerialNumber = '2017122916450888_1';
  475. // $resultDataMsg = '';
  476. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  477. // $resultQueryData = PayHelper::payQuery($payType, $transactionSerialNumber, $reqSn);
  478. // if(!empty($resultQueryData) && !empty($resultQueryData['msg'])) {
  479. // $resultDataMsg = $resultDataMsg."_【".$resultQueryData['msg']."】";
  480. // }
  481. // if(!empty($resultQueryData) && $resultQueryData['code'] == 1) {
  482. // }
  483. // return response()->success($resultQueryData);
  484. // $reqSn = date('YmdHis').mt_rand(100000,999999);
  485. // $resultQueryData = PayHelper::payAccountInfo($payType, $reqSn);
  486. // return response()->success($resultQueryData);
  487. return response()->success();
  488. }
  489. }