question

ryanram avatar image
ryanram asked ryanram commented

Android Clover SDK v3 payment connect preAuth callback never gets called.

We currently have a clover app that uses the preAuth() call. but for some reason, the clover screen completes the payment and shows the receipt screen thereafter which seemed like when you pay from clovers own payment app.

I'm assuming that you can pre vault the card token for processing the payment at a later point in the app flow. Or is it supposed to work that way?


we were expecting the onPreAuthResponse to be called. but it never gets called.

here's a sample call:

PreAuthRequest preAuthRequest = new PreAuthRequest();
preAuthRequest.setExternalId(ExternalIdUtils.generateNewID());
preAuthRequest.setAmount(10000L);
preAuthRequest.setOrderId(order.getId());
preAuthRequest.setCardEntryMethods(CardEntryMethods.ALL);

paymentConnector.preAuth(preAuthRequest);

then waiting for the callback via:

IPaymentConnectorListener cloverListener = new IPaymentConnectorListener() {
    @Override
    public void onPreAuthResponse(PreAuthResponse response) {
        ...
    }
    ...
}

thanks for anyone who can point me in the right direction or guide

PaymentsPaymentConnectorAuth
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 ryanram commented

I can't reproduce the problem. onPreAuthResponse is called in our example app, you may want to take a look at it.

but for some reason, the clover screen completes the payment and shows the receipt screen thereafter which seemed like when you pay from clovers own payment app.

That is correct. An example of a preauth is a bar tab. You are pre-authorizing a card for a set amount (50 dollars). After the card is swiped you will see the receipt screen. At a later point in time (when the customer closes out their tab in the above example) you would capture the preauth via capturePreAuth. It is unclear if this is the behavior you actually desire, if you just want to save a card for future use then take a look at vaultCard.

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

ryanram avatar image ryanram commented ·

thanks, I did try it using vaultCard(..) and I'm getting this error instead:


{
"success": false,
"result": "UNSUPPORTED",
"reason": "Request Validation Error",
"message": "In vaultCard: VaultCard\/Payment Tokens are not supported for the Clover Station.",
"card": null
}


I know the response is straight forward, but is there any alternative to vaulting a card in a clover station device? in our use card we need to be able to use a card later on the transaction flow..


thanks


also another question is, is it possible to override the preAuth behavior to not process the order and just capture the card like vaulting?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ ryanram commented ·

Vaulting on a Station 1 is not supported. I believe it is on a Station 2. You may want to disable this feature for Station 1 in your app.

0 Likes 0 ·
ryanram avatar image ryanram David Marginian ♦♦ commented ·

so an a station 1 device its out of the equation, but is it possible to process via clover api, using manual card entry instead?


also another question is, is it possible to override the preAuth behavior to not process the order and just capture the card like vaulting?

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