$payment = Payment::where('number', $request->input('order_number'))->firstOrFail();
$payboxVerify = \App::make(\Bnb\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(\Bnb\PayboxGateway\Requests\Capture::class);
$response = $captureRequest->setAmount($payment->amount)
->setPayboxCallNumber($payment->call_number)
->setPayboxTransactionNumber($payment->transaction_number)
->send();
if ($response->isSuccess()) {
// process order here
}