Commit 66a4900b by 冷斌

fix bug

parent 49c7385a
<?php <?php
include './Wxpay.php';
class Api_Charge extends PhalApi_Api { class Api_Charge extends PhalApi_Api {
public function getRules() { public function getRules() {
...@@ -50,6 +47,17 @@ class Api_Charge extends PhalApi_Api { ...@@ -50,6 +47,17 @@ class Api_Charge extends PhalApi_Api {
return $orderid; return $orderid;
} }
protected function getWx($configpri, $configpub)
{
return Yansongda\Pay\Pay::wechat([
'appid' => $configpri['wx_appid'],
'appSecret' => $configpri['wx_appsecret'],
'mch_id' => $configpri['wx_mchid'],
'key' => $configpri['wx_key'],
'notify_url' => $configpub['site'].'/index.php?g=Appapi&m=pay&a=notify_wx',
]);
}
/** /**
* 微信支付 * 微信支付
* @desc 用于 微信支付 获取订单号 * @desc 用于 微信支付 获取订单号
...@@ -85,8 +93,8 @@ class Api_Charge extends PhalApi_Api { ...@@ -85,8 +93,8 @@ class Api_Charge extends PhalApi_Api {
$rs['msg'] = '微信未配置'; $rs['msg'] = '微信未配置';
return $rs; return $rs;
} }
$wxpay = new Wxpay();
var_dump($wxpay); var_dump(1);
die; die;
$orderinfo=array( $orderinfo=array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment