Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

Workflow after failed debits? #285

Closed magnolia61 closed 6 years ago

magnolia61 commented 9 years ago

At Civicon NW you mentioned a possible manual approach for failed debits. We do not seem to be able to follow you suggestions, but maybe we misunderstood something (very likely).

Step 1. We mark the whole sepa group as received, thus setting all contributions to status: completed. Step 2. We want to mark the contributions of some failed debits to "failed". This is not possible.

It seems a contribution status cannot change from complete to failed, it can only by cancelled, but that does not seem desirable as we 'lose' the contribution by that. Most people with failed direct debits prefer to pay by bank. So we want to end up with a pending contribution, which we can this time have paid by bank, or we can duplicate the mandate for another debit attempt (not always desirable).

Real solution? After a failed direct debit, and after having marked the contribution as received, it should be possible to roll-back the payment to a pending status and be free in the choice to either clone the original mandate to a OOFF, or have the customer pay by bank. This roll-back mechanism would probably have it's place in civisepa, or we should try to allow changing contribution status from completed or cancelled to pending with all underlying financial transaction logic.

Workaround? I am not sure what the best way would be (aside of civibanking), I think a solution would be to first mark these contributions to failed before marking the whole group as completed. In that case the "mark received" button should mark all contributions "in progress" to "completed" and leave the failed contributions alone. Would this be a working workaround?

What other suggestions and scenarios (not technically, but designwise) would there be possible to go forward after some failed debits?

Reference issues: https://github.com/Project60/org.project60.sepa/issues/258 and https://github.com/Project60/org.project60.sepa/issues/283

bjendres commented 9 years ago

You are right, the failed status is not exposed to the UI (at least you cannot set it there).

The intended workflow is indeed to set the "failed" contributions to cancelled and use the cancel_reason field for further information. If you then ask the donor to send the money again, via a different channel, I don't see why creating a new contribution is not desirable. You would definitely want the information of the first failed/cancelled contribution still to be in the system.

Finally, the status cancelled seems to be appropriate to me, since a "failed" SDD transaction might as well been actively cancelled by the donor.

magnolia61 commented 9 years ago

Would there be a way to cancel the failed contribution and create a new one against the same membership or event the original was connected to?

bjendres commented 9 years ago

Sadly, I think the UI doesn't allow this. We want to get there with CiviSEPA, see https://github.com/Project60/org.project60.sepa/issues/201 ff, and https://github.com/Project60/org.project60.sepa/issues/286

bjendres commented 9 years ago

I think I can close this, @magnolia61 re-open if you disagree

bjendres commented 6 years ago

There is now #492 in the upcoming 1.4.