developermypos / myPOS-SDK-Android

myPOS SDK Android enabling to integrate Apps with myPOS Card Terminals for Card Payments processing
49 stars 22 forks source link

Cannot take a payment #25

Closed hennaboy closed 3 months ago

hennaboy commented 3 months ago

Hello,

Is this still being developed as the demo app is so out of date with depreciated code its quite astonishing for a payment service.

We are trying to implement a demo but cannot take a payment. It does not transfer the amount due to the card reader and then the app will quit with the following

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDeviceConnection.controlTransfer(int, int, int, int, byte[], int, int)' on a null object reference at com.mypos.slavesdk.serial.CdcAcmSerialDriver$CdcAcmSerialPort.sendAcmControlMessage(CdcAcmSerialDriver.java:190) at com.mypos.slavesdk.serial.CdcAcmSerialDriver$CdcAcmSerialPort.setParameters(CdcAcmSerialDriver.java:239) at com.mypos.slavesdk.XgdUsbConnectionHandler$2.run(XgdUsbConnectionHandler.java:154) at java.lang.Thread.run(Thread.java:764)

User actions: 2024-05-23 18:04:27: MainActivity created 2024-05-23 18:04:27: MainActivity resumed

StiliyanKovachev commented 3 months ago

Hi,

can you confirm you are using myPOS Go device and latest sdk version 'com.mypos:slavesdk:2.1.3' ?

Thanks

hennaboy commented 3 months ago

Yes myPOS Go and using the latest SDK version com.mypos:slavesdk:2.1.3

I also amended the demo app here and it has the same issues. Try to take a payment and it responds with a toast message

LAST TRANSACTION NOT COMPLETED

You cannot process a payment and no payment is ever sent to the card reader for a card to be presented.

The error I posted in my previous message I was able to obtain by implementing activity on crash to display what is occuring.

StiliyanKovachev commented 3 months ago

Please follow the procedure below in order to enable profile “Cash Register”.

  1. Press on “FUNC”,
  2. Go to page settings page 3
  3. Select 6. “Change profile”;
  4. Choose 2. “Cash register”.
  5. Device is being restarted;
  6. Choose type of connectivity to master device (BT or USB)
  7. Choose type of connectivity to financial host (BT, USB, SIM, WiFi)
  8. Device waiting for connection from the host.

If the error proceed please share more details on for the android device you are working on.

hennaboy commented 3 months ago

Just checked I have go 2 machines. I assume they are slightly different as I have F1 and F2 buttons and no FUNC

StiliyanKovachev commented 3 months ago

For GO 2 the F2 is the func button.

hennaboy commented 3 months ago

Not finding that option as you have stated here. F2 page 3 option 6 is send log I don't see any profile options

StiliyanKovachev commented 3 months ago

give me your serial number and I will change your software package, After that you have to execute a 'check for updates'.

hennaboy commented 3 months ago

K300WL19304

If this is the solution then I will also need it for all my devices as I have 4. But lets check with this one initially.

StiliyanKovachev commented 3 months ago

The update is set, please check for it. When it is installed please follow the steps for Cash register mode.

hennaboy commented 3 months ago

Yes, this is now working as required.

Could you please also send update for the following

K300WL32829 K300WL32125 K300WL31020

StiliyanKovachev commented 3 months ago

updates are set, please update.