function paymentmethodbasic_payment_method_defaults in Payment 7
Returns default payment methods.
Return value
array An array of PaymentMethod objects.
1 call to paymentmethodbasic_payment_method_defaults()
- paymentmethodbasic_install in modules/
paymentmethodbasic/ paymentmethodbasic.install - Implements hook_install().
File
- modules/
paymentmethodbasic/ paymentmethodbasic.install, line 59 - Installation and uninstallation functions.
Code
function paymentmethodbasic_payment_method_defaults() {
$payment_methods[] = new PaymentMethod(array(
'controller' => payment_method_controller_load('PaymentMethodBasicController'),
'controller_data' => array(
'message' => 'You will be charged upon delivery. Please make sure you have enough cash available.',
'status' => PAYMENT_STATUS_PENDING,
'text_format' => 'plain_text',
),
'name' => 'collect_on_delivery',
'title_generic' => t('Collect on delivery'),
'title_specific' => t('Collect on delivery'),
));
$payment_methods[] = new PaymentMethod(array(
'controller' => payment_method_controller_load('PaymentMethodBasicController'),
'controller_data' => array(
'message' => '',
'status' => PAYMENT_STATUS_SUCCESS,
'text_format' => 'plain_text',
),
'name' => 'no_payment_required',
'title_generic' => t('No payment required'),
'title_specific' => t('No payment required'),
));
return $payment_methods;
}