WeChat payment V3 asynchronous check failed
Here we receive parameters (message body) generally through the framework of the built-in request.
TP6: $this-> request-> param();
if you use the receive mode in here to convert the json attestation will fail.
We need to use the native receive method: file_get_contents(‘ PHP ://input ‘);
directly take the data after receiving the signature verification.
public function verifySign() { $timestamp = "Timestamp in header header"; $nonce = "random string in header header"; $signature = "signature in header header"; $certZs = "Platform certificate";// $data = $this->request->param(); $data = file_get_contents('php://input'); $message = "$timestamp\n$nonce\n$data\n"; //Verify signature if (!$this->verify($message, $signature, $certZs)) { throw new \Exception('Failed visa check', 123456); } }123456789101112131415161718
Read More:
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- Google payment error prompt: error retrieving information from server [df-aa-20]
- Example of public key signature and verification generated with fabric case
- [Solved] failed to req API:/nacos/v1/ns/instance after all servers
- Wechat third party authorization to generate QR code API
- module ‘tensorflow_core._api.v2.train’ has no attribute ‘slice_input_producer’
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Three solutions to the appearance of notice: undefined index in PHP
- An error occurred when installing vs2017: failed to verify the signature of the installation program list
- Nginx redirects the interfac /API to another interface/API
- Spark login error unable to verify certificate and certificate host name verification failed
- server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
- git clone Error: “server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLf…
- Hash verification failed for CDH5.8.2 installation
- CSRF verification failed. Request aborted.
- svn: E230001: Server SSL certificate verification failed: certificate issued
- Asynchronous Future Parallel processing request code example
- Jenkins SVN error Server SSL certificate verification failed: issuer is not trusted
- 【Oracle】IMP-00010: not a valid export file, header failed verification
- Solve host key verification failed [valid]