PHP code example of maximeb / laravel-8-paybox-gateway
1. Go to this page and download the library: Download maximeb/laravel-8-paybox-gateway 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/ */
maximeb / laravel-8-paybox-gateway example snippets
$payment = Payment::where('number', $request->input('order_number'))->firstOrFail();
$payboxVerify = \App::make(\Devpark\PayboxGateway\Responses\Verify::class);
try {
$success = $payboxVerify->isSuccess($payment->amount);
if ($success) {
// process order here after making sure it was real payment
}
echo "OK";
}
catch (InvalidSignature $e) {
Log::alert('Invalid payment signature detected');
}
$payment = PaymentModel::find($idOfAuthorizedPayment);
$captureRequest = \App::make(\Devpark\PayboxGateway\Requests\Capture::class);
$response = $captureRequest->setAmount($payment->amount)
->setPayboxCallNumber($payment->call_number)
->setPayboxTransactionNumber($payment->transaction_number)
->setDayRequestNumber(2)
->send();
if ($response->isSuccess()) {
// process order here
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.