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\Pay\Native;
use Yansongda\Pay\Rocket;
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_4_1.shtml
*/
class PrepayPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\PrepayPlugin
{
protected function getUri(Rocket $rocket): string
return 'v3/pay/transactions/native';
}
protected function getPartnerUri(Rocket $rocket): string
return 'v3/pay/partner/transactions/native';
protected function getConfigKey(array $params): string
$key = ($params['_type'] ?? 'mp').'_app_id';
if ('app_app_id' === $key) {
$key = 'app_id';
return $key;