testing-terminal-pos

1.0.43 • Public • Published

Terminal

Browser Support

Chrome Edge Opera
Latest ✔ Latest ✔ Latest ✔

Installation

Using npm:

$ npm install terminal-gateway

Using yarn:

$ yarn add terminal-gateway

Congfiguration

Key Type Default Description
key String provide by ABA
timeout Number 60000 in milliseconds The Terminal's expiration time
onSuccess Function The callback function will respond with two parameters
onError Function The callback function will respond with two parameters

Initiation

  import Terminal from 'terminal-gateway'
  
  const terminal = new Terminal({
    key: '',
    timeout: 50000, 
    onSuccess: () => {}
    onError: () => {}
  });

Sale transaction

onSale(): This method allows you to do sale transactions. user needs to call this function to get the result failed or successful. It is required four parameters:

Parameter name Data type Require Default Description
amount String Yes 0 amount define transaction
type String Yes SHOWQR SHOWQR: sale by screen QR codeEDC: sale by card
invoice String Yes The invoice number must be unique. Example: INV0011620291635

``` javascript terminal.onSale({amount: '0.01', type: 'SHOWQR', currency: 'USD', invoice: 'INV0011620291635'}); ``` ## Enquiry transaction __onEnquiry():__ This method allows you to receive the response back with the result status of the transaction whether it's successful or failed. It is required a parameter:
Parameter name Data type Require Default Description
invoice String Yes The invoice number must be unique. example: INV0011620291635

terminal.onEnquiry({invoice: 'INV0011620291635'});

Void transaction

onVoid(): This method allows you to void the transaction. It is required a parameter:

Parameter name Data type Require Default Description
traceId String Yes trace number of sale transaction response

Cancelation transaction

onCancel(): This method allows the cancellation of the sale of the transaction.

terminal.onCancel()

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.431latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.431
1.0.420
1.0.410
1.0.400
1.0.370
1.0.350
1.0.340
1.0.330
1.0.320
1.0.300
1.0.290
1.0.280
1.0.270
1.0.260
1.0.250
1.0.240
1.0.230
1.0.220
1.0.210
1.0.200
1.0.180
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i testing-terminal-pos

Weekly Downloads

1

Version

1.0.43

License

ISC

Unpacked Size

14.6 kB

Total Files

4

Last publish

Collaborators

  • bundara-reuk