Default Changelist

This commit is contained in:
2023-08-18 16:57:32 +08:00
parent c74c3b004b
commit 2ff7ceb66b
+3 -2
View File
@@ -432,10 +432,11 @@ class Redhat extends SmallProgram
public function redEnvelopes(): Result
{
$client = new Client('api.qpay.qq.com', 443, true);
$client->withHeader(['Content-Type' => 'application/json']);
$client->withHeader(['Content-Type' => 'application/x-www-form-urlencoded']);
$client->withSslKeyFile($this->config->getSslKey());
$client->withSslCertFile($this->config->getSslCert());
$client->post($this->sendUrl, $this->generate());
$client->withCa($this->config->getSslCa());
$client->post($this->sendUrl, http_build_query($this->generate()));
$client->close();
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
return new Result(code: 505, message: 'network error.');