Files
mier-php/application/api/controller/PayNotify.php

68 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2025-08-11 10:22:05 +08:00
<?php
namespace app\api\controller;
use think\Controller;
use think\facade\Log;
use app\common\pay\Callback;
class PayNotify extends Controller
{
public function wx_pay_notify()
{
//接收微信返回的数据数据,返回的xml格式
$xmlData = file_get_contents('php://input');
$reslut = model('UserRecharge')->wxPayNotify($xmlData);
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
}
public function ali_pay_notify()
{
//接收微信返回的数据数据,返回的xml格式
$data = $this->request->request();
$reslut = model('UserRecharge')->ali_pay_notify($data);
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
}
public function three_pay_notify()
{
//接收微信返回的数据数据,返回的xml格式
$data = $this->request->request();
$reslut = model('UserRecharge')->three_pay_notify($data);
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
}
public function ada_ali_pay_notify()
{
// Log::info('汇付回调');
// Log::info($_POST);
// Log::info($_POST['data']);
// Log::info($_POST['sign']);
// //接收微信返回的数据数据,返回的xml格式
$post_data = json_decode($_POST['data'],true);
$post_sign_str = isset($_POST['sign']) ? $_POST['sign']: '';
// $post_data = [];
// $post_sign_str = '';
$reslut = model('api/UserRecharge')->ada_ali_pay_notify($post_data, $post_sign_str);
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
}
//云账号回调
public function yun_notify()
{
// echo 333;die;
Callback::order();
}
//汇付支付
public function hui_fu_pay_notify()
{
$data = $_POST;
$result = model('UserRecharge')->hui_fu_pay_notify($data);
}
}