The current payment functionality of the “Doula Course” plugin is as follows.
A payment is typically initiated from one of three sources:
- Our public-facing website (www.trainingdoulas.com) as a new monthly subscription.
- A recurring monthly subscription initialized by PayPal’s subscription service.
- A one-time payment made by our alumni to renew their certification.
In all actuality, there is no filters on any incoming payments made to our business’s PayPal account, so any form of payment can trigger our “ipn_relay” script which PayPal calls whenever a payment is made to our account.
The “ipn_relay” script does filter out only payments, meaning that any other IPN notices (such as new subscriptions, delays, suspension, cancellations, or anything else) are ignored.
Additional actions of the “ipn_relay” script are as follows:
- A temporary IPN record is stored in the database. (IPN records older than two days are purged.)
- A new user (and user_id) is created if no user is associated with the PayPal email address (PayPal email address is stored as user_meta field).
- A transaction record is created based on the data sent from the IPN, which includes a user_id.
- Emails receipts of the transaction are sent both to the user and to the administrator.
Note: several objects are created to attend to the details of the work of creating users, transactions, and emails.