question

wsetchell avatar image
wsetchell asked bbiwer commented

Updating order refund status

I'm building a custom tender, and I'm trying to add refund support. How do I let Clover know that the refund has finished?

Here's what's happens

  1. Launch Orders app.
  2. Select Order > Exchange/Refund > Select all items > Refund
  3. Orders opens my activity.
  4. My app refunds the customer's money.
  5. My activity finishes with RESULT_OK with some extras (see below).
  6. I see the order state is not modified in the Orders app. I expect to see the order and line items marked as refunded.

Here's how I my refund activity finishes.

import com.clover.sdk.v1.Intents;
...
Intent data = new Intent();
data.putExtra(Intents.EXTRA_ORDER_ID,
    getIntent().getStringExtra(Intents.EXTRA_ORDER_ID));
data.putExtra(Intents.EXTRA_AMOUNT, cloverAmount);
data.putExtra(Intents.EXTRA_CLIENT_ID, MY_CLOVER_CLIENT_ID);
finishActivityWithResult(RESULT_OK, data);

Do you know what I need to do to tell the Orders app about the refund?

1 comment
10 |2000

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

bbiwer avatar image bbiwer commented ·

Make sure you're passing the paymentid and lineitemids extras or Clover will not recognize the refund or mark the order's line items as refunded. Without paymentid, I believe the Orders app stays on the "Exchange/Refund Items" screen after your activity returns. Without lineitemids, Clover does change the status of the selected line items and they can be refunded multiple times; however, I am not currently seeing correct behavior from Clover on this and have a question open regarding it.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community