Adding Simple Payment Processing to Drupal Site
How to integrate PayPal payment processing into a Drupal website using LM_Paypal module.
I had a need to add simple payment processing to a Drupal website; I did not want to use Ubercart or any other eCommerce modules, or CiviCRM. Here were my basic requirements:
- Users register for a course using a web form page
- After registration user is taken to a payment page
- Payment is then processed by Paypal
- After payment is processed, user is directed back to the site
In this simple payment processing example, I did not want any payment confirmation. For example, if a user registers and then does not complete payment then in this simple method, there would be no automated check or flag; the admin would have to manually check and match the registration and payment records. In order to accomplish this, I looked at two modules: Simple_Paypal and LM_Paypal. Simple_Paypal is till in test mode for Drupal 6, so it is not ready for deployment. LM_Paypal was used for this example. Following steps were used:
- Install lm_paypal module in normal location (/sites/all/modules/)
- Enable the module at admin/build/modules
- Configure the module at admin/settings/lm_paypal/settings
- The first field is LM PayPal Business/Premier Email:
- Create an account with Paypal and use the email address registered with Paypal
- Use default values for the next 2 fields. Use the sandbox address while testing
- While testing check on the two checkboxes
- Last step in configuration is to go to admin/settings/lm_paypal/donations_settings. Here enter a URL; this URL is used by Paypal after the payment processing is complete.
- Next, we need to put a “Pay” link on a webpage.
This completes the setup of simple payment processing.