question

binitashah avatar image
binitashah asked Jeffrey Blattman edited

How to pass amount using ACTION_SECURE_PAY?

Below is my code. But its showing always 0 in clover payment gateway.

val transactionSettings = TransactionSettings()
                transactionSettings.cardEntryMethods =
cardEntryMethodsAllowed// To stop asking Customer SignaturetransactionSettings.signatureEntryLocation = DataEntryLocation.NONEtransactionSettings.signatureThreshold = 1000000transactionSettings.disableRestartTransactionOnFailure = truetransactionSettings.disableDuplicateCheck = true// Create Intent to Start Secure Pay App.val intent = Intent(Intents.ACTION_SECURE_PAY)
intent.putExtra(Intents.EXTRA_AMOUNT,10.00)
intent.putExtra(Intents.EXTRA_ORDER_ID, "111")
intent.putExtra(Intents.EXTRA_TRANSACTION_SETTINGS, transactionSettings)
// Start 'CLOVER Secure Pay' App.startActivityForResult(intent, SECURE_PAY_REQUEST_CODE)
PaymentsClover Flex
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.

binitashah avatar image binitashah commented ·

Hi Jeffrey Blattman,

Thanks for the reply.. Now I am facing issue in getting some details like merchant id,invoice id, apprCode,AID,RRN,TVR,TSI from payment response. Can you guide me through payment response? And Whay my payment status is pending? (NOT CLOSED)?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ binitashah commented ·

It'd help if you could post a new specific question and problem you are facing. Generally speaking if you get RESULT_OK back the payment was successful, and otherwise not. You don't need to worry about the details beyond that. It's bad that we don't document all the details. Unfortunately what you are getting back is a mix of a public SDK and some internal implementation details of the payment that are most likely not useful to you.

0 Likes 0 ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered binitashah commented
All amounts in Clover are Java* longs. That is, an 8-byte integer. No decimals. So $10.00 would be like:
intent.putExtra(Intents.EXTRA_AMOUNT, 1000L)
Also, the order ID must be a Clover UUID which is a 13 digit base 32 number. You'd typically get this by calling OrderConnector.createOrder() prior to initiating the payment.

* Obviously these things can be accessed by non-Java language clients, but the value ends up be parsed on our server which runs in a JVM.
1 comment
10 |2000

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

binitashah avatar image binitashah commented ·
Hi Jeffrey Blattman,

Thanks for the reply.. Now I am facing issue in getting some details like merchant id,invoice id, apprCode,AID,RRN,TVR,TSI from payment response. Can you guide me through payment response? And Whay my payment status is pending? (NOT CLOSED)?
0 Likes 0 ·

Welcome to the
Clover Developer Community