question

ivaandreeva avatar image
ivaandreeva asked ·

Card payment sometimes not triggering onPaymentProcessed on a Clover Mini

Hi there, I am trying to capture an order's payment. I have implemented OnOrderUpdateListener2 and it's method - onPaymentProcessed. Payment with cash works fine, but on a Clover Mini sometimes when the payment is with a card the OnOrderUpdateListener2's onPaymentProcessed doesn't get called at all. The strange thing is that sometimes the method is called as expected, but sometimes not.

Any ideas on this?

Thanks!

Orders
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.

garyf avatar image
garyf answered ·

Hi,

I'm getting this error running a demo with SDK 'com.clover.sdk:clover-android-sdk:latest.release' and Clover 2.0-1836. The code block adds a test OnOrderUpdateListener2 listener which implements onPaymentProcessed

public class TestOrderChangeListener implements OrderConnector.OnOrderUpdateListener2 {
    @Override
    public void onPaymentProcessed(String orderId, String paymentId) {
        System.out.printf("Payment processed: %s, %s\n", orderId, paymentId);
    }

...

orderConnector = new OrderConnector(this, account, null);
orderConnector.addOnOrderChangedListener(new TestOrderChangeListener());

however this is not fired when a payment is complete. Currently trying to find a work around using android.app.Activity#RESULT_OK however ideally the listener process would be used. Any example code of this working would be welcomed.

Many thanks

Gary

2 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.

Hi Gary,

Thanks for getting in touch. Would you mind creating a new thread with your post via this link, so other devs will also be able to find it? I'll start working on it in the meantime.

Thanks,

Mark

0 Likes 0 ·

Your code seems to work fine - I was able to get the intended results with just a few minor changes: http://pastebin.com/4pSQeBJE

0 Likes 0 ·
sg01 avatar image
sg01 answered ·

Hi,

Has this been fixed?

Thank you!

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.

anthonypinto avatar image
anthonypinto answered ·

Looks like there was a bug preventing the callback from being called under certain circumstances depending on the order of synching events internally. There is a fix on the way.

Thanks for bringing this to our attention.

3 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.

Thank you!

0 Likes 0 ·

Hello, could you let me know if this has been fixed please? I'm still seeing some erratic behaviour. Thank you!

0 Likes 0 ·

I'm interested to know if there's an update on this as well. Thanks!

0 Likes 0 ·

Welcome to the
Clover Developer Community