search
Homephp教程php手册银企直连接口问题,php curl

用php curl 调用银行银企直连的接口,首先安装了一个 security Proxy(里面安装了证书:私钥pfx格式证书(私钥用来加密生成签名发送报文),公钥是cer格式证书(公钥用来验证返回报文里的签名) ) 银行的人说,安装了这代理软件,就不用自己构建证书什么的,

用php curl 调用银行银企直连的接口,首先安装了一个 security Proxy(里面安装了证书:私钥pfx格式证书(私钥用来加密生成签名发送报文),公钥是cer格式证书(公钥用来验证返回报文里的签名)

银行的人说,安装了这代理软件,就不用自己构建证书什么的,直接程序调用接口,

php 代码如下: 已经开启了curl 扩展

//构造xml
   $xmldata='**********';
   //初始一个curl会话
   $curl = curl_init();
   //设置发送方式: post
   curl_setopt($curl, CURLOPT_POST, true);
   //这是是否有返回值
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
   //设置url
   $url = '******************';
   curl_setopt($curl, CURLOPT_URL, $url);
   //设置发送数据
   curl_setopt($curl, CURLOPT_POSTFIELDS, $xmldata);
    //设置 超时时间
    curl_setopt($curl, CURLOPT_TIMEOUT, 200);
   //得到返回值
   $response = curl_exec($curl);
   //返回curl错误 
   var_dump(curl_error($curl));
   //关闭cURL资源,并且释放系统资源
   curl_close($curl);

可总是报这样的错误:"SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"

求救

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.