Skip to content

Commit fcc5ec5

Browse files
committed
initial commit
0 parents  commit fcc5ec5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6391
-0
lines changed

.babelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
],
5+
"plugins": [
6+
"@babel/plugin-syntax-dynamic-import",
7+
"@babel/plugin-syntax-import-meta",
8+
"@babel/plugin-proposal-class-properties",
9+
"@babel/plugin-proposal-json-strings",
10+
[
11+
"@babel/plugin-proposal-decorators",
12+
{
13+
"legacy": true
14+
}
15+
],
16+
"@babel/plugin-proposal-function-sent",
17+
"@babel/plugin-proposal-export-namespace-from",
18+
"@babel/plugin-proposal-numeric-separator",
19+
"@babel/plugin-proposal-throw-expressions",
20+
"@babel/plugin-proposal-export-default-from",
21+
"@babel/plugin-proposal-logical-assignment-operators",
22+
"@babel/plugin-proposal-optional-chaining",
23+
[
24+
"@babel/plugin-proposal-pipeline-operator",
25+
{
26+
"proposal": "minimal"
27+
}
28+
],
29+
"@babel/plugin-proposal-nullish-coalescing-operator",
30+
"@babel/plugin-proposal-do-expressions",
31+
"@babel/plugin-proposal-function-bind"
32+
]
33+
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# misc
2+
.DS_STORE
3+
4+
# nodes
5+
node_modules/
6+
package-lock.json

README.MD

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Payment library #
2+
3+
## Installing ##
4+
5+
## npm ##
6+
7+
```bash
8+
npm install git+ssh://[email protected]/CHIPAsia/chip-nodejs-sdk.git#v1.0.0
9+
```
10+
11+
## Getting Started ##
12+
13+
Simple usage looks like:
14+
15+
16+
```javascript
17+
var PublicRestApi = require('Chip').default;
18+
19+
PublicRestApi.ApiClient.instance.basePath = "https://gate.chip-in.asia/api/v1/";
20+
PublicRestApi.ApiClient.instance.token = "TOKEN"
21+
22+
let apiInstance = new PublicRestApi.PaymentApi();
23+
let brandId = "BRAND_ID";
24+
let callback = (error, data, response) => {
25+
if (error) {
26+
console.log('API call failed. Error:');
27+
console.error(error);
28+
} else {
29+
console.log('API called successfully. Returned data:');
30+
console.log(data);
31+
}
32+
}
33+
34+
apiInstance.paymentMethods(brandId, "EUR", {}, callback);
35+
```
36+
37+
## Examples ##
38+
39+
See `example.js` for more examples
40+
41+
## Testing ##
42+
43+
```bash
44+
npm run test
45+
```

0 commit comments

Comments
 (0)