Tabnine Logo
PaymentConfig.getPaymentRetryDays
Code IndexAdd Tabnine to your IDE (free)

How to use
getPaymentRetryDays
method
in
com.ning.billing.util.config.PaymentConfig

Best Java code snippets using com.ning.billing.util.config.PaymentConfig.getPaymentRetryDays (Showing top 5 results out of 315)

origin: com.ning.billing/killbill-payment

private DateTime getNextRetryDate(final int retryAttempt) {
  DateTime result = null;
  final List<Integer> retryDays = config.getPaymentRetryDays();
  final int retryCount = retryAttempt - 1;
  if (retryCount < retryDays.size()) {
    int retryInDays = 0;
    final DateTime nextRetryDate = clock.getUTCNow();
    try {
      retryInDays = retryDays.get(retryCount);
      result = nextRetryDate.plusDays(retryInDays);
    } catch (NumberFormatException ex) {
      log.error("Could not get retry day for retry count {}", retryCount);
    }
  }
  return result;
}
origin: com.ning.billing/killbill-payment

  private int getMaxRetrySizeForFailureType(final FailureType failureType) {
    if (failureType == FailureType.PAYMENT_FAILURE) {
      return paymentConfig.getPaymentRetryDays().size();
    } else {
      return paymentConfig.getPluginFailureRetryMaxAttempts();
    }
  }
}
origin: com.ning.billing/killbill-payment

@Test(groups = "fast")
public void testFailedPaymentWithLastRetrySuccess() throws Exception {
  testSchedulesRetryInternal(paymentConfig.getPaymentRetryDays().size(), FailureType.PAYMENT_FAILURE);
}
origin: com.ning.billing/killbill-payment

@Test(groups = "fast")
public void testAbortedPayment() throws Exception {
  testSchedulesRetryInternal(paymentConfig.getPaymentRetryDays().size() + 1, FailureType.PAYMENT_FAILURE);
}
origin: com.ning.billing/killbill-payment

private void moveClockForFailureType(final FailureType failureType, final int curFailure) {
  if (failureType == FailureType.PAYMENT_FAILURE) {
    final int nbDays = paymentConfig.getPaymentRetryDays().get(curFailure);
    clock.addDays(nbDays + 1);
  } else {
    clock.addDays(1);
  }
}
com.ning.billing.util.configPaymentConfiggetPaymentRetryDays

Popular methods of PaymentConfig

  • getPluginFailureRetryMaxAttempts
  • getDefaultPaymentProvider
  • getPaymentPluginThreadNb
  • getPaymentPluginTimeout
  • getPluginFailureRetryMultiplier
  • getPluginFailureRetryStart
  • isPaymentOff

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now