loov-payment/laravel-sdk is a Laravel package for loov payment solution.
It currently has 0 GitHub stars and 8 downloads on Packagist (latest version 1.0.2).
Install it with composer require loov-payment/laravel-sdk.
Discover more Laravel packages by loov-payment
or browse all Laravel packages to compare alternatives.
Last updated
Loov Solutions is an online payment tools.
Run this in your terminal to install loov fro comand line
composer require loov-payment/laravel-sdk
<?php
namespace App\Htpp\Controllers;
use Loovpayment\LaravelSdk\LoovService;
class payment extends Controller{
public function payment(){
$data =[
'amount' =>50000,
'currency' => 'XAF',
'payment_mode' => 'CARD',
"return_url" => "https://google.com?state=return_url",
"cancel_url" => "https://google.com?state=cancel",
"callback_url" => "https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79",
"description" => "test payment de service en ligne",
"username" => "Arolle Fona",
"email" =>"[email protected]",
"phoneNumber" => "237699009999"
];
$response = (new LoovService())->setKeys(AppKey MerchantKey)->payIn($data);
}
}
Success Response
Upon successful payment initiation, the API will respond with a status code of 200 along with the following response body:
{
"status": 200,
"message": "Payment initiated",
"payment_url": "https://api.secure.payment.loov-solutions.com/payinit/oa7DZzEd8gwJ5PYQ",
"reference": "LOC8SXoZuDVEvu1ODxs"
}
<?php
namespace App\Htpp\Controllers;
use Loovpayment\LaravelSdk\LoovService;
class payment extends Controller{
public function payment(){
$data =[
'amount' =>50000,
'operator' => 'XAF',
"callback_url" => "https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79",
"username" => "Arolle Fona",
"email" =>"[email protected]",
"phoneNumber" => "237699009999"
];
$response = (new LoovService())->setKeys(AppKey MerchantKey)->mobileSoftPay($data);
}
}
Success Response
Upon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.
{
"error": false,
"status": "success",
"amount": "500",
"fees": 10,
"message": "Confirm the payment by entering your PIN code and you will receive an SMS. Thank you for using Orange Money services.",
"reference": "LOMoac3hqZXuBHUHKy8"
}
| country | operator | operator_code |
| Benin | Mtn | mtn-benin |
| Benin | Moov | moov-benin |
| Cameroon | Orange | orange-money-cm |
| Cameroon | Mtn | mtn-cm |
| Ivory Coast | Mtn | mtn-ci |
| Ivory Coast | Moov | moov-ci |
| Mali | Moov | moov-ml |
| Mali | Orange | orange-money-ml |
| Senegal | Orange | orange-money-senegal |
| Senegal | Expresso | expresso-senegal |
| Senegal | Free | free-money-senegal |
| Senegal | Wave Senegal | wave-senegal |
| Togo | T-money | t-money-togo |
<?php
namespace App\Htpp\Controllers;
use Loovpayment\LaravelSdk\LoovService;
class payment extends Controller{
public function payment(){
$data =[
'amount' =>50000,
"operator": "orange-money-cm",
'phoneNumber' => '237699009999',
"currency" => "XAF"
];
$response = (new LoovService())->setKeys(AppKey MerchantKey)->payOut($data);
}
}
Success Response
Upon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.
{
"error": false,
"status": "success",
"amount": "50000",
"reference": "MOMAVzvTY7DLyiRCR38",
"message": "Transfer of 500 XAF transferred to 237699009999"
}
<?php
namespace App\Htpp\Controllers;
use Loovpayment\LaravelSdk\LoovService;
class payment extends Controller{
public function payment(){
$response = (new LoovService())->setKeys(AppKey MerchantKey)->checkStatus($reference);
}
}
Success Response
Upon successfully retrieving the payment status, the API will respond with a JSON object containing the payment status information.
{
"error": false,
"reference": "MOMAVzvTY7DLyiRCR38",
"amount": "500",
"currency": "XAF",
"status": "initiated",
"date": "2023-08-08 09:08:17",
"customer": null
}
If you discover a security vulnerability within Laravel, please send an e-mail to Arolle Fona via [email protected]. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.