\OmnipayableForm
OmnipayableForm provides a base Form for sending payments via the Omnipay library.
- Author: Tom Densham <tom.densham@studiobonito.co.uk>
- Copyright: (c) 2012, Studio Bonito Ltd.
Synopsis
class OmnipayableForm
extends Form
{
- // methods
- public static OmnipayableForm create()
- public void __construct()
- public void setAmount()
- public void setCurrency()
- public null doProcessPayment()
- public null doProcessPaymentRedirect()
- protected array getCreditCardTypes()
- protected array getMonths()
- protected array getYears()
- protected FieldList getCreditCardFields()
- protected FieldList getPaymentFields()
- protected FieldList getPaymentActions()
- protected RequiredFields getRequiredFields()
- protected array processPaymentData()
Hierarchy
Extends
- Form
Members
protected
- $amount
—
int
Store the payment amount. - $gateway
—
Omnipay\Common\GatewayInterface
Store the current gateway.
Methods
protected
- getCreditCardFields() — Create form fields to represent all of the properties on the {@link Omnipay\Common\CreditCard} object.
- getCreditCardTypes() — Get a list of available credit cards.
- getMonths() — Get a translatable list of months of the year.
- getPaymentActions() — Primary method for generating the form actions.
- getPaymentFields() — Primary method for generating the form fields used.
- getRequiredFields() — Primary method for generating the required fields.
- getYears() — Get a list of years starting from the current year.
- processPaymentData() — Process the form data in order to ensure that it is in a format that the gateway can use.
public
- __construct() — Create the Form and the relevant gateway.
- create() — Factory method for creating the correct form for the currently configured gateway.
- doProcessPayment() — Process the form submission and send the payment request via the gateway.
- doProcessPaymentRedirect() — Handle the response from off-site gateways.
- setAmount() — Set the payment amount.
- setCurrency() — Set the currency used to make the payment.