This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:onExtendPaymentMethodModel event

Triggered by Shop_PaymentMethod
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendPaymentMethodModel(Shop_PaymentMethod $payment_method)
$payment_method Shop_PaymentMethod specifies the payment method object.
Allows to define new columns in the payment method model. The event handler should accept a single parameter - the payment method object. To add new columns to the payment method model, call the define_column() method of the payment method object. Before you add new columns to the model, you should add them to the database (the shop_payment_methods table).
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendPaymentMethodModel', $this, 'extend_payment_method_model');
  Backend::$events->addEvent('shop:onExtendPaymentMethodForm', $this, 'extend_payment_method_form');
}

public function extend_payment_method_model($payment_method)
{
  $payment_method->define_column('x_extra_description', 'Extra description');
}

public function extend_payment_method_form($payment_method, $context)
{
  $payment_method->add_form_field('x_extra_description')->tab('Custom');
}