'string', 'secret' => 'string', 'unionId' => 'string'])] protected array $notice = ['token' => '', 'secret' => '', 'unionId' => '']; /** * @param object $app * @return static */ public static function instance(object $app): static { $model = new static(); $model->appId = $app->appId; $model->appSecret = $app->appSecret; $model->type = $app->type; $model->payConfig = PayConfig::parse($app->pay); return $model; } /** * @return bool */ public function typeIsApp(): bool { return $this->type === 3; } }