question

Danielle Cox avatar image
Danielle Cox asked Danielle Cox commented

ACTION_REFUND reference to original payment

Is there any value I can use when processing a custom tender that I can use to match up with a refund? Or is there a way to give a reference to Clover that I would get in that same case?

The closest I see is that I get the order ID, but in the case of split tender, I may have multiple transactions to choose from and would love to tie the two together?

I see a reference to an External Pay ID which would be perfect for what I want, but how do I get to the Payment object from the intent?

Thank you again,

Danielle

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered Danielle Cox commented

The following extras are included with ACTION_REFUND,

  public static final String EXTRA_MERCHANT_ID = "clover.intent.extra.MERCHANT_ID";
  public static final String EXTRA_CURRENCY = "clover.intent.extra.CURRENCY";
  public static final String EXTRA_ORDER_ID = "clover.intent.extra.ORDER_ID";
  public static final String EXTRA_PAYMENT_ID = "clover.intent.extra.PAYMENT_ID";
  public static final String EXTRA_CLIENT_ID = "clover.intent.extra.CLIENT_ID";
  public static final String EXTRA_LINE_ITEM_IDS = "clover.intent.extra.LINE_ITEM_IDS";
  public static final String EXTRA_AMOUNT = "clover.intent.extra.AMOUNT";

Pasting it here since I know the online javadocs are not up to date.

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

Danielle Cox avatar image Danielle Cox commented ·

Thank you - I was wondering what I could officially use. . is there any way to get the paymentid when I am processing ACTIONMERCHANT_TENDER? That way I could match them up with this intent

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

I think you'd need to set the client ID (external payment ID) in your custom tender processing then use that. The payment ID doesn't exist until the custom tender processing processing is complete and returned to our code and processed. I agree it would have been nice to pass along the target payment ID to the custom tender.

0 Likes 0 ·
skodama avatar image skodama commented ·

Hi Jeff,

I'm a bit confused about the ACTION_REFUND. Is it a broadcast from the Clover? Or can we launch a Clover REFUND activity with it?

I just have tried to launch the activity with new Intent(Intents.ACTION_REFUND), but I got an error saying "No Activity found to handle Intent".

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

It's analogous to ACTION_MERCHANT_TENDER and ACTION_CUSTOMER_TENDER, except for refunds not payments. It allows your custom tender to approve or deny a refund as well as of course process the refund in your back end.

0 Likes 0 ·

Welcome to the
Clover Developer Community