PHP code example of dipesh79 / laravel-phonepe
1. Go to this page and download the library: Download dipesh79/laravel-phonepe 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/ */
dipesh79 / laravel-phonepe example snippets
php artisan vendor:publish
use Dipesh79\LaravelPhonePe\LaravelPhonePe;
use Illuminate\Http\Request;
public function callBackAction(Request $request)
{
$phonepe = new LaravelPhonePe();
$response = $phonepe->getTransactionStatus($request->all());
if($response == true){
//Payment Success
}
else
{
//Payment Failed
}
}