PHP code example of luciditv / globalpayments-php-sdk
1. Go to this page and download the library: Download luciditv/globalpayments-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/ */
luciditv / globalpayments-php-sdk example snippets
try {
$response = $card->charge(129.99)
->withCurrency("EUR")
->execute();
} catch (BuilderException $e) {
// handle builder errors
} catch (ConfigurationException $e) {
// handle errors related to your services configuration
} catch (GatewayException $e) {
// handle gateway errors/exceptions
} catch (UnsupportedTransactionException $e) {
// handle errors when the configured gateway doesn't support
// desired transaction
} catch (ApiException $e) {
// handle all other errors
}