question

Robin Walmsley avatar image
Robin Walmsley asked Robin Walmsley commented

Issues taking Payments and payment notifications

Our app is a webview retail system written in Javascript, Html and CSS. It interacts with the SDK via calls to the Android "shell" app.
We have had a stable release for a few years now, but recent modifications and enhancements to the Java app to accomordate new features, new Clover devices and new versions of the Clover SDK have resulted in a number of problems. One of the modifications we have made to our app is to pass the basket items to the Java APK to display on the forward facing device, this has created a number of issues, please see these below.
Here are our outstanding issues ..

  • A payment is taken by using Intents.ACTION_CLOVER_PAY and we receive the OrderId TransactionType (card or cash) and if it is a refund or a sale. In order to get more information, an OrderConnector is executed and payments related to that orderID are filtered and from the one that matches all the info we need is extracted:
    * TenderID
    * Amount
    * CashTendered
    * PaymentId
    What happens if a split payment is done? Because an intent that is called with an ActivityResultContracts is only gets fired when the first payment is detected.

  • A refund is also taken using the same intent and returns the same Extras as part of the intent in the ActivityResultContracts, so how can I extract information like the one described above? Is it the same way?

  • With regard to trying to use the forward facing display to show the basket contents. The CFP SDK documentation is not clear on how I can achieve seamlessly integration in the Station PRO and Station with a tethered MINI (v1 and v2). I managed to get the Station PRO working, but when I tried to do this:

    executor.execute(() -> {
                         
      remoteDeviceConnector.sendMessageToActivity(new MessageToActivity(CUSTOMER_ACTIVITY_NAME,"FINISH"));
    });

    several times after each item is scanned, it blocks the MINI in the Station PRO, therefore any calls to remoteDeviceConnector.disconnect(); are ignored (or it doesn't release the MINI in order to take the payment or the refund). What should be the correct way to:
    1 – Request the screen if it is not being used
    2 – Send a first payload when the first item is scanned.
    3 – Send a message to the activity using the function provided in the RemoteDevice SDK as many times as needed (taking into account that it needs a pool to execute those task, so it may display items in a different order but at the end the result will be the same)
    4 – Release the MINI when a payment/refund is at the next step

  • Things related to the lifecycle of the CFP:
    What happens if the user by mistake or some other reason, minimises the app in the POS? What should be the course of action here?

  • Finally, the BarcodeScanner. Our javascript app uses a handheld or built in barcode scanner. The output from these devices is a character string, which is akin to keyboard input. Is it possible to listen from the Android Java app instead, effectively intercepting the input from the scanning device ? Importantly please note that the javascript app will have focus,
    Is this code part of an example?
private class BarcodeReceiver extends BroadcastReceiver {
       @Override
       public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
           if (action.equals(BARCODE_BROADCAST)) {
                String barcode = intent.getStringExtra("Barcode");
                if (barcode != null) {
                    scannedBarcode = barcode;
                    displayBarcode();
                }
            }
        }
}

Thanks in advance for your help.

Robin Walmsley

PaymentsClover MiniClover Stationbarcode scanner
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
tadaham avatar image
tadaham answered Robin Walmsley commented

Hi Robin,

Thank you for raising posting to our community. We have raised this issue internally and are working towards a resolution. Could you kindly help us with you Developer Name, App Name and App ID respectively and someone from our team at Clover Developer Relations will get in touch with you shortly.


Thanks,

Clover Developer Relations


2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Developer Name : Aptimyz Ltd

App Name : Retail
App Id : FMXCE0SJF7VJT
Thanks

0 Likes 0 ·
App Name may be Aptimyz EU not Retail
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community