Default Changelist
This commit is contained in:
+3
-2
@@ -432,10 +432,11 @@ class Redhat extends SmallProgram
|
|||||||
public function redEnvelopes(): Result
|
public function redEnvelopes(): Result
|
||||||
{
|
{
|
||||||
$client = new Client('api.qpay.qq.com', 443, true);
|
$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->withSslKeyFile($this->config->getSslKey());
|
||||||
$client->withSslCertFile($this->config->getSslCert());
|
$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();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: 'network error.');
|
||||||
|
|||||||
Reference in New Issue
Block a user