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:pay CMS action

Defined in /modules/shop/classes/shop_actions.php, lines 2307-2321
Author LemonStand eCommerce Inc.
Base action for the Payment page. The action loads an order by an order hash string, specified in the page URL and prepares all required PHP variables.

See Also

Supported form fields

Field Type Description
submit_payment string a name of the SUBMIT button element.

Generated PHP variables

Variable Type Description
order Shop_Order an order object, loaded from the database.
payment_method Shop_PaymentMethod a payment method, selected by the customer.
payment_method_obj Shop_PaymentType an instance of a specific payment type class, for example the Shop_PayPal_Pro_Payment.
payment_methods $Db_DataCollection a list of applicable payment methods.

Built-in AJAX handlers

Handler Description
shop:on_pay Processes the payment form.

Supported form field details

submit_payment form field

A name of the SUBMIT button element. The submit button should have name submit_payment if you are implementing a regular POST form. Alternatively you can create an AJAX form with shop:on_pay handler.

Generated PHP variable details

order variable

Shop_Order $order;
An order object, loaded from the database. This variable can be NULL of the order is not found.

payment_method variable

Shop_PaymentMethod $payment_method;
A payment method, selected by the customer.

payment_method_obj variable

Shop_PaymentType $payment_method_obj;
An instance of a specific payment type class, for example the Shop_PayPal_Pro_Payment.

payment_methods variable

$Db_DataCollection $payment_methods;
A list of applicable payment methods. Each element of the collection is an object of the Shop_PaymentMethod class.

Built-in AJAX handlers details

shop:on_pay AJAX handler

Processes the payment form. Use this handler for creating the Submit button on the Pay page. Example:
<a href="#" onclick="return $(this).getForm().sendRequest('shop:on_pay')">Pay</a>