question

amar avatar image
amar asked amar commented

com.clover.intent.action.REFUND_PROCESSED did'nt have refund id?

@Jeffrey Blattman Is there any way to get refund tracking i.e How can we track refund in real time?
I have used broadcast listener for 'com.clover.intent.action.REFUND_PROCESSED' , but it provides only refund amount, payment info etc but not refund ID or unique id.

Is there anything else we can use?
Clover Android SDKClover MiniClover Station
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 amar commented
com.clover.intent.action.REFUND_PROCESSED is not part of our public SDK so use it at your own risk. If someone told you to use that that were wrong to do so. That being said, that broadcast contains the order and payment IDs.
Intent intent = new Intent(CloverIntent.BROADCAST_REFUND);    
intent.putExtra(CloverIntent.EXTRA_ORDER_ID, orderId);    
intent.putExtra(CloverIntent.EXTRA_PAYMENT_ID, refund.getPayment().getId());
intent.putExtra(CloverIntent.EXTRA_AMOUNT, refund.getAmount());
where,
public static final String EXTRA_ORDER_ID = "com.clover.intent.extra.ORDER_ID";  
public static final String EXTRA_PAYMENT_ID = "com.clover.intent.extra.PAYMENT_ID";
Again, this is not public and not guaranteed to work in the future and can change at any time.
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.

So, Is there any alternate for this? I mean how can I get notify for refund in real time?

0 Likes 0 ·

Welcome to the
Clover Developer Community