financialplugins / omnipay-trongrid
Trongrid driver for the Omnipay payment processing library
Installs: 9 673
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
Requires (Dev)
- omnipay/tests: ^3.0
This package is auto-updated.
Last update: 2025-03-01 00:33:45 UTC
README
Trongrid.io driver for the Omnipay PHP payment processing library.
Installation
composer require financialplugins/omnipay-trongrid
Usage
Initialize
This step is required before using other methods.
$gateway = Omnipay::create('Trongrid');
$gateway->initialize([
'network' => 'api.trongrid.io' // 'api.shasta.trongrid.io'
]);
Fetch Address Balance
$response = $gateway->fetchBalance(['address' => '4158b637e78d6f2069a50976c4e3719a1d8bea7cea'])->send();
if ($response->isSuccessful()) {
$data = $response->getData();
} else {
$errorMessage = $response->getMessage();
}
Note that the account balance is returned in SUN, not decimal.
Fetch Transaction Info
$response = $gateway->fetchTransaction(['transaction_id' => '109a0ea9b4c50f15f6a73ee823dabafe020471b6fcb4340059252bd19fd6320f'])->send();
if ($response->isSuccessful()) {
$data = $response->getData();
} else {
$errorMessage = $response->getMessage();
}
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.