idpay-b2b-sdk 0.0.24 → 0.0.25

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.cjs CHANGED
@@ -9,7 +9,9 @@
9
9
  let _type;
10
10
  let _initialized = false;
11
11
  let _openWhileInitializing = false;
12
+ let _collectionId;
12
13
  const TYPE__IFRAME = 'IFRAME';
14
+ const TYPE_SILENT = 'SILENT';
13
15
  const ENV_DEV = 'dev';
14
16
  const ENV_UAT = 'uat';
15
17
  const ENV_PROD = 'prod';
@@ -50,7 +52,9 @@
50
52
  });
51
53
  IDPaySDKAssets.trackEvent(IDPaySDKAssets.EVENT_TYPES.INITIALIZE);
52
54
  _type = options?.type;
53
- if (_type === TYPE__IFRAME) {
55
+ if (_type === TYPE_SILENT) {
56
+ _collectionId = await IDPaySDKAssets.clientBoxControl.initSilent();
57
+ } else if (_type === TYPE__IFRAME) {
54
58
  await _createStyles({
55
59
  host
56
60
  });
@@ -86,7 +90,14 @@
86
90
  transactionId,
87
91
  token
88
92
  });
89
- if (_type === TYPE__IFRAME) {
93
+ if (_type === TYPE_SILENT) {
94
+ IDPaySDKAssets.clientBoxControl.verify({
95
+ transactionId,
96
+ token,
97
+ collectionId: _collectionId,
98
+ onFinish
99
+ });
100
+ } else if (_type === TYPE__IFRAME) {
90
101
  IDPaySDKAssets.clientBoxControl.open({
91
102
  transactionId,
92
103
  token,
package/index.js CHANGED
@@ -3,7 +3,9 @@
3
3
  let _type;
4
4
  let _initialized = false;
5
5
  let _openWhileInitializing = false;
6
+ let _collectionId;
6
7
  const TYPE__IFRAME = 'IFRAME';
8
+ const TYPE_SILENT = 'SILENT';
7
9
  const ENV_DEV = 'dev';
8
10
  const ENV_UAT = 'uat';
9
11
  const ENV_PROD = 'prod';
@@ -44,7 +46,9 @@ const init = async options => {
44
46
  });
45
47
  IDPaySDKAssets.trackEvent(IDPaySDKAssets.EVENT_TYPES.INITIALIZE);
46
48
  _type = options?.type;
47
- if (_type === TYPE__IFRAME) {
49
+ if (_type === TYPE_SILENT) {
50
+ _collectionId = await IDPaySDKAssets.clientBoxControl.initSilent();
51
+ } else if (_type === TYPE__IFRAME) {
48
52
  await _createStyles({
49
53
  host
50
54
  });
@@ -80,7 +84,14 @@ const startPayFlow = ({
80
84
  transactionId,
81
85
  token
82
86
  });
83
- if (_type === TYPE__IFRAME) {
87
+ if (_type === TYPE_SILENT) {
88
+ IDPaySDKAssets.clientBoxControl.verify({
89
+ transactionId,
90
+ token,
91
+ collectionId: _collectionId,
92
+ onFinish
93
+ });
94
+ } else if (_type === TYPE__IFRAME) {
84
95
  IDPaySDKAssets.clientBoxControl.open({
85
96
  transactionId,
86
97
  token,
package/index.umd.js CHANGED
@@ -9,7 +9,9 @@
9
9
  let _type;
10
10
  let _initialized = false;
11
11
  let _openWhileInitializing = false;
12
+ let _collectionId;
12
13
  const TYPE__IFRAME = 'IFRAME';
14
+ const TYPE_SILENT = 'SILENT';
13
15
  const ENV_DEV = 'dev';
14
16
  const ENV_UAT = 'uat';
15
17
  const ENV_PROD = 'prod';
@@ -50,7 +52,9 @@
50
52
  });
51
53
  IDPaySDKAssets.trackEvent(IDPaySDKAssets.EVENT_TYPES.INITIALIZE);
52
54
  _type = options?.type;
53
- if (_type === TYPE__IFRAME) {
55
+ if (_type === TYPE_SILENT) {
56
+ _collectionId = await IDPaySDKAssets.clientBoxControl.initSilent();
57
+ } else if (_type === TYPE__IFRAME) {
54
58
  await _createStyles({
55
59
  host
56
60
  });
@@ -86,7 +90,14 @@
86
90
  transactionId,
87
91
  token
88
92
  });
89
- if (_type === TYPE__IFRAME) {
93
+ if (_type === TYPE_SILENT) {
94
+ IDPaySDKAssets.clientBoxControl.verify({
95
+ transactionId,
96
+ token,
97
+ collectionId: _collectionId,
98
+ onFinish
99
+ });
100
+ } else if (_type === TYPE__IFRAME) {
90
101
  IDPaySDKAssets.clientBoxControl.open({
91
102
  transactionId,
92
103
  token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idpay-b2b-sdk",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/acesso-io/frontend.git",