You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.MD
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,21 @@
1
-
# Payment library #
1
+
# Chip NodeJS library
2
2
3
-
## Installing ##
3
+
## Prerequisite
4
+
Before you start, make sure you already have created `Brand ID` and `API Key` from your developer dashboard by logging-in into [merchant portal](https://gate.chip-in.asia/login).
*`yarn` or `npm` to run scripts/install dependencies
16
+
17
+
## Prerequisite
18
+
You will need to replace the value on file [config.js](./config.js) with the configuration on your Developer section by logging-in to Merchant Portal with your account.
19
+
20
+
```javascript
21
+
// config.js
22
+
constconfig= {
23
+
brandId:'<<BRAND_ID>>',
24
+
apiKey:'<<API_KEY>>',
25
+
endpoint:'https://gate.chip-in.asia/api/v1',
26
+
basedUrl:'<<DOMAIN_URL>>',
27
+
webhookPublicKey:'<<WEBHOOK_PUBLIC_KEY>>'
28
+
}
29
+
30
+
module.exports= config
31
+
```
32
+
33
+
**BRAND_ID**
34
+
35
+
Obtain your BRAND_ID from Developer section.
36
+
37
+
---
38
+
**API_KEY**
39
+
40
+
Obtain your API_KEY from Developer section.
41
+
42
+
---
43
+
44
+
**WEBHOOK_PUBLIC_KEY**
45
+
46
+
Obtain your `WEBHOOK_PUBLIC_KEY` from Developer section. You can register the URL from [API](https://developer.chip-in.asia/api) or from Merchant Portal on Developer section.
47
+
48
+
---
49
+
50
+
**DOMAIN_URL**
51
+
52
+
It is your domain URL
53
+
54
+
## Run Example
55
+
1. Install dependencies:
56
+
```bash
57
+
npm i
58
+
59
+
# OR
60
+
61
+
yarn
62
+
```
63
+
64
+
2. Run application locally:
65
+
```bash
66
+
node run start
67
+
68
+
# OR
69
+
70
+
yarn start
71
+
```
72
+
73
+
and visit [localhost:7001](http://localhost:7001) on your browser.
74
+
To test `/api/callback` & `/api/webhook` to be called from our server, make sure it is connected to internet (exposed to outside).
75
+
76
+
We recommend to use [ngrok](https://ngrok.com/) if you want to run locally for debugging. Then You can replace `DOMAIN_URL` with generated URL by `ngrok`.
77
+
78
+
`NB: Use it at your own risk. Make sure do not expose your critical port.`
0 commit comments