- 框架初始化
 - 安装插件
 - 修复PHP8.4报错
This commit is contained in:
2025-04-19 17:21:20 +08:00
commit c6a4e1f5f6
5306 changed files with 967782 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
use Yansongda\Pay\Rocket;
/**
* @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=755&apiservId=448&version=V2.2&bussType=0
*/
class CancelPlugin extends GeneralPlugin
{
protected function getUri(Rocket $rocket): string
{
return 'gateway/api/backTransReq.do';
}
protected function doSomething(Rocket $rocket): void
{
$rocket->mergePayload([
'bizType' => '000000',
'txnType' => '31',
'txnSubType' => '00',
'channelType' => '07',
]);
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
use Yansongda\Pay\Direction\ResponseDirection;
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
use Yansongda\Pay\Rocket;
/**
* @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=754&apiservId=448&version=V2.2&bussType=0
*/
class PagePayPlugin extends GeneralPlugin
{
protected function getUri(Rocket $rocket): string
{
return 'gateway/api/frontTransReq.do';
}
protected function doSomething(Rocket $rocket): void
{
$rocket->setDirection(ResponseDirection::class)
->mergePayload([
'bizType' => '000201',
'txnType' => '01',
'txnSubType' => '01',
'channelType' => '07',
])
;
}
}

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
use Yansongda\Pay\Rocket;
/**
* @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=757&apiservId=448&version=V2.2&bussType=0
*/
class QueryPlugin extends GeneralPlugin
{
protected function getUri(Rocket $rocket): string
{
return 'gateway/api/queryTrans.do';
}
protected function doSomething(Rocket $rocket): void
{
$rocket->mergePayload([
'bizType' => '000000',
'txnType' => '00',
'txnSubType' => '00',
]);
}
}

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
use Yansongda\Pay\Rocket;
/**
* @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=756&apiservId=448&version=V2.2&bussType=0
*/
class RefundPlugin extends GeneralPlugin
{
protected function getUri(Rocket $rocket): string
{
return 'gateway/api/backTransReq.do';
}
protected function doSomething(Rocket $rocket): void
{
$rocket->mergePayload([
'bizType' => '000000',
'txnType' => '04',
'txnSubType' => '00',
'channelType' => '07',
]);
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Unipay\OnlineGateway;
use Yansongda\Pay\Direction\ResponseDirection;
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
use Yansongda\Pay\Rocket;
/**
* @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=754&apiservId=448&version=V2.2&bussType=0
*/
class WapPayPlugin extends GeneralPlugin
{
protected function getUri(Rocket $rocket): string
{
return 'gateway/api/frontTransReq.do';
}
protected function doSomething(Rocket $rocket): void
{
$rocket->setDirection(ResponseDirection::class)
->mergePayload([
'bizType' => '000201',
'txnType' => '01',
'txnSubType' => '01',
'channelType' => '08',
])
;
}
}