| Method | Description | Returns |
|---|---|---|
| getType() | string | |
| getValues(ElementSubmission $submission) | Gets array representation of given submission value. Payment submissions are inherently structured (amount, currency, payment method, transaction id), so the array form is the natural shape. Returns null if values are not set. | array |
| getPaymentError() | Returns the payment processing error message, if any. | string |
| getCurrencyCode() | Returns the ISO 4217 currency code configured for this element (e.g. 'USD'). | string |
| getCurrency() | Returns the currency object configured for this element. | Currency |
| getAmounts() | Returns the preset payment amounts configured for this element, hydrated as major-unit decimal strings. | array |
| getAmountsAsMoney() | Returns the preset payment amounts configured for this element, hydrated as Money objects. | array |
| getSettings() | array | |
| getMode() | Returns the payment capture mode: 'authorizeCapture' or 'authorizeOnly'. | string |
| getPaymentMethodIds() | Returns the IDs of the payment methods configured for this element. | array |
| getTaxCategoryId() | Returns the tax category ID configured for this element, if any. | int |
| isAllowCustomAmount() | Returns whether the user is permitted to enter a custom payment amount. | bool |
| getEntity() | string | |
| getId() | int | |
| getName() | Gets element name. It could be used in html to identify input, e.g. ' '. | string |
| getHelp() | Gets help text for the element. It could be used as a tooltip or in HTML as a title attribute, e.g. ' '. | string |
| getEditor() | string | |
| getText() | Text for the element that usually is used for element's label | string |
| getDefaultValue() | string | |
| getPlaceholder() | string | |
| isRequired() | bool | |
| getRegex() | string | |
| getPosition() | int | |
| getRevision() | FormRevision | |
| getStep() | Step | |
| getValidationRules() | Collection (ValidationRule) | |
| getValidationConditions() | Collection (ValidationCondition) | |
| getParent() | ElementGroup | |
| isNewRecord() | Check if the record is a new record | bool |
| isHierarchicalModel() | Check whether a model is a hierarchical model, i.e. can have children | bool |
| isVersionedModel() | Check whether a model is versioned | bool |
| getElementId() | string | |
| getHtml() | string |
Forms\Models\Frontend\PaymentElement
Entity for collecting payment