LemonStand Documentation

shop:pay

The shop:pay action is designed for creating the Pay page. The action loads an order by an order hash string, specified in the page URL. Please read the Creating the Pay page article for examples of the action usage.

Supported Form Fields

  • submit_payment – a name of the submit button element. The button name is needed only if you send data by a regular POST method (not AJAX).

Generated PHP variables

  • $order – an order object, loaded from the LemonStand database. An object of the Shop_Order class.
  • $payment_method – a payment method, selected by the customer. An object of the Shop_PaymentMethod class.
  • $payment_method_obj – an instance of a specific payment method class (for example the Shop_PayPal_Pro_Payment). This variable is usually needed for the payment method partials.

Supported AJAX handlers

  • shop:on_pay – 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>

Next: shop:payment_information
Previous: shop:password_restore
Return to Reference