artfulrobot / uk.artfulrobot.civicrm.gocardless

A CiviCRM extension providing GoCardless integration to handle UK Direct Debits.
GNU Affero General Public License v3.0
5 stars 18 forks source link

Launch soon! #1

Closed artfulrobot closed 7 years ago

artfulrobot commented 8 years ago

This is an issue to keep me focussed on my reason for writing it: a client needs this up and running by Nov 2016.

Therefore my primary interest (and all I'm paid to do) is to get the functions that they need implemented and production-ready. My personal interest is in making something really useful for the CiviCRM community at large, but this is a lower priority.

Here's what I need to have working by launch:

  1. Be able to integrate with Contribution Pages for the purposes of regular giving. (i.e. specifically: not for membership, not for one-offs)
  2. Be able to implement with a custom form (outside of CiviCRM's usual Contribution Page workflow). Therefore the "doing" functions need to be outside of CRM_Core_Form classes.
  3. Have sensible references stored to enable manual and automated reconciliation between GoCardless and CiviCRM (i.e. store suitable GoCardless ids in CiviCRM's invoice_id and trxn_id fields)
  4. Have successful payments automatically recorded in CiviCRM as contributions against a recurring contribution record, using the GoCardless webhook.
  5. Have failed payments automatically recorded too, using the GoCardless webhook.
  6. Have expired/cancelled mandates/"subscriptions" (that's GoCardless speak) cancel the recurring payment record in CiviCRM, using the GoCardless webhook.
  7. Have all functionality automatically testable using phpunit4 CiviCRM style tests.

These are my essentials, however it is my goal to have more features and I'll be doing my best to write code in a way that enables that.

artfulrobot commented 8 years ago

Progress:

I've set this up on my site and created a test recurring subscription. Here's what happened:

  1. Process went smoothly and I got the thank you page with relevant details.
  2. I (as the supporter) received an email from GoCardless saying I'd set up a Direct Debit Subscription.
  3. I (as the supporter) received another (that's annoying) email from GoCardless saying I'd set up a Direct Debit.
  4. I (as the admin) received an email from GoCardless telling me about my new 'customer'.
  5. In CiviCRM the contributions tab shows:
    1. a Pending contribution which (correctly) has a future date for the payment (GoCardless decides this). It has the GoCardless subscription ID for the Trxn ID, as designed.
    2. an In Progress recurring contribution with the same correct future start date.

I am expecting that by the end of the 21st (start date) the contribution record will have been set to Completed, and have its trxn_id set to the payment Id.

artfulrobot commented 8 years ago

Yes! Today I checked in with CiviCRM and my payment has been completed and has a transaction id. I hereby declare this in beta.