payment\PaymentProcessor_GatewayHosted
Default class for gateway-hosted processors
Synopsis
class PaymentProcessor_GatewayHosted
extends PaymentProcessor
{
- // members
- private static array $allowed_actions = ;
- private static string $url_segment = 'payment';
- // Inherited members from PaymentProcessor
- protected String $methodName;
- public Payment $payment;
- public PaymentGateway $gateway;
- public $paymentData;
- // methods
- public void capture()
- public void complete()
- private void paymentTxnIDMatchesGatewayTxnID()
- public void cancel()
- // Inherited methods from PaymentProcessor
- public static array get_supported_methods()
- public void setMethodName()
- public void setRedirectURL()
- public String getRedirectURL()
- public void doRedirect()
- public void setup()
- public void capture()
- public FieldList getFormFields()
- public RequiredFields getFormRequirements()
Hierarchy
Extends
Members
private
- $allowed_actions
- $url_segment
protected
- $methodName
—
payment\String
The method name of this controller
public
- $gateway
—
payment\PaymentGateway
The gateway object to be injected to this controller - $payment
—
payment\Payment
The payment object to be injected to this controller - $paymentData
—
array
The payment data array
Methods
private
public
- cancel() — Process request from the external gateway, this action is usually triggered if the payment was cancelled and the user was redirected to the cancelURL.
- capture() — Process a gateway-hosted payment. Users will be redirected to the external gateway to enter payment info. Redirect back to our site when the payment is completed.
- complete() — Process request from the external gateway, this action is usually triggered if the payment was completed on the gateway and the user was redirected to the returnURL.
Inherited from payment\PaymentProcessor
public
- capture() — Process a payment request. To be extended by individual processor type If there's no break point (i.e exceptions and errors), this should redirect to the postRedirectURL (merchant-hosted) or the external gateway (gateway-hosted)
- doRedirect() — Redirection after payment processing
- getFormFields() — Get the processor's form fields. Custom controllers use this function to add the form fields specifically to gateways.
- getFormRequirements() — Get the form requirements
- getRedirectURL() — Get the url to be redirected to after the payment is completed.
- get_supported_methods() — Get the supported methods array set by the yaml configuraion
- setMethodName() — Set the method name of this controller.
- setRedirectURL() — Set the url to be redirected to after the payment is completed.
- setup() — Save preliminary data to database before processing payment