question

vhernandez avatar image
vhernandez asked vhernandez commented

Set custom data before a transaction call and retrieve it on the response

Hello,

I'm coding an android app that works with the Secure network display, I'm wondering if there is any way to set data before perform a request such as (sale, pre auth, capture etc) and recover that data on the response?.

Thank you for your help.

Clover Android SDKsecure network pay displayRemote Pay Android
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

·
David Marginian avatar image
David Marginian Deactivated answered vhernandez commented

I am not sure what the purpose of doing that would be but there is an extras property on BaseTransactionRequest that you could probably use.

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

Hello David, thank you for your reply.

I see I can set that property, but I don't see my map on the response, I've tested it calling

val preAuthRequest = PreAuthRequest(amount, getNextId())

preAuthRequest.extras = extras

cloverConnector.preAuth(preAuthRequest)

Once I get the response onPreAuthResponse(response: PreAuthResponse?) I don't see the map.

Where can I retrieve it?

Thanks.

0 Likes 0 ·
Okay I am not sure what that is for then. Can you explain what your use case is it doesn't really make sense for you to pass something in and then just get the same value back.
0 Likes 0 ·
vhernandez avatar image vhernandez David Marginian ♦♦ ·

Sure, we trigger payments from a custom website to an specific device (that's running our Android app), the website sends custom data (metadata) and it needs the metadata back (on the response), that's why I'm asking. Right now I keep the metadata on memory, however the device can call multiples transaction at the same time (e.g. sale and a failed capture on BG, void on BG etc). so to keep the metadata on memory is not useful anymore.

0 Likes 0 ·
Show more comments

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