Files
hyperf_service/app/Controller/Common/ThirdCallbackController.php
2025-02-24 15:06:26 +08:00

59 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Controller\Common;
use App\Service\Common\OssCallbackService;
use App\Service\Common\Pay\Wx\WxJsRechargeOrderService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
use RedisException;
use Yansongda\Artful\Exception\InvalidParamsException;
#[Controller]
class ThirdCallbackController
{
/**
* oss回调处理
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
#[RequestMapping(path: "/common/oss/ossCallBack", methods: "post")]
public function ossCallback()
{
return (new OssCallbackService)->process();
}
/**
* 微信js通道支付回调
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws InvalidParamsException
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: "/common/wxPay/order/js/callBack", methods: "post")]
public function wxJsPayCallBack(): ResponseInterface
{
return (new WxJsRechargeOrderService)->callBackHandle();
}
/**
* 微信js通道退款回调
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws InvalidParamsException
*/
#[RequestMapping(path: "/common/wxPay/order/js/refund/callBack", methods: "post")]
public function wxJsRefundCallBack(): ResponseInterface
{
return (new WxJsRechargeOrderService)->refundCallBackHandle();
}
}