question

binitashah avatar image
binitashah asked David Marginian Deactivated answered

transactionSettings not applied during payment using SECURE_PAY_REQUEST_CODE in Clover flex.

Hello, please check my code below:

 val transactionSettings = TransactionSettings()
transactionSettings.cardEntryMethods =   cardEntryMethodsAllowed
transactionSettings.signatureEntryLocation = DataEntryLocation.ON_SCREEN
transactionSettings.signatureThreshold = 1000000<br>transactionSettings.cloverShouldHandleReceipts = true<br>transactionSettings.allowOfflinePayment=true<br>transactionSettings.approveOfflinePaymentWithoutPrompt=false<br>transactionSettings.disableReceiptSelection=false<br>transactionSettings.tipSuggestions = listTip<br>transactionSettings.tipMode = TipMode.ON_SCREEN_BEFORE_PAYMENT]<br>transactionSettings.disableRestartTransactionOnFailure = true<br>transactionSettings.disableDuplicateCheck = false<br>
intent.putExtra(Intents.EXTRA_AMOUNT, amount)
intent.putExtra(Intents.EXTRA_ORDER_ID, order.id)
intent.putExtra(Intents.EXTRA_TRANSACTION_SETTINGS, transactionSettings)

startActivityForResult(intent, SECURE_PAY_REQUEST_CODE)

When I run application it is not asking for tip, not printing receipt once payment successful.
secure network 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.

Frank Faustino avatar image
Frank Faustino Deactivated answered ismdcf commented
EXTRA_TRANSACTION_SETTINGS isn't a valid extra for ACTION_SECURE_PAY intent. Actually, tipping isn't part of the secure payment flow. You'll have to either gather the tip amount using your app or start the ACTION_CUSTOMER_ADD_TIP activity prior to calling ACTION_SECURE_PAY and then provide the tip amount as EXTRA_TIP_AMOUNT.

You can infer which extras are supported for each Intent by referring to our documentation: https://clover.github.io/clover-android-sdk/com/clover/sdk/v1/Intents.html#ACTION_CUSTOMER_ADD_TIP
2 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.

ismdcf avatar image ismdcf commented ·

Hi @Frank Faustino I tried your code to get the tip and to pass it as provided tip to action secure pay but this works only on clover mini it does not work with clover station 2018 it gives the following error

    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=clover.intent.action.CUSTOMER_ADD_TIP (has extras) 

What is the best way to get the tip which will work on all devices for ACTION_SECURE_PAY some work with a station some work with mini?

0 Likes 0 ·
ismdcf avatar image ismdcf commented ·

@Jeffrey Blattman @Admin @David Marginian Highly appreciate any help on this issue.

0 Likes 0 ·
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.

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