quickpos 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/papara.js +3 -2
- package/package.json +1 -1
package/lib/papara.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
const axios = require('axios');
|
|
2
2
|
|
|
3
3
|
class PaparaClient {
|
|
4
|
-
constructor(config
|
|
4
|
+
constructor(config) {
|
|
5
5
|
const requiredFields = ['apiKey', 'merchantSecretKey'];
|
|
6
6
|
for (let field of requiredFields) {
|
|
7
7
|
if (!config[field]) throw new Error(`Missing required field: ${field}`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
this.URL =
|
|
10
|
+
this.URL = config?.test ? 'https://merchant-api.test.papara.com' : 'https://merchant.papara.com';
|
|
11
|
+
console.log(this.URL);
|
|
11
12
|
this.merchantSecretKey = config.merchantSecretKey;
|
|
12
13
|
this.client = axios.create({
|
|
13
14
|
baseURL: this.URL,
|