feat: 调试支付
parent
2d3f7b0bde
commit
b823b9110a
|
@ -121,12 +121,12 @@ class WeChatPayServer
|
||||||
}
|
}
|
||||||
|
|
||||||
//pc端
|
//pc端
|
||||||
if (in_array($order_source, [Client_::pc])) {
|
if (in_array($order_source, [Client_::pc, Client_::api])) {
|
||||||
$data = self::getNativeCode($result, $order);
|
$data = self::getNativeCode($result, $order);
|
||||||
}
|
}
|
||||||
|
|
||||||
//h5(非微信环境)
|
//h5(非微信环境)
|
||||||
if (in_array($order_source, [Client_::h5, Client_::api])) {
|
if (in_array($order_source, [Client_::h5])) {
|
||||||
$redirect_url = request()->domain() . '/mobile/pages/user_order/user_order';
|
$redirect_url = request()->domain() . '/mobile/pages/user_order/user_order';
|
||||||
$redirect_url = urlencode($redirect_url);
|
$redirect_url = urlencode($redirect_url);
|
||||||
$data = $result['mweb_url'] . '&redirect_url=' . $redirect_url;
|
$data = $result['mweb_url'] . '&redirect_url=' . $redirect_url;
|
||||||
|
@ -248,14 +248,14 @@ class WeChatPayServer
|
||||||
}
|
}
|
||||||
|
|
||||||
//NATIVE模式设置
|
//NATIVE模式设置
|
||||||
if ($order_source == Client_::pc) {
|
if (in_array($order_source, [Client_::pc, Client_::api])) {
|
||||||
$attributes['trade_type'] = 'NATIVE';
|
$attributes['trade_type'] = 'NATIVE';
|
||||||
$attributes['product_id'] = $order['order_sn'];
|
$attributes['product_id'] = $order['order_sn'];
|
||||||
$attributes['openid'] = "";
|
$attributes['openid'] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//h5支付类型
|
//h5支付类型
|
||||||
if (in_array($order_source, [Client_::h5, Client_::api])) {
|
if (in_array($order_source, [Client_::h5])) {
|
||||||
$attributes['trade_type'] = 'MWEB';
|
$attributes['trade_type'] = 'MWEB';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue