@crmcom/self-service-sdk 3.0.0-build.5 → 3.0.0-build.7
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/index.js +0 -1
- package/package.json +2 -2
- package/wallet.js +5 -0
- package/dataUtil.js +0 -2269
package/index.js
CHANGED
|
@@ -18,7 +18,6 @@ export { jcccards } from './jcccards.js';
|
|
|
18
18
|
export { mobilepass } from './mobilepass.js';
|
|
19
19
|
export { paymentgateway } from './paymentgateway.js';
|
|
20
20
|
export { payouts } from './payouts.js';
|
|
21
|
-
export { dataUtil } from './dataUtil.js';
|
|
22
21
|
export { ErrorCodes, createResult, createCommonResult } from './resultUtil.js';
|
|
23
22
|
export { eventListener, eventTypes } from './eventListener.js';
|
|
24
23
|
export { logger } from './logger.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crmcom/self-service-sdk",
|
|
3
|
-
"version": "3.0.0-build.
|
|
3
|
+
"version": "3.0.0-build.7",
|
|
4
4
|
"description": "Official CRM.COM Self-Service JavaScript SDK for consumer-facing API integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"./mobilepass": "./mobilepass.js",
|
|
28
28
|
"./paymentgateway": "./paymentgateway.js",
|
|
29
29
|
"./payouts": "./payouts.js",
|
|
30
|
-
"./dataUtil": "./dataUtil.js",
|
|
31
30
|
"./resultUtil": "./resultUtil.js",
|
|
32
31
|
"./eventListener": "./eventListener.js",
|
|
33
32
|
"./logger": "./logger.js"
|
|
@@ -35,6 +34,7 @@
|
|
|
35
34
|
"files": [
|
|
36
35
|
"*.js",
|
|
37
36
|
"*.d.ts",
|
|
37
|
+
"!dataUtil.js",
|
|
38
38
|
"!add_imports.ps1"
|
|
39
39
|
],
|
|
40
40
|
"keywords": [
|
package/wallet.js
CHANGED
|
@@ -24,18 +24,23 @@ export const wallet = {
|
|
|
24
24
|
|
|
25
25
|
async function getWallet(walletId) {
|
|
26
26
|
try {
|
|
27
|
+
console.log("walletId", walletId)
|
|
28
|
+
|
|
27
29
|
if (!walletId) {
|
|
28
30
|
walletId = await getWalletId();
|
|
29
31
|
}
|
|
32
|
+
console.log("walletId1", walletId)
|
|
30
33
|
|
|
31
34
|
let response = await httpUtil.get({
|
|
32
35
|
resourcePath: '/v2/wallets/' + walletId,
|
|
33
36
|
withAccessToken: true,
|
|
34
37
|
logOutIfSessionInvalid: false,
|
|
35
38
|
});
|
|
39
|
+
console.log("result", response)
|
|
36
40
|
//check return code here instead of put as there would be different intepretation for different API
|
|
37
41
|
return createCommonResult(response);
|
|
38
42
|
} catch (e) {
|
|
43
|
+
console.log("error", e)
|
|
39
44
|
logger.error('Exception getWallet:', e);
|
|
40
45
|
return createResult(ErrorCodes.UNKNOWN, e);
|
|
41
46
|
}
|