1. Go to this page and download the library: Download loov/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
loov / php-sdk example snippets
bash
composer
namespace App\Http\Controllers;
use Loov\PhpSdk\LoovPay;
class payment extends Controller
{
public function index()
{
$data = [
'amount' => 2000,
'sender_currency' => 'XAF',
'return_url' => 'https://cosna-afrique.com',
'cancel_url' => 'https://cosna-afrique.com',
'notify_url' => 'https://cosna-afrique.com',
];
$res = (new LoovPay())->setKeys(App-key, Merchant-key)->initPayment($data);
return [$res];
}
}
namespace App\Http\Controllers;
use Loov\PhpSdk\LoovPay;
class payment extends Controller
{
public function testPayment()
{
$res = (new LoovPay())->setKeys(App-key, Merchant-key)->checkStatus(Loov reference);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.