Download & Extend

Simple payments

Provides a simple API to access payment gateways and process payments as a module hook.

Completed payments are stored in the database.

Two gateways are currently supported: PayPal and Moneybookers.

Payment forms can be created easily, for example:

<?php
function example_paypal_form($form_state, $product_id) {

 
$vars = array(
   
'module' => 'example',
   
'type' => 'example type',
   
'custom' => $product_id,
   
'item_name' => 'Example payment',
   
'no_shipping' => TRUE,
   
'no_note' => TRUE,
   
'return' => url('', array('absolute' => TRUE)),
   
'amount' => 100,
  );
 
 
$form = simple_payments_paypal_payment_form($vars);

 
$form['button'] = array(
   
'#type' => 'button',
   
'#value' => t('Pay with PayPal'),
  );

  return
$form;
}

$output = drupal_get_form('example_paypal_form', $product_id);
?>

Completed payments can be processed with hook_simple_payment_process($payment) .

The API is documented in more detail in the source code in Doxygen format.

A couple of PayPal payment verification functions were derived from Simple Paypal framework.

If you need something more elaborate (like a cart!), use Commerce.

Downloads

Recommended releases

Version Downloads Date Links
6.x-1.0 tar.gz (9.88 KB) | zip (14.22 KB) 2009-Nov-20 Notes

Development releases

Version Downloads Date Links
6.x-1.x-dev tar.gz (10.66 KB) | zip (14.66 KB) 2011-Feb-25 Notes

Project Information


Maintainers for Simple payments

  • jbrown - 6 commits
    last: 2 years ago, first: 3 years ago

Issues for Simple payments

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants