npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lyracom/react-embedded-form-dev

v0.0.2

Published

[![Build Status](https://travis-ci.org/PureBilling/react-embedded-form.svg?branch=develop)](https://travis-ci.org/PureBilling/react-embedded-form) [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/PureB

Downloads

6

Readme

React Embedded Form

Build Status GitHub license

Installation

Add the next package to your library:

With Yarn

yarn add package-name

With NPM

npm install --save package-name

Usage

You can add a form to any React application as follows:

// Import the library
import { LyraForm, setGlobalOptions } from 'package-name'

// define component setup options
const setup = {
    'kr-client-domain': 'https://api.payzen.eu',
    'kr-theme': 'classic',
    'kr-public-key': '69876357:testpublickey_DEMOPUBLICKEY95me92597fd28tGD4r5'
};

setGlobalOptions(setup);

Now, you can add the component to your application:

<LyraForm
    kr-form-token='YOUR_TOKEN'
    kr-post-url-success='/success'
    kr-post-url-refused='/refused'
    kr-language='en-EN'
    kr-placeholder-pan='Pan'
    kr-placeholder-expiry='Expiry'
    kr-placeholder-security-code='Security Code'
    kr-hide-debug-toolbar='true'
    kr-clear-on-error='false'
/>

Examples

Example | Description ------------------------------------ | --------------------------------------------------- minimal | a minimal example pre-loaded | pre-load the payment form to get it as fast as possible

You can run these examples from 'minimal' folder or 'pre-loaded'

Go to the certain folder (e.g. minimal) and execute npm or yarn command

npm install
npm run start
yarn install
yarn start

Parameters

The allowed configuration parameters are:

Parameter | Description | Setup | Template | Runtime | -------------------------------------|--------------------------------------------------------------|:--------:|:---------:|:--------:| kr-client-domain | Sets the endpoint of the library | ✓ | ❌ | ❌ | kr-public-key | Public key used for the payment | ✓ | ❌ | ❌ | kr-theme | Sets one of two themes | ✓ | ❌ | ❌ | kr-form-token | Sets form token | ✓ | ✓ | ✓ | kr-language | Language used on the payment form | ✓ | ✓ | ✓ | kr-post-url-success | The URL to POST on successfull payment | ✓ | ✓ | ✓ | kr-post-url-refused | The URL to POST on failed payment | ✓ | ✓ | ✓ | kr-clear-on-error | Disable the security code cleaning after a failed payment | ✓ | ✓ | ✓ | kr-hide-debug-toolbar | Disables the toolbar (only visible for test public keys) | ✓ | ✓ | ✓ | kr-placeholder-expiry | Changes the default placeholder of the expiry field | ✓ | ✓ | ✓ | kr-placeholder-pan | Changes the default placeholder of the pan field | ✓ | ✓ | ✓ | kr-placeholder-security-code | Changes the default placeholder of the security code field | ✓ | ✓ | ✓ |

Setup parameters

All the Parameters are configurable on the setup step adding the value on the corresponding key as the next example:

// Import the library
import { LyraForm, setGlobalOptions } from 'package-name'

// Configure your endpoint of payment
const setup = {
    'kr-client-domain': 'https://api.payzen.eu',
    'kr-post-url-success': '/post-result',
    'kr-public-key': '69876357:testpublickey_DEMOPUBLICKEY95me92597fd28tGD4r5',
    'kr-theme': 'classic',
    (...)
};
setGlobalOptions(setup);

Template parameters

All the Parameters (except kr-client-domain, kr-public-key and kr-theme) enabled for templates are configurable on the template step adding the value on the corresponding property on the LyraForm component as the next example:

<LyraForm
    kr-placeholder-pan="My pan!"
    kr-hide-debug-toolbar="true"
    kr-post-url-success="/my-post"
    ...
/>

Runtime parameters

All the Parameters (except kr-client-domain, kr-public-key and kr-theme) enabled for runtime are configurable on the runtime calling the next KR setFormConfig library method:

window.KR.setFormConfig({
    'kr-post-url-success': '/my-post',
    'kr-placeholder-expiry': 'My expiration date',
});

Themes

The theme property can be configured only on the setup object argument of the LyraForm plugin. Available themes are:

  • classic
  • material

If no theme is configured, no CSS will be applied to the final form.