Sunnysideup\Ecommerce\Forms\Validation\EcommercePaymentFormSetupAndValidation
Synopsis
class EcommercePaymentFormSetupAndValidation
{
- // members
- protected EcommercePayment $paymentObject;
- private static string $table_name = 'EcommercePaymentFormSetupAndValidation';
- private static array $db_field_map = ;
- // methods
- public FieldList getCreditCardPaymentFormFields()
- public void getCreditCardPaymentFormFieldsRequired()
- public bool validatePayment()
- public bool validateAndSaveCreditCardInformation()
- public bool processPaymentFormAndReturnNextStep()
- public bool validateCardNumber()
- public bool validateExpiryMonth()
- public bool validateCVV()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
Tasks
Line | Task |
---|---|
350+ | : finish! valid expiry date |
379+ | : TEST valid CVC/CVV number? |
Members
private
- $db_field_map
- $table_name
—
string
you can set specific EcommercePayment payment fields here, like this: MyEcommercePaymentClass CardNumber: MyCardNumberDBField NameOnCard: MyNameOnCardDBField CVVNumber: MyCVVNumberDBField ExpiryDate: MyExpiryDateDBField.
protected
- $paymentObject — Sunnysideup\Ecommerce\Model\Money\EcommercePayment
Methods
public
- getCreditCardPaymentFormFields() — 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.
- getCreditCardPaymentFormFieldsRequired()
- processPaymentFormAndReturnNextStep() — Process payment form and return next step in the payment process.
- validateAndSaveCreditCardInformation() — return false if there is an error and returns true if all is well.
- validateCVV()
- validateCardNumber() — checks if a credit card is a real credit card number.
- validateExpiryMonth()
- validatePayment()