Skip to main content

Payment Methods Styles Props

You can customize the Authorize Module to integrate better with your website's design style. For this, you can use the optional parameters style and labels when calling the window.listOfpaymentMethodsConfig function.

List Of Payment Methods Page

You can customize the following properties in your List Of Payment Methods page:

Labels

Prop NameTypeDescriptionDefault Value
widgetHeaderTitlestringThe title displayed in the header of the widget container.Manage Payment Methods
addNewButtonstringThe label for the "Add New" button used to add a new entry.Add New
loadingTextstringThe caption displayed while the widget is in a loading state.Loading
tableHeaderColumnsarray or listThe table header labels for displaying card details in columns.['Card Holder', 'Card Number', 'Expiry', 'Action']

Styles

Prop NameDescription
widgetContainerThe main container or wrapper for the entire page widget.
widgetHeaderThe header of the widget, containing the "Manage Payment Methods" label and the "Add New" button.
widgetHeaderTitleThe title displayed in the widget header, typically labeled "Manage Payment Methods."
addNewButtonThe button labeled "Add New" for adding new entries.
loadingTextThe text or spinner displayed during loading states.
tableWrapperThe container or scrollable div that wraps the table.
tableHeaderRowThe row representing the header section of the table.
tableHeaderCellThe individual cells or columns within the table header.
tableBodyRowThe row representing the body section of the table.
tableBodyCellThe individual cells or columns within the table body.
editIconWrapperThe container for the edit icon.
editIconThe icon used to edit table entries.
deleteIconWrapperThe container for the delete icon.
deleteIconThe icon used to delete table entries.

Each property above must receive an object as the value. This value can contain style and cssClass keys:

KeyTypeDescription
styleobjectAn object containing valid CSS styles that will be applied to the HTML element.
cssClassstringA class name to be added to the HTML element, allowing for custom styling via CSS.

Example Usage

The image below shows what each available property affects:

Add Or Update Payment Method Page

Use the following properties to customize styles and labels, and also uiConfig for the add or update payment method page:

Labels

Prop NameTypeDescriptionDefault Value
widgetHeaderTitlestringThe title displayed in the widget header.Add/Update Payment Methods
mandatoryFieldsCaptionstringThe caption indicating mandatory fields in the form.* Marks Fields are mandatory
cardInformationHeaderLabelstringThe section header label for the "Card Information" section.Card Information
billingInformationHeaderLabelstringThe section header label for the "Billing Information" section.Billing Information
cardHolderNamestringThe label for the cardholder name input field.Card Holder Name
cardNumberstringThe label for the card number input field.Card Number
cardExpirationstringThe label for the card expiration dropdown field.Card Expiration
cvvstringThe label for the CVV input field.CVV
countrystringThe label for the country dropdown field.Country
address1stringThe label for the first address input field.Address 1
address2stringThe label for the second address input field.Address 2
citystringThe label for the city input field.City
statestringThe label for the state dropdown or input field.State
zipCodestringThe label for the zip code input field.Zip Code
updateButtonstringThe label for the update payment methods button.Update
addButtonstringThe label for the add payment methods button.Add Payment Method

Styles

Prop NameDescription
widgetContainerThe main page or widget container.
widgetHeaderThe widget header containing the "Manage Payment Methods" label and the back button.
backButtonThe button to navigate back to the previous screen.
widgetHeaderTitleThe caption for the "Manage Payment Methods" section.
mandatoryFieldsCaptionCaption indicating mandatory fields, with a default text color of crimson.
sectionHeaderSection headers for "Card Information" and "Billing Information".
labelLabels for form inputs, dropdowns, or radio buttons.
inputInput fields or textboxes in the form.
dropdownDropdown fields in the form.
updateButtonButton labeled "Update" for updating payment methods.
addButtonButton labeled "Add Payment Method" for adding new payment methods.

uiConfig

The uiConfig parameter allows you to add two boolean props to it:

Prop NameTypeDescriptionDefault Value
showCardImagebooleanControls the visibility of the card image. If true, the card image is visible. Set to false to hide it.true
showBillingInfobooleanControls the visibility of the billing information section. If true, the section is visible. Set to false to hide it.true

