function filterPayment($paymentMethods) { if (isCorporateUser()) { $paymentMethods = PaymentService::getPaymentProcessors(false); foreach ($paymentMethods as $i => $paymentMethod) { if (!($paymentMethod->type == "cash")) { unset($paymentMethods[$i]); } } } return $paymentMethods; }
/** * Get payment methods * @return multitype:unknown */ function getPaymentMethods() { $paymentMethods = PaymentService::getPaymentProcessors(); return $paymentMethods; }