capacitor-stripe-terminal 2.1.1-beta.1 → 3.0.0-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.
- package/CapacitorStripeTerminal.podspec +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/io/event1/capacitorstripeterminal/StripeTerminal.java +146 -26
- package/android/src/main/java/io/event1/capacitorstripeterminal/TerminalUtils.java +116 -96
- package/dist/esm/definitions.d.ts +108 -27
- package/dist/esm/definitions.js +32 -6
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/plugin.d.ts +47 -12
- package/dist/esm/plugin.js +101 -22
- package/dist/esm/plugin.js.map +1 -1
- package/dist/esm/web.d.ts +38 -7
- package/dist/esm/web.js +104 -37
- package/dist/esm/web.js.map +1 -1
- package/ios/Plugin/Plugin.swift +1 -1
- package/ios/Podfile +2 -2
- package/ios/Podfile.lock +9 -9
- package/package.json +8 -8
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
s.author = 'eventOne Labs <opensource@event1.io>'
|
|
9
9
|
s.source = { :git => 'https://github.com/eventOneHQ/capacitor-stripe-terminal', :tag => s.version.to_s }
|
|
10
10
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
11
|
-
s.ios.deployment_target = '
|
|
11
|
+
s.ios.deployment_target = '13.0'
|
|
12
12
|
s.dependency 'Capacitor'
|
|
13
|
-
s.dependency 'StripeTerminal', '2.
|
|
13
|
+
s.dependency 'StripeTerminal', '2.14.0'
|
|
14
14
|
end
|
package/android/build.gradle
CHANGED
|
@@ -55,6 +55,6 @@ dependencies {
|
|
|
55
55
|
testImplementation "junit:junit:$junitVersion"
|
|
56
56
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
57
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
58
|
-
implementation "com.stripe:stripeterminal:2.
|
|
58
|
+
implementation "com.stripe:stripeterminal:2.15.0"
|
|
59
59
|
implementation "com.google.code.gson:gson:2.8.8"
|
|
60
60
|
}
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
6
6
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
|
7
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
8
|
+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
7
9
|
</manifest>
|
|
8
10
|
|
|
@@ -20,15 +20,21 @@ import com.stripe.stripeterminal.external.callable.Cancelable;
|
|
|
20
20
|
import com.stripe.stripeterminal.external.callable.ConnectionTokenCallback;
|
|
21
21
|
import com.stripe.stripeterminal.external.callable.ConnectionTokenProvider;
|
|
22
22
|
import com.stripe.stripeterminal.external.callable.DiscoveryListener;
|
|
23
|
+
import com.stripe.stripeterminal.external.callable.HandoffReaderListener;
|
|
23
24
|
import com.stripe.stripeterminal.external.callable.LocationListCallback;
|
|
24
25
|
import com.stripe.stripeterminal.external.callable.PaymentIntentCallback;
|
|
25
26
|
import com.stripe.stripeterminal.external.callable.ReaderCallback;
|
|
26
27
|
import com.stripe.stripeterminal.external.callable.TerminalListener;
|
|
28
|
+
import com.stripe.stripeterminal.external.callable.UsbReaderListener;
|
|
27
29
|
import com.stripe.stripeterminal.external.models.BatteryStatus;
|
|
28
30
|
import com.stripe.stripeterminal.external.models.Cart;
|
|
29
31
|
import com.stripe.stripeterminal.external.models.CartLineItem;
|
|
30
32
|
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.BluetoothConnectionConfiguration;
|
|
33
|
+
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.EmbeddedConnectionConfiguration;
|
|
34
|
+
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.HandoffConnectionConfiguration;
|
|
31
35
|
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.InternetConnectionConfiguration;
|
|
36
|
+
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.LocalMobileConnectionConfiguration;
|
|
37
|
+
import com.stripe.stripeterminal.external.models.ConnectionConfiguration.UsbConnectionConfiguration;
|
|
32
38
|
import com.stripe.stripeterminal.external.models.ConnectionStatus;
|
|
33
39
|
import com.stripe.stripeterminal.external.models.ConnectionTokenException;
|
|
34
40
|
import com.stripe.stripeterminal.external.models.DiscoveryConfiguration;
|
|
@@ -75,6 +81,8 @@ public class StripeTerminal
|
|
|
75
81
|
ConnectionTokenProvider,
|
|
76
82
|
TerminalListener,
|
|
77
83
|
DiscoveryListener,
|
|
84
|
+
UsbReaderListener,
|
|
85
|
+
HandoffReaderListener,
|
|
78
86
|
BluetoothReaderListener {
|
|
79
87
|
|
|
80
88
|
Cancelable pendingDiscoverReaders = null;
|
|
@@ -321,6 +329,22 @@ public class StripeTerminal
|
|
|
321
329
|
return selectedReader;
|
|
322
330
|
}
|
|
323
331
|
|
|
332
|
+
private ReaderCallback createReaderCallback(final PluginCall call) {
|
|
333
|
+
return new ReaderCallback() {
|
|
334
|
+
@Override
|
|
335
|
+
public void onSuccess(@NonNull Reader reader) {
|
|
336
|
+
JSObject ret = new JSObject();
|
|
337
|
+
ret.put("reader", TerminalUtils.serializeReader(reader));
|
|
338
|
+
call.resolve(ret);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@Override
|
|
342
|
+
public void onFailure(@NonNull TerminalException e) {
|
|
343
|
+
call.reject(e.getErrorMessage(), e);
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
|
|
324
348
|
@PluginMethod
|
|
325
349
|
public void connectInternetReader(final PluginCall call) {
|
|
326
350
|
Reader reader = getReaderFromDiscovered(call);
|
|
@@ -342,19 +366,7 @@ public class StripeTerminal
|
|
|
342
366
|
.connectInternetReader(
|
|
343
367
|
reader,
|
|
344
368
|
connectionConfig,
|
|
345
|
-
|
|
346
|
-
@Override
|
|
347
|
-
public void onSuccess(@NonNull Reader reader) {
|
|
348
|
-
JSObject ret = new JSObject();
|
|
349
|
-
ret.put("reader", TerminalUtils.serializeReader(reader));
|
|
350
|
-
call.resolve(ret);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
@Override
|
|
354
|
-
public void onFailure(@NonNull TerminalException e) {
|
|
355
|
-
call.reject(e.getErrorMessage(), e);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
369
|
+
this.createReaderCallback(call)
|
|
358
370
|
);
|
|
359
371
|
}
|
|
360
372
|
|
|
@@ -383,19 +395,121 @@ public class StripeTerminal
|
|
|
383
395
|
reader,
|
|
384
396
|
connectionConfig,
|
|
385
397
|
this,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
JSObject ret = new JSObject();
|
|
390
|
-
ret.put("reader", TerminalUtils.serializeReader(reader));
|
|
391
|
-
call.resolve(ret);
|
|
392
|
-
}
|
|
398
|
+
this.createReaderCallback(call)
|
|
399
|
+
);
|
|
400
|
+
}
|
|
393
401
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
402
|
+
@PluginMethod
|
|
403
|
+
public void connectUsbReader(final PluginCall call) {
|
|
404
|
+
Reader reader = getReaderFromDiscovered(call);
|
|
405
|
+
|
|
406
|
+
if (reader == null) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
String locationId = call.getString("locationId");
|
|
411
|
+
|
|
412
|
+
if (locationId == null) {
|
|
413
|
+
call.reject("Must provide a location ID");
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
UsbConnectionConfiguration connectionConfig = new UsbConnectionConfiguration(
|
|
418
|
+
locationId
|
|
419
|
+
);
|
|
420
|
+
|
|
421
|
+
Terminal
|
|
422
|
+
.getInstance()
|
|
423
|
+
.connectUsbReader(
|
|
424
|
+
reader,
|
|
425
|
+
connectionConfig,
|
|
426
|
+
this,
|
|
427
|
+
this.createReaderCallback(call)
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@PluginMethod
|
|
432
|
+
public void connectLocalMobileReader(final PluginCall call) {
|
|
433
|
+
Reader reader = getReaderFromDiscovered(call);
|
|
434
|
+
|
|
435
|
+
if (reader == null) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
String locationId = call.getString("locationId");
|
|
440
|
+
|
|
441
|
+
if (locationId == null) {
|
|
442
|
+
call.reject("Must provide a location ID");
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
LocalMobileConnectionConfiguration connectionConfig = new LocalMobileConnectionConfiguration(
|
|
447
|
+
locationId
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
Terminal
|
|
451
|
+
.getInstance()
|
|
452
|
+
.connectLocalMobileReader(
|
|
453
|
+
reader,
|
|
454
|
+
connectionConfig,
|
|
455
|
+
this.createReaderCallback(call)
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
@PluginMethod
|
|
460
|
+
public void connectEmbeddedReader(final PluginCall call) {
|
|
461
|
+
Reader reader = getReaderFromDiscovered(call);
|
|
462
|
+
|
|
463
|
+
if (reader == null) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
String locationId = call.getString("locationId");
|
|
468
|
+
|
|
469
|
+
if (locationId == null) {
|
|
470
|
+
call.reject("Must provide a location ID");
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
EmbeddedConnectionConfiguration connectionConfig = new EmbeddedConnectionConfiguration(
|
|
475
|
+
locationId
|
|
476
|
+
);
|
|
477
|
+
|
|
478
|
+
Terminal
|
|
479
|
+
.getInstance()
|
|
480
|
+
.connectEmbeddedReader(
|
|
481
|
+
reader,
|
|
482
|
+
connectionConfig,
|
|
483
|
+
this.createReaderCallback(call)
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
@PluginMethod
|
|
488
|
+
public void connectHandoffReader(final PluginCall call) {
|
|
489
|
+
Reader reader = getReaderFromDiscovered(call);
|
|
490
|
+
|
|
491
|
+
if (reader == null) {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
String locationId = call.getString("locationId");
|
|
496
|
+
|
|
497
|
+
if (locationId == null) {
|
|
498
|
+
call.reject("Must provide a location ID");
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
HandoffConnectionConfiguration connectionConfig = new HandoffConnectionConfiguration(
|
|
503
|
+
locationId
|
|
504
|
+
);
|
|
505
|
+
|
|
506
|
+
Terminal
|
|
507
|
+
.getInstance()
|
|
508
|
+
.connectHandoffReader(
|
|
509
|
+
reader,
|
|
510
|
+
connectionConfig,
|
|
511
|
+
this,
|
|
512
|
+
this.createReaderCallback(call)
|
|
399
513
|
);
|
|
400
514
|
}
|
|
401
515
|
|
|
@@ -426,7 +540,13 @@ public class StripeTerminal
|
|
|
426
540
|
public void getConnectedReader(PluginCall call) {
|
|
427
541
|
Reader reader = Terminal.getInstance().getConnectedReader();
|
|
428
542
|
JSObject ret = new JSObject();
|
|
429
|
-
|
|
543
|
+
|
|
544
|
+
if (reader == null) {
|
|
545
|
+
ret.put("reader", JSObject.NULL);
|
|
546
|
+
} else {
|
|
547
|
+
ret.put("reader", TerminalUtils.serializeReader(reader));
|
|
548
|
+
}
|
|
549
|
+
|
|
430
550
|
call.resolve(ret);
|
|
431
551
|
}
|
|
432
552
|
|
|
@@ -17,74 +17,80 @@ import com.stripe.stripeterminal.external.models.SimulatorConfiguration;
|
|
|
17
17
|
|
|
18
18
|
public class TerminalUtils {
|
|
19
19
|
|
|
20
|
-
public static
|
|
20
|
+
public static Object serializeReader(Reader reader) {
|
|
21
|
+
if (reader == null) {
|
|
22
|
+
return JSObject.NULL;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
JSObject object = new JSObject();
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
object.put("label", label);
|
|
80
|
-
}
|
|
27
|
+
// device type
|
|
28
|
+
object.put(
|
|
29
|
+
"deviceType",
|
|
30
|
+
translateDeviceTypeToJS(reader.getDeviceType().ordinal())
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// simulated
|
|
34
|
+
object.put("simulated", reader.isSimulated());
|
|
35
|
+
|
|
36
|
+
// stripe id
|
|
37
|
+
object.put("stripeId", reader.getId());
|
|
38
|
+
|
|
39
|
+
// location id
|
|
40
|
+
String locationId = null;
|
|
41
|
+
if (reader.getLocation() != null) locationId = reader.getLocation().getId();
|
|
42
|
+
object.put("locationId", locationId);
|
|
43
|
+
|
|
44
|
+
// location status
|
|
45
|
+
object.put("locationStatus", reader.getLocationStatus().ordinal());
|
|
46
|
+
|
|
47
|
+
// serial number
|
|
48
|
+
String serial = null;
|
|
49
|
+
if (reader.getSerialNumber() != null) serial = reader.getSerialNumber();
|
|
50
|
+
object.put("serialNumber", serial);
|
|
51
|
+
|
|
52
|
+
//
|
|
53
|
+
// BLUETOOTH READER PROPS
|
|
54
|
+
//
|
|
55
|
+
|
|
56
|
+
// software version
|
|
57
|
+
object.put("deviceSoftwareVersion", reader.getSoftwareVersion());
|
|
58
|
+
|
|
59
|
+
// is update available
|
|
60
|
+
object.put("isAvailableUpdate", reader.getAvailableUpdate() != null);
|
|
61
|
+
|
|
62
|
+
// battery level
|
|
63
|
+
Float level = reader.getBatteryLevel();
|
|
64
|
+
double batteryLevel = 0;
|
|
65
|
+
if (level != null) batteryLevel = (double) level;
|
|
66
|
+
object.put("batteryLevel", batteryLevel);
|
|
67
|
+
|
|
68
|
+
//
|
|
69
|
+
// INTERNET READER PROPS
|
|
70
|
+
//
|
|
71
|
+
|
|
72
|
+
// status
|
|
73
|
+
int status = Reader.NetworkStatus.OFFLINE.ordinal();
|
|
74
|
+
if (reader.getNetworkStatus() != null) status =
|
|
75
|
+
reader.getNetworkStatus().ordinal();
|
|
76
|
+
object.put("status", translateNetworkStatusToJS(status));
|
|
77
|
+
|
|
78
|
+
// label
|
|
79
|
+
String label = null;
|
|
80
|
+
if (reader.getLabel() != null) label = reader.getLabel();
|
|
81
|
+
object.put("label", label);
|
|
82
|
+
|
|
81
83
|
return object;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
public static
|
|
86
|
+
public static Object serializePaymentIntent(
|
|
85
87
|
PaymentIntent paymentIntent,
|
|
86
88
|
String currency
|
|
87
89
|
) {
|
|
90
|
+
if (paymentIntent == null) {
|
|
91
|
+
return JSObject.NULL;
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
JSObject object = new JSObject();
|
|
89
95
|
|
|
90
96
|
object.put("stripeId", paymentIntent.getId());
|
|
@@ -107,55 +113,61 @@ public class TerminalUtils {
|
|
|
107
113
|
return object;
|
|
108
114
|
}
|
|
109
115
|
|
|
110
|
-
public static
|
|
116
|
+
public static Object serializeUpdate(
|
|
111
117
|
ReaderSoftwareUpdate readerSoftwareUpdate
|
|
112
118
|
) {
|
|
119
|
+
if (readerSoftwareUpdate == null) {
|
|
120
|
+
return JSObject.NULL;
|
|
121
|
+
}
|
|
122
|
+
|
|
113
123
|
JSObject object = new JSObject();
|
|
114
124
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
object.put("requiredAt", readerSoftwareUpdate.getRequiredAt().getTime());
|
|
126
|
-
}
|
|
125
|
+
ReaderSoftwareUpdate.UpdateTimeEstimate updateTimeEstimate = readerSoftwareUpdate.getTimeEstimate();
|
|
126
|
+
|
|
127
|
+
object.put(
|
|
128
|
+
"estimatedUpdateTimeString",
|
|
129
|
+
updateTimeEstimate.getDescription()
|
|
130
|
+
);
|
|
131
|
+
object.put("estimatedUpdateTime", updateTimeEstimate.ordinal());
|
|
132
|
+
object.put("deviceSoftwareVersion", readerSoftwareUpdate.getVersion());
|
|
133
|
+
object.put("components", readerSoftwareUpdate.getComponents());
|
|
134
|
+
object.put("requiredAt", readerSoftwareUpdate.getRequiredAt().getTime());
|
|
127
135
|
|
|
128
136
|
return object;
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
public static
|
|
139
|
+
public static Object serializeLocation(Location location) {
|
|
140
|
+
if (location == null) {
|
|
141
|
+
return JSObject.NULL;
|
|
142
|
+
}
|
|
143
|
+
|
|
132
144
|
JSObject object = new JSObject();
|
|
133
145
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
object.put("livemode", location.getLivemode());
|
|
146
|
+
object.put("stripeId", location.getId());
|
|
147
|
+
object.put("displayName", location.getDisplayName());
|
|
148
|
+
object.put("livemode", location.getLivemode());
|
|
138
149
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
150
|
+
Address address = location.getAddress();
|
|
151
|
+
if (address != null) {
|
|
152
|
+
object.put("address", serializeAddress(address));
|
|
143
153
|
}
|
|
144
154
|
|
|
145
155
|
return object;
|
|
146
156
|
}
|
|
147
157
|
|
|
148
|
-
public static
|
|
158
|
+
public static Object serializeAddress(Address address) {
|
|
159
|
+
if (address == null) {
|
|
160
|
+
return JSObject.NULL;
|
|
161
|
+
}
|
|
162
|
+
|
|
149
163
|
JSObject object = new JSObject();
|
|
150
164
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
object.put("state", address.getState());
|
|
158
|
-
}
|
|
165
|
+
object.put("city", address.getCity());
|
|
166
|
+
object.put("country", address.getCountry());
|
|
167
|
+
object.put("line1", address.getLine1());
|
|
168
|
+
object.put("line2", address.getLine2());
|
|
169
|
+
object.put("postalCode", address.getPostalCode());
|
|
170
|
+
object.put("state", address.getState());
|
|
159
171
|
|
|
160
172
|
return object;
|
|
161
173
|
}
|
|
@@ -165,10 +177,8 @@ public class TerminalUtils {
|
|
|
165
177
|
) {
|
|
166
178
|
JSObject object = new JSObject();
|
|
167
179
|
|
|
168
|
-
|
|
169
|
-
object.put("
|
|
170
|
-
// object.put("simulatedCard", config.getSimulatedCard().getEmvBlob().toString());
|
|
171
|
-
}
|
|
180
|
+
object.put("availableReaderUpdate", config.getUpdate().ordinal());
|
|
181
|
+
// object.put("simulatedCard", config.getSimulatedCard().getEmvBlob().toString());
|
|
172
182
|
|
|
173
183
|
return object;
|
|
174
184
|
}
|
|
@@ -180,6 +190,14 @@ public class TerminalUtils {
|
|
|
180
190
|
return DiscoveryMethod.BLUETOOTH_SCAN;
|
|
181
191
|
} else if (method == 2) {
|
|
182
192
|
return DiscoveryMethod.INTERNET;
|
|
193
|
+
} else if (method == 4) {
|
|
194
|
+
return DiscoveryMethod.USB;
|
|
195
|
+
} else if (method == 5) {
|
|
196
|
+
return DiscoveryMethod.EMBEDDED;
|
|
197
|
+
} else if (method == 6) {
|
|
198
|
+
return DiscoveryMethod.HANDOFF;
|
|
199
|
+
} else if (method == 7) {
|
|
200
|
+
return DiscoveryMethod.LOCAL_MOBILE;
|
|
183
201
|
} else {
|
|
184
202
|
return DiscoveryMethod.BLUETOOTH_SCAN;
|
|
185
203
|
}
|
|
@@ -197,8 +215,10 @@ public class TerminalUtils {
|
|
|
197
215
|
return 2;
|
|
198
216
|
} else if (type == DeviceType.WISEPOS_E.ordinal()) {
|
|
199
217
|
return 4;
|
|
218
|
+
} else if (type == DeviceType.STRIPE_S700.ordinal()) {
|
|
219
|
+
return 9;
|
|
200
220
|
} else {
|
|
201
|
-
return
|
|
221
|
+
return 6;
|
|
202
222
|
}
|
|
203
223
|
}
|
|
204
224
|
|