--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/28b2abd0-5b61-404f-82f6-2fa0be80a8e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
| private DateTime computeNextRetryDate(final String paymentExternalKey, final boolean isApiAPayment, final InternalCallContext internalContext) { | |
| // Don't retry call that come from API. | |
| if (isApiAPayment) { | |
| return null; | |
| } |
There is a lot of information and not always the clarity needed to really follow your steps -- if you want to go in this level of details, please make reference to exact api you are using -- e.g not sure what transitionPendingTransaction is?
Questions:
- Are you making payments in the context of subscription billing or using our raw payment apis (no subscription/invoice) ? - recurring payments with invoices and subscription
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/CAKuqY30Bi51QG0NwYuOwP0xDOT5a2onFP194J-WdXZRVGY4TLg%40mail.gmail.com.
- Subscription recurring payment is due and my java payment plugin is invoked to directly debit a bank account via an external payment provider.
- The initial payment/payment transactions are marked as PENDING and payment attempt is marked as SUCCESS (from transaction being in PENDING)
- In my case, most of inter-bank transfers take 2-3 business days to complete so we either poll or subscribe to a webhook from the external payment provider.
- When a payment of such kind fails through polling or webhook notifications, I call paymentApiWrapper.transitionPendingTransaction (now is this perceived by your code base as an apiPayment call ?)
- Rest is as you know due to that isAPIPayment being set to true in the IncompletePaymentAttemptTask.java no retries are scheduled.
Without digging further, and the above affecting my live system, I have overridden your isAPIPayment variable to effectively make your second scenario allowing retriesWe delegate the if retry decision to the configuration per Tenant in Killbill, we use multiple tenants in Killbill in our design.
[...]
- Subscription recurring payment is due and my java payment plugin is invoked to directly debit a bank account via an external payment provider.
- The initial payment/payment transactions are marked as PENDING and payment attempt is marked as SUCCESS (from transaction being in PENDING)
- In my case, most of inter-bank transfers take 2-3 business days to complete so we either poll or subscribe to a webhook from the external payment provider.
- When a payment of such kind fails through polling or webhook notifications, I call paymentApiWrapper.transitionPendingTransaction (now is this perceived by your code base as an apiPayment call ?)
Yes absolutely - as a matter of fact any interaction from your plugin to KB core will need to happen through api calls. Which means that if such operation were to fail, this would not be retried. - I am confused here:
- Rest is as you know due to that isAPIPayment being set to true in the IncompletePaymentAttemptTask.java no retries are scheduled.
Without digging further, and the above affecting my live system, I have overridden your isAPIPayment variable to effectively make your second scenario allowing retriesWe delegate the if retry decision to the configuration per Tenant in Killbill, we use multiple tenants in Killbill in our design.
So i assume you had to fork the code and recompile with this change? - Yes I had to do so since this behaviour is unchanged from 0.20.0 to 0.20.10.Also, i am confused why can't you embed the retry logic in your plugin instead of hacking the code? - I followed your document on overdue invoices and found org.killbill.payment.retry.days:3,3,3. This worked perfectly for any payment failures completed instantly without delays. I decided to fork so the same retries apply to payments waiting for a callback to know if failed or succeeded.
If I may suggest, this behaviour of "If a payment is made in the context of any api call, we don't allow for retry because the caller will be notified of the error and can decide whether or not this is appropriate to retry" could be made configurable e.g., org.killbill.payment.retry.isapipaymentpermitted = false (default to false). But other users can override it to true.
But I totally understand if you do not agree.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/CABUAYrux95YFtcy4OagA49jWkro2H%3DdyCek6jsdp4O06pjSONQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Yes absolutely - as a matter of fact any interaction from your plugin to KB core will need to happen through api calls. Which means that if such operation were to fail, this would not be retried. - I am confused here:
- Out of Box, Stripe credit card payments or my bank debit plugin payment failures are retried by the default payment control plugin, PROVIDED the failure status is returned in the synchronous response to the purchase transaction, in other words, if then payment completed and failed without delays.
- If a PEDNING (IncompletePaymentAttemptTask.java is involved) payment is notified of a failure sometime later, then no retry by your design. These are two distinct scenarios IMO, both of which involve a plugin interacting with KB Core.
Could I then interpret your clarification above as "any incomplete payments in-flight if failed will NOT be retried as per design"?