SilverCommerce\Checkout\Control\Checkout
Controller used to render the checkout process
- Author: i-lateral (http://www.i-lateral.com)
Synopsis
class Checkout
extends Controller
{
- // members
- private static string $url_segment = 'checkout';
- private static boolean $cron_cleaner = false;
- private static string $zero_gateway = ZeroValueGateway::GATEWAY_NAME;
- protected array $templates = ;
- private static array $allowed_actions = ;
- private static array $omnipay_map = ;
- private Estimate $estimate = NULL;
- // methods
- public void getEstimate()
- public void setEstimate()
- public boolean hasEstimate()
- public string getPaymentMethod()
- protected Payment createPayment()
- protected array collectOmnipayData()
- public string Link()
- public string AbsoluteLink()
- public string RelativeLink()
- public ArrayList getMenu()
- public void Menu()
- public void init()
- public void index()
- public array postage()
- public void payment()
- public string complete()
- public string noestimate()
- public CustomerDetailsForm CustomerForm()
- public Form PostageForm()
- public Form GatewayForm()
- public Form PaymentForm()
- public redirect doUpdatePayment()
- public void doSubmitPayment()
- public static Int getRandomNumber()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
- $allowed_actions
- $cron_cleaner
—
boolean
whether or not the cleaning task should be left to a cron job - $estimate
—
SilverCommerce\OrdersAdmin\Model\Estimate
Estimate linked to this checkout process - $omnipay_map
—
array
A list of fields in the checkout module that are mapped to omnipay allowed fields. - $url_segment
—
string
URL Used to generate links to this controller. - $zero_gateway
—
string
Name of a gateway used for a zero value payment (auto completed)
protected
- $templates
—
array
Setup default templates for this controller
Methods
protected
- collectOmnipayData() — Map our order data to an array that can be passed to omnipay.
- createPayment() — Create a new payment and configure it using the provided invoice.
public
- AbsoluteLink() — Get an absolute link to this controller
- CustomerForm() — Form to capture the customers details
- GatewayForm() — Generate a gateway form to select available gateways
- Link() — Get the link to this controller
- Menu()
- PaymentForm() — Generate a payment form using omnipay scafold
- PostageForm() — Form to find postage options and allow user to select payment
- RelativeLink() — Get a relative (to the root url of the site) link to this controller
- complete() — Deal with rendering a completion message to the end user
- doSubmitPayment()
- doUpdatePayment() — Update the selected payment gateway
- getEstimate()
- getMenu() — If content controller exists, return it's menu function
- getPaymentMethod() — Get a payment method to use (either the default or from a session)
- getRandomNumber() — Generate a random number based on the current time, a random int and a third int that can be passed as a param.
- hasEstimate() — country Is an estimate set? return false if not
- index() — Initial login/details screen for the checkout
- init()
- noestimate() — Special function to be loaded when no estimate is available
- payment() — Action that gets called before we interface with our payment method.
- postage() — Allowing user to select postage
- setEstimate()