Bank-enterprise direct connection interface problem, phpcurl

Source: Internet
Author: User
Tags ssl certificate
Use phpcurl to call the bank's direct connection interface. First, install a securityProxy (with a certificate: Private Key pfx format certificate (private key is used to encrypt and generate a signature to send packets ), the public key is a cer-format certificate (the public key is used to verify the signature in the returned message). The bank said that if the proxy software is installed, you do not have to build the certificate or anything on your own,

Use php curl to call the direct connection interface of bank and Enterprise. First, install a security Proxy (with the certificate: Private Key pfx format certificate (private key is used to encrypt and generate a signature to send packets ), the public key is a cer-format certificate (the public key is used to verify the signature in the returned message). The bank said that if the proxy software is installed, you do not have to build the certificate or anything on your own,

Use php curl to call the direct connection interface of bank and Enterprise. First, install a security Proxy (with the certificate: Private Key pfx format certificate (private key is used to encrypt and generate a signature to send packets ), the public key is a cer Certificate (the public key is used to verify the signature in the returned message)

)

The bank said that if the agent software is installed, You Don't Have To build certificates or anything on your own, and the program calls the interface directly,

Php code: curl extension enabled

// Construct xml
$ Xmldata = '**********';
// Initiate a curl session
$ Curl = curl_init ();
// Set the sending method: post
Curl_setopt ($ curl, CURLOPT_POST, true );
// Whether the returned value exists
Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, true );
// Set the url
$ Url = '******************';
Curl_setopt ($ curl, CURLOPT_URL, $ url );
// Set the sending data
Curl_setopt ($ curl, CURLOPT_POSTFIELDS, $ xmldata );
// Set the timeout value
Curl_setopt ($ curl, CURLOPT_TIMEOUT, 200 );
// Obtain the returned value
$ Response = curl_exec ($ curl );
// Return curl Error
Var_dump (curl_error ($ curl ));
// Disable cURL resources and Release System Resources
Curl_close ($ curl );

Always report the following error: "SSL certificate problem, verify that the CA cert is OK. Details: error: 14090086: SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed"

For help

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.