Module: FLEX
Flex(captureContext)
new Flex(captureContext)
For detailed setup instructions, see Getting Started.
Parameters:
Name | Type | Description |
---|---|---|
captureContext | String | JWT string that you requested via a
server-side authenticated call before starting the checkout flow. |
Example
Basic Setup
script src="https://flex.cybersource.com/cybersource/assets/microform/0.11/flex-microform.min.js"></script> <script> var flex = new Flex('header.payload.signature'); </script>
Methods
microform(optionsopt) > {Microform}
This method is the main setup function used to initialize
Microform Integration
. Upon
successful setup, the callback receives a microform
, which is used to
interact with the service and build your integration. For details, see Class: Microform.Name | Type | Description |
---|---|---|
options | Object |
Name | Type | Attributes | Description |
---|---|---|---|
styles | Object | <optional> | Apply custom styling to all the fields in
your integration. |
Returns:
Type: Microform
Examples
Minimal Setup
var flex = new Flex('header.payload.signature'); var microform = flex.microform();
Custom Styling
var flex = new Flex('header.payload.signature'); var microform = flex.microform({ styles: { input: { color: '#212529', 'font-size': '20px' } } });