Last active
October 19, 2015 11:52
-
-
Save Buntix/b02f2126566a566e7648 to your computer and use it in GitHub Desktop.
Test PHP WSDL fetching.
This file contains hidden or 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 | |
require_once basename(__FILE__) . '/../vendor/autoload.php'; | |
$interface = new \RoyalMail\RoyalMail([ | |
'mode' => 'onboarding', | |
'application_id' => '9876543210', | |
'transaction_id' => 'order-234', | |
'username' => 'my-username', | |
'password' => 'my-password', | |
'endpoint' => NULL, | |
'soap_client_options' => [ | |
'uri' => MODULE_ROOT . 'reference/ShippingAPI_V2_0_8.wsdl', | |
'location' => 'https://api.royalmail.com/shipping/onboarding', | |
'exception' => FALSE, | |
'local_cert' => NULL, | |
], | |
]); | |
$response = $interface->cancelShipment(['cancelShipments' => ['RQ221150289GB']]); | |
print_r($response->getErrors()); | |
if ($response->getDebugInfo()) { | |
print_r($response->getDebugInfo()->getConfig()); | |
print_r($response->getDebugInfo()->getException()->getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment