|
@@ -202,11 +202,15 @@ class OrderService
|
|
$qrcodeNbr = $params['qrcode_nbr'];
|
|
$qrcodeNbr = $params['qrcode_nbr'];
|
|
$prefix = substr($qrcodeNbr, 0, 2);
|
|
$prefix = substr($qrcodeNbr, 0, 2);
|
|
// 模拟数据
|
|
// 模拟数据
|
|
- // $result = [
|
|
|
|
- // 'return_code'=>'SUCCESS',
|
|
|
|
- // 'result_code' => 'SUCCESS'
|
|
|
|
- // ];
|
|
|
|
- // return $result;
|
|
|
|
|
|
+// $result = [
|
|
|
|
+// 'return_code'=>'SUCCESS',
|
|
|
|
+// 'result_code' => 'SUCCESS'
|
|
|
|
+// ];
|
|
|
|
+// $result=[
|
|
|
|
+// 'code'=> '10000',
|
|
|
|
+// 'msg' => 'Success'
|
|
|
|
+// ];
|
|
|
|
+// return $result;
|
|
// 微信支付
|
|
// 微信支付
|
|
if (in_array($prefix, [10, 11, 12, 13, 14, 15])) {
|
|
if (in_array($prefix, [10, 11, 12, 13, 14, 15])) {
|
|
$payData = [
|
|
$payData = [
|
|
@@ -216,7 +220,9 @@ class OrderService
|
|
'auth_code' => $params['qrcode_nbr'],
|
|
'auth_code' => $params['qrcode_nbr'],
|
|
];
|
|
];
|
|
try {
|
|
try {
|
|
- Pay::wechat(config('payment.wxpay'))->pos($payData);
|
|
|
|
|
|
+ $config = config('payment.wxpay');
|
|
|
|
+ $config['notify_url'] = getenv('NOTIFY_DOMAIN_ADMIN').'/notify/orderPay/wxpay';
|
|
|
|
+ Pay::wechat($config)->pos($payData);
|
|
$result = self::findWxpay($params['orderGroupId'], 0);
|
|
$result = self::findWxpay($params['orderGroupId'], 0);
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
$log->error("WXPAY", ['msg' => $e->getMessage()]);
|
|
$log->error("WXPAY", ['msg' => $e->getMessage()]);
|
|
@@ -235,7 +241,9 @@ class OrderService
|
|
'auth_code' => $params['qrcode_nbr'],
|
|
'auth_code' => $params['qrcode_nbr'],
|
|
];
|
|
];
|
|
try {
|
|
try {
|
|
- Pay::alipay(config('payment.alipay'))->pos($payData);
|
|
|
|
|
|
+ $config = config('payment.alipay');
|
|
|
|
+ $config['notify_url'] = getenv('NOTIFY_DOMAIN_ADMIN').'/notify/orderPay/alipay';
|
|
|
|
+ Pay::alipay($config)->pos($payData);
|
|
$result = self::findAlipay($params['orderGroupId'], 0);
|
|
$result = self::findAlipay($params['orderGroupId'], 0);
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
$log->error("ALIPAY", ['msg' => $e->getMessage()]);
|
|
$log->error("ALIPAY", ['msg' => $e->getMessage()]);
|