...
|
...
|
@@ -10,6 +10,7 @@ use Yansongda\Pay\Pay; |
|
|
use think\Log;
|
|
|
use fast\Http;
|
|
|
use think\Validate;
|
|
|
use Exception;
|
|
|
/**
|
|
|
* 支付接口**
|
|
|
*/
|
...
|
...
|
@@ -73,7 +74,8 @@ class Wxpay extends Api |
|
|
'total_fee' => 1,
|
|
|
//'total_fee' => floatval($total_price)*100,//单位:分
|
|
|
'openid' => $openid,
|
|
|
'notify_url' => $this->request->root(true) . '/api/Wxpay/notify',
|
|
|
'notify_url' => 'http://feipin.w.brotop.cn/api/Wxpay/notify',
|
|
|
'return_url' => 'http://feipin.w.brotop.cn/api/Wxpay/wechatReturn',
|
|
|
];
|
|
|
//跳转或输出
|
|
|
$this->success('成功',$pay->miniapp($order));
|
...
|
...
|
@@ -101,4 +103,17 @@ class Wxpay extends Api |
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 微信异步通知
|
|
|
*/
|
|
|
public function wechatReturn(){
|
|
|
$pay = Service::checkReturn('wechat');
|
|
|
if (!$pay) {
|
|
|
$this->error('签名错误');
|
|
|
}
|
|
|
//你可以在这里定义你的提示信息,但切记不可在此编写逻辑
|
|
|
$this->success("恭喜你!支付成功!");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|