question

alex-3 avatar image
alex-3 asked

Tip amount is not reflected in the original amount

I called the tip screen with ACTION_CUSTOMER_ADD_TIP and the payment screen with ACTION_SECURE_PAY.

The Tip amount is included when I did the transaction, the amount of $100, and the tip amount was $20.

payment-with-tip.png


The transaction was successful and I can see it on the transaction page.

screenshot-2022-10-20-at-112306-am.png


But the tip amount is not reflected in the order and it didn't show up on the printing receipt too.

screenshot-2022-10-20-at-112501-am.png


Below is my code to call Secure pay and Tip screen.

override fun openCloverSecurePay(tip: Long): Intent {
        val transactionSettings = TransactionSettings()
        transactionSettings.cardEntryMethods = Intents.CARD_ENTRY_METHOD_ICC_CONTACT or Intents.CARD_ENTRY_METHOD_MAG_STRIPE or Intents.CARD_ENTRY_METHOD_NFC_CONTACTLESS
        transactionSettings.signatureEntryLocation = DataEntryLocation.ON_SCREEN
        transactionSettings.signatureThreshold = 1000000
        transactionSettings.autoAcceptSignature = true
        // To stop re-try if failed or declined
        transactionSettings.disableRestartTransactionOnFailure = true
        transactionSettings.disableDuplicateCheck = true

        // Create Intent to Start Secure Pay App.
        val intent = Intent(Intents.ACTION_SECURE_PAY)
        intent.putExtra(Intents.EXTRA_AMOUNT, amount)
        intent.putExtra(Intents.EXTRA_ORDER_ID, order_id)
        intent.putExtra(Intents.EXTRA_TRANSACTION_SETTINGS, transactionSettings)
        intent.putExtra(Intents.EXTRA_SIGNATURE_THRESHOLD, 1000000)
        intent.putExtra(Intents.EXTRA_TIP_AMOUNT, tip)
        intent.putExtra(Intents.EXTRA_AUTO_ACCEPT_SIGNATURE, true)
        return intent
    }

    override fun showTipPayment(): Intent {
        val intent = Intent(Intents.ACTION_CUSTOMER_ADD_TIP)
        intent.putExtra(Intents.EXTRA_ORDER_ID, order_id)
        intent.putExtra(Intents.EXTRA_AMOUNT, amount) 

        return intent
    }


May I know how can I update the tip amount in the order and add it to the receipt?

And I also want to ask customer's signature after card payment . How do I achieve it?

Looking forward to your reply!

Clover Android SDK
10 |2000

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

0 Answers

·

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