financialplugins / omnipay-solana
Solana driver for the Omnipay payment processing library
1.0
2022-04-28 13:46 UTC
Requires
Requires (Dev)
- omnipay/tests: ^3.0
README
Solscan.io driver for the Omnipay PHP payment processing library.
Installation
composer require financialplugins/omnipay-solana
Usage
Initialize
This step is required before using other methods.
$gateway = Omnipay::create('Solana');
$gateway->initialize();
Fetch Address Balance
Fetch address balance in lamports.
$response = $gateway->fetchBalance(['address' => '8Jd4NUfJJB4bXYEx36ZrEF7hxKqYyxh1cBkrspAJxDAw'])->send();
if ($response->isSuccessful()) {
$data = $response->getData();
} else {
$errorMessage = $response->getMessage();
}
Fetch Transaction
$response = $gateway->fetchTransaction(['transactionReference' => '5vF7STm7q1v84THiJhL6BdvvYs9u2YvjwX5MjSmqJVdmu4x5SKsrc1QXveZREA7TaCnvrU96Ndc9Uxn3rVwwoemD'])->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.