Sunnysideup\Ecommerce\Model\Money\PaymentTypes\EcommercePaymentTestSuccess
Payment object representing a TEST = SUCCESS.
Synopsis
class EcommercePaymentTestSuccess
extends EcommercePaymentTest
{
- // Inherited constants from EcommercePayment
- const INCOMPLETE_STATUS = 'Incomplete';
- const SUCCESS_STATUS = 'Success';
- const FAILURE_STATUS = 'Failure';
- const PENDING_STATUS = 'Pending';
- // members
- private static string $singular_name = 'Ecommerce Test Success Payment';
- private static string $plural_name = 'Ecommerce Test Success Payments';
- // Inherited members from EcommercePayment
- public EcommercePaymentSupportedMethodsProvider $supportedMethodsProvider;
- // methods
- public void i18n_singular_name()
- public void i18n_plural_name()
- public EcommercePaymentSuccess processPayment()
- public void getPaymentFormFields()
- public void getPaymentFormRequirements()
- // Inherited methods from EcommercePaymentTest
- public void i18n_singular_name()
- public void i18n_plural_name()
- public void getPaymentFormRequirements()
- // Inherited methods from EcommercePayment
- public void i18n_singular_name()
- public void i18n_plural_name()
- public $this|EcommercePayment init()
- public void getCMSFields()
- public string CMSEditLink()
- public bool canCreate()
- public void canView()
- public bool canEdit()
- public bool canDelete()
- public void addAlternativeEndPoint()
- public void redirectToOrder()
- public string Title()
- public string getTitle()
- public float AmountValue()
- public float getAmountValue()
- public string AmountCurrency()
- public string getAmountCurrency()
- public string Status()
- public static string site_currency()
- public void populateDefaults()
- public void PaymentMethod()
- public static void set_supported_methods()
- public static void get_supported_methods()
- public static array combined_form_requirements()
- public static FieldList combined_form_fields()
- public void getPaymentFormFields()
- public void getPaymentFormRequirements()
- public void validatePayment()
- public void processPayment()
- public void PaidObject()
- public void debug()
- public static EcommercePaymentFormSetupAndValidation ecommerce_payment_form_setup_and_validation_object()
- public static void php_class_to_html_class()
- public static void html_class_to_php_class()
- protected void onBeforeWrite()
- protected void onAfterWrite()
- protected void setClientIP()
- protected void handleError()
- protected EcommercePaymentFormSetupAndValidation ecommercePaymentFormSetupAndValidationObject()
- // Inherited methods from OrderCached
- public void setOrderCached()
- public Order|null; getOrderCached()
Hierarchy
Constants
Name | Value |
---|---|
INCOMPLETE_STATUS | 'Incomplete' |
SUCCESS_STATUS | 'Success' |
FAILURE_STATUS | 'Failure' |
PENDING_STATUS | 'Pending' |
Members
private
- $plural_name
—
string
standard SS variable. - $singular_name
—
string
standard SS variable.
protected
- $orderCached — Sunnysideup\Ecommerce\Model\Order
- $orderCachedStatusID — int
public
- $supportedMethodsProvider
—
Sunnysideup\Ecommerce\Money\EcommercePaymentSupportedMethodsProvider
automatically populated by the dependency manager.
Methods
public
- getPaymentFormFields()
- getPaymentFormRequirements()
- i18n_plural_name()
- i18n_singular_name()
- processPayment()
Inherited from Sunnysideup\Ecommerce\Model\Money\PaymentTypes\EcommercePaymentTest
public
Inherited from Sunnysideup\Ecommerce\Model\Money\EcommercePayment
protected
- ecommercePaymentFormSetupAndValidationObject()
- handleError()
- onAfterWrite() — standard SS method try to finalise order if payment has been made.
- onBeforeWrite() — standard SS method try to finalise order if payment has been made.
- setClientIP() — Set the IP address of the user to this payment record.
public
- AmountCurrency() — alias for getAmountCurrency.
- AmountValue() — alias for getAmountValue.
- CMSEditLink() — link to edit the record.
- PaidObject()
- PaymentMethod() — Returns the Payment type currently in use.
- Status()
- Title() — alias.
- addAlternativeEndPoint() — redirects to this link after order has been placed ...
- canCreate() — Standard SS method.
- canDelete() — Standard SS method set to false as a security measure...
- canEdit() — Standard SS method.
- canView()
- combined_form_fields() — Return a set of payment fields from all enabled payment methods for this site, given the .
- combined_form_requirements() — Return the form requirements for all the payment methods.
- debug() — Debug helper method.
- ecommerce_payment_form_setup_and_validation_object()
- getAmountCurrency()
- getAmountValue()
- getCMSFields()
- getPaymentFormFields() — Return the payment form fields that should be shown on the checkout order form for the payment type. Example: for {@link DPSPayment}, this would be a set of fields to enter your credit card details.
- getPaymentFormRequirements() — Define what fields defined in {@link Order->getPaymentFormFields()} should be required.
- getTitle()
- get_supported_methods() — returns the list of supported methods test methods are included if the site is in DEV mode OR the current user is a ShopAdmin.
- html_class_to_php_class()
- i18n_plural_name()
- i18n_singular_name()
- init() — CRUCIAL makes sure all the relevant payment methods are available ...
- php_class_to_html_class()
- populateDefaults() — Set currency to default one.
- processPayment() — Perform payment processing for the type of payment. For example, if this was a credit card payment type, you would perform the data send off to the payment gateway on this function for your payment subclass.
- redirectToOrder() — redirect to order action.
- set_supported_methods() — Static method to quickly update the payment method on runtime associative array that goes like ClassName => Description ...
- site_currency() — Return the site currency in use.
- validatePayment() — Checks if all the data for payment is correct (e.g. credit card) By default it returns true, because lots of payments gatewawys do not have any fields required here.