question

ondrej avatar image
ondrej asked ondrej commented

Is synchronization of the order state functional in the sandbox environment?

Hello,

few months ago I was using an OrderConnector.OnOrderUpdateListener to be notified when a Clover payment done using the web REST API was synchronized to the device where the order was created.

It was working fine.

Without any code change, this stopped working. Now, the OnOrderUpdateListener is not notified anymore.

I have tried to upgrade also the Clover SDK to clover-android-sdk:152.9 without any change in behavior.

Was there any change in the functionality or is it some known problem limited just to the sandbox environment?

Thank you, Ondrej

OrdersSandbox
4 comments
10 |2000 characters needed characters left characters exceeded

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

First thing is to check if the push client is working okay. Do a adb logcat | grep -i push and make the output available on pastebin.

0 Likes 0 ·

Hi Jeff, thanks. I have checked the output and there is nothing. I have tried also to turn off the emulator and turn it on to no avail. Is there a way to start it manually?

Regards, Ondrej

0 Likes 0 ·

Hmmm. You don't see anything like this? http://pastebin.com/UNxEvs0R. Rebooting the device (or killing and letting com.clover.engine restart) should kick everything to restart.

0 Likes 0 ·

Hi Jeff,

I have tried it today with a clean emulator installation and all that I got was:

    Line 6637: I/PushRunner( 1871): run(PushRunner.java:105): Connect returned
    Line 6639: I/PushRunner( 1871): run(PushRunner.java:103): Connecting

No other lines mentioning PushRunner are present in the log. Is there anything else that can be done?

Thank you, Ondrej

0 Likes 0 ·

1 Answer

Mark Mullan avatar image
Mark Mullan answered ondrej commented

Hi,

The listener is working fine for me. I'm POSTing payments via the REST API and the listener is being triggered. I'm also on Sandbox. Are you still seeing the issue on your end?

        orderConnector = new OrderConnector(this, mAccount, null);
        orderConnector.connect();

        orderConnector.addOnOrderChangedListener(new OrderConnector.OnOrderUpdateListener() {
            @Override
            public void onOrderUpdated(String orderId, boolean boo) {
                Log.d(TAG, "onOrderUpdated: " + orderId);
            }
        });
1 comment
10 |2000 characters needed characters left characters exceeded

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

Hi Mark,

thank you for help and the code sample. Unfortunately, it simply does not work in my case. I am in the context of a tender processing. I see from the log that:

  1. The listener is initialized
  2. There is a POST to https://apisandbox.dev.clover.com/v3/... http/1.1 and a successful response
  3. The listener is not notified. I have tried to wait for 30 secs - it does not help. The payment is synchronized only after the cashier tap on the synchronization icon in the payments screen. It was ok few months ago.

Thank you, Ondrej

0 Likes 0 ·

Welcome to the
Clover Developer Community