|
@@ -12,7 +12,7 @@ use SixShop\System\Trait\ConfigTrait;
|
|
|
* @property string $notify_url 商户通知地址
|
|
* @property string $notify_url 商户通知地址
|
|
|
* @property string $complete_notify_url 收货确认通知地址
|
|
* @property string $complete_notify_url 收货确认通知地址
|
|
|
*/
|
|
*/
|
|
|
-class Config extends Configuration
|
|
|
|
|
|
|
+class Config
|
|
|
{
|
|
{
|
|
|
use ConfigTrait;
|
|
use ConfigTrait;
|
|
|
|
|
|
|
@@ -31,33 +31,22 @@ class Config extends Configuration
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- #[\Override] public function getAppId()
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取V3配置
|
|
|
|
|
+ * @return Configuration
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getV3Config():Configuration
|
|
|
{
|
|
{
|
|
|
- return $this->getConfig('appid');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- #[\Override] public function getSerialNo()
|
|
|
|
|
- {
|
|
|
|
|
- return $this->getConfig('serial_no');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- #[\Override] public function getSm4Key()
|
|
|
|
|
- {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return new Configuration([
|
|
|
|
|
+ 'app_id' => $this->getConfig('appid'),
|
|
|
|
|
+ 'serial_no' => $this->getConfig('serial_no'),
|
|
|
|
|
+ 'sm4_key' => null,
|
|
|
|
|
+ 'merchant_private_key_path' => public_path().$this->getConfig('sign_cert')[0],
|
|
|
|
|
+ 'lkl_certificate_path' => public_path().$this->getConfig('verify_cert')[0],
|
|
|
|
|
+ 'app_debug' => $this->getConfig('environment') === 'test',
|
|
|
|
|
+ 'host_test' => $this->getConfig('gateway')['test'],
|
|
|
|
|
+ 'host_pro' => $this->getConfig('gateway')['product'],
|
|
|
|
|
+ ]);
|
|
|
|
|
|
|
|
- #[\Override] public function getMerchantPrivateKeyPath()
|
|
|
|
|
- {
|
|
|
|
|
- return public_path().$this->getConfig('sign_cert')[0];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- #[\Override] public function getLklCertificatePath()
|
|
|
|
|
- {
|
|
|
|
|
- return public_path().$this->getConfig('verify_cert')[0];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- #[\Override] public function getHost()
|
|
|
|
|
- {
|
|
|
|
|
- return $this->getConfig('gateway')[$this->getConfig('environment')];
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|