Check for active gateway

This commit is contained in:
Hillel Coren 2017-03-21 17:19:00 +02:00
parent 754f11cb51
commit 625c6b381f

View File

@ -98,6 +98,10 @@ class OnlinePaymentController extends BaseController
$paymentDriver = $account->paymentDriver($invitation, $gatewayTypeId); $paymentDriver = $account->paymentDriver($invitation, $gatewayTypeId);
if (! $paymentDriver) {
return redirect()->to('view/' . $invitation->invitation_key);
}
try { try {
return $paymentDriver->startPurchase(Input::all(), $sourceId); return $paymentDriver->startPurchase(Input::all(), $sourceId);
} catch (Exception $exception) { } catch (Exception $exception) {