To be able to distinguish different implementaions of this library from one another, it should be possible to set a $userAgent
parameter that is used in a User-Agent
header which is sent every HTTP request against PayEx' API.
// We should of course figure out which version this library as well as PHP we're running dynamically and not hard coded liket his:
$userAgent = $this->_userAgent . 'PayEx.Ecommerce.Php/1.0.2 php/7.0.6';
// The stream_context needs to include the 'ssl' key if 'ssl_verify' is set to true.
$context = stream_context_create(array('http' => array('header' => "User-Agent: $userAgent"));
$options = array('stream_context' => $context);
$client = new \SoapClient($wsdl, $options);