You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
984 B
51 lines
984 B
<?php
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\controller;
|
|
|
|
use app\BaseController;
|
|
use app\logic\AliPay;
|
|
use app\middleware\CheckUser;
|
|
use app\validate\Pay as PayValidate;
|
|
use think\exception\ValidateException;
|
|
use think\facade\Request;
|
|
|
|
class Pay extends BaseController
|
|
{
|
|
|
|
protected $middleware = [CheckUser::class];
|
|
|
|
/**
|
|
* 支付宝支付
|
|
* @return array|void
|
|
*/
|
|
public function pay()
|
|
{
|
|
// $param = Request::param();
|
|
//
|
|
// try {
|
|
// validate(PayValidate::class)->check($param);
|
|
//
|
|
// $data = AliPay::pay(time(),1,'test subject - 测试');
|
|
//
|
|
// return $this->renderSuccess('success',['data' => $data]);
|
|
// } catch (ValidateException $validateException) {
|
|
// return $this->renderError($validateException->getMessage());
|
|
// }
|
|
}
|
|
|
|
public function notify()
|
|
{
|
|
|
|
// AliPay::notify();
|
|
|
|
}
|
|
|
|
public function return()
|
|
{
|
|
|
|
// AliPay::return();
|
|
|
|
}
|
|
|
|
}
|
|
|