PayPal API Certificate

Well, I never saw this ever when encoding again and sending third-party SOAP API calls, but it looks like PayPal requires their larger clients to use the X509 certificate to send API calls, and not just send a standard API signature as and most of the APIs requiring you.

Am I the only one who thinks this is strange or not like?

http://en.wikipedia.org/wiki/X.509

I do not understand how this relates to the API call. I see an example of the code that they gave me in C # that implements the ICertificatePolicy interface in .NET ... but it is just alien to me and how is it related to the fact that they still give you an API signature in the PayPal sandbox. So, why should I read the physical Certificate file and use the API signature? I guess I don’t see the connection between the certificate and the PayPal SOAP API.

+3
source share
2 answers

This is a common thing among larger names when working with connections that require a safer β€œhandshake”, and all this is used for.

, .pem,.p12,.pfx python cURL, , X.509, , , google , ( .p12).

python

        c = pycurl.Curl()
        c.setopt(pycurl.URL, FirstDataAPI_URL)
        c.setopt(pycurl.HTTPHEADER, ["Accept:"])
        c.setopt(pycurl.POST, 1)
        c.setopt(pycurl.POSTFIELDS, urllib.urlencode(FirstDataAPI_PostData))
        b = StringIO.StringIO()
        c.setopt(pycurl.WRITEFUNCTION, b.write)
        c.setopt(pycurl.FOLLOWLOCATION, 1)
        c.setopt(pycurl.MAXREDIRS, 5)
        #c.setopt(pycurl.SSLCERT, '/home/***/***/***/ssl/digitalID.p12')
        c.setopt(pycurl.SSLCERT, '/home/***/***/***/ssl/productionDigitalId.p12')
        c.setopt(pycurl.SSLCERTTYPE, 'p12')
        c.setopt(pycurl.SSLCERTPASSWD, '******')
        c.perform()

SOAP , , .

, , Paypal API ... API, , , X509 , , API, 2 .

+1

, , , , , .

API , , .

0

Source: https://habr.com/ru/post/1729139/


All Articles