|
@@ -48,7 +48,7 @@ class Wechat extends Base
|
|
]
|
|
]
|
|
];
|
|
];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
unset($order['order_id'], $order['total_amount']);
|
|
unset($order['order_id'], $order['total_amount']);
|
|
$method = $this->getMethod('wechat');
|
|
$method = $this->getMethod('wechat');
|
|
$result = Pay::wechat()->$method($order);
|
|
$result = Pay::wechat()->$method($order);
|
|
@@ -331,16 +331,18 @@ class Wechat extends Base
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- $config['notify_url'] = request()->domain() . '/addons/shopro/pay/notify/payment/wechat/platform/' . $this->platform;
|
|
|
|
- $config['mch_secret_cert'] = ROOT_PATH . 'public' . $config['mch_secret_cert'];
|
|
|
|
- $config['mch_public_cert_path'] = ROOT_PATH . 'public' . $config['mch_public_cert_path'];
|
|
|
|
|
|
+ $config['notify_url'] = request()->domain() . '/api/pay/notify/payment/wechat/platform/' . $this->platform;
|
|
|
|
+ // $config['mch_secret_cert'] = cdnurl($config['mch_secret_cert'], true);
|
|
|
|
+ // $config['mch_public_cert_path'] = cdnurl($config['mch_public_cert_path'], true);
|
|
|
|
+ $config['mch_secret_cert'] = ROOT_PATH . 'public/apiclient_cert.pem';
|
|
|
|
+ $config['mch_public_cert_path'] = ROOT_PATH . 'public/apiclient_key.pem';
|
|
|
|
|
|
// 可手动配置微信支付公钥证书
|
|
// 可手动配置微信支付公钥证书
|
|
$config['wechat_public_cert_id'] = $config['wechat_public_cert_id'] ?? '';
|
|
$config['wechat_public_cert_id'] = $config['wechat_public_cert_id'] ?? '';
|
|
$config['wechat_public_cert'] = $config['wechat_public_cert'] ?? '';
|
|
$config['wechat_public_cert'] = $config['wechat_public_cert'] ?? '';
|
|
if ($config['wechat_public_cert_id'] && $config['wechat_public_cert']) {
|
|
if ($config['wechat_public_cert_id'] && $config['wechat_public_cert']) {
|
|
$config['wechat_public_cert_path'] = [
|
|
$config['wechat_public_cert_path'] = [
|
|
- $config['wechat_public_cert_id'] => ROOT_PATH . 'public' . $config['wechat_public_cert']
|
|
|
|
|
|
+ $config['wechat_public_cert_id'] => cdnurl($config['wechat_public_cert'], true)
|
|
];
|
|
];
|
|
}
|
|
}
|
|
unset($config['wechat_public_cert_id'], $config['wechat_public_cert']);
|
|
unset($config['wechat_public_cert_id'], $config['wechat_public_cert']);
|