From 494a7e48c002c697903170fe76ec81d5d67baf2f Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 13 Nov 2023 23:36:03 +0800 Subject: [PATCH] eee --- wchat/common/PayConfig.php | 98 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 wchat/common/PayConfig.php diff --git a/wchat/common/PayConfig.php b/wchat/common/PayConfig.php new file mode 100644 index 0000000..6230fab --- /dev/null +++ b/wchat/common/PayConfig.php @@ -0,0 +1,98 @@ + "string", "mchCa" => "string", "mchId" => "string", "mchKey" => "string", "mchCert" => "string", "appSecret" => "string", "mchSecret" => "string"])] + protected array $qq = ["appId" => "", "mchCa" => "", "mchId" => "", "mchKey" => "", "mchCert" => "", "appSecret" => "", "mchSecret" => ""]; + + + /** + * @var array|string[] + */ + #[ArrayShape(["appId" => "string", "mchId" => "string", "schema" => "string", "mchKey" => "string", "secret" => "string", "mchCert" => "string", "appSecret" => "string", "SerialNumber" => "string"])] + protected array $wx = ["appId" => "", "mchId" => "", "schema" => "", "mchKey" => "", "secret" => "", "mchCert" => "", "appSecret" => "", "SerialNumber" => ""]; + + + /** + * @var array|string[] + */ + #[ArrayShape(["appId" => "string", "appKey" => "string", "appSecret" => "string", "aliPubSecret" => "string", "appPubSecret" => "string", "aliRootSecret" => "string", "openFileState" => "string"])] + protected array $ali = ["appId" => "", "appKey" => "", "appSecret" => "", "aliPubSecret" => "", "appPubSecret" => "", "aliRootSecret" => "", "openFileState" => "0"]; + + + /** + * @return array|string[] + */ + #[ArrayShape(["appId" => "string", "mchCa" => "string", "mchId" => "string", "mchKey" => "string", "mchCert" => "string", "appSecret" => "string", "mchSecret" => "string"])] public function getQq(): array + { + return $this->qq; + } + + /** + * @param array|string[] $qq + */ + public function setQq(array $qq): void + { + $this->qq = $qq; + } + + /** + * @return array|string[] + */ + #[ArrayShape(["appId" => "string", "mchId" => "string", "schema" => "string", "mchKey" => "string", "secret" => "string", "mchCert" => "string", "appSecret" => "string", "SerialNumber" => "string"])] public function getWx(): array + { + return $this->wx; + } + + /** + * @param array|string[] $wx + */ + public function setWx(array $wx): void + { + $this->wx = $wx; + } + + /** + * @return array|string[] + */ + #[ArrayShape(["appId" => "string", "appKey" => "string", "appSecret" => "string", "aliPubSecret" => "string", "appPubSecret" => "string", "aliRootSecret" => "string", "openFileState" => "string"])] + public function getAli(): array + { + return $this->ali; + } + + /** + * @param array|string[] $ali + */ + public function setAli(array $ali): void + { + $this->ali = $ali; + } + + + /** + * @param string|array $pay + * @return static + */ + public static function parse(string|array $pay): static + { + if (is_string($pay)) { + $pay = json_decode($pay, true); + } + $model = new static(); + foreach ($pay as $key => $value) { + $model->$key = $value; + } + return $model; + } + +} \ No newline at end of file