admin/app/pay/controller/Pay.php

57 lines
1.3 KiB
PHP

<?php
/**
* ThinkShop商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 成都云之牛科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.cdcloudshop.com
* =========================================================
*/
namespace app\pay\controller;
use app\Controller;
use app\model\system\Pay as PayModel;
/**
* 支付控制器
*/
class Pay extends Controller
{
/**
* 支付异步回调
*/
public function notify()
{
$param = input();
// file_put_contents(date('YmdHis').'alipay--.txt',json_encode($param));
event('PayNotify', []);
}
public function payReturn()
{
}
/**
* 付款码支付
*/
public function authcodePay()
{
$param = input();
$result = event('AuthcodePay', $param, true);
if (empty($result)) {
$pay_model = new PayModel();
return json($pay_model->error([], '付款码未通过校验!'));
}
return json($result);
}
/***
* 支付宝网关通知
*/
public function alinotify(){
$param = input();
trace($param, '支付宝网关通知');
event('AliAuthNotify',$param);
}
}