Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c74c3b004b | |||
| b92ea7df9f | |||
| 72a7c58bc4 | |||
| e1959752e1 | |||
| 361ad4538f |
+1
-1
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">= 8.0",
|
||||
"game-worker/kiri-client": "dev-master",
|
||||
"game-worker/kiri-client": "~v2.6",
|
||||
"game-worker/kiri-container": "~v1.9",
|
||||
"psr/container": "*"
|
||||
},
|
||||
|
||||
+10
-1
@@ -536,11 +536,20 @@ class Config
|
||||
$this->usrSwoole = $usrSwoole;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $configs
|
||||
*/
|
||||
public function __construct(array $configs)
|
||||
{
|
||||
$this->setConfigs($configs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $configs
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfigs(array $configs): static
|
||||
protected function setConfigs(array $configs): static
|
||||
{
|
||||
if (empty($configs)) {
|
||||
return $this;
|
||||
|
||||
@@ -10,21 +10,20 @@ namespace wchat\qq;
|
||||
|
||||
use Exception;
|
||||
use Kiri\Client;
|
||||
use wchat\common\HttpClient;
|
||||
use wchat\common\Result;
|
||||
use wchat\common\Help;
|
||||
|
||||
class Recharge extends SmallProgram
|
||||
{
|
||||
private $money = 0;
|
||||
private float $money = 0;
|
||||
|
||||
private $orderNo;
|
||||
private string $orderNo;
|
||||
|
||||
private $data = [];
|
||||
private array $data = [];
|
||||
|
||||
private $spill_create_ip = '';
|
||||
private string $spill_create_ip = '';
|
||||
|
||||
private $uniformer = 'https://qpay.qq.com/cgi-bin/pay/qpay_unified_order.cgi';
|
||||
private string $uniformer = '/cgi-bin/pay/qpay_unified_order.cgi';
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
|
||||
+3
-1
@@ -431,8 +431,10 @@ class Redhat extends SmallProgram
|
||||
*/
|
||||
public function redEnvelopes(): Result
|
||||
{
|
||||
$client = new Client('qpay.qq.com', 443, true);
|
||||
$client = new Client('api.qpay.qq.com', 443, true);
|
||||
$client->withHeader(['Content-Type' => 'application/json']);
|
||||
$client->withSslKeyFile($this->config->getSslKey());
|
||||
$client->withSslCertFile($this->config->getSslCert());
|
||||
$client->post($this->sendUrl, $this->generate());
|
||||
$client->close();
|
||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||
|
||||
Reference in New Issue
Block a user