tamara-solution / php-sdk
Tamara PHP Client Library
3.0.0
2026-06-08 08:26 UTC
Requires
- php: ^7.1|^8.0
- ext-json: *
- firebase/php-jwt: ^6.1
- guzzlehttp/guzzle: >=6.0
- kriswallsmith/buzz: ^1.2|^0.16
- nyholm/psr7: ^1.3
- psr/http-client: ^1.0
- psr/log: ^1.0||^2.0||^3.0
- symfony/http-foundation: >=4.1
Requires (Dev)
- phpunit/phpunit: >=7
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2026-06-08 08:27:04 UTC
README
Tamara PHP SDK is a wrapper for the Tamara API.
Installation
Update composer.json
"require": { "tamara-solution/php-sdk": "^3.0.0" }
If you are using PHP < 8.1, please use the version, 2.x
"require": { "tamara-solution/php-sdk": "^2.0.0" }
Usage
$configuration = Configuration::create($apiUrl, $apiToken, $apiRequestTimeout, $transport); $client = Client::create($configuration); $response = $client->getPaymentTypes('SA'); if ($response->isSuccess()) { var_dump($response->getPaymentTypes()); }
Notification Service
$notification = \Tamara\Notification\NotificationService::create('token-key'); $message = $notification->processAuthoriseNotification(); var_dump($message->getOrderId()); var_dump($message->getOrderStatus()); var_dump($message->getData());
Symfony DI
tamarapay.configuration: factory: ['Tamara\Configuration', create] arguments: - https://api.tamarapay.com - test_token tamarapay.client: factory: ['Tamara\Client', create] arguments: ['@tamarapay.configuration']
Notes
- We use Guzzlehttp library as the default http client transport and Nyholm http as a backup
- You can use your own transport service and just need to implement the
Tamara\HttpClient\ClientInterfaceand pass it toConfiguration::createfunction