1. Go to this page and download the library: Download codepreneur/casys-pay 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 Codepreneur\CasysPay\Events\CasysPaymentFailed;
use Codepreneur\CasysPay\Events\CasysPaymentSucceeded;
use Illuminate\Support\Facades\Event;
Event::listen(CasysPaymentSucceeded::class, function ($event) {
// update order or membership state
});
Event::listen(CasysPaymentFailed::class, function ($event) {
// mark the payment attempt as failed
});