paymentiq-cashier-bootstrapper
TypeScript icon, indicating that this package has built-in type declarations

1.3.25 • Public • Published

PaymentIQ-Cashier-V2-Integration

This is a bootstrapper for the PaymentIQ Cashier.

Setup

Basic setup

import _PaymentIQCashier from 'paymentiq-cashier-bootstrapper'

new _PaymentIQCashier('#cashier',
  {
    merchantId: '1337',
    userId: 'Han Solo',
    sessionId: '66',
    environment: 'test', // if not set, defaults to production
    method: 'deposit' // if not set, defaults to deposit
  },
  (api) => {
     console.log('Cashier intialized and ready to take down the empire')

     // register a few callbacks
     api.on({
      cashierInitLoad: () => console.log('The cashier successfully loaded and is ready'),
      success: data => console.log('Successful transaction completed', data)
     })
  }
)

Typescript setup

import _PaymentIQCashier, { IPiqCashierConfig, IPiqCashierApiMethods } from 'paymentiq-cashier-bootstrapper'

const config: IPiqCashierConfig = {
  merchantId: '1337',
  userId: 'Han Solo',
  sessionId: '66',
  environment: 'test',
  method: 'deposit'
}

new _PaymentIQCashier('#cashier',
  config,
  (api: IPiqCashierApiMethods) => {
     
     console.log('Cashier intialized and ready to take down the empire')

     // register a few callbacks
     api.on({
      cashierInitLoad: () => console.log('The cashier successfully loaded and is ready'),
      success: data => console.log('Successful transaction completed', data)
     })

  }
)

Reset cashier

You can reset the cashier, effectively removing the iframe showing the application.

window._PaymentIQCashierReset()

You can read more in depths setup guides and FAQ's on our document portal.

Package Sidebar

Install

npm i paymentiq-cashier-bootstrapper

Weekly Downloads

10,564

Version

1.3.25

License

ISC

Unpacked Size

72 kB

Total Files

6

Last publish

Collaborators

  • devcodepayment