@paytomorrow/pt-transition-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

PayTomorrow Transition Plugin

Try MPE demo here http://transition-demo.paytomorrow.com

NPM Setup

Installation

Via npm:

npm install @paytomorrow/pt-transition

Usage

Import the module:

import { 
  addTransitionIframe,
  openTransitionIframe
} from "@paytomorrow/pt-transition";

addTransitionIframe("your_paytomorrow_public_id");

function onPrimaryFinanceRejection() {
  openTransitionIframe();
}

HTML tag setup

Installation

Copy and paste this on your website:

<!-- Paste in body tag  -->
<script type="text/javascript" src="https://cdn.paytomorrow.com/plugins/transition-plugin/pt-transition.min.js"></script>

Usage

<script>
ptTransition.addTransitionIframe("your_paytomorrow_public_id");

function onPrimeFinanceRejection() {
  ptTransition.openTransitionIframe();
}

document.addEventListener("pt-confirmation", function () {
  createPayTomorrowApplication();
});
document.addEventListener("pt-close", function () {
  redirectToCartPage();
});

</script>

PayTomorrow Transition API

Public Methods

addTransitionIframe(publicId: string): void;

Appends PayTomorrow's Transition iframe to the bottom of your page and is hidden by default.

openTransitionIframe(): void;

Displays PayTomorrow's Transition iframe.

Events

"pt-confirmation"

Event triggered when consumer clicks the confirm button in the iframe.

"pt-close"

Event triggered when consumer clicks the close button in the iframe.

Readme

Keywords

none

Package Sidebar

Install

npm i @paytomorrow/pt-transition-plugin

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

44.2 kB

Total Files

33

Last publish

Collaborators

  • abenti
  • ddomingo
  • ededdah