splitit-flex-fields

Splitit.Web.FlexFields

General description

Flexfields is a product that enables a merchant to have a payment related fields inside its page, while each field is in an iframe lolcated on Splitit's domain, and therefoere enables PCI compliance.

How to use

You may run it locally by first building the project, by running ``npm run build:local-dev-env`, and then, open the emample page, on any live server.

How to build

To build the project, run npm run build. This will create a dist folder, with the following folders:

  • dist/{environment} - contains the files that should be uploaded to the server, and are used by the merchant.

  • Environments are local, beta, sandbox, automation and prod.

Enviromnemt variables:

  • __URL__ - the source URL of the iframes.
  • __ENV__ - the environment of the iframes. Can be local, beta, sandbox, automation and prod.
  • __DATA_TRACKING_ENDPOINT__ - the endpoint to send the data to.
  • __GA_UA_ID__ - the Google Analytics UA ID.
  • __VERSINO__ - the version of the project.
  • __MAJOR_VERSION__ - the major version of the project.
  • __TRANSLATION_URL__ - the URL of the translation API.
  • __API_URL__ - the URL of the API.

How to test

run npm test

Tech stack

  • Typescript
  • Webpack (for bundling, remcommend using another bundler)
  • Jest (for testing)

Generated using TypeDoc