camoo / camoo-pay
CamooPay plugin for mobile Money aggregation
Installs: 167
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:camoo-plugin
Requires
- php: >=8.1
- ext-json: *
- cakephp/validation: ^5.1.1
- giggsey/libphonenumber-for-php: ^8.12
- maviance/smobilpay-php: ^v2.0.0
This package is auto-updated.
Last update: 2024-11-14 12:38:05 UTC
README
Installation
You can install this plugin into your PHP application using composer.
The recommended way to install composer packages is:
composer require camoo/camoo-pay
Usage
use CamooPay\Exception\CamooPayCashoutException; use CamooPay\Lib\CashOut; $cashOut = new CashOut('token', 'secret', 'orange'); $phoneNumber = '690000000'; $amount = 850; $customerEmail = 'end-customer@email.cm'; try { $payment $cashOut->charge($phoneNumber, $amount, $customerEmail); } catch (CamooPayCashoutException $exception) { $message = $exception->getMessage(); echo $message } var_dump($payment); // Now verify the status $transactionNumber = $payment['ptn']; $checkPayment = new \CamooPay\Lib\CheckPayment('token', 'secret'); $verify = $checkPayment->check($transactionNumber); var_dump($verify);