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.
Field |
Type |
Description |
submit_payment |
string |
a name of the SUBMIT button element. |
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
An order object, loaded from the database.
This variable can be NULL of the order is not found.
¶
payment_method variable
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>
|