question

vhernandez avatar image
vhernandez asked David Marginian Deactivated commented

How to retrieve a payment on android using payment connector?

Hello,

I want to retrieve a payment on android using the payment connector (com.clover.sdk.v3.connector) methods , I've tried

        RetrievePaymentRequest r = new RetrievePaymentRequest();
        r.setExternalPaymentId("ExternalPaymentId");
        AsyncTask.execute(() ->paymentConnector.retrievePayment(r));

the callback gets called but always returns not payment found

{
  "success": false,
  "result": "FAIL",
  "payment": null,
  "reason": "Payment not found",
  "message": null
}

I've also tried

AsyncTask.execute(paymentConnector::retrievePendingPayments)

And the same

{
  "success": true,
  "result": "SUCCESS",
  "reason": null,
  "message": null,
  "pendingPaymentEntries": {
    "elements": []
  }
}

Am I missing anything?, I really need to retrieve a payment.

Note: I'm connecting android pay display usb app over a mini

Thanks!!

Clover Android SDKUSB Pay Display
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 David Marginian Deactivated commented

Are you actually passing the string "ExternalPaymentId"

7 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 ·

Thanks for the quickly response, and yes I pass the external id.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ vhernandez commented ·
Sorry you are passing a string with the exact value in your post? You need to pass the actual external ID you set when you made the payment. Was the payment taken on the device? When?
0 Likes 0 ·
vhernandez avatar image vhernandez David Marginian ♦♦ commented ·

mmm not I pass a real externalPaymentId, I even took it from https://sandbox.dev.clover.com/transactions/

I've tried to pass != payments (recently payments and an hour ago).

I have also tried retrievePendingPayments method and returns empty



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