I'm looking forward to have a listener for refunds and it's amounts with it's payment/refund ID.
Is this possible using the Intents?
I don't see an Intent publicly exposed in the SDK that you can operate from a refund is performed. We have our own internal intent com.clover.intent.action.REFUND_PROCESSED
, but we could refactor that away at any time so I wouldn't rely on that. You might instead consider using a Service that listens using an IOnOrderUpdateListener2
which you can find in the clover-android-sdk. Remember that there are Refunds, Voids (cancels a payment) and Credits (returns money without an associated payment). I'm not sure which you might be interested in. If I were developing an app I would ideally like to tap into the TransactionsProvider that is maintained by the Clover Transactions app, that gives all the information about transactions through a ContentProvider and changes to transactions via ContentObserver notifications. Unfortunately the contract for the TransactionsProvider is not exposed. The IOnOrderUpdateListener2
seems like the next best thing.
Great answer, the issue with this is that my app reports sales to the goverment. I need to know if voids/refunds have been made and report them. It can't use any modules that the 2000 software doesn't have. Are these listeners available without the modules?
For Merchants using Clover purely as a payment terminal where there are no orders you are out of luck as far as I can tell. I have a ticket open to expose the Transactions ContentProvider with our developer platform team. Hopefully they will see that and/or this discussion and move on it.
In addition to what Jacob said, I'm pretty sure you can just add a broadcast listener for com.clover.intent.action.REFUND_PROCESSED as this is how some apps are listening for refunds at the moment.
But I would suggest that the best long term option is to have a server that can receive payment webhook events. That way you will be notified about payments and refunds in a uniform manor across all device and plan types. (https://docs.clover.com/build/web-app...)
I think that `com.clover.intent.action.REFUND_PROCESSED` and `com.clover.intent.action.CREDIT_PROCESSED` will only work on merchants that are using Clover Orders, on so called 2000 merchants that are using Clover solely to take payments in a semi-integrated setup with a non-Clover POS this intent won't be invoked.
3 People are following this question.