DengBiao 1 rok temu
rodzic
commit
cf59db666c
2 zmienionych plików z 2 dodań i 1 usunięć
  1. +1
    -0
      src/applet/app/controllers/Alipay/DecryptController.php
  2. +1
    -1
      src/applet/app/controllers/Alipay/SystemOauthTokenController.php

+ 1
- 0
src/applet/app/controllers/Alipay/DecryptController.php Wyświetl plik

@@ -18,6 +18,7 @@ class DecryptController extends ControllerBase
$args = $this->request->getJsonRawBody(true);
$aesKey = $args["aes_key"] ?? "n1UenLsnSPxi2KsTv3y/0Q=="; //AES密钥
$content = $args["content"] ?? "Ho5y3nixH0tSnYWw8p/HMTO1bIONKSYd7BfkbI+ww4qgJEXKMYFWnSwjXN2B9YwvsKBYykK2gva2v1jfnQVSNQ==";
$this->logger($args, 'Decrypt', true);
$result = openssl_decrypt(base64_decode($content), 'AES-128-CBC', base64_decode($aesKey), OPENSSL_RAW_DATA);
if (!$result) {
$this->api(Msg::NewError(500, 'AES解密失败!'));


+ 1
- 1
src/applet/app/controllers/Alipay/SystemOauthTokenController.php Wyświetl plik

@@ -25,7 +25,7 @@ class SystemOauthTokenController extends ControllerBase
$config["pay_ali_public_key"] = $args["config"]["ali_public_key"] ?? "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzEC7+3O/Ej/gkXug6EgcCM3LjWzz11RR6ESo0KshGg3ODgM8DfdKDHD5b1T6VbcRGFobXQBqVtW008ocUnSOZzE67a73l6mKT3FbmhRsbrgwcUuOHEJUZaLFxPibJgFl7fkOjBcIiz+Wc+9VDTt8O4YxIZhAL6L6ppXcrVrCkOaiIiuHGyp7FjQ+5s3Lk3NLSO3TfXw1WEX2F+IHnw32ZN/FlC8rF8HVlgM0w/PZJ9RuadoLqn5H6z/iqrurbtxscnx0Qbdt8CBzREabJnWxHjxO936AXu9njIPvsXkTfaJJIXxRGGb0b8peSiCljwi8UEODe8mjl2c/LzLel6RuLQIDAQAB";
$code = $args["code"] ?? "";
$refresh_token = $args["refresh_token"] ?? "";
$this->logger($config, '$config', true);
$this->logger($config, 'SystemOauthTokenController', true);
$AlipayServiceToTransfer = new AlipayServiceToSystemOauthToken($config);
$result = $AlipayServiceToTransfer->systemOauthToken($code, $refresh_token);
if (!$result["status"]) {


Ładowanie…
Anuluj
Zapisz