|
@@ -617,7 +617,7 @@ class OrdersController extends Controller
|
|
|
if ($pay_merchant->config_info) {
|
|
|
$config = json_decode($pay_merchant->config_info, true);
|
|
|
}
|
|
|
- $wechatPay = WechatPay::Union($pay_merchant->source,$config);
|
|
|
+ $wechatPay = WechatPay::Union($pay_merchant->source, $config);
|
|
|
if (!$wechatPay) return response()->error('WAP_PARAM_ERROR');
|
|
|
$trade_no = $wechatPay->generateTradeNo();
|
|
|
|
|
@@ -952,8 +952,7 @@ class OrdersController extends Controller
|
|
|
public function waitPageUnion(Request $request)
|
|
|
{
|
|
|
$order = $request->input('merOrderId');
|
|
|
- if($order)
|
|
|
- {
|
|
|
+ if ($order) {
|
|
|
$from = 'pay';
|
|
|
$order = (string) $order;
|
|
|
$order_info = OrderService::getByTradeNo($order);
|
|
@@ -985,7 +984,7 @@ class OrdersController extends Controller
|
|
|
|
|
|
$pay_merchant = DB::table('pay_merchants')->select('appid', 'source', 'config_info')->where('id', $pay_merchant_id)->where('is_enabled', 1)->first();
|
|
|
|
|
|
- $application = WechatPay::Official(json_decode($pay_merchant->config_info, true));
|
|
|
+ $application = WechatPay::Official($pay_merchant->source, json_decode($pay_merchant->config_info, true));
|
|
|
//$app = new Application($options);
|
|
|
$app = $application->app;
|
|
|
$response = $app->payment->handleNotify(function ($notify, $successful) {
|