You are here

function _payment_gateway_data in Ubercart 5

Same name and namespace in other branches
  1. 6.2 payment/uc_payment/uc_payment.module \_payment_gateway_data()

Return data from a payment gateway by gateway ID and the array key.

Parameters

$gateway_id: The ID of the payment gateway to query.

$key: The key of the data being requested.

Return value

The requested data.

2 calls to _payment_gateway_data()
uc_credit_form_alter in payment/uc_credit/uc_credit.module
Implementation of hook_form_alter().
uc_credit_gateway_txn_types in payment/uc_credit/uc_credit.module
Returns the credit transaction types available for a payment gateway.

File

payment/uc_payment/uc_payment.module, line 1131

Code

function _payment_gateway_data($gateway_id, $key) {

  // Load all the payment gateways.
  $gateways = _payment_gateway_list();

  // Loop through the array to find the matching gateway.
  foreach ($gateways as $gateway) {

    // If this is it, return the requested data.
    if ($gateway['id'] == $gateway_id) {
      return $gateway[$key];
    }
  }
}