southlondonmakerspace / membership-system

This is a membership management system, it's chiefly a database of member data for legal purposes, setting up subscription payments, managing access control permissions, logging events, and interfacing with Discourse permissions.
http://southlondonmakerspace.org
Other
48 stars 22 forks source link

Add support for payments other than regular recurring ones #167

Open naxxfish opened 7 years ago

naxxfish commented 7 years ago

Sometimes, we might want to record the fact a member has made a donation for some reason - for example they have donated for a specific purpose like time using a tool, or purchasing a material or component from the organisation.

At the moment payments are almost exclusively used for GoCardless recurring membership payments (Direct Debits). Ideally, the same database model should be used so that all payments are in the same format regardless of how they arrive, so should be flexible to include payments made via a PoS system, including card payments (chip+pin, contactless) and possibly cash payments.

Preferably, there should be a means for registering payments against a user through an API (e.g. to integrate with an ePoS system).

naxxfish commented 6 years ago

Alternatively, we could simply make use of the direct debit to deduct payments and standardise on this as a way of taking payments.

This would make things a bit easier as no extra payment provider would be required to be integrated, however we should be careful to ensure that if the direct debit is used that we properly handle the payment bouncing or otherwise failing (e.g. cancelled direct debit)

unknowndomain commented 6 years ago

You can create payments with meta data that would link it to a database record:

screen shot 2018-05-03 at 23 23 49

POST: https://api-sandbox.gocardless.com/payments

{
    "payments": {
        "amount": "150",
        "currency": "GBP",
        "description": "6mm Laser Plywood",
        "links": {
            "mandate": "REDACTED"
        },
        "metadata": {
            "member": "example_id",
            "product": "123",
            "transaction": "test"
        }
    }
}

Dashboard screenshot:

screen shot 2018-05-03 at 23 18 26
unknowndomain commented 6 years ago

GoCardless have advised how to create restricted mandates which involves tickkng a box against the customer profile in the advanced settings.

The result however is that for restricted mandates you’ll be asked to approve by GoCardless, for unrestricted mandates you won’t be asked or told about the payment. Subscriptions will notify as usual but similarly require authentication.

Will test this out to see if it just a yes button in the email or requires further authentication like reentering your card details.