react-native-mesmart 0.7.4 → 1.0.0
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/README.md +110 -31
- package/android/build.gradle +13 -8
- package/android/gradle.properties +6 -5
- package/android/src/main/java/com/mesmart/Packages.kt +4 -2
- package/android/src/main/java/com/mesmart/Utils.kt +107 -0
- package/android/src/main/java/com/pax/PaxImpl.kt +71 -40
- package/android/src/main/java/com/pax/PaxModule.kt +52 -29
- package/android/src/main/java/com/paystore/PaystoreImpl.kt +53 -0
- package/android/src/main/java/com/paystore/PaystoreModule.kt +24 -28
- package/android/src/main/java/com/paystore/utils/CredentialsUtils.kt +6 -4
- package/android/src/main/java/com/plugpag/PlugpagImpl.kt +66 -45
- package/android/src/main/java/com/plugpag/PlugpagModule.kt +49 -39
- package/android/src/main/java/com/plugpag/utils/PlugpagUtils.kt +23 -24
- package/android/src/main/java/com/stone/StoneImpl.kt +270 -0
- package/android/src/main/java/com/stone/StoneModule.kt +121 -0
- package/android/src/main/java/com/stone/utils/StoneUtils.kt +282 -0
- package/android/src/main/java/com/stone/utils/TransactionObjectMapper.kt +200 -0
- package/android/src/main/java/com/sunmi/SunmiImpl.kt +36 -12
- package/android/src/main/java/com/sunmi/SunmiModule.kt +49 -36
- package/android/src/main/java/com/sunmi/helpers/SunmiPrintHelper.kt +13 -17
- package/android/src/main/java/com/sunmi/helpers/SunmiRfidHelper.kt +8 -8
- package/android/src/main/java/com/{mesmart → sunmi}/utils/ESCUtil.kt +1 -1
- package/lib/commonjs/@types/{index.js → index.d.js} +16 -5
- package/lib/commonjs/@types/index.d.js.map +1 -0
- package/lib/commonjs/@types/pax.d.js +2 -0
- package/lib/commonjs/@types/{pax.js.map → pax.d.js.map} +1 -1
- package/lib/commonjs/@types/paystore.d.js +2 -0
- package/lib/commonjs/@types/{paystore.js.map → paystore.d.js.map} +1 -1
- package/lib/commonjs/@types/plugpag.d.js +36 -0
- package/lib/commonjs/@types/plugpag.d.js.map +1 -0
- package/lib/commonjs/@types/stone.d.js +6 -0
- package/lib/commonjs/@types/{sunmi.js.map → stone.d.js.map} +1 -1
- package/lib/commonjs/@types/sunmi.d.js +2 -0
- package/lib/{module/@types/pax.js.map → commonjs/@types/sunmi.d.js.map} +1 -1
- package/lib/commonjs/index.js +39 -60
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pax.js +25 -0
- package/lib/commonjs/pax.js.map +1 -0
- package/lib/commonjs/paystore.js +21 -0
- package/lib/commonjs/paystore.js.map +1 -0
- package/lib/commonjs/sunmi.js +28 -0
- package/lib/commonjs/sunmi.js.map +1 -0
- package/lib/module/@types/{index.js → index.d.js} +4 -2
- package/lib/module/@types/index.d.js.map +1 -0
- package/lib/module/@types/pax.d.js +2 -0
- package/lib/module/@types/{sunmi.js.map → pax.d.js.map} +1 -1
- package/lib/module/@types/paystore.d.js +2 -0
- package/lib/module/@types/paystore.d.js.map +1 -0
- package/lib/module/@types/plugpag.d.js +30 -0
- package/lib/module/@types/{plugpag.js.map → plugpag.d.js.map} +1 -1
- package/lib/module/@types/stone.d.js +2 -0
- package/lib/module/@types/stone.d.js.map +1 -0
- package/lib/module/@types/sunmi.d.js +2 -0
- package/lib/module/@types/sunmi.d.js.map +1 -0
- package/lib/module/index.js +39 -47
- package/lib/module/index.js.map +1 -1
- package/lib/module/pax.js +18 -0
- package/lib/module/pax.js.map +1 -0
- package/lib/module/paystore.js +14 -0
- package/lib/module/paystore.js.map +1 -0
- package/lib/module/sunmi.js +21 -0
- package/lib/module/sunmi.js.map +1 -0
- package/lib/typescript/src/index.d.ts +37 -24
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/pax.d.ts +2 -0
- package/lib/typescript/src/pax.d.ts.map +1 -0
- package/lib/typescript/src/paystore.d.ts +3 -0
- package/lib/typescript/src/paystore.d.ts.map +1 -0
- package/lib/typescript/src/sunmi.d.ts +2 -0
- package/lib/typescript/src/sunmi.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/@types/index.d.ts +29 -0
- package/src/@types/pax.d.ts +8 -0
- package/src/@types/{paystore.ts → paystore.d.ts} +4 -2
- package/src/@types/{plugpag.ts → plugpag.d.ts} +16 -23
- package/src/@types/stone.d.ts +310 -0
- package/src/@types/sunmi.d.ts +13 -0
- package/src/index.ts +41 -107
- package/src/pax.ts +28 -0
- package/src/paystore.ts +32 -0
- package/src/sunmi.ts +29 -0
- package/android/src/main/java/com/mesmart/utils/Utils.kt +0 -65
- package/lib/commonjs/@types/index.js.map +0 -1
- package/lib/commonjs/@types/pax.js +0 -2
- package/lib/commonjs/@types/paystore.js +0 -2
- package/lib/commonjs/@types/plugpag.js +0 -36
- package/lib/commonjs/@types/plugpag.js.map +0 -1
- package/lib/commonjs/@types/sunmi.js +0 -2
- package/lib/module/@types/index.js.map +0 -1
- package/lib/module/@types/pax.js +0 -2
- package/lib/module/@types/paystore.js +0 -2
- package/lib/module/@types/paystore.js.map +0 -1
- package/lib/module/@types/plugpag.js +0 -30
- package/lib/module/@types/sunmi.js +0 -2
- package/lib/typescript/src/@types/index.d.ts +0 -5
- package/lib/typescript/src/@types/index.d.ts.map +0 -1
- package/lib/typescript/src/@types/pax.d.ts +0 -7
- package/lib/typescript/src/@types/pax.d.ts.map +0 -1
- package/lib/typescript/src/@types/paystore.d.ts +0 -34
- package/lib/typescript/src/@types/paystore.d.ts.map +0 -1
- package/lib/typescript/src/@types/plugpag.d.ts +0 -47
- package/lib/typescript/src/@types/plugpag.d.ts.map +0 -1
- package/lib/typescript/src/@types/sunmi.d.ts +0 -9
- package/lib/typescript/src/@types/sunmi.d.ts.map +0 -1
- package/src/@types/index.ts +0 -4
- package/src/@types/pax.ts +0 -6
- package/src/@types/sunmi.ts +0 -13
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
package com.stone.utils
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Arguments
|
|
4
|
+
import com.facebook.react.bridge.ReadableMap
|
|
5
|
+
import com.facebook.react.bridge.WritableMap
|
|
6
|
+
import com.mesmart.Utils
|
|
7
|
+
import stone.application.enums.CardBrandEnum
|
|
8
|
+
import stone.application.enums.EntryMode
|
|
9
|
+
import stone.application.enums.InstalmentTransactionEnum
|
|
10
|
+
import stone.application.enums.TransactionStatusEnum
|
|
11
|
+
import stone.application.enums.TypeOfTransactionEnum
|
|
12
|
+
import stone.application.xml.enums.InstalmentTypeEnum
|
|
13
|
+
import stone.database.transaction.TransactionObject
|
|
14
|
+
import stone.user.Address
|
|
15
|
+
import stone.user.UserModel
|
|
16
|
+
import stone.user.device.UserPhone
|
|
17
|
+
|
|
18
|
+
object TransactionObjectMapper {
|
|
19
|
+
fun fromReadableMap(map: ReadableMap): TransactionObject {
|
|
20
|
+
return TransactionObject().apply {
|
|
21
|
+
idFromBase = map.getInt("idFromBase")
|
|
22
|
+
amount = map.getString("amount")
|
|
23
|
+
requestId = map.getString("requestId")
|
|
24
|
+
emailSent = map.getString("emailSent")
|
|
25
|
+
timeToPassTransaction = map.getString("timeToPassTransaction")
|
|
26
|
+
initiatorTransactionKey = map.getString("initiatorTransactionKey")
|
|
27
|
+
acquirerTransactionKey = map.getString("acquirerTransactionKey")
|
|
28
|
+
cardHolderNumber = map.getString("cardHolderNumber")
|
|
29
|
+
cardHolderName = map.getString("cardHolderName")
|
|
30
|
+
date = map.getString("date")
|
|
31
|
+
time = map.getString("time")
|
|
32
|
+
aid = map.getString("aid")
|
|
33
|
+
arcq = map.getString("arcq")
|
|
34
|
+
authorizationCode = map.getString("authorizationCode")
|
|
35
|
+
iccRelatedData = map.getString("iccRelatedData")
|
|
36
|
+
transactionReference = map.getString("transactionReference")
|
|
37
|
+
actionCode = map.getString("actionCode")
|
|
38
|
+
commandActionCode = map.getString("commandActionCode")
|
|
39
|
+
pinpadUsed = map.getString("pinpadUsed")
|
|
40
|
+
saleAffiliationKey = map.getString("saleAffiliationKey")
|
|
41
|
+
cne = map.getString("cne")
|
|
42
|
+
cvm = map.getString("cvm")
|
|
43
|
+
balance = map.getString("balance")
|
|
44
|
+
serviceCode = map.getString("serviceCode")
|
|
45
|
+
subMerchantCategoryCode = map.getString("subMerchantCategoryCode")
|
|
46
|
+
entryMode = map.getString("entryMode")?.let { EntryMode.valueOf(it) }
|
|
47
|
+
cardBrand = map.getString("cardBrand")?.let { CardBrandEnum.valueOf(it) }
|
|
48
|
+
cardBrandName = map.getString("cardBrandName")
|
|
49
|
+
|
|
50
|
+
if (map.hasKey("cardBrandId") && !map.isNull("cardBrandId"))
|
|
51
|
+
cardBrandId = map.getInt("cardBrandId")
|
|
52
|
+
|
|
53
|
+
instalmentTransaction = InstalmentTransactionEnum.ONE_INSTALMENT
|
|
54
|
+
transactionStatus = map.getString("transactionStatus")?.let { TransactionStatusEnum.valueOf(it) }
|
|
55
|
+
instalmentType = map.getString("instalmentType")?.let { InstalmentTypeEnum.valueOf(it) }
|
|
56
|
+
typeOfTransactionEnum = map.getString("typeOfTransaction")?.let { TypeOfTransactionEnum.valueOf(it) }
|
|
57
|
+
signature = map.getString("signatureBitmap")?.let { Utils.convertStringToBitmap(it) }
|
|
58
|
+
cancellationDate = map.getString("cancellationDate")?.let { Utils.convertStringToDate(it) }
|
|
59
|
+
isCapture =
|
|
60
|
+
if (map.hasKey("capture") && !map.isNull("capture"))
|
|
61
|
+
map.getBoolean("capture")
|
|
62
|
+
else null
|
|
63
|
+
shortName = map.getString("shortName")
|
|
64
|
+
subMerchantAddress = map.getString("subMerchantAddress")
|
|
65
|
+
userModel = map.getMap("userModel")?.let { mapUserModel(it) }
|
|
66
|
+
cvv = map.getString("cvv")
|
|
67
|
+
isFallbackTransaction = map.getBoolean("isFallbackTransaction").takeIf { !map.isNull("isFallbackTransaction") } ?: false
|
|
68
|
+
subMerchantCity = map.getString("subMerchantCity")
|
|
69
|
+
subMerchantTaxIdentificationNumber = map.getString("subMerchantTaxIdentificationNumber")
|
|
70
|
+
subMerchantRegisteredIdentifier = map.getString("subMerchantRegisteredIdentifier")
|
|
71
|
+
subMerchantPostalAddress = map.getString("subMerchantPostalAddress")
|
|
72
|
+
appLabel = map.getString("appLabel")
|
|
73
|
+
cardExpireDate = map.getString("cardExpireDate")
|
|
74
|
+
cardSequenceNumber = map.getString("cardSequenceNumber")
|
|
75
|
+
externalId = map.getString("externalId")
|
|
76
|
+
qrCode = map.getString("qrcodeBitmap")?.let { Utils.convertStringToBitmap(it) }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private fun mapUserModel(map: ReadableMap?): UserModel {
|
|
81
|
+
return UserModel().apply {
|
|
82
|
+
merchantName = map?.getString("merchantName")
|
|
83
|
+
saleAffiliationKey = map?.getString("saleAffiliationKey")
|
|
84
|
+
affiliationKey = map?.getString("affiliationKey")
|
|
85
|
+
merchantPassword = map?.getString("merchantPassword")
|
|
86
|
+
merchantDocumentNumber = map?.getString("merchantDocumentNumber")
|
|
87
|
+
stoneCode = map?.getString("stoneCode")
|
|
88
|
+
currencyCode = map?.getString("currencyCode")
|
|
89
|
+
merchantAddress = mapAddress(map?.getMap("merchantAddress"))
|
|
90
|
+
setMerchantUserPhone(mapUserPhone(map?.getMap("merchantUserPhone")))
|
|
91
|
+
tableVersion = map?.getString("tableVersion")
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private fun mapAddress(map: ReadableMap?): Address {
|
|
96
|
+
return Address().apply {
|
|
97
|
+
distric = map?.getString("distric")
|
|
98
|
+
street = map?.getString("street")
|
|
99
|
+
neighborhood = map?.getString("neighborhood")
|
|
100
|
+
doorNumber = map?.getString("doorNumber")
|
|
101
|
+
city = map?.getString("city")
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private fun mapUserPhone(map: ReadableMap?): UserPhone {
|
|
106
|
+
return UserPhone().apply {
|
|
107
|
+
merchantAndroidVersion = map?.getString("merchantAndroidVersion")
|
|
108
|
+
merchantPhoneModel = map?.getString("merchantPhoneModel")
|
|
109
|
+
merchantPhoneFactory = map?.getString("merchantPhoneFactory")
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
fun toWritableMap(transactionObject: TransactionObject): WritableMap {
|
|
114
|
+
return Arguments.createMap().apply {
|
|
115
|
+
putInt("idFromBase", transactionObject.idFromBase)
|
|
116
|
+
putString("amount", transactionObject.amount)
|
|
117
|
+
putString("requestId", transactionObject.requestId)
|
|
118
|
+
putString("emailSent", transactionObject.emailSent)
|
|
119
|
+
putString("timeToPassTransaction", transactionObject.timeToPassTransaction)
|
|
120
|
+
putString("initiatorTransactionKey", transactionObject.initiatorTransactionKey)
|
|
121
|
+
putString("acquirerTransactionKey", transactionObject.acquirerTransactionKey)
|
|
122
|
+
putString("cardHolderNumber", transactionObject.cardHolderNumber)
|
|
123
|
+
putString("cardHolderName", transactionObject.cardHolderName)
|
|
124
|
+
putString("date", transactionObject.date)
|
|
125
|
+
putString("time", transactionObject.time)
|
|
126
|
+
putString("aid", transactionObject.aid)
|
|
127
|
+
putString("arcq", transactionObject.arcq)
|
|
128
|
+
putString("authorizationCode", transactionObject.authorizationCode)
|
|
129
|
+
putString("iccRelatedData", transactionObject.iccRelatedData)
|
|
130
|
+
putString("transactionReference", transactionObject.transactionReference)
|
|
131
|
+
putString("actionCode", transactionObject.actionCode)
|
|
132
|
+
putString("commandActionCode", transactionObject.commandActionCode)
|
|
133
|
+
putString("pinpadUsed", transactionObject.pinpadUsed)
|
|
134
|
+
putString("saleAffiliationKey", transactionObject.saleAffiliationKey)
|
|
135
|
+
putString("cne", transactionObject.cne)
|
|
136
|
+
putString("cvm", transactionObject.cvm)
|
|
137
|
+
putString("balance", transactionObject.balance)
|
|
138
|
+
putString("serviceCode", transactionObject.serviceCode)
|
|
139
|
+
putString("subMerchantCategoryCode", transactionObject.subMerchantCategoryCode)
|
|
140
|
+
putString("entryMode", transactionObject.entryMode?.name ?: "UNKNOWN")
|
|
141
|
+
putString("cardBrand", transactionObject.cardBrand?.name ?: "UNKNOWN")
|
|
142
|
+
putString("cardBrandName", transactionObject.cardBrandName)
|
|
143
|
+
putInt("cardBrandId", transactionObject.cardBrandId)
|
|
144
|
+
putString("instalmentTransaction", transactionObject.instalmentTransaction.name)
|
|
145
|
+
putString("transactionStatus", transactionObject.transactionStatus?.name ?: "UNKNOWN")
|
|
146
|
+
putString("instalmentType", transactionObject.instalmentType?.name ?: "None")
|
|
147
|
+
putString("typeOfTransaction", transactionObject.typeOfTransactionEnum?.name ?: "UNKNOWN")
|
|
148
|
+
putString("signatureBitmap", Utils.bitmapToBase64(transactionObject.signature))
|
|
149
|
+
putString("cancellationDate", Utils.dateToString(transactionObject.cancellationDate))
|
|
150
|
+
putBoolean("capture", transactionObject.isCapture)
|
|
151
|
+
putString("shortName", transactionObject.shortName)
|
|
152
|
+
putString("subMerchantAddress", transactionObject.subMerchantAddress)
|
|
153
|
+
putMap("userModel", userModelToWritableMap(transactionObject.userModel))
|
|
154
|
+
putString("cvv", transactionObject.cvv)
|
|
155
|
+
putBoolean("isFallbackTransaction", transactionObject.isFallbackTransaction)
|
|
156
|
+
putString("subMerchantCity", transactionObject.subMerchantCity)
|
|
157
|
+
putString("subMerchantTaxIdentificationNumber", transactionObject.subMerchantTaxIdentificationNumber)
|
|
158
|
+
putString("subMerchantRegisteredIdentifier", transactionObject.subMerchantRegisteredIdentifier)
|
|
159
|
+
putString("subMerchantPostalAddress", transactionObject.subMerchantPostalAddress)
|
|
160
|
+
putString("appLabel", transactionObject.appLabel)
|
|
161
|
+
putString("cardExpireDate", transactionObject.cardExpireDate)
|
|
162
|
+
putString("cardSequenceNumber", transactionObject.cardSequenceNumber)
|
|
163
|
+
putString("externalId", transactionObject.externalId)
|
|
164
|
+
putString("qrcodeBitmap", Utils.bitmapToBase64(transactionObject.qrCode))
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
private fun userModelToWritableMap(userModel: UserModel?): WritableMap {
|
|
169
|
+
return Arguments.createMap().apply {
|
|
170
|
+
putString("merchantName", userModel?.merchantName)
|
|
171
|
+
putString("saleAffiliationKey", userModel?.saleAffiliationKey)
|
|
172
|
+
putString("affiliationKey", userModel?.affiliationKey)
|
|
173
|
+
putString("merchantPassword", userModel?.merchantPassword)
|
|
174
|
+
putString("merchantDocumentNumber", userModel?.merchantDocumentNumber)
|
|
175
|
+
putString("stoneCode", userModel?.stoneCode)
|
|
176
|
+
putString("currencyCode", userModel?.currencyCode)
|
|
177
|
+
putMap("merchantAddress", addressToWritableMap(userModel?.merchantAddress))
|
|
178
|
+
putMap("merchantUserPhone", userPhoneToWritableMap(userModel?.userPhone))
|
|
179
|
+
putString("tableVersion", userModel?.tableVersion)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
private fun addressToWritableMap(address: Address?): WritableMap {
|
|
184
|
+
return Arguments.createMap().apply {
|
|
185
|
+
putString("distric", address?.distric)
|
|
186
|
+
putString("street", address?.street)
|
|
187
|
+
putString("neighborhood", address?.neighborhood)
|
|
188
|
+
putString("doorNumber", address?.doorNumber)
|
|
189
|
+
putString("city", address?.city)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
private fun userPhoneToWritableMap(userPhone: UserPhone?): WritableMap {
|
|
194
|
+
return Arguments.createMap().apply {
|
|
195
|
+
putString("merchantAndroidVersion", userPhone?.merchantAndroidVersion)
|
|
196
|
+
putString("merchantPhoneModel", userPhone?.merchantPhoneModel)
|
|
197
|
+
putString("merchantPhoneFactory", userPhone?.merchantPhoneFactory)
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -5,6 +5,7 @@ import android.graphics.BitmapFactory
|
|
|
5
5
|
import com.facebook.react.bridge.Promise
|
|
6
6
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
7
|
import com.mesmart.R
|
|
8
|
+
import com.mesmart.Utils
|
|
8
9
|
import com.sunmi.helpers.SunmiPrintHelper
|
|
9
10
|
import com.sunmi.helpers.SunmiRfidHelper
|
|
10
11
|
import sunmi.paylib.SunmiPayKernel
|
|
@@ -13,23 +14,36 @@ import sunmi.paylib.SunmiPayKernel.ConnectCallback
|
|
|
13
14
|
class SunmiImpl(
|
|
14
15
|
private val reactContext: ReactApplicationContext
|
|
15
16
|
) {
|
|
16
|
-
private
|
|
17
|
-
private var sunmiRfidHelper: SunmiRfidHelper =
|
|
17
|
+
private var payKernel: SunmiPayKernel? = null
|
|
18
|
+
private var sunmiRfidHelper: SunmiRfidHelper? = null
|
|
18
19
|
private var sunmiPrintHelper: SunmiPrintHelper = SunmiPrintHelper(reactContext)
|
|
19
20
|
|
|
20
21
|
init {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (Utils.isSunmiP2()) {
|
|
23
|
+
payKernel = SunmiPayKernel.getInstance()
|
|
24
|
+
|
|
25
|
+
payKernel?.initPaySDK(reactContext, object : ConnectCallback {
|
|
26
|
+
override fun onConnectPaySDK() {}
|
|
27
|
+
override fun onDisconnectPaySDK() {}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
sunmiRfidHelper = payKernel?.let { SunmiRfidHelper(it) }
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
|
|
27
|
-
fun
|
|
28
|
-
|
|
34
|
+
private fun checkKernel() {
|
|
35
|
+
if (payKernel == null)
|
|
36
|
+
throw Exception("Kernel da SunmiP2 não inicializado! Você deve utilizar esse método em um dispositivo SunmiP2 ou ocorreu algum erro durante a inicialização!")
|
|
29
37
|
}
|
|
30
38
|
|
|
31
|
-
fun
|
|
32
|
-
|
|
39
|
+
fun scanRfid(promise: Promise) {
|
|
40
|
+
checkKernel()
|
|
41
|
+
sunmiRfidHelper?.scanRfid(promise)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
fun cancelScan() {
|
|
45
|
+
checkKernel()
|
|
46
|
+
sunmiRfidHelper?.cancelScan()
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
fun printText(
|
|
@@ -38,6 +52,7 @@ class SunmiImpl(
|
|
|
38
52
|
isBold: Boolean,
|
|
39
53
|
isUnderline: Boolean
|
|
40
54
|
) {
|
|
55
|
+
checkKernel()
|
|
41
56
|
sunmiPrintHelper.printText(
|
|
42
57
|
str,
|
|
43
58
|
fontSize.toFloat(),
|
|
@@ -47,10 +62,13 @@ class SunmiImpl(
|
|
|
47
62
|
}
|
|
48
63
|
|
|
49
64
|
fun printEmptyLine() {
|
|
65
|
+
checkKernel()
|
|
50
66
|
sunmiPrintHelper.printEmptyLine()
|
|
51
67
|
}
|
|
52
68
|
|
|
53
69
|
fun printBpLogo() {
|
|
70
|
+
checkKernel()
|
|
71
|
+
|
|
54
72
|
val options = BitmapFactory.Options().apply {
|
|
55
73
|
inTargetDensity = 160
|
|
56
74
|
inDensity = 160
|
|
@@ -63,8 +81,14 @@ class SunmiImpl(
|
|
|
63
81
|
)
|
|
64
82
|
}
|
|
65
83
|
|
|
66
|
-
fun setPrinterAlign(align:
|
|
67
|
-
|
|
84
|
+
fun setPrinterAlign(align: String) {
|
|
85
|
+
checkKernel()
|
|
86
|
+
when (align) {
|
|
87
|
+
"left" -> sunmiPrintHelper.setPrinterAlign(0)
|
|
88
|
+
"center" -> sunmiPrintHelper.setPrinterAlign(1)
|
|
89
|
+
"right" -> sunmiPrintHelper.setPrinterAlign(2)
|
|
90
|
+
else -> throw Exception("'$align' não reconhecido! Utilize somente um desses: ['left', 'center', 'right']")
|
|
91
|
+
}
|
|
68
92
|
}
|
|
69
93
|
}
|
|
70
94
|
|
|
@@ -4,71 +4,84 @@ import com.facebook.react.bridge.Promise
|
|
|
4
4
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
5
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
6
|
import com.facebook.react.bridge.ReactMethod
|
|
7
|
-
import com.mesmart.utils.Utils
|
|
8
7
|
|
|
9
8
|
class SunmiModule(
|
|
10
9
|
reactContext: ReactApplicationContext
|
|
11
10
|
) : ReactContextBaseJavaModule(reactContext) {
|
|
12
|
-
private var sunmi: SunmiImpl
|
|
13
|
-
|
|
14
|
-
init {
|
|
15
|
-
if (Utils.isSunmiP2()) {
|
|
16
|
-
sunmi = SunmiImpl(reactContext)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
11
|
+
private var sunmi: SunmiImpl = SunmiImpl(reactContext)
|
|
19
12
|
|
|
20
13
|
override fun getName(): String {
|
|
21
14
|
return "Sunmi"
|
|
22
15
|
}
|
|
23
16
|
|
|
24
|
-
private fun checkSunmi() {
|
|
25
|
-
if (sunmi == null)
|
|
26
|
-
throw Exception("Sunmi is null! You may not working in a Sunmi P2 or an error ocurred during the initialization!")
|
|
27
|
-
}
|
|
28
|
-
|
|
29
17
|
@ReactMethod
|
|
30
|
-
fun
|
|
18
|
+
fun scanRfid(promise: Promise) {
|
|
31
19
|
try {
|
|
32
|
-
|
|
33
|
-
sunmi?.searchRfid(promise)
|
|
20
|
+
sunmi.scanRfid(promise)
|
|
34
21
|
} catch (e: Exception) {
|
|
35
22
|
e.printStackTrace()
|
|
36
23
|
promise.reject(e)
|
|
37
24
|
}
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
@ReactMethod
|
|
41
|
-
fun
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
@ReactMethod
|
|
28
|
+
fun cancelScan(promise: Promise) {
|
|
29
|
+
try {
|
|
30
|
+
sunmi.cancelScan()
|
|
31
|
+
promise.resolve(null)
|
|
32
|
+
} catch (e: Exception) {
|
|
33
|
+
e.printStackTrace()
|
|
34
|
+
promise.reject(e)
|
|
35
|
+
}
|
|
44
36
|
}
|
|
45
37
|
|
|
46
|
-
@ReactMethod
|
|
38
|
+
@ReactMethod
|
|
47
39
|
fun printText(
|
|
48
40
|
str: String,
|
|
49
41
|
fontSize: Int,
|
|
50
42
|
isBold: Boolean,
|
|
51
|
-
isUnderline: Boolean
|
|
43
|
+
isUnderline: Boolean,
|
|
44
|
+
promise: Promise
|
|
52
45
|
) {
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
try {
|
|
47
|
+
sunmi.printText(str, fontSize, isBold, isUnderline)
|
|
48
|
+
promise.resolve(null)
|
|
49
|
+
} catch (e: Exception) {
|
|
50
|
+
e.printStackTrace()
|
|
51
|
+
promise.reject(e)
|
|
52
|
+
}
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
@ReactMethod
|
|
58
|
-
fun printEmptyLine() {
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
@ReactMethod
|
|
56
|
+
fun printEmptyLine(promise: Promise) {
|
|
57
|
+
try {
|
|
58
|
+
sunmi.printEmptyLine()
|
|
59
|
+
promise.resolve(null)
|
|
60
|
+
} catch (e: Exception) {
|
|
61
|
+
e.printStackTrace()
|
|
62
|
+
promise.reject(e)
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
|
|
63
|
-
@ReactMethod
|
|
64
|
-
fun printBpLogo() {
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
@ReactMethod
|
|
67
|
+
fun printBpLogo(promise: Promise) {
|
|
68
|
+
try {
|
|
69
|
+
sunmi.printBpLogo()
|
|
70
|
+
promise.resolve(null)
|
|
71
|
+
} catch (e: Exception) {
|
|
72
|
+
e.printStackTrace()
|
|
73
|
+
promise.reject(e)
|
|
74
|
+
}
|
|
67
75
|
}
|
|
68
76
|
|
|
69
|
-
@ReactMethod
|
|
70
|
-
fun setPrinterAlign(align:
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
@ReactMethod
|
|
78
|
+
fun setPrinterAlign(align: String, promise: Promise) {
|
|
79
|
+
try {
|
|
80
|
+
sunmi.setPrinterAlign(align)
|
|
81
|
+
promise.resolve(null)
|
|
82
|
+
} catch (e: Exception) {
|
|
83
|
+
e.printStackTrace()
|
|
84
|
+
promise.reject(e)
|
|
85
|
+
}
|
|
73
86
|
}
|
|
74
87
|
}
|
|
@@ -3,7 +3,7 @@ package com.sunmi.helpers
|
|
|
3
3
|
import android.graphics.Bitmap
|
|
4
4
|
import android.os.RemoteException
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.
|
|
6
|
+
import com.sunmi.utils.ESCUtil
|
|
7
7
|
import com.sunmi.peripheral.printer.InnerPrinterCallback
|
|
8
8
|
import com.sunmi.peripheral.printer.InnerPrinterException
|
|
9
9
|
import com.sunmi.peripheral.printer.InnerPrinterManager
|
|
@@ -70,9 +70,8 @@ class SunmiPrintHelper(
|
|
|
70
70
|
isUnderLine: Boolean,
|
|
71
71
|
typeface: String?
|
|
72
72
|
) {
|
|
73
|
-
if (sunmiPrinterService == null)
|
|
74
|
-
|
|
75
|
-
}
|
|
73
|
+
if (sunmiPrinterService == null)
|
|
74
|
+
throw Exception("Serviço de InnerPrinter da SunmiP2 nulo!")
|
|
76
75
|
|
|
77
76
|
try {
|
|
78
77
|
try {
|
|
@@ -101,26 +100,24 @@ class SunmiPrintHelper(
|
|
|
101
100
|
}
|
|
102
101
|
sunmiPrinterService!!.printTextWithFont(content, typeface, size, null)
|
|
103
102
|
} catch (e: RemoteException) {
|
|
104
|
-
e
|
|
103
|
+
throw e
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
fun printEmptyLine() {
|
|
109
|
-
if (sunmiPrinterService == null)
|
|
110
|
-
|
|
111
|
-
}
|
|
108
|
+
if (sunmiPrinterService == null)
|
|
109
|
+
throw Exception("Serviço de InnerPrinter da SunmiP2 nulo!")
|
|
112
110
|
|
|
113
111
|
try {
|
|
114
112
|
sunmiPrinterService!!.lineWrap(1, null)
|
|
115
113
|
} catch (e: RemoteException) {
|
|
116
|
-
e
|
|
114
|
+
throw e
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
fun printBitmap(bitmap: Bitmap?, orientation: Int) {
|
|
121
|
-
if (sunmiPrinterService == null)
|
|
122
|
-
|
|
123
|
-
}
|
|
119
|
+
if (sunmiPrinterService == null)
|
|
120
|
+
throw Exception("Serviço de InnerPrinter da SunmiP2 nulo!")
|
|
124
121
|
|
|
125
122
|
try {
|
|
126
123
|
if (orientation == 0) {
|
|
@@ -131,19 +128,18 @@ class SunmiPrintHelper(
|
|
|
131
128
|
sunmiPrinterService!!.printText("\n\n", null)
|
|
132
129
|
}
|
|
133
130
|
} catch (e: RemoteException) {
|
|
134
|
-
e
|
|
131
|
+
throw e
|
|
135
132
|
}
|
|
136
133
|
}
|
|
137
134
|
|
|
138
135
|
fun setPrinterAlign(align: Int) {
|
|
139
|
-
if (sunmiPrinterService == null)
|
|
140
|
-
|
|
141
|
-
}
|
|
136
|
+
if (sunmiPrinterService == null)
|
|
137
|
+
throw Exception("Serviço de InnerPrinter da SunmiP2 nulo!")
|
|
142
138
|
|
|
143
139
|
try {
|
|
144
140
|
sunmiPrinterService!!.setAlignment(align, null)
|
|
145
141
|
} catch (e: RemoteException) {
|
|
146
|
-
e
|
|
142
|
+
throw e
|
|
147
143
|
}
|
|
148
144
|
}
|
|
149
145
|
}
|
|
@@ -2,7 +2,7 @@ package com.sunmi.helpers
|
|
|
2
2
|
|
|
3
3
|
import android.os.Bundle
|
|
4
4
|
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.mesmart.
|
|
5
|
+
import com.mesmart.Utils
|
|
6
6
|
import com.sunmi.pay.hardware.aidl.AidlConstants
|
|
7
7
|
import com.sunmi.pay.hardware.aidlv2.readcard.CheckCardCallbackV2
|
|
8
8
|
import sunmi.paylib.SunmiPayKernel
|
|
@@ -10,9 +10,9 @@ import sunmi.paylib.SunmiPayKernel
|
|
|
10
10
|
class SunmiRfidHelper(private val payKernel: SunmiPayKernel) {
|
|
11
11
|
private var attempt: Int = 0
|
|
12
12
|
|
|
13
|
-
fun
|
|
13
|
+
fun scanRfid(promise: Promise) {
|
|
14
14
|
try {
|
|
15
|
-
|
|
15
|
+
cancelScan()
|
|
16
16
|
payKernel.mReadCardOptV2.checkCard(
|
|
17
17
|
AidlConstants.CardType.MIFARE.value,
|
|
18
18
|
object : CheckCardCallbackV2.Stub() {
|
|
@@ -26,11 +26,11 @@ class SunmiRfidHelper(private val payKernel: SunmiPayKernel) {
|
|
|
26
26
|
|
|
27
27
|
override fun findRFCard(s: String) {
|
|
28
28
|
promise.resolve(Utils.resolveRFID(s))
|
|
29
|
-
|
|
29
|
+
cancelScan()
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
override fun onError(i: Int, s: String) {
|
|
33
|
-
handleOnFail(
|
|
33
|
+
handleOnFail(s, promise)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
override fun findICCardEx(bundle: Bundle) {
|
|
@@ -50,11 +50,11 @@ class SunmiRfidHelper(private val payKernel: SunmiPayKernel) {
|
|
|
50
50
|
} catch (e: Exception) {
|
|
51
51
|
e.printStackTrace()
|
|
52
52
|
promise.reject(e)
|
|
53
|
-
|
|
53
|
+
cancelScan()
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
fun
|
|
57
|
+
fun cancelScan() {
|
|
58
58
|
payKernel.mReadCardOptV2.cancelCheckCard()
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -64,6 +64,6 @@ class SunmiRfidHelper(private val payKernel: SunmiPayKernel) {
|
|
|
64
64
|
promise.reject(errorMessage)
|
|
65
65
|
attempt = 0
|
|
66
66
|
}
|
|
67
|
-
else
|
|
67
|
+
else scanRfid(promise)
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -14,6 +14,17 @@ Object.keys(_plugpag).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
var _paystore = require("./paystore");
|
|
18
|
+
Object.keys(_paystore).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _paystore[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _paystore[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
17
28
|
var _sunmi = require("./sunmi");
|
|
18
29
|
Object.keys(_sunmi).forEach(function (key) {
|
|
19
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -36,15 +47,15 @@ Object.keys(_pax).forEach(function (key) {
|
|
|
36
47
|
}
|
|
37
48
|
});
|
|
38
49
|
});
|
|
39
|
-
var
|
|
40
|
-
Object.keys(
|
|
50
|
+
var _stone = require("./stone");
|
|
51
|
+
Object.keys(_stone).forEach(function (key) {
|
|
41
52
|
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] ===
|
|
53
|
+
if (key in exports && exports[key] === _stone[key]) return;
|
|
43
54
|
Object.defineProperty(exports, key, {
|
|
44
55
|
enumerable: true,
|
|
45
56
|
get: function () {
|
|
46
|
-
return
|
|
57
|
+
return _stone[key];
|
|
47
58
|
}
|
|
48
59
|
});
|
|
49
60
|
});
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
|
61
|
+
//# sourceMappingURL=index.d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_plugpag","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_paystore","_sunmi","_pax","_stone"],"sourceRoot":"../../../src","sources":["@types/index.d.ts"],"mappings":";;;;;AAwBA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,IAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,IAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,IAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,IAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,MAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,MAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,MAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,MAAA,CAAAR,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/pax.ts"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/pax.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/paystore.ts"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/paystore.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PlugpagResult = exports.PlugpagEvent = void 0;
|
|
7
|
+
let PlugpagEvent = exports.PlugpagEvent = /*#__PURE__*/function (PlugpagEvent) {
|
|
8
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CUSTOM_MESSAGE"] = -2] = "EVENT_CODE_CUSTOM_MESSAGE";
|
|
9
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_DEFAULT"] = -1] = "EVENT_CODE_DEFAULT";
|
|
10
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_WAITING_CARD"] = 0] = "EVENT_CODE_WAITING_CARD";
|
|
11
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_INSERTED_CARD"] = 1] = "EVENT_CODE_INSERTED_CARD";
|
|
12
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_PIN_REQUESTED"] = 2] = "EVENT_CODE_PIN_REQUESTED";
|
|
13
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_PIN_OK"] = 3] = "EVENT_CODE_PIN_OK";
|
|
14
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_SALE_END"] = 4] = "EVENT_CODE_SALE_END";
|
|
15
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_AUTHORIZING"] = 5] = "EVENT_CODE_AUTHORIZING";
|
|
16
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_INSERTED_KEY"] = 6] = "EVENT_CODE_INSERTED_KEY";
|
|
17
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_WAITING_REMOVE_CARD"] = 7] = "EVENT_CODE_WAITING_REMOVE_CARD";
|
|
18
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_REMOVED_CARD"] = 8] = "EVENT_CODE_REMOVED_CARD";
|
|
19
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CVV_REQUESTED"] = 9] = "EVENT_CODE_CVV_REQUESTED";
|
|
20
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CVV_OK"] = 10] = "EVENT_CODE_CVV_OK";
|
|
21
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CAR_BIN_REQUESTED"] = 11] = "EVENT_CODE_CAR_BIN_REQUESTED";
|
|
22
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CAR_BIN_OK"] = 12] = "EVENT_CODE_CAR_BIN_OK";
|
|
23
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CAR_HOLDER_REQUESTED"] = 13] = "EVENT_CODE_CAR_HOLDER_REQUESTED";
|
|
24
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_CAR_HOLDER_OK"] = 14] = "EVENT_CODE_CAR_HOLDER_OK";
|
|
25
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_ACTIVATION_SUCCESS"] = 15] = "EVENT_CODE_ACTIVATION_SUCCESS";
|
|
26
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_DIGIT_PASSWORD"] = 16] = "EVENT_CODE_DIGIT_PASSWORD";
|
|
27
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_NO_PASSWORD"] = 17] = "EVENT_CODE_NO_PASSWORD";
|
|
28
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_SALE_APPROVED"] = 18] = "EVENT_CODE_SALE_APPROVED";
|
|
29
|
+
PlugpagEvent[PlugpagEvent["EVENT_CODE_SALE_NOT_APPROVED"] = 19] = "EVENT_CODE_SALE_NOT_APPROVED";
|
|
30
|
+
return PlugpagEvent;
|
|
31
|
+
}({});
|
|
32
|
+
let PlugpagResult = exports.PlugpagResult = /*#__PURE__*/function (PlugpagResult) {
|
|
33
|
+
PlugpagResult[PlugpagResult["RET_OK"] = 0] = "RET_OK";
|
|
34
|
+
return PlugpagResult;
|
|
35
|
+
}({});
|
|
36
|
+
//# sourceMappingURL=plugpag.d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PlugpagEvent","exports","PlugpagResult"],"sourceRoot":"../../../src","sources":["@types/plugpag.d.ts"],"mappings":";;;;;;IAmBYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IA+BZE,aAAa,GAAAD,OAAA,CAAAC,aAAA,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
|