Created
April 20, 2023 05:35
-
-
Save Musilda/11c52173251794e3f89cf8659e71533b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$password = 'xxxxxxx'; | |
$wsdlUrl = 'https://xxxxxx:xxxx/xxxx/CardServiceWs?WSDL'; | |
$pemFilePath = PATHDIR . 'client.pem'; | |
$pemPassword = 'xxxxxxxxxxxxx'; | |
$contextOptions = array( | |
'ssl' => array( | |
'verify_peer' => false, | |
'verify_peer_name' => false, | |
'allow_self_signed' => true | |
) | |
); | |
$sslContext = stream_context_create( $contextOptions ); | |
$params = [ | |
'local_cert' => $pemFilePath, | |
'passphrase' => $pemPassword , | |
'trace' => 1, | |
'exceptions' => 1, | |
'cache_wsdl' => WSDL_CACHE_NONE, | |
'stream_context' => $sslContext | |
]; | |
try { | |
$soapClient = new \SoapClient( $wsdlUrl, $params ); | |
} | |
catch(Exception $e) { | |
print_r($e->getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment