question

vhernandez avatar image
vhernandez asked David Marginian Deactivated commented

onVoidPaymentResponse not trigering

I'm implementing the DfaultCloverConnectorListener interface, when I void a payment the callback does not get trigger, I'm implementing also capture, sale, preAuth and all those callbacks get triggered, just void doesn't.

Device: clover mini

SDK: com.clover.sdk:remote-pay-android-connector:3.0.0

Clover Android SDKRemote 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.

David Marginian avatar image
David Marginian Deactivated answered
10 |2000

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

vhernandez avatar image
vhernandez answered vhernandez edited

I saw the implementation from that project, my implementation is similar, looking at the log, I see this error: stats transaction denied, SECURE_PAY / ACTIVITY_REQUEST -> VOID_PAYMENT

1617557950380.png

any idea why or how can I fix it?


Thank you so much!!


1617557950380.png (124.4 KiB)
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

Can you explain your flow?

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

vhernandez avatar image vhernandez commented ·

Hello,

I request invoices from our api, then the user picks an invoice out, after that I pre-auth the invoice selected, then I show up an agreement screen, if the user accepts (I will capture), if the user denies (I will void), after the user accepts or declines I save the data on my db.

I have a bg service running every 1 minute that picks out the data to from my db, and capture/void the payment.

Note: capture works fine so far, I log the request and response, no issues, however, after I void the payment, the onVoidPaymentResponse method never happens.


Thank you

0 Likes 0 ·
vhernandez avatar image vhernandez vhernandez commented ·

I think void does not work in background (remote-pay-android-connector), so I added the clover-android-connector-sdk to use the payment connector (because that is not included on remote-pay-android-connector), then I can call the paymentConnector.voidPayment(VoidPaymentRequest) (in background), so I'm getting response back (in background), however, I'm facing another problem now, all responses from onVoidPaymentResponse are failing, I'm sending the correct paymentId, the correct orderId and the voidReason as "USER_CANCEL", why all responses back are an error? this is the response I always get.

VoidPaymentResponse{json='{"success":false,"result":"FAIL","reason":null,"message":"Void was null","paymentId":null}


Thanks again for you help

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ vhernandez commented ·
I think void does not work in background (remote-pay-android-connector), so I added the clover-android-connector-sdk to use the payment connector (because that is not included on remote-pay-android-connector), then I can call the paymentConnector.voidPayment(VoidPaymentRequest) (in background),
 so I'm getting response back (in background), 

This doesn't make any sense. remote-pay-android-connector is the Remote Pay Android SDK which is used when you have a remote integration. clover-android-connector-sdk is Payment Connector and used for native integrations. You can't pick and choose these, the integration type dictates what you should be using.

VoidPaymentResponse{json='{"success":false,"result":"FAIL","reason":null,"message":"Void was null","paymentId":null}

You say you are setting the paymentId, but it is coming back as null in the response.

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