function _payment_gateway_data in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_payment/uc_payment.module \_payment_gateway_data()
Returns 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.
1 call to _payment_gateway_data()
- 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 840
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 isset($gateway[$key]) ? $gateway[$key] : NULL;
}
}
}