if (strcmp($POST['cardtype'], "mastercard")) { $Processor = $PaymentProcessorFactory.InstantiateByType("mastercard"); $Processor = $PaymentProcessorFactory.InstantiateByType("visa"); } $Processor.process($POST);