npm

@tap-payments/checkout-v2
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

GoSell Checkout SDK

Development Section

Installation

  • run git clone https://github.com/Tap-Payments/goSell-CheckoutSDK.git
  • run cd {{project dir}}
  • run yarn install || npm install
  • run yarn husky:install || npm run husky:install

Scripts || Command options

  • run yarn prettier:fix || npm run prettier:fix To fix all formatting/styling issues
  • run yarn prettier || npm run prettier To find all formatting/style issues
  • run yarn lint || npm run lint To find all eslint/linting issues
  • run yarn lint:fix || npm run lint:fix To fix all eslint/linting issues
  • run yarn test || npm run test To run all test cases
  • run yarn build:npm || npm run build:npm To compile source code from typescript to javascript
  • run yarn build:vanilla || npm run build:vanilla When we need to create a vanilla build
  • run yarn dev || npm run dev To start the project in development mode (http://localhost:3000)
  • run yarn start || npm run start To start the project in production mode (https://domain.name) after doing yarn build

Attribute table

Name Description Type Required Structure Example
amount This should containe the total amount/price of the purchase number True - amount={100}
Currency This should contain the currency code prefered string True - currency="KWD"
Metadata This should contain the items purchased and (tax/shipment) if any object True - metaData={{ items: {amount: 100,currency: 'SAR',name: 'Item 1',quantity: 1,}]}}

Metadata table

Metadata consists of 3 object attributes ([items], [taxes], shipping)

Items attribute

Name Description Type Required Structure
amount This should containe the amount/price of the purchased item number True -
Currency This should contain the currency code prefered string True -
name This should contain the name of the item string True -
quantity This should contain the quantity of the purchased item number True -
description This should contain description of the purchased item string False -
image This should contain an image URL of the purchased item string False -
discount This should contain item discount object False { type: string, value: number}

Taxes attribute

Name Description Type Required Structure
name This should contain the name of the tax string True -
rate This should contain the rate of the tax, tax.type is either 'F' for fixed amount or 'P' for percentage object True { type: string, value: number}
description This should contain description of the tax string False -

Shipping attribute

Name Description Type Required Structure
amount This should containe the amount/price for shipment number True -
Currency This should contain the currency code for the shipment cost string True -
providor This should contain the shipiment providor string True -
service This should contain the shipiment service string True -
description This should contain description of the shipment string False -

Package Sidebar

Install

npm i @tap-payments/checkout-v2

Weekly Downloads

70

Version

1.0.11

License

MIT

Unpacked Size

770 kB

Total Files

386

Last publish

Collaborators

  • sherifashraftap
  • mostafaabobakr.tap
  • i.mousa
  • mahmoudallam
  • aya_tap
  • mud_fahmi
  • ahmedkaram-tap
  • haitham-tap
  • muhammadazhar007
  • elsharkawy
  • waqast
  • hala.q
  • reham_alsabbagh
  • kalpanatap
  • sadbarkhattak