CRM_Contribute_Form_Contribution_Main
class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_ContributionBase
This class generates form components for processing a Contribution.
Traits
Constants
ATTR_SPACING |
Constants for attributes for various form elements attempt to standardize on the number of variations that we use of the below form elements |
CB_PREFIX |
All checkboxes are defined with a common prefix. This allows us to have the same javascript to check / clear all the checkboxes etc If u have multiple groups of checkboxes, you will need to give them different ids to avoid potential name collision |
CB_PREFIY |
All checkboxes are defined with a common prefix. This allows us to have the same javascript to check / clear all the checkboxes etc If u have multiple groups of checkboxes, you will need to give them different ids to avoid potential name collision |
CB_PREFIZ |
All checkboxes are defined with a common prefix. This allows us to have the same javascript to check / clear all the checkboxes etc If u have multiple groups of checkboxes, you will need to give them different ids to avoid potential name collision |
CB_PREFIX_LEN |
All checkboxes are defined with a common prefix. This allows us to have the same javascript to check / clear all the checkboxes etc If u have multiple groups of checkboxes, you will need to give them different ids to avoid potential name collision |
Properties
protected object | $_state | The state object that this form belongs to | from CRM_Core_Form |
protected string | $_name | The name of this form | from CRM_Core_Form |
protected string | $_title | The title of this form | from CRM_Core_Form |
array | $_defaults | The default values for the form. | from CRM_Core_Form |
mixed | $_options | (QUASI-PROTECTED) The options passed into this form | from CRM_Core_Form |
$_action | from CRM_Contribute_Form_ContributionBase | ||
$_paymentProcessors | |||
array | $_paymentProcessorIDs | Available payment processors (IDS). | from CRM_Core_Form |
protected | $_paymentProcessorID | ||
protected int | $_is_pay_later_enabled | Is pay later enabled for the form. | from CRM_Core_Form |
protected object | $_renderer | The renderer used for this form | from CRM_Core_Form |
protected array | $_dateFields | An array to hold a list of datefields on the form so that they can be converted to ISO in a consistent manner | from CRM_Core_Form |
static protected CRM_Core_Smarty | $_template | Cache the smarty template for efficiency reasons | from CRM_Core_Form |
protected bool | $unsavedChangesWarn | Indicate if this form should warn users of unsaved changes | from CRM_Core_Form |
array | $ajaxResponse | What to return to the client if in ajax mode (snippet=json) | from CRM_Core_Form |
array | $urlPath | Url path used to reach this page | from CRM_Core_Form |
protected string | $context | Context of the form being loaded. | from CRM_Core_Form |
bool | $submitOnce | from CRM_Core_Form | |
CRM_Core_Controller | $controller | from CRM_Core_Form | |
static array | $html5Types | Extra input types we support via the "add" method | from CRM_Core_Form |
protected string | $payLaterLabel | The label for the pay later pseudoprocessor option. | from CRM_Financial_Form_FrontEndPaymentFormTrait |
int | $_id | The id of the contribution page that we are processing. | from CRM_Contribute_Form_ContributionBase |
string | $_mode | The mode that we are in | from CRM_Contribute_Form_ContributionBase |
int | $_membershipContactID | The contact id related to a membership | from CRM_Contribute_Form_ContributionBase |
array | $_values | The values for the contribution db object | from CRM_Contribute_Form_ContributionBase |
array | $_paymentProcessor | The paymentProcessor attributes for this page | from CRM_Contribute_Form_ContributionBase |
$_paymentObject | from CRM_Contribute_Form_ContributionBase | ||
array | $_membershipBlock | The membership block for this page | from CRM_Contribute_Form_ContributionBase |
protected bool | $_separateMembershipPayment | Does this form support a separate membership payment | from CRM_Contribute_Form_ContributionBase |
array | $_params | The params submitted by the form and computed by the app | from CRM_Contribute_Form_ContributionBase |
array | $_fields | The fields involved in this contribution page | from CRM_Contribute_Form_ContributionBase |
int | $_bltID | The billing location id for this contribution page. | from CRM_Contribute_Form_ContributionBase |
float | $_amount | Cache the amount to make things easier | from CRM_Contribute_Form_ContributionBase |
int | $_pcpId | Pcp id | from CRM_Contribute_Form_ContributionBase |
array | $_pcpBlock | Pcp block | from CRM_Contribute_Form_ContributionBase |
array | $_pcpInfo | Pcp info | from CRM_Contribute_Form_ContributionBase |
int | $_contactID | The contact id of the person for whom membership is being added or renewed based on the cid in the url, checksum, or session | from CRM_Contribute_Form_ContributionBase |
protected | $_userID | from CRM_Contribute_Form_ContributionBase | |
int | $_membershipId | The Membership ID for membership renewal | from CRM_Contribute_Form_ContributionBase |
int | $_priceSetId | Price Set ID, if the new price set method is used | from CRM_Contribute_Form_ContributionBase |
array | $_priceSet | Array of fields for the price set | from CRM_Contribute_Form_ContributionBase |
string | $_contributeMode | Contribution mode e.g express for payment express, notify for off-site + notification back to CiviCRM | from CRM_Contribute_Form_ContributionBase |
$_useForMember | |||
bool | $_isBillingAddressRequiredForPayLater | from CRM_Contribute_Form_ContributionBase | |
bool | $_emailExists | Flag if email field exists in embedded profile | from CRM_Contribute_Form_ContributionBase |
bool | $isBackOffice | Is this a backoffice form (this will affect whether paypal express code is displayed) | from CRM_Contribute_Form_ContributionBase |
int | $paymentInstrumentID | Payment instrument if for the transaction. | from CRM_Contribute_Form_ContributionBase |
int | $_defaultMemTypeId | Define default MembershipType Id. | |
$_membershipTypeValues | |||
array | $_paymentFields | Array of payment related fields to potentially display on this form (generally credit card or debit card fields). This is rendered via billingBlock.tpl | |
protected | $_snippet |
Methods
Constructor for the basic form page.
Simple easy to use wrapper around addElement.
Set variables up before form is built.
Process the form submission.
Build the form object.
Set the default values.
This is a virtual function that adds group and global rules to the form.
This if a front end form function for setting the payment processor.
Format the fields in $this->_params for the payment processor.
Format the fields in $params for the payment processor.
Handle Payment Processor switching for contribution and event registration forms.
Use the form name to create the tpl file name.
Add the extra.tpl in.
Store the variable with the value in the form scope.
Assign value to name in template by reference.
Appends values to template variables.
Returns an array containing template variables.
No description
No description
No description
Simple shell that derived classes can call to add buttons to the form with a customized title for the main Submit
No description
Add a search for a range using date picker fields.
Based on form action, return a string representing the api action.
Classes extending CRM_Core_Form should implement this method.
Adds a select based on field metadata.
Adds a field based on metadata.
Add a widget for selecting/editing/creating/copying a profile form
Add date.
Function that will add date and time.
Add a currency and money element to the form.
Add currency element to the form.
Create a single or multiple entity ref field.
Convert all date fields within the params to mysql date ready for the BAO layer. In this case fields are checked against the $_datefields defined for the form and if time is defined it is incorporated
Helper function to verify that required fields have been filled.
Get contact if for a form object. Prioritise - cid in URL if 0 (on behalf on someoneelse) (@todo consider setting a variable if onbehalf for clarity of downstream 'if's - logged in user id if it matches the one in the cid in the URL - contact id validated from a checksum from a checksum - cid from the url if the caller has ACL permission to view - fallback is logged in user (or ? NULL if no logged in user) (@todo wouldn't 0 be more intuitive?)
Add autoselector field -if user has permission to view contacts If adding this to a form you also need to add to the tpl e.g
Set default values on form for given contact (or no contact defaults)
Create a chain-select target field. All settings are optional; the defaults usually work.
Assign billing name to the template.
No description
Alter line items for template.
Assign line items to the template.
Get the configured processors, including the pay later processor.
Assign the minimal set of variables to the template.
Add the custom fields.
Enable ReCAPTCHA on Contribution form
Display ReCAPTCHA warning on Contribution form
Check if ReCAPTCHA has to be added on Contribution form forcefully.
Add onbehalf/honoree profile fields and native module fields.
Check template file exists.
Authenticate pledge user during online payment.
Build Membership Block in Contribution Pages.
Determine if recurring parameters need to be added to the form parameters.
Get the payment processor object for the submission, returning the manual one for offline payments.
Global form rule.
Compute amount to be paid.
Submit function.
Assign the billing mode to the template.
Process confirm function and pass browser to the thank you page.
Set form variables if contribution ID is found
Function for unit tests on the postProcess function.
Details
in CRM_Core_Form at line 200
string
getContext()
in CRM_Core_Form at line 207
setContext()
Set context variable.
in CRM_Core_Form at line 268
CRM_Core_Form
__construct(object $state = NULL, const|enum|int $action = CRM_Core_Action::NONE, string $method = 'post', string $name = NULL)
Constructor for the basic form page.
We should not use QuickForm directly. This class provides a lot of default convenient functions, rules and buttons
in CRM_Core_Form at line 311
protected
setTranslatedFields()
Set translated fields.
This function is called from the class constructor, allowing us to set fields on the class that can't be set as properties due to need for translation or other non-input specific handling.
in CRM_Core_Form at line 318
addClass(string $className)
Add one or more css classes to the form.
in CRM_Core_Form at line 326
registerRules()
Register all the standard rules that most forms potentially use.
in CRM_Core_Form at line 379
HTML_QuickForm_Element
add(string $type, string $name, string $label = '', string|array $attributes = '', bool $required = FALSE, array $extra = NULL)
Simple easy to use wrapper around addElement.
Deal with simple validation rules.
at line 63
preProcess()
Set variables up before form is built.
at line 1002
postProcess()
Process the form submission.
in CRM_Core_Form at line 494
mainProcess(bool $allowAjax = TRUE)
Main process wrapper.
Implemented so that we can call all the hook functions.
in CRM_Core_Form at line 520
postProcessHook()
The postProcess hook is typically called by the framework.
However in a few cases, the form exits or redirects early in which case it needs to call this function so other modules can do the needful Calling this function directly should be avoided if possible. In general a better way is to do setUserContext so the framework does the redirect
at line 289
buildQuickForm()
Build the form object.
at line 102
array|NULL
setDefaultValues()
Set the default values.
in CRM_Core_Form at line 549
addRules()
This is a virtual function that adds group and global rules to the form.
Keeping it distinct from the form to keep code small and localized in the form building code
in CRM_Core_Form at line 559
bool
validate()
Performs the server side validation.
in CRM_Core_Form at line 587
buildForm()
Core function that builds the form.
We redefine this function here and expect all CRM forms to build their form in the function buildQuickForm.
in CRM_Core_Form at line 650
addButtons(array $params)
Add default Next / Back buttons.
in CRM_Core_Form at line 723
string
getName()
Getter function for Name.
in CRM_Core_Form at line 732
object
getState()
Getter function for State.
in CRM_Core_Form at line 741
int
getStateType()
Getter function for StateType.
in CRM_Core_Form at line 752
string
getTitle()
Getter function for title.
Should be over-ridden by derived class.
in CRM_Core_Form at line 762
setTitle(string $title)
Setter function for title.
in CRM_Core_Form at line 772
assignBillingType()
Assign billing type id to bltID.
in CRM_Core_Form at line 781
int
getPaymentProcessorID()
in CRM_Core_Form at line 794
protected
assignPaymentProcessor(bool $isPayLaterEnabled)
This if a front end form function for setting the payment processor.
It would be good to sync it with the back-end function on abstractEditPayment & use one everywhere.
in CRM_Core_Form at line 832
protected array
formatParamsForPaymentProcessor(array $fields)
Format the fields in $this->_params for the payment processor.
In order to pass fields to the payment processor in a consistent way we add some renamed parameters.
in CRM_Core_Form at line 848
protected array
prepareParamsForPaymentProcessor(array $params)
Format the fields in $params for the payment processor.
In order to pass fields to the payment processor in a consistent way we add some renamed parameters.
in CRM_Core_Form at line 896
protected
preProcessPaymentOptions()
Handle Payment Processor switching for contribution and event registration forms.
This function is shared between contribution & event forms & this is their common class.
However, this should be seen as an in-progress refactor, the end goal being to also align the backoffice forms that action payments.
This function overlaps assignPaymentProcessor, in a bad way.
in CRM_Core_Form at line 948
protected
handlePreApproval(array $params)
Handle pre approval for processors.
This fits with the flow where a pre-approval is done and then confirmed in the next stage when confirm is hit.
This function is shared between contribution & event forms & this is their common class.
However, this should be seen as an in-progress refactor, the end goal being to also align the backoffice forms that action payments.
in CRM_Core_Form at line 973
setOptions(mixed $options)
Setter function for options.
in CRM_Core_Form at line 982
string
toSmarty()
Render form and return contents.
in CRM_Core_Form at line 1000
object
getRenderer()
Getter function for renderer.
If renderer is not set create one and initialize it.
in CRM_Contribute_Form_ContributionBase at line 1031
string
getTemplateFileName()
Use the form name to create the tpl file name.
in CRM_Core_Form at line 1035
getHookedTemplateFileName()
A wrapper for getTemplateFileName.
This includes calling the hook to prevent us from having to copy & paste the logic of calling the hook.
in CRM_Contribute_Form_ContributionBase at line 1044
string
overrideExtraTemplateFileName()
Add the extra.tpl in.
Default extra tpl file basically just replaces .tpl with .extra.tpl i.e. we do not override - why isn't this done at the CRM_Core_Form level?
in CRM_Core_Form at line 1062
error(string $message, int $code = NULL, CRM_Core_DAO $dao = NULL)
Error reporting mechanism.
in CRM_Core_Form at line 1080
set(string $name, mixed $value)
Store the variable with the value in the form scope.
in CRM_Core_Form at line 1092
mixed
get(string $name)
Get the variable from the form scope.
in CRM_Core_Form at line 1101
int
getAction()
Getter for action.
in CRM_Core_Form at line 1111
setAction(int $action)
Setter for action.
in CRM_Core_Form at line 1123
assign(string $var, mixed $value = NULL)
Assign value to name in template.
in CRM_Core_Form at line 1135
assign_by_ref(string $var, mixed $value)
Assign value to name in template by reference.
in CRM_Core_Form at line 1147
append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)
Appends values to template variables.
in CRM_Core_Form at line 1158
array
get_template_vars(string $name = NULL)
Returns an array containing template variables.
in CRM_Core_Form at line 1172
HTML_QuickForm_group
addRadio(string $name, $title, $values, array $attributes = [], null $separator = NULL, bool $required = FALSE)
in CRM_Core_Form at line 1204
addYesNo(int $id, $title, bool $allowClear = FALSE, null $required = NULL, array $attributes = [])
in CRM_Core_Form at line 1230
addCheckBox(int $id, $title, $values, null $other = NULL, null $attributes = NULL, null $required = NULL, null $javascriptMethod = NULL, string $separator = '<br />', bool $flipValues = FALSE)
in CRM_Core_Form at line 1277
resetValues()
in CRM_Core_Form at line 1293
addDefaultButtons(string $title, string $nextType = 'next', string $backType = 'back', bool|string $submitOnce = FALSE)
Simple shell that derived classes can call to add buttons to the form with a customized title for the main Submit
in CRM_Core_Form at line 1324
addDateRange(string $name, string $from = '_from', string $to = '_to', string $label = 'From:', string $dateFormat = 'searchDate', bool $required = FALSE, bool $displayTime = FALSE)
in CRM_Core_Form at line 1346
addDatePickerRange(string $fieldName, string $label, bool $isDateTime = FALSE, bool $required = FALSE, string $fromLabel = 'From', string $toLabel = 'To')
Add a search for a range using date picker fields.
in CRM_Core_Form at line 1372
protected
getApiAction()
Based on form action, return a string representing the api action.
Used by addField method.
Return string
in CRM_Core_Form at line 1391
getDefaultEntity()
Classes extending CRM_Core_Form should implement this method.
in CRM_Core_Form at line 1401
getDefaultContext()
Classes extending CRM_Core_Form should implement this method.
TODO: Merge with CRM_Core_DAO::buildOptionsContext($context) and add validation.
in CRM_Core_Form at line 1423
HTML_QuickForm_Element
addSelect($name, array $props = [], bool $required = FALSE)
Adds a select based on field metadata.
TODO: This could be even more generic and widget type (select in this case) could also be read from metadata Perhaps a method like $form->bind($name) which would look up all metadata for named field
in CRM_Core_Form at line 1507
mixed
addField($name, array $props = [], bool $required = FALSE, bool $legacyDate = TRUE)
Adds a field based on metadata.
in CRM_Core_Form at line 1710
addProfileSelector(string $name, string $label, string $allowCoreTypes, string $allowSubTypes, array $entities, bool $default = FALSE, string $usedFor = NULL)
Add a widget for selecting/editing/creating/copying a profile form
in CRM_Core_Form at line 1729
null
getRootTitle()
in CRM_Core_Form at line 1736
string
getCompleteTitle()
in CRM_Core_Form at line 1743
static CRM_Core_Smarty
getTemplate()
in CRM_Core_Form at line 1750
addUploadElement($elementName)
in CRM_Core_Form at line 1780
null
getVar($name)
in CRM_Core_Form at line 1788
setVar($name, $value)
in CRM_Core_Form at line 1807
addDate(string $name, string $label, bool $required = FALSE, array $attributes = NULL)
deprecated
deprecated
Add date.
in CRM_Core_Form at line 1896
addDateTime(string $name, string $label, bool $required = FALSE, null $attributes = NULL)
deprecated
deprecated
Function that will add date and time.
in CRM_Core_Form at line 1922
HTML_QuickForm_Element
addMoney(string $name, string $label, bool $required = FALSE, null $attributes = NULL, bool $addCurrency = TRUE, string $currencyName = 'currency', null $defaultCurrency = NULL, bool $freezeCurrency = FALSE)
Add a currency and money element to the form.
in CRM_Core_Form at line 1952
addCurrency(string $name = 'currency', null $label = NULL, bool $required = TRUE, string $defaultCurrency = NULL, bool $freezeCurrency = FALSE, bool $setDefaultCurrency = TRUE)
Add currency element to the form.
in CRM_Core_Form at line 2006
HTML_QuickForm_Element
addEntityRef(string $name, string $label = '', array $props = [], bool $required = FALSE)
Create a single or multiple entity ref field.
in CRM_Core_Form at line 2055
convertDateFieldsToMySQL(array $params)
Convert all date fields within the params to mysql date ready for the BAO layer. In this case fields are checked against the $_datefields defined for the form and if time is defined it is incorporated
in CRM_Core_Form at line 2075
removeFileRequiredRules($elementName)
in CRM_Core_Form at line 2093
cancelAction()
Function that can be defined in Form to override or.
perform specific action on cancel action
in CRM_Core_Form at line 2105
static
validateMandatoryFields(array $fields, array $values, array $errors)
Helper function to verify that required fields have been filled.
Typically called within the scope of a FormRule function
in CRM_Core_Form at line 2124
protected NULL|int
setContactID()
Get contact if for a form object. Prioritise - cid in URL if 0 (on behalf on someoneelse) (@todo consider setting a variable if onbehalf for clarity of downstream 'if's - logged in user id if it matches the one in the cid in the URL - contact id validated from a checksum from a checksum - cid from the url if the caller has ACL permission to view - fallback is logged in user (or ? NULL if no logged in user) (@todo wouldn't 0 be more intuitive?)
in CRM_Core_Form at line 2179
int|null
getContactID()
Get the contact id that the form is being submitted for.
in CRM_Core_Form at line 2186
getLoggedInUserContactID()
Get the contact id of the logged in user.
in CRM_Core_Form at line 2215
addAutoSelector(array $profiles = [], array $autoCompleteField = [])
Add autoselector field -if user has permission to view contacts If adding this to a form you also need to add to the tpl e.g
{if !empty($selectable)}
{/if}
in CRM_Core_Form at line 2240
canUseAjaxContactLookups()
in CRM_Core_Form at line 2256
addCIDZeroOptions()
Add the options appropriate to cid = zero - ie. autocomplete
in CRM_Core_Form at line 2280
array
getProfileDefaults(mixed $profile_id = 'Billing', int $contactID = NULL)
Set default values on form for given contact (or no contact defaults)
in CRM_Core_Form at line 2299
preventAjaxSubmit()
Sets form attribute.
in CRM_Core_Form at line 2307
allowAjaxSubmit()
Sets form attribute.
in CRM_Core_Form at line 2315
setPageTitle(string $entityLabel)
Sets page title based on entity and action.
in CRM_Core_Form at line 2344
HTML_QuickForm_Element
addChainSelect(string $elementName, array $settings = [])
Create a chain-select target field. All settings are optional; the defaults usually work.
in CRM_Core_Form at line 2379
addTaskMenu(array $tasks)
Add actions menu to results form.
in CRM_Core_Form at line 2496
string
assignBillingName(array $params = [])
Assign billing name to the template.
in CRM_Core_Form at line 2531
string
getCurrency(array $submittedValues = [])
Get the currency for the form.
in CRM_Core_Form at line 2553
protected bool
isFormInViewOrEditMode()
Is the form in view or edit mode.
The 'addField' function relies on the form action being one of a set list of actions. Checking for these allows for an early return.
in CRM_Financial_Form_FrontEndPaymentFormTrait at line 49
string
getPayLaterLabel()
in CRM_Financial_Form_FrontEndPaymentFormTrait at line 59
setPayLaterLabel(string $payLaterLabel)
in CRM_Financial_Form_FrontEndPaymentFormTrait at line 72
protected
alterLineItemsForTemplate($tplLineItems)
Alter line items for template.
This is an early cut of what will ideally eventually be a hooklike call to the CRM_Invoicing_Utils class with a potential end goal of moving this handling to an extension.
in CRM_Financial_Form_FrontEndPaymentFormTrait at line 101
protected
assignLineItemsToTemplate($tplLineItems)
Assign line items to the template.
in CRM_Financial_Form_FrontEndPaymentFormTrait at line 112
protected array
getProcessors()
Get the configured processors, including the pay later processor.
in CRM_Contribute_Form_ContributionBase at line 218
bool
isQuickConfig()
Is the price set quick config.
in CRM_Contribute_Form_ContributionBase at line 515
assignToTemplate()
Assign the minimal set of variables to the template.
in CRM_Contribute_Form_ContributionBase at line 599
buildCustom(int $id, string $name, bool $viewOnly = FALSE, null $profileContactType = NULL, array $fieldTypes = NULL)
Add the custom fields.
in CRM_Contribute_Form_ContributionBase at line 747
protected
enableCaptchaOnForm()
Enable ReCAPTCHA on Contribution form
in CRM_Contribute_Form_ContributionBase at line 751
assignPaymentFields()
in CRM_Contribute_Form_ContributionBase at line 806
protected
displayCaptchaWarning()
Display ReCAPTCHA warning on Contribution form
in CRM_Contribute_Form_ContributionBase at line 817
protected
hasToAddForcefully()
Check if ReCAPTCHA has to be added on Contribution form forcefully.
in CRM_Contribute_Form_ContributionBase at line 827
buildComponentForm(int $id, CRM_Core_Form $form)
Add onbehalf/honoree profile fields and native module fields.
in CRM_Contribute_Form_ContributionBase at line 1015
null|string
checkTemplateFileExists(string $suffix = NULL)
Check template file exists.
in CRM_Contribute_Form_ContributionBase at line 1052
authenticatePledgeUser()
Authenticate pledge user during online payment.
in CRM_Contribute_Form_ContributionBase at line 1105
cancelRecurring()
Cancel recurring contributions.
In case user cancel recurring contribution, When we get the control back from payment gate way lets delete the recurring and related contribution.
in CRM_Contribute_Form_ContributionBase at line 1138
protected bool
buildMembershipBlock(int $cid, bool $isContributionMainPage = FALSE, int|array $selectedMembershipTypeID = NULL, bool $thankPage = FALSE, null $isTest = NULL)
Build Membership Block in Contribution Pages.
in CRM_Contribute_Form_ContributionBase at line 1347
protected
setRecurringMembershipParams()
Determine if recurring parameters need to be added to the form parameters.
- is_recur
- frequency_interval
- frequency_unit
For membership this is based on the membership type.
This needs to be done before processing the pre-approval redirect where relevant on the main page or before any payment processing.
Arguably the form should start to build $this->_params in the pre-process main page & use that array consistently throughout.
in CRM_Contribute_Form_ContributionBase at line 1390
protected CRM_Core_Payment
getPaymentProcessorObject()
Get the payment processor object for the submission, returning the manual one for offline payments.
at line 533
static
buildRecur(CRM_Core_Form $form)
Build elements to collect information for recurring contributions.
at line 618
static bool|array
formRule(array $fields, array $files, CRM_Contribute_Form_Contribution_Main $self)
Global form rule.
at line 967
static int|mixed|null|string
computeAmount(array $params, array $formValues)
Compute amount to be paid.
at line 1024
submit(array $params)
Submit function.
This is the guts of the postProcess made also accessible to the test suite.
at line 1243
protected
setContributeMode()
Assign the billing mode to the template.
This is required for legacy support for contributeMode in templates.
The goal is to remove this parameter & use more relevant parameters.
at line 1263
protected
skipToThankYouPage()
Process confirm function and pass browser to the thank you page.
at line 1288
assignFormVariablesByContributionID()
Set form variables if contribution ID is found
at line 1334
testSubmit(array $params)
Function for unit tests on the postProcess function.