PHP code example of vrpayment / sdk
1. Go to this page and download the library: Download vrpayment/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/ */
vrpayment / sdk example snippets
VRPayment\Sdk\Sdk\Service\TransactionsService;
use VRPayment\Sdk\Sdk\Configuration;
$applicationUserId = 140366;
$authenticationKey = 'dvZsZdp+CLyi6RqBJuJER88CrrROHLz3VNuAkZI5U6s=';
$configuration = Configuration::getDefaultConfiguration(
userId: $applicationUserId,
authenticationKey: $authenticationKey);
$transactionsService = new TransactionsService($configuration);
$spaceId = 82470;
$transactionId = 367155626;
$expandSet = [ 'group' ];
try {
$transaction = $transactionsService->getPaymentTransactionsId($transactionId, $spaceId, $expandSet);
print_r($transaction);
} catch (Exception $e) {
echo 'Exception when calling api: ', $e->getMessage(), PHP_EOL;
}
try {
// Operation which can throw ApiException
} catch (ApiException $ex) {
if (ApiExceptionErrorCodes::CONFLICT->matches($ex)) {
// Retry
} else {
// Other handling
}
}
sh
./gradlew clean php:generate --machineNameOption=Wallee
vendor/bin/phpunit --testdox test/QueryingTest.php