Downloads
Stars
Version
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.