PHP code example of panyongwei / easysdk-alipay-kernel
1. Go to this page and download the library: Download panyongwei/easysdk-alipay-kernel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
panyongwei / easysdk-alipay-kernel example snippets
namespace EasySDK\AlipayPay;
use EasySDK\AlipayKernel\ServiceContainer;
/**
* @method static Application Foctory(array $config)
*/
class AlipayPay extends ServiceContainer
{
public static function make(string $name, array $config)
{
// 这里的命名空间是 Application.php 所在的命名空间
$application = "\\EasySDK\\AlipayPay\\Application";
return new $application($config);
}
public static function __callStatic($name, $arguments)
{
return self::make($name, ...$arguments);
}
}