question

saad-bin-iqbal avatar image
saad-bin-iqbal asked saad-bin-iqbal commented

How to stop clover print credit card details on receipt while payout ?

I don't want to print credit card details on receipt after doing payout.
Clover Mini
10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered saad-bin-iqbal commented
This is a developer forum. If you have questions about how to use your Clover or the software thereon please contact customer support. That being said, the details printed on the receipt are required by credit card processors. We do not have a way to turn that off.

EDIT: I was able to reproduce this with the following code:
final LineItem customLineItem = new LineItem();
customLineItem.setName("foo");
customLineItem.setUnipe tQty(1);
customLineItem.setPrice(-100L);

final OrderConnector orderConnector = getConnector(CommonActivity.ORDER_CONNECTOR);

new AsyncTask<Void,Void,Order>() {
  @Override
  protected Order doInBackground(Void... voids) {
    try {
      Order order = orderConnector.createOrder(new Order().setManualTransaction(true));
      orderConnector.addCustomLineItem(order.getId(), customLineItem, false);
      return order;
    } catch (Exception e) {
      e.printStackTrace();
      return null;
    }
  }

  @Override
  protected void onPostExecute(Order order) {
    if (order != null) {
      Intent payIntent = new Intent(Intents.ACTION_CLOVER_PAY);
      payIntent.putExtra(Intents.EXTRA_CLOVER_ORDER_ID, order.getId());
      payIntent.putExtra(Intents.EXTRA_OBEY_AUTO_LOGOUT, true);
      //payIntent.putExtra(Intents.EXTRA_TRANSACTION_TYPE, "credit");
      payIntent.setFlags(payIntent.getFlags() | Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity(payIntent);
    }
  }
}.execute();
The initial receipt print looks okay, but a re-print shows the following as the total / tender line:
TEST REFUND $1.00
CREDIT NULL
I'll file a bug for us to fix this.
14 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.

saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Thanks for your response.

We've build a android app that runs on clover device and had implemented payout functionality on click of custom payout button. When payout is done through our app, we add some information to clover order connector and process pay through clover. But why credit card details are printed on receipt although I don't provide card details to clover while this transaction. This happens when we select custom tender while payout. Please consider attached receipt.payout-receipt.jpg

0 Likes 0 ·
payout-receipt.jpg (449.1 KiB)
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ saad-bin-iqbal commented ·

Seems like a bug to me. Looks like you did a manual refund (aka credit). Do things work if you do a sale with that tender? Does the receipt look correct?

0 Likes 0 ·
saad-bin-iqbal avatar image saad-bin-iqbal Jeffrey Blattman ♦♦ commented ·

Yes, It is manual refund.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ saad-bin-iqbal commented ·

Please provide an example that reproduces the problem. This is probably some nuance of of you are using the SDK but I can't troubleshoot it with nothing to go on.

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·
I don't believe this is a bug, can you share a sample of the order object?

I believe you're expanding or adding a field which triggers the card details field to show, or the order payment is improperly done. (Source: I've faced this before).

0 Likes 0 ·
saad-bin-iqbal avatar image saad-bin-iqbal commented ·
I share you a demo code.
Note: Card details are printed when we payout selecting custom tender from clover pay screen.
Please consider the attached image. This attached clover screen opens up when we fire Intent payIntent = new Intent(Intents.ACTION_CLOVER_PAY) for payout.
payout-with-custom-tender.png

Code: https://pastebin.com/NJpWcZ5w
0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega saad-bin-iqbal commented ·

Winner winner, chicken dinner.

payIntent.putExtra(Intents.EXTRA_TRANSACTION_TYPE, "credit");

A couple of questions,

  • If you're creating an order, assigning line items, why use Manual Pay?
  • Transaction type credit makes the credit field show up.
  • Are you taking a payment or a refund?
  • I see you've created your order but you added the line item later on, have you've called orderConnector.updateOrder(order)?
  • Why set the order to "Manual Transaction"?

Thanks!

Ps: It's easier to share the ultimate goal.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ saad-bin-iqbal commented ·

I tried your code, with my own merchant tender. It worked fine. First thing is your use of the term "custom tender". That's a method to allow Clover to call out to another app to process the payment. There are also merchant tenders, which are essentially just labels with no logic behind them. "Check" is an example, where it's just expected that the merchant has accepted and verified the check out of band. Are you using a custom tender or a merchant tender?

PS @Bryanne Vega "credit" doesn't mean credit card, it means a credit transaction, as opposed to a sale.

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega Jeffrey Blattman ♦♦ commented ·

Wops! :'D.DDid not read the intent!

0 Likes 0 ·
Show more comments
saad-bin-iqbal avatar image saad-bin-iqbal commented ·
Thanks guyz..
0 Likes 0 ·
Bryanne Vega avatar image
Bryanne Vega answered
There's a Bug report @Jeffrey Blattman will submit.

This isn't new, I've faced this a year or two ago, I recommend (for now) pulling the Order Object from the rest API:

Order order = new Order(getOrderFromRest)
Then printing that Order Object. This is only a temporary solution if this affects your tool until it is fixed.

10 |2000

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