You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Fundraising/SmashPig

From Wikitech-static
Jump to navigation Jump to search

CiviCRM Extension

We have written an extension in CiviCRM to use the SmashPig library to charge recurring payments. It currently supports credit cards via Ingenico and Adyen, and iDEAL and Apple Pay via Adyen.

The SmashPig extension has a settings menu in the Civi UI:

Administer -> System Settings -> SmashPig Settings

Here you can switch the extension to either use queues or directly insert the donation. In production we always want to use queues so that the charge job doesn't conflict with the donation queue consumer for table access, and so that any special data munging we apply in the queue consumer is applied consistently.

The extension defines a CiviCRM PaymentProcessor implementation (limited to only charging recurring installments) and a job that can be run via the CiviCRM.

Running the recurring job with 1 donation

  drush cvapi job.process_smashpig_recurring batch_size=1

Running with a specific recurring_id

  drush cvapi job.process_smashpig_recurring contribution_recur_id=12345