quivio-transaction-processor 1.22.3-beta → 1.22.5-beta

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.
@@ -3,7 +3,7 @@
3
3
  xmlns:tools="http://schemas.android.com/tools">
4
4
 
5
5
  <!-- optional: advertise USB host feature but don't force Play Store filtering -->
6
- <uses-feature android:name="android.hardware.usb.host" android:required="false" />
6
+ <uses-feature android:name="android.hardware.usb.host"/>
7
7
 
8
8
  <!-- any permissions your receiver/native code needs -->
9
9
  <uses-permission android:name="android.permission.INTERNET" />
@@ -13,13 +13,16 @@
13
13
  <application>
14
14
  <!-- BroadcastReceiver that listens for USB attach/detach -->
15
15
  <receiver
16
- android:name=".usb.UsbDeviceReceiver"
16
+ android:name="com.rohan.emvcardreaderlib.usb.UsbDeviceReceiver"
17
17
  android:exported="true"
18
18
  android:enabled="true">
19
19
  <intent-filter>
20
20
  <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
21
21
  <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
22
22
  </intent-filter>
23
+ <meta-data
24
+ android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
25
+ android:resource="@xml/device_filter" />
23
26
  </receiver>
24
27
  </application>
25
28
  </manifest>
@@ -40,15 +40,13 @@ enum class ErrorCode(val code: String) {
40
40
  data class SaleTransactionResponse(
41
41
  // CmdResponse section
42
42
  val responseOrigin: String,
43
-
44
- val expiryMonth: String,
45
-
46
- val expiryYear: String,
47
43
  val dsixReturnCode: String,
48
44
  val cmdStatus: String,
49
45
  val textResponse: String,
50
46
 
51
47
  // TranResponse section
48
+ val expiryMonth: String,
49
+ val expiryYear: String,
52
50
  val merchantID: String,
53
51
  val payAPIId: String,
54
52
  val acctNo: String,
@@ -129,9 +129,9 @@ class DsiEMVRequestBuilder(val config: ConfigFactory) {
129
129
  <TranCode>${TransType.EMVZeroAuth.name}</TranCode>
130
130
  <ProcessorToken>TokenRequested</ProcessorToken>
131
131
  <SecureDevice>${secureDevice}</SecureDevice>
132
+ <ReturnClearExpDate>Allow</ReturnClearExpDate>
132
133
  <InvoiceNo>${createUniqueInvoiceNo()}</InvoiceNo>
133
134
  <RefNo>${createUniqueInvoiceNo()}</RefNo>
134
- <ReturnClearExpDate>Allow</ReturnClearExpDate>
135
135
  <Amount>
136
136
  <Purchase>0.00</Purchase>
137
137
  </Amount>
@@ -5,10 +5,13 @@ import android.content.Context
5
5
  import android.content.Intent
6
6
  import android.hardware.usb.UsbDevice
7
7
  import android.hardware.usb.UsbManager
8
+ import android.util.Log
9
+ import com.rohan.emvcardreaderlib.PRINT_TAG
8
10
 
9
11
  class UsbDeviceReceiver : BroadcastReceiver() {
10
12
 
11
13
  override fun onReceive(context: Context, intent: Intent) {
14
+ Log.d(PRINT_TAG, "Receiver triggered: ${intent.action}")
12
15
  val device: UsbDevice? =
13
16
  intent.getParcelableExtra(UsbManager.EXTRA_DEVICE)
14
17
 
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <usb-device vendor-id="2765" product-id="18000" />
4
+ </resources>
@@ -298,7 +298,7 @@ class EMVPaymentManagerModule(private val reactContext: ReactApplicationContext)
298
298
  putString("date", zeroAuthData.date)
299
299
  putString("time", zeroAuthData.time)
300
300
  putString("applicationLabel", zeroAuthData.applicationLabel)
301
-
301
+
302
302
  // EMV specific fields
303
303
  putString("aid", zeroAuthData.aid)
304
304
  putString("tvr", zeroAuthData.tvr)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quivio-transaction-processor",
3
- "version": "1.22.3-beta",
3
+ "version": "1.22.5-beta",
4
4
  "description": "React Native hook for Card payment integration with DataCap",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",