Example Usage

The image below shows what each available property affects:

Full Code Example

The code block below presents a complete example with all available parameters for the window.authorizePaymentConfig function:

Example
window.addPaymentMethodsConfig = {
customerReference: "123545745454",
merchantIdentifier: "ACVX458KJGJLAS7878DSADS",
labels: {
widgetHeaderTitle: "Add/Update Payment Methods",
mandatoryFieldsCaption: "* Marks Fields are mandatory",
cardInformationHeaderLabel: "Card Info",
billingInformationHeaderLabel: "Billing Info",
cardHolderName: "Holder Name",
cardNumber: "Number",
cardExpiration: "Expiry",
cvv: "CVV",
country: "Country",
state: "StRegonate",
address1: "Street",
address2: "Street 1",
city: "CITY",
zipCode: "Zip",
updateButton: "Update",
addButton: "Add Payment Method",
backButton: "Back"
},
styles: {
widgetContainer: {
style: {
padding: "20px",
backgroundColor: "#f9f9f9"
},
cssClass: "widget-container-class"
},

widgetHeader: {
style: {
display: "flex",
justifyContent: "space-between",
alignItems: "center",
paddingBottom: "10px",
borderBottom: "1px solid #ddd"
},
cssClass: "widget-header-class"
},
backButton: {
style: {
backgroundColor: "#e0e0e0",
border: "none",
padding: "8px 16px",
cursor: "pointer"
},
cssClass: "back-button-class"
},
input: {
style: {
border: "2px dashed cyan",
padding: "10px",
borderRadius: "4px"
},
cssClass: "input-class"
},
dropdown: {
style: {
padding: "10px",
borderRadius: "4px"
},
cssClass: "dropdown-class"
},
sectionHeader: {
style: {
color: "purple",
fontWeight: "bold",
marginTop: "20px",
marginBottom: "10px"
},
cssClass: "section-header-class"
},
label: {
style: {
display: "block",
marginBottom: "5px",
fontWeight: "600"
},
cssClass: "label-class"
},
payButton: {
style: {
backgroundColor: "#28a745",
color: "#fff",
border: "none",
padding: "10px 20px",
cursor: "pointer",
borderRadius: "4px"
},
cssClass: "pay-button-class"
},
updateButton: {
style: {
backgroundColor: "#007bff",
color: "#fff",
border: "none",
padding: "10px 20px",
cursor: "pointer",
borderRadius: "4px"
},
cssClass: "update-button-class"
},
addButton: {
style: {
backgroundColor: "#17a2b8",
color: "#fff",
border: "none",
padding: "10px 20px",
cursor: "pointer",
borderRadius: "4px"
},
cssClass: "add-button-class"
},
tableWrapper: {
style: {
overflowX: "auto",
marginTop: "20px"
},
cssClass: "table-wrapper-class"
},
tableHeaderRow: {
style: {
backgroundColor: "#f1f1f1"
},
cssClass: "table-header-row-class"
},
tableHeaderCell: {
style: {
padding: "10px",
textAlign: "left",
borderBottom: "1px solid #ddd"
},
cssClass: "table-header-cell-class"
},
tableBodyRow: {
style: {
borderBottom: "1px solid #ddd"
},
cssClass: "table-body-row-class"
},
tableBodyCell: {
style: {
padding: "10px",
textAlign: "left"
},
cssClass: "table-body-cell-class"
},
editIconWrapper: {
style: {
display: "inline-block",
cursor: "pointer"
},
cssClass: "edit-icon-wrapper-class"
},
editIcon: {
style: {
width: "16px",
height: "16px",
fill: "#007bff"
},
cssClass: "edit-icon-class"
},
deleteIconWrapper: {
style: {
display: "inline-block",
cursor: "pointer"
},
cssClass: "delete-icon-wrapper-class"
},
deleteIcon: {
style: {
width: "16px",
height: "16px",
fill: "#dc3545"
},
cssClass: "delete-icon-class"
}
},
uiConfig: {
showCardImage: true, // Default: true (Card image is visible)
showBillingInfo: true // Default: true (Billing information section is visible)
}
};