try {
// Replace the following variables with your own key management
// $APPLICATION_KEY
// $TOKEN
// $USER_ID
// $APPLICATION_ID
$appId = $APPLICATION_ID;
$userId = $USER_ID;
$token = $TOKEN;
$appKey = $APPLICATION_KEY;
$orderServiceUrl = 'https://api.tradera.com/v3/OrderService.asmx';
$orderServiceUrlWithAuth = $orderServiceUrl
. '?appId=' . $appId
. '&appKey=' . $appKey
. '&userId=' . $userId
. '&token=' . $token;
$orderClient = new SoapClient(
$orderServiceUrl . '?WSDL',
array('location' => $orderServiceUrlWithAuth)
);
// Set params
$orderId = 90763155;
$setShippedRequest = new StdClass();
$setShippedRequest -> OrderId = $orderId;
$setShippedParams = new StdClass();
$setShippedParams -> request = $setShippedRequest;
// Make Soap call
$setShippedResponse = $orderClient->SetSellerOrderAsShipped($setShippedParams);
// Handle result
if($setShippedResponse -> SetSellerOrderAsShippedResult -> OrderId == $orderId){
echo 'SUCCESS' . PHP_EOL;
}
else {
echo 'FAILED' . PHP_EOL;
}
}
catch(SoapFault $soapFault) {
echo 'Error: ' . $soapFault->faultstring;
}
|