question

chisan avatar image
chisan asked chisan commented

I would like to add a button on the refund app to apply a 10% restock fee

greetings,

I would like to know if it is possible to add a button to the refund app that will calculate a 10% restock fee of the order selected, I tried clover.intent.action.MERCHANT_TENDER and clover.intent.action.REFUND with the example code from modifyamountbutton both no luck yet
Refund
10 |2000

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

1 Answer

chanel avatar image
chanel Deactivated answered chisan commented
You would need to create a separate order for 10% of the original order's price.

To create a new "restock fee" order:

Intent intent = new Intent(Intents.ACTION_SECURE_PAY);
intent.putExtra(Intents.intent.putExtra(Intents.EXTRA_AMOUNT, originalOrder.getTotal()/10L);
startActivityForResult(intent, 1003);
To then refund the original order:

Intent intent = new Intent(Intents.ACTION_START_TRANSACTION_DETAIL);
intent.putExtra(Intents.EXTRA_PAYMENT, originalOrder.getPayments().get(0));
startActivityForResult(intent, 1002);
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.

chisan avatar image chisan commented ·
thank you for the reply,
will try this after I got home.

0 Likes 0 ·

Welcome to the
Clover Developer Community