To create a new configuration use:
new YellowCube\Config($sender, $wsdl, $timeout, $debugMode, $soapClientOptions, $receiver)
Constructor arguments are:
(Distance seller ID) in accordance with the registration to YellowCube Format: "Xxxxxxxxxxx"
$wsdl: Optional WSDL file to use. This can be a path to a local file or a URL. If no value is provided, the production WSDL is used (if debug mode is
false) or the test WSDL is used (if debug mode is
$timeout: Optional timeout in seconds for a transaction to finish, by default no timeout is set.
$operatingMode: Optional operating mode, default is "P" for production. "D" = Development, "T" = Test.
$soapClientOptions: Optional options which are passed to the SoapClient.
$receiver: Optional receiver constant, by default
To receive a configuration with an operating mode set to "T" = test, which can be used for testing use:
To receive a configuration with an operating mode set to "D" = development, which can be used for integration tests:
For testing with a proxy like Charles you can use the following testing configuration.
The configuration expects a HTTP Proxy running on host
127.0.0.1 and port
In order to authenticate, a certificate which is registered with the YellowCube Service is necessary. To authenticate with the certificate, set it on a configuration instance:
$config = Config::testConfig(); $config->setCertificateFilePath(__DIR__ . '/../client_ca.pem');
- When you receive a
Could not connect to hosterror, that probably means that the certificate is broken.
If the certificate requires a password, you can set a passphrase as second parameter.
$config->setCertificateFilePath(__DIR__ . '/../client_ca.pem', 'passphrase');