integration bankid api with php language

926 Views Asked by At

i tried to integrate bankID with my code but it does not work

this is the tutorial bankID tutorial this api have ssl certification https://www.bankid.com/assets/bankid/rp/FPTestcert2_20150818_102329.pfx

can any one help me to integrate this api with php

this is my code

try { $client = new SoapClient( 'https://appapi.test.bankid.com/rp/v4?wsdl', array( "local_cert" => "/certname.pem" ) ); } catch (Exception $e) { echo json_encode( array( "result" => false, "reason" => $e->getMessage() ) );}

and because the ssl is pfx i convert it by useing openssl as

openssl pkcs12 -in FPTestcert2_20150818_102329.pfx -nocerts -out key.pem -nodes

openssl pkcs12 -in FPTestcert2_20150818_102329.pfx -nokeys -out cert.pem openssl rsa -in key.pem -out server.key

Copy 
-----BEGIN RSA PRIVATE KEY-----
... 
-----END RSA PRIVATE KEY-----
section from server.key and
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
section from cert.pem and put them into new certname.pem file.

and this is the error SOAP-ERROR: Parsing WSDL: Couldn't load from 'link' : failed to load external entity

0

There are 0 best solutions below