Prevent multiple gateways w/tokens

This commit is contained in:
Hillel Coren 2018-05-08 17:47:47 +03:00
parent 97395c46df
commit 755f125bf0
2 changed files with 3 additions and 2 deletions

View File

@ -907,7 +907,7 @@ class Account extends Eloquent
$available = true;
foreach ($gatewayTypes as $type) {
if ($type != GATEWAY_TYPE_TOKEN && $paymentDriver->handles($type)) {
if ($paymentDriver->handles($type)) {
$available = false;
break;
}

View File

@ -48,6 +48,8 @@ class Gateway extends Eloquent
GATEWAY_AUTHORIZE_NET,
GATEWAY_MOLLIE,
GATEWAY_GOCARDLESS,
GATEWAY_BITPAY,
GATEWAY_DWOLLA,
GATEWAY_CUSTOM1,
GATEWAY_CUSTOM2,
GATEWAY_CUSTOM3,
@ -60,7 +62,6 @@ class Gateway extends Eloquent
*/
public static $alternate = [
GATEWAY_PAYPAL_EXPRESS,
GATEWAY_GOCARDLESS,
GATEWAY_BITPAY,
GATEWAY_DWOLLA,
GATEWAY_CUSTOM1,