|
@@ -12,6 +12,7 @@ class PayUtil
|
|
|
public function __construct()
|
|
|
{
|
|
|
$this->config = [
|
|
|
+ 'sub_appid' => 'wx29d6281c5252f504',
|
|
|
'huifu_id' => '6666000145960408',
|
|
|
'sys_id' => '6666000145960408',
|
|
|
'product_id' => 'YMFZS',
|
|
@@ -19,7 +20,7 @@ class PayUtil
|
|
|
];
|
|
|
}
|
|
|
|
|
|
- public function jsPay(string $order_no, string $amount, string $desc = '', string $notify_url = '', string $type = 'T_MINIAPP')
|
|
|
+ public function jsPay(string $openid,string $order_no, string $amount, string $desc = '', string $notify_url = '', string $type = 'T_MINIAPP')
|
|
|
{
|
|
|
$url = "https://api.huifu.com/v2/trade/payment/jspay";
|
|
|
|
|
@@ -33,8 +34,8 @@ class PayUtil
|
|
|
'trade_type' => $type,
|
|
|
'trans_amt' => $amount,// 交易金额 单位元 最低传入0.01
|
|
|
'wx_data' => [
|
|
|
- 'sub_appid' => 'wx29d6281c5252f504',
|
|
|
- 'sub_openid' => '123',
|
|
|
+ 'sub_appid' => $this->config['sub_appid'],
|
|
|
+ 'sub_openid' => $openid,
|
|
|
],
|
|
|
'notify_url' => ''
|
|
|
];
|