A simple package to add DPO API to your laravel application and make payment processing much easy
zepson/dpo-php is a Laravel package for a simple package to add dpo api to your laravel application and make payment processing much easy.
It currently has 7 GitHub stars and 172 downloads on Packagist (latest version 1.0.0).
Install it with composer require zepson/dpo-php.
Discover more Laravel packages by zepson
or browse all Laravel packages to compare alternatives.
Last updated
This is the package that will help you add DPO Payment API to your PHP Application, We are open to contribution and support to make it better.
<?php
use Zepson\Dpo\Dpo;
$dpo = new Dpo();
$order = [
'paymentAmount' => "10000",
'paymentCurrency' => "TZS",
'customerFirstName' => "Novath",
'customerLastName' => "Thomas",
'customerAddress' => "Tanzania",
'customerCity' => "Dodoma",
'customerPhone' => "0752771650",
'customerEmail' => "[email protected]",
'companyRef' => "34TESTREFF"
];
// Now make payment
$dpo->directPayment($data);
// Its done! Simple right! 😂
Install the package Via Composer
composer require zepson/dpo-php
$order = [
'paymentAmount' => "10000",
'paymentCurrency' => "TZS",
'customerFirstName' => "Novath",
'customerLastName' => "Thomas",
'customerAddress' => "Tanzania",
'customerCity' => "Dodoma",
'customerPhone' => "0752771650",
'customerEmail' => "[email protected]",
'companyRef' => "34TESTREFF"
];
$dpo = new Dpo;
return $dpo->directPayment($data); // this will redirect user to DPO Payment page
$token = $dpo->createToken($data); //return array of response with transaction code
//you can save or do what ever you want with the response
$dpo->getPaymentUrl($token);
return Redirect::to($payment_url);
As [Novath Thomas] always says
There is a huge difference between sysem security and complications, Complication hurts, API should'nt be complicated Thats one of the primary AIM of the introduction of APIs
This project is licensed under the MIT license.