...
|
...
|
@@ -28,6 +28,9 @@ class SomepayController extends HomeBaseController |
|
|
// 微信支付
|
|
|
public function pay($openId , $price , $order_sn , $url,$content)
|
|
|
{
|
|
|
echo "<pre/>";
|
|
|
print_r('123');
|
|
|
die;
|
|
|
$price = intval($price * 100);
|
|
|
$tools = new \JsApiPay();
|
|
|
$input = new \WxPayUnifiedOrder();
|
...
|
...
|
@@ -54,6 +57,8 @@ class SomepayController extends HomeBaseController |
|
|
//微信回调
|
|
|
public function pay_notify()
|
|
|
{
|
|
|
$a['a'] ='7';
|
|
|
Db::name('Test')->insertGetId($a);
|
|
|
$config = new \WxPayConfig();
|
|
|
$notify = new \WxPayNotify();
|
|
|
$notify->Handle($config, false);
|
...
|
...
|
@@ -63,7 +68,7 @@ class SomepayController extends HomeBaseController |
|
|
//验签
|
|
|
if ($base->CheckSign($config)) {
|
|
|
if ($data["return_code"] == "SUCCESS") {
|
|
|
$a['a'] ='99';
|
|
|
$a['a'] ='9';
|
|
|
$a['c'] = json_decode($data);
|
|
|
Db::name('Test')->insertGetId($a);
|
|
|
// 支付成功
|
...
|
...
|
|