1. Go to this page and download the library: Download waqarraza/jazzcash-laravel 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/ */
public function checkout() {
$amount = 10 ; // in pkr
$description = "Some checkout details";
return JazzCash::checkout($amount, $description)
}
public function checkout_return(Request $request) {
if($request->get('pp_ResponseCode') === '000') {
... do something on success
} else {
... do something in failure
}
}