@tonder.io/ionic-lite-sdk 0.0.41-beta.1 → 0.0.42-beta.2

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.
Files changed (57) hide show
  1. package/.gitlab-ci.yml +28 -28
  2. package/README.md +532 -532
  3. package/dist/classes/3dsHandler.d.ts +3 -1
  4. package/dist/classes/BaseInlineCheckout.d.ts +3 -2
  5. package/dist/classes/liteCheckout.d.ts +1 -1
  6. package/dist/data/cardApi.d.ts +3 -3
  7. package/dist/index.js +1 -1
  8. package/dist/types/commons.d.ts +1 -0
  9. package/dist/types/liteInlineCheckout.d.ts +1 -1
  10. package/jest.config.ts +14 -14
  11. package/package.json +41 -41
  12. package/rollup.config.js +16 -16
  13. package/src/classes/3dsHandler.ts +347 -337
  14. package/src/classes/BaseInlineCheckout.ts +424 -415
  15. package/src/classes/errorResponse.ts +16 -16
  16. package/src/classes/liteCheckout.ts +589 -591
  17. package/src/data/api.ts +20 -20
  18. package/src/data/businessApi.ts +18 -18
  19. package/src/data/cardApi.ts +91 -87
  20. package/src/data/checkoutApi.ts +84 -84
  21. package/src/data/customerApi.ts +31 -31
  22. package/src/data/openPayApi.ts +12 -12
  23. package/src/data/paymentMethodApi.ts +37 -37
  24. package/src/data/skyflowApi.ts +20 -20
  25. package/src/helpers/constants.ts +63 -63
  26. package/src/helpers/mercadopago.ts +15 -15
  27. package/src/helpers/skyflow.ts +91 -91
  28. package/src/helpers/utils.ts +120 -120
  29. package/src/helpers/validations.ts +55 -55
  30. package/src/index.ts +12 -12
  31. package/src/shared/catalog/paymentMethodsCatalog.ts +247 -247
  32. package/src/shared/constants/messages.ts +10 -10
  33. package/src/shared/constants/paymentMethodAPM.ts +63 -63
  34. package/src/shared/constants/tonderUrl.ts +8 -8
  35. package/src/types/card.ts +35 -35
  36. package/src/types/checkout.ts +123 -123
  37. package/src/types/commons.ts +143 -142
  38. package/src/types/customer.ts +22 -22
  39. package/src/types/liteInlineCheckout.ts +216 -216
  40. package/src/types/paymentMethod.ts +23 -23
  41. package/src/types/requests.ts +114 -114
  42. package/src/types/responses.ts +192 -192
  43. package/src/types/skyflow.ts +17 -17
  44. package/src/types/transaction.ts +101 -101
  45. package/src/types/validations.d.ts +11 -11
  46. package/tests/classes/liteCheckout.test.ts +57 -57
  47. package/tests/methods/createOrder.test.ts +141 -141
  48. package/tests/methods/createPayment.test.ts +121 -121
  49. package/tests/methods/customerRegister.test.ts +118 -118
  50. package/tests/methods/getBusiness.test.ts +114 -114
  51. package/tests/methods/getCustomerCards.test.ts +112 -112
  52. package/tests/methods/registerCustomerCard.test.ts +117 -117
  53. package/tests/methods/startCheckoutRouter.test.ts +119 -119
  54. package/tests/methods/startCheckoutRouterFull.test.ts +138 -138
  55. package/tests/utils/defaultMock.ts +21 -21
  56. package/tests/utils/mockClasses.ts +659 -659
  57. package/tsconfig.json +18 -18
