question

lucdowell avatar image
lucdowell asked ·

Pull data of order post payment

Hi, my clover sdk app is currently creating a tender button on the merchant side. When pressed, the user has an option to specify a username (which is connected to another service outside Clover). I know this is not the most ideal user interaction. My goal is to be able to pull data from the order after the payment is processed and send it to that specific user.


I've been reading through the docs, and I found the function:

ACTION_PAYMENT_PROCESSED

This function returns a string which states whether the payment went through. Is there a function that runs after the payment is processed? I could then send order data to that specific username directly.
Otherwise, is there an area where I could check for that intent "action_payment_processed" post-payment, and if it is paid, I could then send the data?

As a last option, I heard that potentially a rest API could be a solution as well, but I'm not exactly sure how this would work.

Thank you for your help!

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

This function returns a string which states whether the payment went through. Is there a function that runs after the payment is processed?

What's the difference between "payment went through" and "payment processed"?

ACTION_PAYMENT_PROCESSED is broadcast when the payment is added to the order on the device, which is after it was completed successfully.

Otherwise, is there an area where I could check for that intent "action_payment_processed"

That's a broadcast, so you create broadcast receiver to listen for that in your app.

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

Sorry for not being clear. There is no difference between "payment went through" and "payment processed" in this case.
So since the ACTION_PAYMENT_PROCESSED is a broadcast, how will I receive that broadcast in my app? Doesn't payment happen in Register or Sales, so if I add a broadcast receiver to my app, wouldn't it not go through?

I just need a bit of clarity in terms of the actual integration of broadcast receivers into my app to listen for ACTION_PAYMENT_PROCESSED.

0 Likes 0 · ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community