capacitor-stripe-terminal 2.1.0-beta.4 → 2.1.0-beta.5
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/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.10.0"
|
|
59
59
|
implementation "com.google.code.gson:gson:2.8.8"
|
|
60
60
|
}
|
|
@@ -2,6 +2,7 @@ package io.event1.capacitorstripeterminal;
|
|
|
2
2
|
|
|
3
3
|
import com.getcapacitor.JSObject;
|
|
4
4
|
import com.stripe.stripeterminal.external.models.Address;
|
|
5
|
+
import com.stripe.stripeterminal.external.models.DeviceType;
|
|
5
6
|
import com.stripe.stripeterminal.external.models.DiscoveryMethod;
|
|
6
7
|
import com.stripe.stripeterminal.external.models.Location;
|
|
7
8
|
import com.stripe.stripeterminal.external.models.PaymentIntent;
|
|
@@ -181,15 +182,15 @@ public class TerminalUtils {
|
|
|
181
182
|
|
|
182
183
|
// translate the android device type enum to the JS device type enum
|
|
183
184
|
public static Integer translateDeviceTypeToJS(int type) {
|
|
184
|
-
if (type ==
|
|
185
|
+
if (type == DeviceType.CHIPPER_2X.ordinal()) {
|
|
185
186
|
return 0;
|
|
186
|
-
} else if (type ==
|
|
187
|
+
} else if (type == DeviceType.STRIPE_M2.ordinal()) {
|
|
187
188
|
return 3;
|
|
188
|
-
} else if (type ==
|
|
189
|
+
} else if (type == DeviceType.VERIFONE_P400.ordinal()) {
|
|
189
190
|
return 1;
|
|
190
|
-
} else if (type ==
|
|
191
|
+
} else if (type == DeviceType.WISEPAD_3.ordinal()) {
|
|
191
192
|
return 2;
|
|
192
|
-
} else if (type ==
|
|
193
|
+
} else if (type == DeviceType.WISEPOS_E.ordinal()) {
|
|
193
194
|
return 4;
|
|
194
195
|
} else {
|
|
195
196
|
return 5;
|
package/package.json
CHANGED