@Override public boolean apply(final PaymentMethodPlugin input) { return (input.getAddress1() != null && input.getAddress1().contains(searchKey)) || (input.getAddress2() != null && input.getAddress2().contains(searchKey)) || (input.getCCLast4() != null && input.getCCLast4().contains(searchKey)) || (input.getCCName() != null && input.getCCName().contains(searchKey)) || (input.getCity() != null && input.getCity().contains(searchKey)) || (input.getState() != null && input.getState().contains(searchKey)) || (input.getCountry() != null && input.getCountry().contains(searchKey)); } }));
public DefaultNoOpPaymentMethodPlugin(final UUID kbPaymentMethodId, final PaymentMethodPlugin src) { this.kbPaymentMethodId = kbPaymentMethodId; this.externalId = UUID.randomUUID().toString(); this.isDefault = src.isDefaultPaymentMethod(); this.props = src.getProperties(); }
if (pluginDetail != null) { List<PaymentMethodProperties> properties = null; if (pluginDetail.getProperties() != null) { properties = new ArrayList<PaymentMethodJson.PaymentMethodProperties>(Collections2.transform(pluginDetail.getProperties(), new Function<PaymentMethodKVInfo, PaymentMethodProperties>() { @Override public PaymentMethodProperties apply(final PaymentMethodKVInfo input) { pluginDetailJson = new PaymentMethodPluginDetailJson(pluginDetail.getExternalPaymentMethodId(), pluginDetail.isDefaultPaymentMethod(), pluginDetail.getType(), pluginDetail.getCCName(), pluginDetail.getCCType(), pluginDetail.getCCExpirationMonth(), pluginDetail.getCCExpirationYear(), pluginDetail.getCCLast4(), pluginDetail.getAddress1(), pluginDetail.getAddress2(), pluginDetail.getCity(), pluginDetail.getState(), pluginDetail.getZip(), pluginDetail.getCountry(), properties);
@Override public void deletePaymentMethod(final UUID kbAccountId, final UUID kbPaymentMethodId, final CallContext context) throws PaymentPluginApiException { PaymentMethodPlugin toBeDeleted = null; final List<PaymentMethodPlugin> pms = paymentMethods.get(kbPaymentMethodId.toString()); if (pms != null) { for (final PaymentMethodPlugin cur : pms) { if (cur.getExternalPaymentMethodId().equals(kbPaymentMethodId.toString())) { toBeDeleted = cur; break; } } } if (toBeDeleted != null) { pms.remove(toBeDeleted); } }
@Override public boolean apply(final PaymentMethodPlugin input) { return (input.getAddress1() != null && input.getAddress1().contains(searchKey)) || (input.getAddress2() != null && input.getAddress2().contains(searchKey)) || (input.getCCLast4() != null && input.getCCLast4().contains(searchKey)) || (input.getCCName() != null && input.getCCName().contains(searchKey)) || (input.getCity() != null && input.getCity().contains(searchKey)) || (input.getState() != null && input.getState().contains(searchKey)) || (input.getCountry() != null && input.getCountry().contains(searchKey)); } }));
public TestPaymentMethodPlugin(final UUID kbPaymentMethodId, final PaymentMethodPlugin src, final String externalPaymentId) { this.kbPaymentMethodId = kbPaymentMethodId; this.externalPaymentMethodId = externalPaymentId; this.isDefaultPaymentMethod = src.isDefaultPaymentMethod(); this.properties = src.getProperties(); }