question

pratik avatar image
pratik asked ·

"Type card" function not present while accepting payment using android SDK on clover flex.

Manual card entry button while accepting payment is missing since a few months back. Earlier it was there and working fine. We have first-generation flex with android 5. We are using clover-android-sdk version 228.3 (also tried with the latest version 262.2) and while accepting the payment "type card" button is not showing up on the payment screen in our integrated application but, the "Sale" application when opened manually, it is showing the "type card" button.

Clover Android SDKClover Flex
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.

David Marginian avatar image
David Marginian answered ·

You can't use Intents.CARD_ENTRY_METHOD_ALL in customer facing mode. Please see our Native POS Example and note the additional bit shift - https://github.com/clover/remote-pay-android-examples/blob/f417b5d0e8904beac676f52d6cefd63cfc003e22/native-android-example-pos/src/main/java/com/clover/example/model/POSStore.java. Please use the card entry methods from our example.

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.

Why can't we use "Intents.CARD_ENTRY_METHOD_ALL"?

And As per the examples, you have hardcoded the card entry methods in the code. Are card entry methods defined somewhere in one place as "Intents"? or do we have to hardcode card entry methods in our code in the same manner?

0 Likes 0 ·

Because, that is for merchant, not customer facing. There is an extra bit shift for customer facing per the example I provided. Yes, I believe you need to define them in your code.

0 Likes 0 ·
pratik avatar image pratik David Marginian ♦♦ ·

Thanks a lot, It's working for me now.


0 Likes 0 ·
David Marginian avatar image
David Marginian answered ·

You will have to provide details on how you are initiating the payment.

1 comment
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.

Thank you for your quick response, we are initiating the payment by following way.


        PaymentConnector paymentConnector = initializePaymentConnector()

        SaleRequest saleRequest = new SaleRequest();
        saleRequest.setExternalId(ExternalIdUtils.generateNewID());
        saleRequest.setTipAmount(100L);
        saleRequest.setTipMode(TipMode.TIP_PROVIDED);
     
        saleRequest.setDisableReceiptSelection(true);
        saleRequest.setSignatureEntryLocation(DataEntryLocation.NONE);
        saleRequest.setTaxAmount(100L);
        saleRequest.setAmount(1000L);
        saleRequest.setCardEntryMethods(Intents.CARD_ENTRY_METHOD_ALL);
        saleRequest.setDisableDuplicateChecking(true);
        saleRequest.setAutoAcceptPaymentConfirmations(true);
        saleRequest.setDisablePrinting(true);

        paymentConnector.sale(saleRequest);
0 Likes 0 ·

Welcome to the
Clover Developer Community