You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
817 B
PHP
31 lines
817 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\H5;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class PayController extends Controller
|
|
{
|
|
//支付回调
|
|
public function Notify()
|
|
{
|
|
$order_num =request('order_num');
|
|
$status =request('status');
|
|
$pay_info =request('pay_info');
|
|
if(!isset($order_num)) return \Yz::echoError1("订单号不能为空");
|
|
$order=DB::table('orders')->where(['order_number'=>$order_num])->first();
|
|
if(!$order) return \Yz::echoError1("订单不存在");
|
|
if($status=='SUCCESS'){
|
|
$u=DB::table('orders')->where(['order_number'=>$order_num])->update([
|
|
'status'=>2
|
|
]);
|
|
if($u){
|
|
return \Yz::Return(true,"更新成功",['order_num'=>$order_num]);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|