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:onExtendPaymentMethodForm event

Triggered by Shop_PaymentMethod
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendPaymentMethodForm(Shop_PaymentMethod $payment_method, string $context)
$payment_method Shop_PaymentMethod specifies the payment method object.
$context string specifies the execution context.
Allows to add new fields to the Create/Edit Payment Method form in the Administration Area. Usually this event is used together with the shop:onExtendPaymentMethodModel event. To add new fields to the payment method form, call the add_form_field() method of the payment method object.
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');
}