File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
android/src/main/java/com/pos Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,9 @@ abstract class CardManager {
7575 val userInfo = Arguments .createMap()
7676 userInfo.putBoolean(" isPosError" , true )
7777
78- if (! samIsConnected) {
79- promise.reject(PosException .NO_SAM_AVAILABLE , " No SAM available" , userInfo)
80- return
81- }
82-
8378 try {
79+ connectSam()
80+
8481 val kif = options.getInt(" kif" ).toByte()
8582 val kvc = options.getInt(" kvc" ).toByte()
8683 val log = ByteConvertReactNativeUtil .arrayListToByteArray(options.getArray(" log" )!! .toArrayList() as ArrayList <Int >)
@@ -100,6 +97,8 @@ abstract class CardManager {
10097 samComputeLogSignatureParser.checkStatus()
10198
10299 promise.resolve(ByteConvertReactNativeUtil .byteArrayToReadableArray(samComputeLogSignatureParser.signature))
100+
101+ disconnectSam()
103102 } catch (e: Exception ) {
104103 val userInfo = Arguments .createMap()
105104 userInfo.putBoolean(" isPosError" , true )
You can’t perform that action at this time.
0 commit comments