作者 李忠强

更新

... ... @@ -23,18 +23,21 @@ class Notify extends Api
public function orderNotify()
{
$paytype = $this->request->param('type');
Db::name('pay')->insert(['number'=>111,'text'=>'']);
$pay = Service::checkNotify($paytype);
if (!$pay) {
Db::name('pay')->insert(['number'=>222,'text'=>'']);
echo '签名错误';
return;
}
$data = $pay->verify();
if (is_array($data)) $data = json_encode($data);
Db::name('pay')->insert(['number'=>333,'text'=>$data]);exit();
$data = json_decode($data,true);
$model = new \app\api\model\Order();
$goodsmodel = new \app\api\model\OrderGoods();
$skumodel = new \app\api\model\GoodsSpec();
$goods_model = new \app\api\model\Goods();
$cartmodel = new \app\api\model\Cart();
$buymodel = new \app\api\model\UserBuylist();
try {
$out_trade_no = $data['out_trade_no'];
... ...