betsolutions / casino-sdk
Betsolutions casino SDK
Installs: 258 063
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 13
Open Issues: 1
Requires
- php: >=7.3.0
- ext-json: *
- myclabs/php-enum: ^1.7
- nategood/httpful: *
- netresearch/jsonmapper: *
This package is not auto-updated.
Last update: 2024-12-09 14:57:03 UTC
README
Betsolutions’s Casino API SDK for PHP provides developer tools for accessing Casino API. For Betsolutions’s Casino API documentation, please see: https://docs.betsolutions.com/
Requirements
PHP 7.3 or later.
Installation
Installation via Composer
composer require betsolutions/casino-sdk
Dependencies
The SDK requires the following extensions in order to work properly:
Example
Example of 'getPlayerBalance' request. SDK calculates hash and appends merchantId and hash in the request.
$merchantAuthInfo = new MerchantAuthInfo(1843, 'https://api-staging.betsolutions.com', '[your private key]'); $walletService = new WalletService($merchantAuthInfo); try { $privateToken = "[privateToken]"; $playerId = "[player's id in merchant's system]"; $currency = "EUR"; $result = $walletService->getBalance(new GetBalanceRequest($privateToken, $playerId, $currency)); if(200 == $result->statusCode) { $balance = $result->data->balance; } } catch (CantConnectToServerException $ex) { echo $ex->getMessage(); echo $ex->getHttpStatusCode(); } catch (JsonMappingException $e) { echo $e->getMessage(); }