You are here

function payment_entity_property_info in Payment 7

Implements hook_entity_property_info().

File

./payment.module, line 520
Hook implementations and shared functions.

Code

function payment_entity_property_info() {

  // Payment.
  $properties['payment']['properties']['context'] = array(
    'description' => t("The machine-readable name of the context that created the payment."),
    'label' => t('Context'),
    'required' => TRUE,
    'schema field' => 'context',
  );
  $properties['payment']['properties']['currency_code'] = array(
    'description' => t('A three-letter ISO 4217 currency code.'),
    'label' => t('Currency code'),
    'required' => TRUE,
    'schema field' => 'currency_code',
  );
  $properties['payment']['properties']['description'] = array(
    'label' => t('Description'),
    'schema field' => 'description',
    'getter callback' => 'payment_entity_property_get',
  );
  $properties['payment']['properties']['finish_callback'] = array(
    'description' => t('The name of the function to call once payment processing is completed.'),
    'label' => t('Finish callback'),
    'required' => TRUE,
    'schema field' => 'finish_callback',
  );
  $properties['payment']['properties']['method'] = array(
    'label' => t('Payment method'),
    'required' => TRUE,
    'type' => 'payment_method',
  );
  $properties['payment']['properties']['pid'] = array(
    'label' => t('Payment ID'),
    'schema field' => 'pid',
    'type' => 'integer',
  );
  $properties['payment']['properties']['pmid'] = array(
    'label' => t('Payment method ID'),
    'schema field' => 'pmid',
    'type' => 'integer',
  );
  $properties['payment']['properties']['uid'] = array(
    'label' => t('User ID'),
    'description' => t('The ID of the user this payment belongs to.'),
    'required' => TRUE,
    'schema field' => 'uid',
    'type' => 'integer',
  );

  // Payment method.
  $properties['payment_method']['properties']['controller_class_name'] = array(
    'label' => t('Payment method type'),
    'schema field' => 'controller_class_name',
  );
  $properties['payment_method']['properties']['enabled'] = array(
    'description' => t('Whether the payment method is enabled and can be used.'),
    'label' => t('Enabled'),
    'schema field' => 'enabled',
    'type' => 'boolean',
  );
  $properties['payment_method']['properties']['pmid'] = array(
    'label' => t('Payment method ID'),
    'schema field' => 'pmid',
    'type' => 'integer',
  );
  $properties['payment_method']['properties']['title_specific'] = array(
    'label' => t('Title (specific)'),
    'required' => TRUE,
    'schema field' => 'title_specific',
  );
  $properties['payment_method']['properties']['title_generic'] = array(
    'label' => t('Title (generic)'),
    'schema field' => 'title_generic',
  );
  $properties['payment_method']['properties']['uid'] = array(
    'label' => t('User ID'),
    'description' => t('The ID of the user this payment method belongs to.'),
    'required' => TRUE,
    'schema field' => 'uid',
    'type' => 'integer',
  );
  return $properties;
}