Documentation

CRM_Financial_Form_FrontEndPaymentFormTrait

This class holds functionality shared between various front end forms.

Table of Contents

Properties

$_mode  : string
The payment mode that we are in ("live" or "test") This should be protected and retrieved via getPaymentMode() but it's accessed all over the place so we have to leave it public for now.
$isBackOffice  : bool
Is this a back office form
$isPayLater  : bool
Is pay later enabled on this form?
$payLaterLabel  : string
The label for the pay later pseudoprocessor option.

Methods

getIsBackOffice()  : bool
getPayLaterLabel()  : string
getPaymentMode()  : string
Get the payment mode ('live' or 'test')
isPayLater()  : bool
setIsPayLater()  : mixed
setPayLaterLabel()  : mixed
setPaymentMode()  : mixed
Set the payment mode ('live' or 'test')
addPaymentProcessorFieldsToForm()  : mixed
Adds in either a set of radio buttons or hidden fields to contain the payment processors on a front end form
alterLineItemsForTemplate()  : mixed
Alter line items for template.
assignLineItemsToTemplate()  : mixed
Assign line items to the template.
getPaymentProcessorTitle()  : string
Get the title of the payment processor to display to the user Note: There is an identical function in CRM_Core_Payment
getProcessors()  : array<string|int, mixed>
Get the configured processors, including the pay later processor.

Properties

$_mode

The payment mode that we are in ("live" or "test") This should be protected and retrieved via getPaymentMode() but it's accessed all over the place so we have to leave it public for now.

public string $_mode

Methods

getPaymentMode()

Get the payment mode ('live' or 'test')

public getPaymentMode() : string
Return values
string

setPayLaterLabel()

public setPayLaterLabel(string $payLaterLabel) : mixed
Parameters
$payLaterLabel : string

addPaymentProcessorFieldsToForm()

Adds in either a set of radio buttons or hidden fields to contain the payment processors on a front end form

protected addPaymentProcessorFieldsToForm() : mixed

alterLineItemsForTemplate()

Alter line items for template.

protected alterLineItemsForTemplate(array<string|int, mixed> &$tplLineItems) : mixed

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.

Parameters
$tplLineItems : array<string|int, mixed>

assignLineItemsToTemplate()

Assign line items to the template.

protected assignLineItemsToTemplate(array<string|int, mixed> $tplLineItems) : mixed
Parameters
$tplLineItems : array<string|int, mixed>

getPaymentProcessorTitle()

Get the title of the payment processor to display to the user Note: There is an identical function in CRM_Core_Payment

protected getPaymentProcessorTitle(array<string|int, mixed> $processor) : string
Parameters
$processor : array<string|int, mixed>
Return values
string

getProcessors()

Get the configured processors, including the pay later processor.

protected getProcessors() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results