@Test public void isPaymentMethodActiveTest() { String otherPaymentMethodCode = "paymentMethod2"; assertTrue("No active payment method found", wirecardPaymentModeFacade.isPaymentMethodActive(PAYMENT_METHOD_CODE)); paymentModeData.setCode(otherPaymentMethodCode); assertFalse("Active payment method found", wirecardPaymentModeFacade.isPaymentMethodActive(PAYMENT_METHOD_CODE)); }
@Override public boolean isPaymentMethodActive(String paymentMethodChosen) { return getActivePaymentModes().stream() .map(PaymentModeData::getCode) .anyMatch(paymentModeCode -> paymentModeCode.equals(paymentMethodChosen)); }
DefaultWirecardPaymentModeFacade implements WirecardPaymentModeFacade { @Override public boolean isPaymentMethodActive(String paymentMethodChosen) { return getActivePaymentModes().stream() .map(PaymentModeData::getCode) .anyMatch(paymentModeCode -> paymentModeCode.equals(paymentMethodChosen)); } }
DefaultWirecardPaymentModeFacade implements WirecardPaymentModeFacade { @Override public boolean isPaymentMethodActive(String paymentMethodChosen) { return getActivePaymentModes().stream() .map(PaymentModeData::getCode) .anyMatch(paymentModeCode -> paymentModeCode.equals(paymentMethodChosen)); }  }
DefaultWirecardPaymentModeFacade implements WirecardPaymentModeFacade { @Override public boolean isPaymentMethodActive(String paymentMethodChosen) { return getActivePaymentModes().stream() .map(PaymentModeData::getCode) .anyMatch(paymentModeCode -> paymentModeCode.equals(paymentMethodChosen)); }  @Override List<PaymentModeData> getActivePaymentModes(); PaymentModeData getActiveCreditCardPaymentMode(List<PaymentModeData> paymentModeData, String alias); @Override boolean isPurchase(String paymentMethodChosen); @Override WirecardRequestData getSeamlessFormData(AbstractOrderModel abstractOrderModel,
                                                   TransactionType transactionType,
                                                   PaymentMethodName paymentMethodName, PaymentModeModel paymentModeModel); @Override SepaMandateData getSepaMandateData(String sepaCode); @Override boolean isPaymentMethodActive(String paymentMethodChosen); @Override boolean isPaymentMethodChooseInactive(String paymentMethodChosen); @Required void setI18NService(I18NService i18NService); @Required void setPaymentModeConverter(Converter<PaymentModeModel, PaymentModeData> paymentModeConverter); @Required void setWirecardPaymentModeService(WirecardPaymentModeService wirecardPaymentModeService); @Required void setWirecardPaymentConfigurationService(WirecardPaymentConfigurationService wirecardPaymentConfigurationService); @Required void setWirecardSignatureStrategy(WirecardSignatureStrategy wirecardSignatureStrategy); }
DefaultWirecardPaymentModeFacade implements WirecardPaymentModeFacade { @Override public boolean isPaymentMethodActive(String paymentMethodChosen) { return getActivePaymentModes().stream() .map(PaymentModeData::getCode) .anyMatch(paymentModeCode -> paymentModeCode.equals(paymentMethodChosen)); }  @Override List<PaymentModeData> getActivePaymentModes(); PaymentModeData getActiveCreditCardPaymentMode(List<PaymentModeData> paymentModeData, String alias); @Override boolean isPurchase(String paymentMethodChosen); @Override WirecardRequestData getSeamlessFormData(AbstractOrderModel abstractOrderModel,
                                                   TransactionType transactionType,
                                                   PaymentMethodName paymentMethodName, PaymentModeModel paymentModeModel); @Override SepaMandateData getSepaMandateData(String sepaCode); @Override boolean isPaymentMethodActive(String paymentMethodChosen); @Override boolean isPaymentMethodChooseInactive(String paymentMethodChosen); @Required void setI18NService(I18NService i18NService); @Required void setPaymentModeConverter(Converter<PaymentModeModel, PaymentModeData> paymentModeConverter); @Required void setWirecardPaymentModeService(WirecardPaymentModeService wirecardPaymentModeService); @Required void setWirecardPaymentConfigurationService(WirecardPaymentConfigurationService wirecardPaymentConfigurationService); @Required void setWirecardSignatureStrategy(WirecardSignatureStrategy wirecardSignatureStrategy);  }