1. Go to this page and download the library: Download mpluskassa/soap library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mpluskassa / soap example snippets
use MplusKASSA\SOAP\Client;
use MplusKASSA\Support\ApiException;
$apiServer = "https://api.mpluskassa.nl";
$apiPort = YOUR_API_PORT;
$apiIdent = YOUR_API_IDENT;
$apiSecret = YOUR_API_SECRET;
$client = new Client($apiServer, $apiPort, $apiIdent, $apiSecret);
$apiMethod = "getArticleGroupChanges"; // <-- This is the API method, get this from documentation after "Input:" for the desired call
// Build the request array as documented in your personal documentation for the specific API method. Please note : Don't add list elements, this will be done by the prepareRequest method
$requestArray = [
'request' => [
[
'syncMarker' => 0,
'syncMarkerLimit' => 10,
'groupNumbers' => [
1, 2, 3, 9,
]
]
]
];
try {
// If your request is an object or mixed object/array, then the prepareRequest will convert it to an array suitable for the execute call
// If your request contains one or more 'List's, the can be wrapped in the n : " . $e->getMessage() . "\n"; // <-- get exception message
echo "Code : ".$e->getCode()."\n"; // <-- get last exception code
echo "Trace : ".print_r($e->getTrace(), true)."\n"; //<-- get backtrace
echo "RequestId : ".$e->getRequestId()."\n"; //<-- get request id
echo "Request :\n" . $client->getLastRequestXML() . "\n"; // <-- get last request XML
echo "Response :\n" . $client->getLastResponseXML() . "\n"; // <-- get last response XML
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.