@@ -1,337 +1,347 @@
1
- import { CustomizationOptions } from "../types/commons"
2
-
3
- type ThreeDSHandlerContructor = {
4
- payload?: any,
5
- apiKey?: string,
6
- baseUrl?: string,
7
- customization?: CustomizationOptions,
8
- tdsIframeId?: string,
9
- callBack?: (params: any) => any
10
- }
11
-
12
- export class ThreeDSHandler {
13
-
14
- callBack?: (params: any) => any
15
- baseUrl?: string
16
- apiKey?: string
17
- payload?: any
18
- localStorageKey: string = "verify_transaction_status_url"
19
- customization: CustomizationOptions = {
20
- saveCards: {
21
- showSaveCardOption: true,
22
- showSaved: true,
23
- autoSave: false
24
- },
25
- redirectOnComplete: true
26
- }
27
- tdsIframeId?: string
28
-
29
- constructor({
30
- payload = null,
31
- apiKey,
32
- baseUrl,
33
- customization,
34
- tdsIframeId,
35
- callBack
36
- }: ThreeDSHandlerContructor) {
37
- this.baseUrl = baseUrl,
38
- this.apiKey = apiKey,
39
- this.payload = payload
40
- this.tdsIframeId = tdsIframeId
41
- this.customization = {
42
- ...this.customization,
43
- ...(customization || {}),
44
- saveCards: {
45
- ...this.customization.saveCards,
46
- ...(customization?.saveCards || {}),
47
- },
48
- }
49
- this.callBack = callBack
50
- }
51
-
52
- setStorageItem (data: any) {
53
- return localStorage.setItem(this.localStorageKey, JSON.stringify(data))
54
- }
55
-
56
- getStorageItem () {
57
- return localStorage.getItem(this.localStorageKey)
58
- }
59
-
60
- removeStorageItem () {
61
- return localStorage.removeItem(this.localStorageKey)
62
- }
63
-
64
- saveVerifyTransactionUrl() {
65
- const url = this.payload?.next_action?.redirect_to_url?.verify_transaction_status_url
66
- if (url) {
67
- this.saveUrlWithExpiration(url)
68
- } else {
69
- const url = this.payload?.next_action?.iframe_resources?.verify_transaction_status_url
70
- if (url) {
71
- this.saveUrlWithExpiration(url)
72
- } else {
73
- console.log('No verify_transaction_status_url found');
74
- }
75
- }
76
- }
77
-
78
- saveUrlWithExpiration(url: string) {
79
- try {
80
- const now = new Date()
81
- const item = {
82
- url: url,
83
- // Expires after 20 minutes
84
- expires: now.getTime() + 20 * 60 * 1000
85
- }
86
- this.setStorageItem(item)
87
- } catch (error) {
88
- console.log('error: ', error)
89
- }
90
- }
91
-
92
- getUrlWithExpiration() {
93
- const status = this.getStorageItem();
94
- if(status) {
95
- const item = JSON.parse(status)
96
- if (!item) return
97
- const now = new Date()
98
- if (now.getTime() > item.expires) {
99
- this.removeVerifyTransactionUrl()
100
- return null
101
- } else {
102
- return item.url
103
- }
104
- } else {
105
- return null
106
- }
107
- }
108
-
109
- removeVerifyTransactionUrl() {
110
- return this.removeStorageItem()
111
- }
112
-
113
- getVerifyTransactionUrl() {
114
- return this.getStorageItem()
115
- }
116
-
117
- loadIframe() {
118
- const iframe = this.payload?.next_action?.iframe_resources?.iframe
119
-
120
- if (iframe) {
121
- return new Promise((resolve, reject) => {
122
- const iframe = this.payload?.next_action?.iframe_resources?.iframe
123
-
124
- if (iframe) {
125
- this.saveVerifyTransactionUrl()
126
- const container = document.createElement('div')
127
- container.innerHTML = iframe
128
- document.body.appendChild(container)
129
-
130
- // Create and append the script tag manually
131
- const script = document.createElement('script')
132
- script.textContent = 'document.getElementById("tdsMmethodForm").submit();'
133
- container.appendChild(script)
134
-
135
- // Resolve the promise when the iframe is loaded
136
- const iframeElement = document.getElementById('tdsMmethodTgtFrame')
137
- if(iframeElement) {
138
- iframeElement.onload = () => resolve(true)
139
- } else {
140
- console.log('No redirection found');
141
- reject(false)
142
- }
143
- } else {
144
- console.log('No redirection found');
145
- reject(false)
146
- }
147
- })
148
- }
149
- }
150
-
151
- getRedirectUrl() {
152
- return this.payload?.next_action?.redirect_to_url?.url
153
- }
154
-
155
- redirectToChallenge() {
156
- const url = this.getRedirectUrl()
157
- if (url) {
158
- this.saveVerifyTransactionUrl()
159
- if(this.customization) {
160
- if(this.customization?.redirectOnComplete) {
161
- window.location = url;
162
- } else {
163
- const iframe = document.querySelector(`#${this.tdsIframeId}`)
164
- if(iframe) {
165
-
166
- iframe.setAttribute("src", url);
167
- iframe.setAttribute("style", "display: block");
168
-
169
- const self = this;
170
-
171
- const listenerHandler = async (event: any) => {
172
-
173
- const checkStatus = (result: any) => result?.transaction_status !== "Pending";
174
-
175
- const executeAction = () => {
176
- if(iframe) {
177
- iframe.setAttribute("style", "display: none");
178
- }
179
- if(self.callBack) self.callBack(self.payload);
180
- iframe.removeEventListener("load", listenerHandler);
181
- }
182
-
183
- const chainPromises = async (promise: Promise<any>) => {
184
- const result = await new Promise((resolve, reject) => resolve(promise))
185
- if(result) {
186
- if(checkStatus(result)) {
187
- return executeAction()
188
- } else {
189
- const timer = setTimeout(async () => {
190
- clearTimeout(timer);
191
- await chainPromises(self.requestTransactionStatus());
192
- }, 15000)
193
- }
194
- }
195
- }
196
-
197
- await chainPromises(self.requestTransactionStatus())
198
- }
199
-
200
- iframe.addEventListener("load", listenerHandler)
201
-
202
- } else {
203
- console.log('No iframe found');
204
- }
205
- }
206
- } else {
207
- window.location = url;
208
- }
209
- } else {
210
- if (this.callBack) this.callBack!(this.payload);
211
- }
212
- }
213
-
214
- async requestTransactionStatus() {
215
-
216
- const verifyUrl = this.getUrlWithExpiration();
217
- const url = `${this.baseUrl}${verifyUrl}`;
218
- const response = await fetch(url, {
219
- method: "GET",
220
- headers: {
221
- "Content-Type": "application/json",
222
- Authorization: `Token ${this.apiKey}`,
223
- },
224
- // body: JSON.stringify(data),
225
- });
226
-
227
- if (response.status !== 200) {
228
- console.error('La verificación de la transacción falló.');
229
- return null;
230
- } else {
231
- const response_json = await response.json();
232
- return response_json;
233
- }
234
-
235
- }
236
-
237
- // Returns an object
238
- // https://example.com/?name=John&age=30&city=NewYork
239
- // { name: "John", age: "30", city: "NewYork" }
240
- getURLParameters() {
241
- const parameters: any = {};
242
- const urlParams: any = new URLSearchParams(window.location.search);
243
-
244
- for (const [key, value] of urlParams) {
245
- parameters[key] = value;
246
- }
247
-
248
- return parameters;
249
- }
250
-
251
- handleSuccessTransaction(response: any) {
252
- this.removeVerifyTransactionUrl();
253
- console.log('Transacción autorizada.');
254
- return response;
255
- }
256
-
257
- handleDeclinedTransaction(response: any) {
258
- this.removeVerifyTransactionUrl();
259
- return response;
260
- }
261
-
262
- // TODO: the method below needs to be tested with a real 3DS challenge
263
- // since we couldn't get a test card that works with this feature
264
- async handle3dsChallenge(response_json: any) {
265
- // Create the form element:
266
- const form = document.createElement('form');
267
- form.name = 'frm';
268
- form.method = 'POST';
269
- form.action = response_json.redirect_post_url;
270
-
271
- // Add hidden fields:
272
- const creqInput = document.createElement('input');
273
- creqInput.type = 'hidden';
274
- creqInput.name = response_json.creq;
275
- creqInput.value = response_json.creq;
276
- form.appendChild(creqInput);
277
-
278
- const termUrlInput = document.createElement('input');
279
- termUrlInput.type = 'hidden';
280
- termUrlInput.name = response_json.term_url;
281
- termUrlInput.value = response_json.TermUrl;
282
- form.appendChild(termUrlInput);
283
-
284
- // Append the form to the body:
285
- document.body.appendChild(form);
286
- form.submit();
287
-
288
- await this.verifyTransactionStatus();
289
- }
290
-
291
- // TODO: This method could be removed
292
- async handleTransactionResponse(response: any) {
293
- const response_json = await response.json();
294
- if (response_json.status === "Pending" && response_json.redirect_post_url) {
295
- return await this.handle3dsChallenge(response_json);
296
- } else if (["Success", "Authorized"].includes(response_json.status)) {
297
- return this.handleSuccessTransaction(response_json);
298
- } else {
299
- this.handleDeclinedTransaction(response);
300
- return response_json
301
- }
302
- }
303
-
304
- async verifyTransactionStatus() {
305
- const verifyUrl = this.getUrlWithExpiration();
306
- if (verifyUrl) {
307
- const url = `${this.baseUrl}${verifyUrl}`;
308
- try {
309
- const response = await fetch(url, {
310
- method: "GET",
311
- headers: {
312
- "Content-Type": "application/json",
313
- Authorization: `Token ${this.apiKey}`,
314
- },
315
- // body: JSON.stringify(data),
316
- });
317
-
318
- if (response.status !== 200) {
319
- console.error('La verificación de la transacción falló.');
320
- this.removeVerifyTransactionUrl();
321
- return response
322
- }
323
-
324
- return await this.handleTransactionResponse(response);
325
- } catch (error) {
326
- console.error('Error al verificar la transacción:', error);
327
- this.removeVerifyTransactionUrl();
328
- }
329
- } else {
330
- console.log('No verify_transaction_status_url found');
331
- }
332
- }
333
-
334
- setPayload = (payload: any) => {
335
- this.payload = payload
336
- }
337
- }
1
+ import { CustomizationOptions } from "../types/commons"
2
+
3
+ type ThreeDSHandlerContructor = {
4
+ payload?: any,
5
+ apiKey?: string,
6
+ baseUrl?: string,
7
+ customization?: CustomizationOptions,
8
+ tdsIframeId?: string,
9
+ tonderPayButtonId?: string,
10
+ callBack?: (params: any) => any
11
+ }
12
+
13
+ export class ThreeDSHandler {
14
+
15
+ callBack?: (params: any) => any
16
+ baseUrl?: string
17
+ apiKey?: string
18
+ payload?: any
19
+ localStorageKey: string = "verify_transaction_status_url"
20
+ customization: CustomizationOptions = {
21
+ saveCards: {
22
+ showSaveCardOption: true,
23
+ showSaved: true,
24
+ autoSave: false
25
+ },
26
+ redirectOnComplete: true
27
+ }
28
+ tdsIframeId?: string
29
+ tonderPayButtonId?: string
30
+
31
+ constructor({
32
+ payload = null,
33
+ apiKey,
34
+ baseUrl,
35
+ customization,
36
+ tdsIframeId,
37
+ tonderPayButtonId,
38
+ callBack
39
+ }: ThreeDSHandlerContructor) {
40
+ this.baseUrl = baseUrl,
41
+ this.apiKey = apiKey,
42
+ this.payload = payload
43
+ this.tdsIframeId = tdsIframeId
44
+ this.tonderPayButtonId = tonderPayButtonId
45
+ this.customization = {
46
+ ...this.customization,
47
+ ...(customization || {}),
48
+ saveCards: {
49
+ ...this.customization.saveCards,
50
+ ...(customization?.saveCards || {}),
51
+ },
52
+ }
53
+ this.callBack = callBack
54
+ }
55
+
56
+ setStorageItem (data: any) {
57
+ return localStorage.setItem(this.localStorageKey, JSON.stringify(data))
58
+ }
59
+
60
+ getStorageItem () {
61
+ return localStorage.getItem(this.localStorageKey)
62
+ }
63
+
64
+ removeStorageItem () {
65
+ return localStorage.removeItem(this.localStorageKey)
66
+ }
67
+
68
+ saveVerifyTransactionUrl() {
69
+ const url = this.payload?.next_action?.redirect_to_url?.verify_transaction_status_url
70
+ if (url) {
71
+ this.saveUrlWithExpiration(url)
72
+ } else {
73
+ const url = this.payload?.next_action?.iframe_resources?.verify_transaction_status_url
74
+ if (url) {
75
+ this.saveUrlWithExpiration(url)
76
+ } else {
77
+ console.log('No verify_transaction_status_url found');
78
+ }
79
+ }
80
+ }
81
+
82
+ saveUrlWithExpiration(url: string) {
83
+ try {
84
+ const now = new Date()
85
+ const item = {
86
+ url: url,
87
+ // Expires after 20 minutes
88
+ expires: now.getTime() + 20 * 60 * 1000
89
+ }
90
+ this.setStorageItem(item)
91
+ } catch (error) {
92
+ console.log('error: ', error)
93
+ }
94
+ }
95
+
96
+ getUrlWithExpiration() {
97
+ const status = this.getStorageItem();
98
+ if(status) {
99
+ const item = JSON.parse(status)
100
+ if (!item) return
101
+ const now = new Date()
102
+ if (now.getTime() > item.expires) {
103
+ this.removeVerifyTransactionUrl()
104
+ return null
105
+ } else {
106
+ return item.url
107
+ }
108
+ } else {
109
+ return null
110
+ }
111
+ }
112
+
113
+ removeVerifyTransactionUrl() {
114
+ return this.removeStorageItem()
115
+ }
116
+
117
+ getVerifyTransactionUrl() {
118
+ return this.getStorageItem()
119
+ }
120
+
121
+ loadIframe() {
122
+ const iframe = this.payload?.next_action?.iframe_resources?.iframe
123
+
124
+ if (iframe) {
125
+ return new Promise((resolve, reject) => {
126
+ const iframe = this.payload?.next_action?.iframe_resources?.iframe
127
+
128
+ if (iframe) {
129
+ this.saveVerifyTransactionUrl()
130
+ const container = document.createElement('div')
131
+ container.innerHTML = iframe
132
+ document.body.appendChild(container)
133
+
134
+ // Create and append the script tag manually
135
+ const script = document.createElement('script')
136
+ script.textContent = 'document.getElementById("tdsMmethodForm").submit();'
137
+ container.appendChild(script)
138
+
139
+ // Resolve the promise when the iframe is loaded
140
+ const iframeElement = document.getElementById('tdsMmethodTgtFrame')
141
+ if(iframeElement) {
142
+ iframeElement.onload = () => resolve(true)
143
+ } else {
144
+ console.log('No redirection found');
145
+ reject(false)
146
+ }
147
+ } else {
148
+ console.log('No redirection found');
149
+ reject(false)
150
+ }
151
+ })
152
+ }
153
+ }
154
+
155
+ getRedirectUrl() {
156
+ return this.payload?.next_action?.redirect_to_url?.url
157
+ }
158
+
159
+ redirectToChallenge() {
160
+ const url = this.getRedirectUrl()
161
+ if (url) {
162
+ this.saveVerifyTransactionUrl()
163
+ if(this.customization) {
164
+ if(this.customization?.redirectOnComplete) {
165
+ window.location = url;
166
+ } else {
167
+ const iframe = document.querySelector(`#${this.tdsIframeId}`)
168
+ if(iframe) {
169
+
170
+ iframe.setAttribute("src", url);
171
+ iframe.setAttribute("style", "display: block");
172
+
173
+ const self = this;
174
+
175
+ const listenerHandler = async (event: any) => {
176
+
177
+ const checkStatus = (result: any) => result?.transaction_status !== "Pending";
178
+
179
+ const executeAction = () => {
180
+ try {
181
+ const selector: any = document.querySelector(`#${this.tonderPayButtonId}`);
182
+ if(selector) {
183
+ selector.disabled = false;
184
+ }
185
+ } catch {}
186
+ if(iframe) {
187
+ iframe.setAttribute("style", "display: none");
188
+ }
189
+ if(self.callBack) self.callBack(self.payload);
190
+ iframe.removeEventListener("load", listenerHandler);
191
+ }
192
+
193
+ const chainPromises = async (promise: Promise<any>) => {
194
+ const result = await new Promise((resolve, reject) => resolve(promise))
195
+ if(result) {
196
+ if(checkStatus(result)) {
197
+ return executeAction()
198
+ } else {
199
+ const timer = setTimeout(async () => {
200
+ clearTimeout(timer);
201
+ await chainPromises(self.requestTransactionStatus());
202
+ }, 7000)
203
+ }
204
+ }
205
+ }
206
+
207
+ await chainPromises(self.requestTransactionStatus())
208
+ }
209
+
210
+ iframe.addEventListener("load", listenerHandler)
211
+
212
+ } else {
213
+ console.log('No iframe found');
214
+ }
215
+ }
216
+ } else {
217
+ window.location = url;
218
+ }
219
+ } else {
220
+ if (this.callBack) this.callBack!(this.payload);
221
+ }
222
+ }
223
+
224
+ async requestTransactionStatus() {
225
+
226
+ const verifyUrl = this.getUrlWithExpiration();
227
+ const url = `${this.baseUrl}${verifyUrl}`;
228
+ const response = await fetch(url, {
229
+ method: "GET",
230
+ headers: {
231
+ "Content-Type": "application/json",
232
+ Authorization: `Token ${this.apiKey}`,
233
+ },
234
+ // body: JSON.stringify(data),
235
+ });
236
+
237
+ if (response.status !== 200) {
238
+ console.error('La verificación de la transacción falló.');
239
+ return null;
240
+ } else {
241
+ const response_json = await response.json();
242
+ return response_json;
243
+ }
244
+
245
+ }
246
+
247
+ // Returns an object
248
+ // https://example.com/?name=John&age=30&city=NewYork
249
+ // { name: "John", age: "30", city: "NewYork" }
250
+ getURLParameters() {
251
+ const parameters: any = {};
252
+ const urlParams: any = new URLSearchParams(window.location.search);
253
+
254
+ for (const [key, value] of urlParams) {
255
+ parameters[key] = value;
256
+ }
257
+
258
+ return parameters;
259
+ }
260
+
261
+ handleSuccessTransaction(response: any) {
262
+ this.removeVerifyTransactionUrl();
263
+ console.log('Transacción autorizada.');
264
+ return response;
265
+ }
266
+
267
+ handleDeclinedTransaction(response: any) {
268
+ this.removeVerifyTransactionUrl();
269
+ return response;
270
+ }
271
+
272
+ // TODO: the method below needs to be tested with a real 3DS challenge
273
+ // since we couldn't get a test card that works with this feature
274
+ async handle3dsChallenge(response_json: any) {
275
+ // Create the form element:
276
+ const form = document.createElement('form');
277
+ form.name = 'frm';
278
+ form.method = 'POST';
279
+ form.action = response_json.redirect_post_url;
280
+
281
+ // Add hidden fields:
282
+ const creqInput = document.createElement('input');
283
+ creqInput.type = 'hidden';
284
+ creqInput.name = response_json.creq;
285
+ creqInput.value = response_json.creq;
286
+ form.appendChild(creqInput);
287
+
288
+ const termUrlInput = document.createElement('input');
289
+ termUrlInput.type = 'hidden';
290
+ termUrlInput.name = response_json.term_url;
291
+ termUrlInput.value = response_json.TermUrl;
292
+ form.appendChild(termUrlInput);
293
+
294
+ // Append the form to the body:
295
+ document.body.appendChild(form);
296
+ form.submit();
297
+
298
+ await this.verifyTransactionStatus();
299
+ }
300
+
301
+ // TODO: This method could be removed
302
+ async handleTransactionResponse(response: any) {
303
+ const response_json = await response.json();
304
+ if (response_json.status === "Pending" && response_json.redirect_post_url) {
305
+ return await this.handle3dsChallenge(response_json);
306
+ } else if (["Success", "Authorized"].includes(response_json.status)) {
307
+ return this.handleSuccessTransaction(response_json);
308
+ } else {
309
+ this.handleDeclinedTransaction(response);
310
+ return response_json
311
+ }
312
+ }
313
+
314
+ async verifyTransactionStatus() {
315
+ const verifyUrl = this.getUrlWithExpiration();
316
+ if (verifyUrl) {
317
+ const url = `${this.baseUrl}${verifyUrl}`;
318
+ try {
319
+ const response = await fetch(url, {
320
+ method: "GET",
321
+ headers: {
322
+ "Content-Type": "application/json",
323
+ Authorization: `Token ${this.apiKey}`,
324
+ },
325
+ // body: JSON.stringify(data),
326
+ });
327
+
328
+ if (response.status !== 200) {
329
+ console.error('La verificación de la transacción falló.');
330
+ this.removeVerifyTransactionUrl();
331
+ return response
332
+ }
333
+
334
+ return await this.handleTransactionResponse(response);
335
+ } catch (error) {
336
+ console.error('Error al verificar la transacción:', error);
337
+ this.removeVerifyTransactionUrl();
338
+ }
339
+ } else {
340
+ console.log('No verify_transaction_status_url found');
341
+ }
342
+ }
343
+
344
+ setPayload = (payload: any) => {
345
+ this.payload = payload
346
+ }
347
+ }