hexopay-cashier

1.0.1 • Public • Published

hexopay-cashier

NPM package for easy integration to Hexopay Cashier

Usage:

npm install hexopay-cashier
import { HexopayCashier } from 'hexopay-cashier'

const hexopayCashier        = new HexopayCashier('<Hexopay Cashier host>')
const transactionDataHash   = { transactionDataToken: '<token from /checkout response>' }
const hexopayCashierElement = document.getElementById('<parent element for hosted card fields>')

hexopayCashier.initialize(hexopayCashierElement, transactionDataHash)
const transactionDataToken = transactionDataHash['transactionDataToken']

Development

Setup:

npm install

Test:

npm test

E2E Tests:

E2E tests are run against staging. Sometimes they might fail cause staging is slow to response.

Please treat them as a way to check your new implementation or bug fix. I do suggest to run playwright with --ui flag to see what has failed. (Mostly it fails waiting for a validation error to appear and it does not due to slow response).

Setting up the tests

npx playwright install

Running the tests

npx playwright test

You can specify specific flags while running playwright:

  • project flag let's you specify which browser to use
--project=chromium
  • ui flag runs the tests with ui interface, so you can see each line executed and state of the app
--ui
  • debug flag runs the tests in debug mode
--debug

Publish:

Currently it's published manually from local repo

To do:

Add automated publish job for github repo

Readme

Keywords

Package Sidebar

Install

npm i hexopay-cashier

Weekly Downloads

182

Version

1.0.1

License

ISC

Unpacked Size

199 kB

Total Files

27

Last publish

Collaborators

  • p.aleksandrowicz
  • stephennpmooney!1
  • gudel98
  • hexopay-admin