F
F
fashionmens2020-02-20 11:38:22
PHP
fashionmens, 2020-02-20 11:38:22

How to send a request to PHP via Curl using a certificate?

There is documentation for the QIWI API on card payments - https://developer.qiwi.com/en/topup-card/#ssl-auth

Generated a certificate on the server in a folder called /ssl at the root of the domain.
Now the question is how to send a request via CURL in php
The kivy documentation only lists an example like this:

[email protected]:~/station$ openssl s_client -connect private-api.qiwi.com/xml/topup.jsp:443 -showcerts -CAfile ./CA/our_CA -cert ./my_cert -key ./private_key.pem


How to do it in PHP?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-02-20
@Compolomus

Write the certificate in php.ini in the curl section for example
https://www.php.net/manual/en/curl.configuration.p...

B
Boris Korobkov, 2020-02-20
@BorisKorobkov

CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER at https://www.php.net/manual/en/function.curl-setopt.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question