You are here

function _webform_submit_paypal in Webform Paypal 7.2

Same name and namespace in other branches
  1. 7 webform_paypal.module \_webform_submit_paypal()

A hook for changing the input values before saving to the database.

Note that Webform will save the result of this function directly into the database.

Parameters

$component: A Webform component array.

$value: The POST data associated with the user input.

Return value

An array of values to be saved into the database. Note that this should be a numerically keyed array.

File

./webform_paypal.module, line 185

Code

function _webform_submit_paypal($component, $value) {
  $return = array();
  $return['id'] = $component['value'];
  $return['status'] = 'unpaid';
  if (is_int($value) && $value == 1) {
    $return['status'] = 'paid';
  }
  return $return;
}