AuthorizeNet / inperson-sdk-android

Mobile SDK for Android point-of-sale applications
Other
23 stars 38 forks source link

onPrepareQuickChipDataSuccessful not firing #67

Open nathanoertel opened 3 years ago

nathanoertel commented 3 years ago

I'm attempting to implement this without the UI according to the instructions. This is my code:

    val l = object : EMVTransactionManager.QuickChipTransactionSessionListener {
      override fun onReturnBluetoothDevices(bluetoothDeviceList: List<BluetoothDevice>) {
      }

      override fun onBluetoothDeviceConnected(bluetoothDevice: BluetoothDevice) {
      }

      override fun onBluetoothDeviceDisConnected() {
      }

      override fun onTransactionStatusUpdate(transactionStatus: String) {
        sendMessage("Transaction Status Update: ${transactionStatus}")
      }

      override fun onPrepareQuickChipDataSuccessful() {
        sendMessage("Chip data saved Successfully")
      }

      override fun onPrepareQuickChipDataError(error: EMVErrorCode, cause: String) {
        sendMessage("onPrepareQuickChipDataError")
        sendMessage(cause)
      }

      override fun onEMVTransactionSuccessful(result: net.authorize.aim.emv.Result) {
      }

      override fun onEMVReadError(emvError: EMVErrorCode) {
        if (emvError != null) {
          sendMessage("EMV Error: ${emvError.errorString}")
        } else sendMessage("EMV Error")
        promise.reject("EMV Read Error", emvError.errorString);
      }

      override fun onEMVTransactionError(result: net.authorize.aim.emv.Result, emvError: EMVErrorCode) {
        sendMessage("onEMVTransactionError")
      }
    }

    EMVTransactionManager.prepareDataForQuickChipTransaction(context, l)

I get the message Transaction Status Update: Waiting for device... from the onTransactionStatusUpdate event but never get anything from either onPrepareQuickChipDataSuccessful or onPrepareQuickChipDataError. I've inserted the card into the device and waited for an extended period of time.

I do not see this actually used in the sample app anywhere. Does this work and what might I be doing wrong?

amimishr commented 3 years ago

@nathanoertel Which Android device you are using?

Could you try the sample app and see if you are able to connect to the reader. There is a possibility that it needs a configuration update .

nathanoertel commented 3 years ago

@amimishr I've tried:

I've checked the software on the chipper using the Auth.net app and the software on all chippers we have tried (2 BT and 1 audio) are up to date.

This operation doesn't work with the sample app or our integration of it on any device. I was told by Authorize.net's support that I was out of luck because I didn't use some mystery list of approved devices (they didn't include what that list was) and was told to switch to iOS.

amimishr commented 3 years ago

@nathanoertel Using the sample app, could you try doing OTA update?

nathanoertel commented 3 years ago

@amimishr that function doesn't work in any way.

MouaYing commented 3 years ago

This also will not work for me. I'm using a BBPOS CHC2XBT Chipper 2X BT.