1. Go to this page and download the library: Download code4mk/lara-sslcommerz 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/ */
use SslPayment;
$data = SslPayment::verify(request());
// return response()->json($data);
if ($data->status == 'VALID') {
// your business logic
}
/* you can get success objects which triggers by sslcomerz.
you can
*/
Route::post('ipn',function(){
return response()->json(request());
})
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'/success',
'/ipn'
];
}