PHP code example of tamara-solution / php-sdk
1. Go to this page and download the library: Download tamara-solution/php-sdk 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/ */
tamara-solution / php-sdk example snippets
$configuration = Configuration::create($apiUrl, $apiToken, $apiRequestTimeout, $transport);
$client = Client::create($configuration);
$response = $client->getPaymentTypes('SA');
if ($response->isSuccess()) {
var_dump($response->getPaymentTypes());
}
$notification = \Tamara\Notification\NotificationService::create('token-key');
$message = $notification->processAuthoriseNotification();
var_dump($message->getOrderId());
var_dump($message->getOrderStatus());
var_dump($message->getData());