Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
Update README and move in the MembershipDates.md content
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Lott committed Nov 16, 2018
1 parent c5eb938 commit e745c9f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 18 deletions.
18 changes: 0 additions & 18 deletions MembershipDates.md

This file was deleted.

57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,63 @@ Note: if you're running a "test-drive" contribution page you can use GoCardless'

Having set up a Direct Debit you should see that in the Contributions tab for your contact's record on CiviCRM, showing as a recurring payment, and also a pending contribution record. The date will be about a week in the future. Check your database several days after that date (GoCardless only knows something's been successful after the time for problems to be raised has expired, which is several working days) and the contribution should have been completed. Check your record next week/month/year and there should be another contribution automatically created.

## Pre-filling fields on the GoCardless hosted page

GoCardless can prepopulate some of the fields (address, phone, email). This is
useful in the cases when you have asked the user for this information as part of
the form you set up in CiviCRM because it saves them from having to enter it twice.

To use this feature just add the relevant fields to a CiviCRM Profile that you
are including in your contribution (etc) page.

Addresses, emails, phones all take a location type (Primary, Billing, Home,
Work...). If you have used more than one location type this plugin needs to
choose which to send to GoCardless. It picks fields using the following order of
preference:

1. Billing
2. Primary
3. anything

## Membership Dates

In a simple world, someone fills in a membership form, pays by credit card and
their membership is active immediately.

In the DD world, things happen on different dates:

1. `setup_date` - fill in a membership form, complete a DD mandate
- Recurring Contribution created with status Pending
- Contribution created with status Pending
- Membership created with status Pending,
`join_date = start_date = setup_date`

2. `charge_date` - first payment charged

3. `webhook_date` - GoCardless fires webhook and notifies of `charge_date`

- Recurring Contribution updated to In Progress

- Contribution updated to status Completed, `receive_date` updated to
`charge_date`

- Membership updated to status New, `join_date` unchanged, `start_date`
updated to `webhook_date`, `end_date` updated to `start_date` +
membership_length

This appears to be identical date behaviour to creating a membership with a
pending cheque payment and then later recording the cheque as being received.
The membership will start when the payment is recorded and the contribution
status set to Completed. The end date is recalculated to be a year (or other
membership length) from the start date so that members get a full year of
benefit.

However... some might want the membership to start as soon as the mandate is
setup, before waiting for the first payment. The current date logic is handled
by core so this extension would need to override that in a couple of places to
implement a different scheme. Since that is not specific to this payment
processor, it might be better to do this as an enhancement to core, or a
separate extension.

## Technical notes

Expand Down

0 comments on commit e745c9f

Please sign in to comment.