mytharcher\sdk\alipay\Alipay::__construct PHP Метод

__construct() публичный Метод

配置
public __construct ( $config, null $type = null )
$config array 配置信息
$type null string 类型 wap app
    public function __construct($config, $type = null)
    {
        $this->config = array_merge($this->config, (array) $config);
        $this->is_mobile = $type == 'wap' || $type === true ? true : false;
        if ($this->is_mobile) {
            $this->gateway = self::GATEWAY_MOBILE;
        }
        if ($type == 'wap' || $type === true) {
            $this->service = self::SERVICE_WAP;
        } elseif ($type == 'app') {
            $this->service = self::SERVICE_APP;
        }
    }