Skip to content

lyra/embedded-form-examples

Repository files navigation

github-status-action status

Embedded Form Examples

This is a repository of all the different kinds of integrations that can be done using Lyra's JavaScript library.

Examples

  • custom/errors/errorsByField: When there is an error on a specific field, displays the error on an element behind it.
  • [custom/customFields][custom/customFields]: How to add an additional checkbox with the form styles and make it mandatory

Installation

The examples included are fully functional, in order to run them, just execute the following:

Add your API Keys

Add your server API Keys and endpoints in:

  • in server/createPayment.js line 4
  • in server/index.js line 36

And Client API Keys and enpoints in:

  • examples/custom/errors/errorsByField/form.js lines 3 to 5 and/or in
  • examples/custom/customFields/form.js lines 3 to 5

Build

npm install
npm run build

API Server

The payment application needs an API to generate the test payment tokens. It can be set it up with:

npm run server

Static Server

To serve the examples, set up the static server with:

npm run e2e:server

After that you can access to the example path:

Tests

To run the included e2e tests:

npm run test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors