PHP Library that wraps endpoints documented https://documentation.opayweb.com/
- Cashier/Checkout - Get Paid with OPay
- Bank Transfer - Send money to any Nigerian bank account(s)
- OPay wallet Transfer - Send money to OPay USER/MERCHANT seamlessly
$ composer require opay-services/opay-sdk-php
You need the library initialized as follows: (example in http_example/Config.php file)
/**
* init config file
*/
class Config implements ConfigInterface
{
private $endpointBaseUrl = 'http://sandbox-cashierapi.opayweb.com';
private $pubKey = 'OPAYPUBxxxxxxxxxxxxx.xxxxxxxxxxxxx';
private $prvKey = 'OPAYPRVxxxxxxxxxxxxx.xxxxxxxxxxxxx';
private $merchantId = '256620xxxxxxxxxxxxx';
}
(new TestTransaction())->test();
Access sample codes & implementations right inside the http_example folder
- cashier example: http_example/cashier/Cashier.php
- handling payment callback: http_example/cashier/CashierCallback.php
- Get supported countries、banks: http_example/miscellaneous/Miscellaneous.php
- Validate a user/customer: http_example/info/user/InfoUser.php
- Validate a merchant: http_example/info/merchant/InfoMerchant.php
- Transfer to OPay wallet: http_example/transfer/wallet/TransferToWallet.php
- Batch transfer to OPay wallet: http_example/transfer/batch_to_wallet/TransferBatchToWallet.php
- Transfer to Bank: http_example/transfer/bank/TransferToBank.php
- Batch transfer to Bank: http_example/transfer/batch_to_bank/TransferBatchToBank.php
- Charge transaction: http_example/charge/Charge.php
- Query your all accounts' balances : http_example/balances/Balances.php
- Transaction test : http_example/transaction/TestTransaction.php
- Transaction example : http_example/transaction/html/initialize.html
- BankTransfer transaction : http_example/transaction/bank_transfer/BankTransfer.php
- Ussd transaction : http_example/transaction/ussd/Ussd.php
- Example : http_example/bills/Bills.php