You are here

function _webform_display_paypal in Webform Paypal 7.2

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

Implements _webform_display_component().

File

./webform_paypal.module, line 199

Code

function _webform_display_paypal($component, $value) {
  if (!empty($value['status']) && $value['status'] == 'unpaid') {
    $value = t('Submitted to PayPal');
  }
  if (!empty($value['status']) && $value['status'] == 'paid') {
    $value = t('Submitted to PayPal - Payment Confirmed');
  }
  return array(
    '#title' => t('PayPal Status'),
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_paypal',
    '#theme_wrappers' => array(
      'webform_element',
    ),
    '#value' => $value,
    '#webform_component' => $component,
  );
}