zmp-sdk 2.19.0-rc.3 → 2.19.0-rc.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/dist/browser.min.js +41 -25
- package/dist/index.es.js +41 -25
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/services/mock-mp-service.d.ts +2 -2
- package/dist/types/src/services/window.d.ts +1 -1
- package/dist/types/src/services/zalo.d.ts +1 -1
- package/dist/types/src/types/callbackData.d.ts +2 -2
- package/dist/types/src/types/enum.d.ts +2 -4
- package/dist/types/src/types/inputData.d.ts +7 -5
- package/dist/types/src/types/interface.d.ts +2 -2
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -2306,7 +2306,7 @@
|
|
|
2306
2306
|
ShareSheetType[ShareSheetType["video"] = 12] = "video";
|
|
2307
2307
|
ShareSheetType[ShareSheetType["link"] = 4] = "link";
|
|
2308
2308
|
ShareSheetType[ShareSheetType["oa"] = 5] = "oa";
|
|
2309
|
-
ShareSheetType[ShareSheetType["zmp"] =
|
|
2309
|
+
ShareSheetType[ShareSheetType["zmp"] = 20] = "zmp";
|
|
2310
2310
|
})(ShareSheetType || (ShareSheetType = {}));
|
|
2311
2311
|
var OrientationType;
|
|
2312
2312
|
(function (OrientationType) {
|
|
@@ -2338,8 +2338,6 @@
|
|
|
2338
2338
|
MediaPickerType[MediaPickerType["photo"] = 4] = "photo";
|
|
2339
2339
|
MediaPickerType[MediaPickerType["video"] = 5] = "video";
|
|
2340
2340
|
MediaPickerType[MediaPickerType["file"] = 6] = "file";
|
|
2341
|
-
MediaPickerType[MediaPickerType["multi_photo"] = 7] = "multi_photo";
|
|
2342
|
-
MediaPickerType[MediaPickerType["multi_video"] = 8] = "multi_video";
|
|
2343
2341
|
})(MediaPickerType || (MediaPickerType = {}));
|
|
2344
2342
|
|
|
2345
2343
|
const readCookie = (name) => {
|
|
@@ -2431,7 +2429,6 @@
|
|
|
2431
2429
|
'4G': isAndroid ? 13 : 2
|
|
2432
2430
|
});
|
|
2433
2431
|
const MEDIA_PICKER_LIMIT = 1 * MB;
|
|
2434
|
-
const MEDIA_PICKER_UPLOAD_SERVER = 'https://zapi-server.tungnt.xyz/upload/photos';
|
|
2435
2432
|
const ACTION = {
|
|
2436
2433
|
GET_DOWNLOADED_STICKER: {
|
|
2437
2434
|
name: 'action.get.downloaded.sticker',
|
|
@@ -2750,7 +2747,7 @@
|
|
|
2750
2747
|
},
|
|
2751
2748
|
PICK_MEDIA: {
|
|
2752
2749
|
name: 'action.pick.media',
|
|
2753
|
-
version_live: { iOS:
|
|
2750
|
+
version_live: { iOS: 440 }
|
|
2754
2751
|
},
|
|
2755
2752
|
MP_CLOSE_LOADINGVIEW: {
|
|
2756
2753
|
name: 'action.mp.close.loadingview'
|
|
@@ -2883,6 +2880,7 @@
|
|
|
2883
2880
|
const PAYMENT_APIS = {
|
|
2884
2881
|
CREATE_ORDER: 'https://payment-mini.zalo.me/api/order/create',
|
|
2885
2882
|
GET_TRANSACTION: 'https://payment-mini.zalo.me/api/transaction',
|
|
2883
|
+
GET_ORDER_STATUS: 'https://payment-mini.zalo.me/api/transaction/get-status'
|
|
2886
2884
|
};
|
|
2887
2885
|
const PAYMENT_H5_URL = 'https://payment-mini.zalo.me';
|
|
2888
2886
|
|
|
@@ -4235,7 +4233,7 @@
|
|
|
4235
4233
|
}
|
|
4236
4234
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4237
4235
|
|
|
4238
|
-
var version = "2.19.0-rc.
|
|
4236
|
+
var version = "2.19.0-rc.6";
|
|
4239
4237
|
|
|
4240
4238
|
class Basics {
|
|
4241
4239
|
/**
|
|
@@ -5738,10 +5736,10 @@
|
|
|
5738
5736
|
* @category Window
|
|
5739
5737
|
*
|
|
5740
5738
|
*/
|
|
5741
|
-
static openWebview(
|
|
5739
|
+
static openWebview(url) {
|
|
5742
5740
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5743
5741
|
yield this.callNative(ACTION.OPEN_INAPP, {
|
|
5744
|
-
url:
|
|
5742
|
+
url: url
|
|
5745
5743
|
});
|
|
5746
5744
|
});
|
|
5747
5745
|
}
|
|
@@ -6189,12 +6187,12 @@
|
|
|
6189
6187
|
* @category Zalo
|
|
6190
6188
|
*
|
|
6191
6189
|
*/
|
|
6192
|
-
static openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6190
|
+
static openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6193
6191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6194
6192
|
const uploadSetting = {
|
|
6195
6193
|
type: 0,
|
|
6196
|
-
url:
|
|
6197
|
-
maxSize: MEDIA_PICKER_LIMIT
|
|
6194
|
+
url: serverUpload,
|
|
6195
|
+
maxSize: maxItemSize || MEDIA_PICKER_LIMIT
|
|
6198
6196
|
};
|
|
6199
6197
|
const defaultEditView = {
|
|
6200
6198
|
enable: 1,
|
|
@@ -6827,8 +6825,8 @@
|
|
|
6827
6825
|
this.vibrate = () => {
|
|
6828
6826
|
return Promise.resolve();
|
|
6829
6827
|
};
|
|
6830
|
-
this.openWebview = (
|
|
6831
|
-
location.replace(
|
|
6828
|
+
this.openWebview = (url) => {
|
|
6829
|
+
location.replace(url);
|
|
6832
6830
|
return Promise.resolve();
|
|
6833
6831
|
};
|
|
6834
6832
|
this.getRouteParams = Routing.getRouteParams;
|
|
@@ -6885,7 +6883,7 @@
|
|
|
6885
6883
|
removeAllListeners(event) {
|
|
6886
6884
|
throw new Error('Method not implemented.');
|
|
6887
6885
|
}
|
|
6888
|
-
openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6886
|
+
openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6889
6887
|
console.warn('This api only works on zalo app');
|
|
6890
6888
|
return Promise.resolve({
|
|
6891
6889
|
urls: []
|
|
@@ -7342,7 +7340,12 @@
|
|
|
7342
7340
|
}
|
|
7343
7341
|
openWebview(object) {
|
|
7344
7342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7345
|
-
|
|
7343
|
+
const url = new URL(object.url);
|
|
7344
|
+
const typeInapp = url.searchParams.get("typeInapp");
|
|
7345
|
+
if (_.isEmpty(typeInapp)) {
|
|
7346
|
+
url.searchParams.set("typeInapp", "1");
|
|
7347
|
+
}
|
|
7348
|
+
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|
|
7346
7349
|
});
|
|
7347
7350
|
}
|
|
7348
7351
|
getRouteParams() {
|
|
@@ -7453,7 +7456,7 @@
|
|
|
7453
7456
|
editView.aspect_ratio = (_c = object.editView) === null || _c === void 0 ? void 0 : _c.aspectRatio;
|
|
7454
7457
|
const silentRequest = object.silentRequest === true ? 1 : 0;
|
|
7455
7458
|
const maxSelectItem = object.maxSelectItem;
|
|
7456
|
-
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, editView, silentRequest, maxSelectItem);
|
|
7459
|
+
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, object.serverUploadUrl, object.maxItemSize, editView, silentRequest, maxSelectItem);
|
|
7457
7460
|
});
|
|
7458
7461
|
}
|
|
7459
7462
|
getShareableLink(object) {
|
|
@@ -7813,7 +7816,7 @@
|
|
|
7813
7816
|
handleError,
|
|
7814
7817
|
validate,
|
|
7815
7818
|
__param(0, checkType('object', {
|
|
7816
|
-
url: checkData('
|
|
7819
|
+
url: checkData('url')
|
|
7817
7820
|
}))
|
|
7818
7821
|
], SDKCreator.prototype, "openWebview", null);
|
|
7819
7822
|
__decorate([
|
|
@@ -7857,6 +7860,8 @@
|
|
|
7857
7860
|
type: checkData('string', {
|
|
7858
7861
|
values: ['photo', 'video', 'file', 'multi_photo', 'multi_video']
|
|
7859
7862
|
}),
|
|
7863
|
+
'serverUploadUrl': checkData('url'),
|
|
7864
|
+
'maxItemSize?': checkData('number', { min: 0 }),
|
|
7860
7865
|
'editView?': checkData('object'),
|
|
7861
7866
|
'editView.enable?': checkData('boolean'),
|
|
7862
7867
|
'editView.aspectRatio?': checkData('string', { regex: /^\d+:\d+$/ }),
|
|
@@ -8000,13 +8005,24 @@
|
|
|
8000
8005
|
const appTransID = queryString.getParameterByName("appTransID", inputData) || queryString.getParameterByName("apptransid", inputData);
|
|
8001
8006
|
id = orderId || appTransID;
|
|
8002
8007
|
}
|
|
8008
|
+
const getConfig = {
|
|
8009
|
+
headers: {
|
|
8010
|
+
'authorization': `Bearer `
|
|
8011
|
+
}
|
|
8012
|
+
};
|
|
8013
|
+
const accessToken = yield sdk.getAccessToken({
|
|
8014
|
+
fail: (error) => {
|
|
8015
|
+
throw apiResponse.error.loginRequired;
|
|
8016
|
+
}
|
|
8017
|
+
});
|
|
8018
|
+
getConfig.headers.authorization = `Bearer ${accessToken}`;
|
|
8003
8019
|
const url = new URL(PAYMENT_APIS.GET_TRANSACTION);
|
|
8004
8020
|
const params = {
|
|
8005
8021
|
transId: id || "",
|
|
8006
8022
|
appId: __classPrivateFieldGet(this, _PaymentService_appId, "f")
|
|
8007
8023
|
};
|
|
8008
8024
|
url.search = new URLSearchParams(params).toString();
|
|
8009
|
-
const res = yield fetch(url.toString());
|
|
8025
|
+
const res = yield fetch(url.toString(), getConfig);
|
|
8010
8026
|
const resData = yield res.json();
|
|
8011
8027
|
if (!resData.data || resData.err !== 0) {
|
|
8012
8028
|
throw apiResponse.error.badRequest(resData.msg);
|
|
@@ -8014,11 +8030,11 @@
|
|
|
8014
8030
|
const data = resData.data || {};
|
|
8015
8031
|
const transaction = {
|
|
8016
8032
|
msg: data.resultMessage,
|
|
8017
|
-
appId: data.appId,
|
|
8018
8033
|
orderId: data.orderId,
|
|
8019
8034
|
resultCode: data.resultCode,
|
|
8020
8035
|
transTime: data.transTime,
|
|
8021
|
-
createdAt: data.createAt
|
|
8036
|
+
createdAt: data.createAt,
|
|
8037
|
+
transId: data.transId
|
|
8022
8038
|
};
|
|
8023
8039
|
return transaction;
|
|
8024
8040
|
}
|
|
@@ -8048,12 +8064,12 @@
|
|
|
8048
8064
|
;
|
|
8049
8065
|
checkTransaction(sdk, object) {
|
|
8050
8066
|
const result = {
|
|
8051
|
-
msg: '',
|
|
8052
|
-
appId: '',
|
|
8067
|
+
msg: 'Success',
|
|
8053
8068
|
orderId: '',
|
|
8054
|
-
resultCode:
|
|
8055
|
-
transTime:
|
|
8056
|
-
createdAt:
|
|
8069
|
+
resultCode: 1,
|
|
8070
|
+
transTime: new Date().getTime().toString(),
|
|
8071
|
+
createdAt: new Date().getTime().toString(),
|
|
8072
|
+
transId: ''
|
|
8057
8073
|
};
|
|
8058
8074
|
return Promise.resolve(result);
|
|
8059
8075
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -2135,7 +2135,7 @@ var ShareSheetType;
|
|
|
2135
2135
|
ShareSheetType[ShareSheetType["video"] = 12] = "video";
|
|
2136
2136
|
ShareSheetType[ShareSheetType["link"] = 4] = "link";
|
|
2137
2137
|
ShareSheetType[ShareSheetType["oa"] = 5] = "oa";
|
|
2138
|
-
ShareSheetType[ShareSheetType["zmp"] =
|
|
2138
|
+
ShareSheetType[ShareSheetType["zmp"] = 20] = "zmp";
|
|
2139
2139
|
})(ShareSheetType || (ShareSheetType = {}));
|
|
2140
2140
|
var OrientationType;
|
|
2141
2141
|
(function (OrientationType) {
|
|
@@ -2167,8 +2167,6 @@ var MediaPickerType;
|
|
|
2167
2167
|
MediaPickerType[MediaPickerType["photo"] = 4] = "photo";
|
|
2168
2168
|
MediaPickerType[MediaPickerType["video"] = 5] = "video";
|
|
2169
2169
|
MediaPickerType[MediaPickerType["file"] = 6] = "file";
|
|
2170
|
-
MediaPickerType[MediaPickerType["multi_photo"] = 7] = "multi_photo";
|
|
2171
|
-
MediaPickerType[MediaPickerType["multi_video"] = 8] = "multi_video";
|
|
2172
2170
|
})(MediaPickerType || (MediaPickerType = {}));
|
|
2173
2171
|
|
|
2174
2172
|
const readCookie = (name) => {
|
|
@@ -2260,7 +2258,6 @@ const NETWORK_TYPE = (isAndroid) => ({
|
|
|
2260
2258
|
'4G': isAndroid ? 13 : 2
|
|
2261
2259
|
});
|
|
2262
2260
|
const MEDIA_PICKER_LIMIT = 1 * MB;
|
|
2263
|
-
const MEDIA_PICKER_UPLOAD_SERVER = 'https://zapi-server.tungnt.xyz/upload/photos';
|
|
2264
2261
|
const ACTION = {
|
|
2265
2262
|
GET_DOWNLOADED_STICKER: {
|
|
2266
2263
|
name: 'action.get.downloaded.sticker',
|
|
@@ -2579,7 +2576,7 @@ const ACTION = {
|
|
|
2579
2576
|
},
|
|
2580
2577
|
PICK_MEDIA: {
|
|
2581
2578
|
name: 'action.pick.media',
|
|
2582
|
-
version_live: { iOS:
|
|
2579
|
+
version_live: { iOS: 440 }
|
|
2583
2580
|
},
|
|
2584
2581
|
MP_CLOSE_LOADINGVIEW: {
|
|
2585
2582
|
name: 'action.mp.close.loadingview'
|
|
@@ -2712,6 +2709,7 @@ const HIDE_ACTION_BAR = 6;
|
|
|
2712
2709
|
const PAYMENT_APIS = {
|
|
2713
2710
|
CREATE_ORDER: 'https://payment-mini.zalo.me/api/order/create',
|
|
2714
2711
|
GET_TRANSACTION: 'https://payment-mini.zalo.me/api/transaction',
|
|
2712
|
+
GET_ORDER_STATUS: 'https://payment-mini.zalo.me/api/transaction/get-status'
|
|
2715
2713
|
};
|
|
2716
2714
|
const PAYMENT_H5_URL = 'https://payment-mini.zalo.me';
|
|
2717
2715
|
|
|
@@ -4060,7 +4058,7 @@ class ZJSBridgeProvider {
|
|
|
4060
4058
|
}
|
|
4061
4059
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4062
4060
|
|
|
4063
|
-
var version$1 = "2.19.0-rc.
|
|
4061
|
+
var version$1 = "2.19.0-rc.6";
|
|
4064
4062
|
|
|
4065
4063
|
class Basics {
|
|
4066
4064
|
/**
|
|
@@ -5562,10 +5560,10 @@ class Window {
|
|
|
5562
5560
|
* @category Window
|
|
5563
5561
|
*
|
|
5564
5562
|
*/
|
|
5565
|
-
static openWebview(
|
|
5563
|
+
static openWebview(url) {
|
|
5566
5564
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5567
5565
|
yield this.callNative(ACTION.OPEN_INAPP, {
|
|
5568
|
-
url:
|
|
5566
|
+
url: url
|
|
5569
5567
|
});
|
|
5570
5568
|
});
|
|
5571
5569
|
}
|
|
@@ -6013,12 +6011,12 @@ class Zalo {
|
|
|
6013
6011
|
* @category Zalo
|
|
6014
6012
|
*
|
|
6015
6013
|
*/
|
|
6016
|
-
static openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6014
|
+
static openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6017
6015
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6018
6016
|
const uploadSetting = {
|
|
6019
6017
|
type: 0,
|
|
6020
|
-
url:
|
|
6021
|
-
maxSize: MEDIA_PICKER_LIMIT
|
|
6018
|
+
url: serverUpload,
|
|
6019
|
+
maxSize: maxItemSize || MEDIA_PICKER_LIMIT
|
|
6022
6020
|
};
|
|
6023
6021
|
const defaultEditView = {
|
|
6024
6022
|
enable: 1,
|
|
@@ -6651,8 +6649,8 @@ class MockSDKService {
|
|
|
6651
6649
|
this.vibrate = () => {
|
|
6652
6650
|
return Promise.resolve();
|
|
6653
6651
|
};
|
|
6654
|
-
this.openWebview = (
|
|
6655
|
-
location.replace(
|
|
6652
|
+
this.openWebview = (url) => {
|
|
6653
|
+
location.replace(url);
|
|
6656
6654
|
return Promise.resolve();
|
|
6657
6655
|
};
|
|
6658
6656
|
this.getRouteParams = Routing.getRouteParams;
|
|
@@ -6709,7 +6707,7 @@ class MockSDKService {
|
|
|
6709
6707
|
removeAllListeners(event) {
|
|
6710
6708
|
throw new Error('Method not implemented.');
|
|
6711
6709
|
}
|
|
6712
|
-
openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6710
|
+
openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6713
6711
|
console.warn('This api only works on zalo app');
|
|
6714
6712
|
return Promise.resolve({
|
|
6715
6713
|
urls: []
|
|
@@ -8526,7 +8524,12 @@ class SDKCreator {
|
|
|
8526
8524
|
}
|
|
8527
8525
|
openWebview(object) {
|
|
8528
8526
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8529
|
-
|
|
8527
|
+
const url = new URL(object.url);
|
|
8528
|
+
const typeInapp = url.searchParams.get("typeInapp");
|
|
8529
|
+
if (_.isEmpty(typeInapp)) {
|
|
8530
|
+
url.searchParams.set("typeInapp", "1");
|
|
8531
|
+
}
|
|
8532
|
+
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|
|
8530
8533
|
});
|
|
8531
8534
|
}
|
|
8532
8535
|
getRouteParams() {
|
|
@@ -8637,7 +8640,7 @@ class SDKCreator {
|
|
|
8637
8640
|
editView.aspect_ratio = (_c = object.editView) === null || _c === void 0 ? void 0 : _c.aspectRatio;
|
|
8638
8641
|
const silentRequest = object.silentRequest === true ? 1 : 0;
|
|
8639
8642
|
const maxSelectItem = object.maxSelectItem;
|
|
8640
|
-
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, editView, silentRequest, maxSelectItem);
|
|
8643
|
+
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, object.serverUploadUrl, object.maxItemSize, editView, silentRequest, maxSelectItem);
|
|
8641
8644
|
});
|
|
8642
8645
|
}
|
|
8643
8646
|
getShareableLink(object) {
|
|
@@ -8997,7 +9000,7 @@ __decorate([
|
|
|
8997
9000
|
handleError,
|
|
8998
9001
|
validate,
|
|
8999
9002
|
__param(0, checkType('object', {
|
|
9000
|
-
url: checkData('
|
|
9003
|
+
url: checkData('url')
|
|
9001
9004
|
}))
|
|
9002
9005
|
], SDKCreator.prototype, "openWebview", null);
|
|
9003
9006
|
__decorate([
|
|
@@ -9041,6 +9044,8 @@ __decorate([
|
|
|
9041
9044
|
type: checkData('string', {
|
|
9042
9045
|
values: ['photo', 'video', 'file', 'multi_photo', 'multi_video']
|
|
9043
9046
|
}),
|
|
9047
|
+
'serverUploadUrl': checkData('url'),
|
|
9048
|
+
'maxItemSize?': checkData('number', { min: 0 }),
|
|
9044
9049
|
'editView?': checkData('object'),
|
|
9045
9050
|
'editView.enable?': checkData('boolean'),
|
|
9046
9051
|
'editView.aspectRatio?': checkData('string', { regex: /^\d+:\d+$/ }),
|
|
@@ -9184,13 +9189,24 @@ class PaymentService {
|
|
|
9184
9189
|
const appTransID = QueryString.getParameterByName("appTransID", inputData) || QueryString.getParameterByName("apptransid", inputData);
|
|
9185
9190
|
id = orderId || appTransID;
|
|
9186
9191
|
}
|
|
9192
|
+
const getConfig = {
|
|
9193
|
+
headers: {
|
|
9194
|
+
'authorization': `Bearer `
|
|
9195
|
+
}
|
|
9196
|
+
};
|
|
9197
|
+
const accessToken = yield sdk.getAccessToken({
|
|
9198
|
+
fail: (error) => {
|
|
9199
|
+
throw apiResponse.error.loginRequired;
|
|
9200
|
+
}
|
|
9201
|
+
});
|
|
9202
|
+
getConfig.headers.authorization = `Bearer ${accessToken}`;
|
|
9187
9203
|
const url = new URL(PAYMENT_APIS.GET_TRANSACTION);
|
|
9188
9204
|
const params = {
|
|
9189
9205
|
transId: id || "",
|
|
9190
9206
|
appId: __classPrivateFieldGet(this, _PaymentService_appId, "f")
|
|
9191
9207
|
};
|
|
9192
9208
|
url.search = new URLSearchParams(params).toString();
|
|
9193
|
-
const res = yield fetch(url.toString());
|
|
9209
|
+
const res = yield fetch(url.toString(), getConfig);
|
|
9194
9210
|
const resData = yield res.json();
|
|
9195
9211
|
if (!resData.data || resData.err !== 0) {
|
|
9196
9212
|
throw apiResponse.error.badRequest(resData.msg);
|
|
@@ -9198,11 +9214,11 @@ class PaymentService {
|
|
|
9198
9214
|
const data = resData.data || {};
|
|
9199
9215
|
const transaction = {
|
|
9200
9216
|
msg: data.resultMessage,
|
|
9201
|
-
appId: data.appId,
|
|
9202
9217
|
orderId: data.orderId,
|
|
9203
9218
|
resultCode: data.resultCode,
|
|
9204
9219
|
transTime: data.transTime,
|
|
9205
|
-
createdAt: data.createAt
|
|
9220
|
+
createdAt: data.createAt,
|
|
9221
|
+
transId: data.transId
|
|
9206
9222
|
};
|
|
9207
9223
|
return transaction;
|
|
9208
9224
|
}
|
|
@@ -9232,12 +9248,12 @@ class MockPaymentService {
|
|
|
9232
9248
|
;
|
|
9233
9249
|
checkTransaction(sdk, object) {
|
|
9234
9250
|
const result = {
|
|
9235
|
-
msg: '',
|
|
9236
|
-
appId: '',
|
|
9251
|
+
msg: 'Success',
|
|
9237
9252
|
orderId: '',
|
|
9238
|
-
resultCode:
|
|
9239
|
-
transTime:
|
|
9240
|
-
createdAt:
|
|
9253
|
+
resultCode: 1,
|
|
9254
|
+
transTime: new Date().getTime().toString(),
|
|
9255
|
+
createdAt: new Date().getTime().toString(),
|
|
9256
|
+
transId: ''
|
|
9241
9257
|
};
|
|
9242
9258
|
return Promise.resolve(result);
|
|
9243
9259
|
}
|