@@ -47,16 +47,15 @@ internal class TransactionRequest {
47
47
val transJson = Gson ().toJson(transactionObject)
48
48
val intent = Intent (TRANSACTION_REQUEST_INTENT_ADDRESS )
49
49
intent.putExtra(REQUEST_DATA_TAG , transJson)
50
+
51
+
50
52
when (callingComponent) {
51
53
is Fragment -> {
52
54
callingComponent.startActivityForResult(intent, CP_PURCHASE_REQUEST_CODE )
53
55
}
54
56
is Activity -> {
55
57
callingComponent.startActivityForResult(intent, CP_PURCHASE_REQUEST_CODE )
56
58
}
57
- is PreferenceFragmentCompat -> {
58
- callingComponent.startActivityForResult(intent, CP_PURCHASE_REQUEST_CODE )
59
- }
60
59
else -> {
61
60
throw UnsupportedCallingComponentException (" Unsupported calling component." )
62
61
}
@@ -86,9 +85,6 @@ internal class TransactionRequest {
86
85
is Activity -> {
87
86
callingComponent.startActivityForResult(intent, CP_PURCHASE_WITH_CASHBACK_REQUEST_CODE )
88
87
}
89
- is PreferenceFragmentCompat -> {
90
- callingComponent.startActivityForResult(intent, CP_PURCHASE_WITH_CASHBACK_REQUEST_CODE )
91
- }
92
88
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
93
89
}
94
90
}
@@ -118,9 +114,6 @@ internal class TransactionRequest {
118
114
is Activity -> {
119
115
callingComponent.startActivityForResult(intent, CNP_PURCHASE_REQUEST_CODE )
120
116
}
121
- is PreferenceFragmentCompat -> {
122
- callingComponent.startActivityForResult(intent, CNP_PURCHASE_REQUEST_CODE )
123
- }
124
117
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
125
118
}
126
119
}
@@ -152,9 +145,6 @@ internal class TransactionRequest {
152
145
is Activity -> {
153
146
callingComponent.startActivityForResult(intent, CNP_PURCHASE_WITH_CB_REQUEST_CODE )
154
147
}
155
- is PreferenceFragmentCompat -> {
156
- callingComponent.startActivityForResult(intent, CNP_PURCHASE_WITH_CB_REQUEST_CODE )
157
- }
158
148
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
159
149
}
160
150
}
@@ -184,9 +174,6 @@ internal class TransactionRequest {
184
174
is Activity -> {
185
175
callingComponent.startActivityForResult(intent, CNP_PRE_AUTH_PURCHASE_REQUEST_CODE )
186
176
}
187
- is PreferenceFragmentCompat -> {
188
- callingComponent.startActivityForResult(intent, CNP_PRE_AUTH_PURCHASE_REQUEST_CODE )
189
- }
190
177
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
191
178
}
192
179
}
@@ -218,9 +205,6 @@ internal class TransactionRequest {
218
205
is Activity -> {
219
206
callingComponent.startActivityForResult(intent, CNP_PRE_AUTH_COMPLETION_REQUEST_CODE )
220
207
}
221
- is PreferenceFragmentCompat -> {
222
- callingComponent.startActivityForResult(intent, CNP_PRE_AUTH_COMPLETION_REQUEST_CODE )
223
- }
224
208
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
225
209
}
226
210
}
@@ -248,9 +232,6 @@ internal class TransactionRequest {
248
232
is Activity -> {
249
233
callingComponent.startActivityForResult(intent, CNP_CARD_BALANCE_REQUEST_CODE )
250
234
}
251
- is PreferenceFragmentCompat -> {
252
- callingComponent.startActivityForResult(intent, CNP_CARD_BALANCE_REQUEST_CODE )
253
- }
254
235
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
255
236
}
256
237
}
@@ -280,9 +261,6 @@ internal class TransactionRequest {
280
261
is Activity -> {
281
262
callingComponent.startActivityForResult(intent, CNP_REFUND_REQUEST_CODE )
282
263
}
283
- is PreferenceFragmentCompat -> {
284
- callingComponent.startActivityForResult(intent, CNP_REFUND_REQUEST_CODE )
285
- }
286
264
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
287
265
}
288
266
}
@@ -314,9 +292,6 @@ internal class TransactionRequest {
314
292
is Activity -> {
315
293
callingComponent.startActivityForResult(intent, CNP_REFUND_REQUEST_CODE )
316
294
}
317
- is PreferenceFragmentCompat -> {
318
- callingComponent.startActivityForResult(intent, CNP_REFUND_REQUEST_CODE )
319
- }
320
295
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
321
296
}
322
297
}
@@ -344,9 +319,6 @@ internal class TransactionRequest {
344
319
is Activity -> {
345
320
callingComponent.startActivityForResult(intent, MOBILE_MONEY_PURCHASE_REQUEST_CODE )
346
321
}
347
- is PreferenceFragmentCompat -> {
348
- callingComponent.startActivityForResult(intent, MOBILE_MONEY_PURCHASE_REQUEST_CODE )
349
- }
350
322
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
351
323
}
352
324
}
@@ -373,9 +345,6 @@ internal class TransactionRequest {
373
345
is Activity -> {
374
346
callingComponent.startActivityForResult(intent, MOBILE_MONEY_STATUS_CHECK_REQUEST_CODE )
375
347
}
376
- is PreferenceFragmentCompat -> {
377
- callingComponent.startActivityForResult(intent, MOBILE_MONEY_STATUS_CHECK_REQUEST_CODE )
378
- }
379
348
else -> throw UnsupportedCallingComponentException (" Unsupported calling component." )
380
349
}
381
350
}
0 commit comments