Shop_PaymentMethod
The Shop_PaymentMethod class represents a payment method, which you can create on the Shop/Payment Methods page. You can access an instance of the Shop_ PaymentMethod class through the $payment_method field of the Shop_Order class, when you develop the Order Details page. Also, a collection of objects of that class is available on the Payment Method step of the Checkout process.
Parent class: Db_ActiveRecord
Class fields
- $name – the payment method name
- $description – the payment method description in plain text format. Please use the h function when you output a payment method description to escape HTML-sensitive characters.
- $ls_api_code - LemonStand API code assigned to the method in the Administration Area
Class methods
- static find_by_api_code($code) - finds a payment method by the API code. This method allows you to find specific payment methods. You can assign the LemonStand API Code to any payment method in the payment method configuration form.
- find_customer_profile($customer) - finds a customer payment profile. If the profile exists the method returns the profile object (which has the $cc_four_digits_num and $profile_data fields). If profile doesn't exist, the method returns NULL.
- init_customer_profile($customer) - initializes a new empty customer payment profile. This method should be used by payment methods internally.
- profile_exists($customer) - returns TRUE of a payment profile exists for a specific customer.
- supports_payment_profiles() - returns TRUE if the payment method supports customer payment profiles.
See also:
In order to get the individual payment type object, you can do this:
$payment_method = $order->payment_method->get_paymenttype_object();
Next: shop:on_addToCompare
Previous: Shop_OrderStatus
Return to Reference


Comments
No comments posted so far.
Add your comment
Loading form...