question

bloyal avatar image
bloyal asked David Marginian answered

Clover Tender Not Applying

I'm trying to create a custom tender app, I'm able to register the tender and select it in the register. However, once I get to the point where I have verified the transaction and I attempt to apply it to the order, my tender app closes and the register shows "Payment 1" for the full amount of the order. Unfortunately, instead of showing payment successful with a done button, it says "Remaining balance" with the full cost of the order and asks to pay more later or do another payment. Here is my code for after I have validated the transaction.


private void applyCardPayment() {
    try {
        String clientId = Utility.buildExternalPaymentID(trnId, mGCCodeEditText.getText().toString());
        Intent data = new Intent();
        data.putExtra(Intents.EXTRA_AMOUNT, amountToRedeem);
        data.putExtra(Intents.EXTRA_CLIENT_ID, clientId);
        data.putExtra(Intents.EXTRA_NOTE, "TransactionID:" + trnId + " bLoyalTender:" + new BLSetting().getTenderCode());
        data.putExtra(Intents.EXTRA_EXTERNAL_PAYMENT_ID, trnId);
        setResult(RESULT_OK, data);
        finish();
    } catch (Exception e) {
        BLLogger.logException(getClass().getSimpleName() + ":applyCardPayment: Exception while applying payment to order :"+ e, e);
        showErrorDialog("Error adding gift card payment to order.", getClass().getSimpleName() + ":applyCardPayment: Exception while applying payment to order :"+ e + "\n" + Utility.getCallStack(e));
        finish();
    }
}


This appears to match what is in your documentation so I am wondering if there is something that I am missing that is causing this behavior?

Please let me know if there is any additional information you need.

Thanks,

Ryan

Custom Tenders
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.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered

The logcat may help. We have a working example here - https://github.com/clover/android-examples/tree/master/extensibletenderexample, I would start over from that example.

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.

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