for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Plugin\Wechat\Fund\Transfer;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Plugin\Wechat\GeneralPlugin;
use Yansongda\Pay\Rocket;
class CreatePlugin extends GeneralPlugin
{
/**
* @throws \Yansongda\Pay\Exception\ContainerDependencyException
* @throws \Yansongda\Pay\Exception\ContainerException
* @throws \Yansongda\Pay\Exception\ServiceNotFoundException
*/
protected function doSomething(Rocket $rocket): void
$config = get_wechat_config($rocket->getParams());
$extra = [
'appid' => $config->get('mp_app_id'),
];
if (Pay::MODE_SERVICE == $config->get('mode')) {
'sub_mchid' => $config->get('sub_mch_id', ''),
}
$rocket->mergePayload($extra);
protected function getUri(Rocket $rocket): string
return 'v3/transfer/batches';
protected function getPartnerUri(Rocket $rocket): string
return 'v3/partner-transfer/batches';