feat : refund
This commit is contained in:
@@ -2,15 +2,29 @@
|
||||
|
||||
namespace App\Service\Common\Pay\Wx;
|
||||
|
||||
use App\Constants\Common\OrderCode;
|
||||
use App\Model\Order;
|
||||
use App\Service\ServiceTrait\Api\CheckOrderCallBackTrait;
|
||||
use App\Service\ServiceTrait\Api\GoodOrderTrait;
|
||||
use App\Service\ServiceTrait\Api\OrderTrait;
|
||||
use App\Service\ServiceTrait\Api\PayFinishTrait;
|
||||
use Hyperf\DbConnection\Db;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Yansongda\Artful\Exception\InvalidParamsException;
|
||||
use function Hyperf\Config\config;
|
||||
|
||||
class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
{
|
||||
use CheckOrderCallBackTrait,
|
||||
OrderTrait;
|
||||
GoodOrderTrait,
|
||||
PayFinishTrait;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const int OrderType = OrderCode::ORDER_TYPE_GOOD;
|
||||
|
||||
/**
|
||||
* 订单 id
|
||||
@@ -28,17 +42,27 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
*/
|
||||
protected mixed $orderInfo;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
protected mixed $payInfo;
|
||||
|
||||
/**
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws InvalidParamsException
|
||||
*/
|
||||
public function callBackHandle()
|
||||
{
|
||||
$this-> getWechatData();
|
||||
|
||||
$this->checkWxCallBackOrder();
|
||||
|
||||
$this->checkGoodOrder();
|
||||
$this->checkOrder();
|
||||
|
||||
Db::transaction(function (){
|
||||
$this->manageGoodOrder();
|
||||
$this->manageOrder();
|
||||
|
||||
$this->manageWxOrder();
|
||||
});
|
||||
@@ -55,7 +79,10 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
return $this->returnSuccess();
|
||||
}
|
||||
|
||||
public function setNotify()
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setNotify(): void
|
||||
{
|
||||
//返回的回调地址
|
||||
$this->config['wechat']['default']['notify_url'] = config('system.api_url').'/common/wxPay/order/js/callBack';
|
||||
|
||||
Reference in New Issue
Block a user