DPO Group Payment gateway wrapper. using api payment option Easily use with API without web or redirects
If you need support in development, or you need a development team kindly contact us.
To get the depth details of the api check API docs here.
You can install the PHP SDK via composer or by downloading the source
The recommended way to install the SDK is with Composer.
composer require razor-informatics/dpo-php
use RazorInformatics\DPOPhp;
$companyToken = 'YOUR_COMPANY_TOKEN';
$dpo = new DPOPhp($companyToken);
$results = $dpo->account()->balance('USD')
print_r($results);
How to verify token
use RazorInformatics\DPOPhp;
$companyToken = 'YOUR_COMPANY_TOKEN';
$dpo = new DPOPhp($companyToken);
$transactionToken = 'TRANSACTION_TOKEN_GIVEN';
$results = $dpo->token()->verify($transactionToken)
print_r($results);
make a direct card payment.
use RazorInformatics\DPOPhp;
$companyToken = 'YOUR_COMPANY_TOKEN';
$serviceType = 5525; //SERVICE TYPE
$paymentAmount = 500;
$reference ="INV-1000";
$cardNumber = 5436886269848367
$cardExpiry = 1224;// format My example 0123 i.e. January 2023
$cardCvv = 123;
$customerFirstName='John';
$customerLastName = 'Doe';
$customerPhone ='';
$customerEmail = '';
$currency = 'USD';
$description = 'Flight booking for 5th January 2032'
$dpo = new DPOPhp($companyToken);
$results = $dpo->payment()->card($reference,$serviceType,$paymentAmount,$cardNumber,$cardExpiry,$cardCvv, $customerFirstName,$customerLastName,$customerPhone,$customerEmail,$currency,$description)
print_r($results);
Make a direct mpesa payment, Currency is in KES (Kenya Shillings). In the results there us the transaction token, use it to verfiy payment went through.
use RazorInformatics\DPOPhp;
$companyToken = 'YOUR_COMPANY_TOKEN';
$serviceType = 5525; //SERVICE TYPE
$reference ="INV-1000";
$paymentAmount = 500;
$customerFirstName='John';
$customerLastName = 'Doe';
$customerPhone = 2547100100100;
$customerEmail = '';
$description = 'Flight booking for 5th January 2032'
$dpo = new DPOPhp($companyToken);
$results = $dpo->payment()->chargeMpesa($reference,$serviceType,$paymentAmount, $customerFirstName,$customerLastName,$customerPhone,$customerEmail,$description)
print_r($results);
Remember to verify the transaction code to confirm if payment was successfully.
This package is open-sourced software licensed under the MIT license.