Can com.clover.intent.action.PAYMENT_PROCESSED give payment details such as:
Total Subtotal Discounts Tax Rates Taxes Amount Non-taxable amounts
Etc?
Can com.clover.intent.action.PAYMENT_PROCESSED give payment details such as:
Total Subtotal Discounts Tax Rates Taxes Amount Non-taxable amounts
Etc?
Looks like it gives only following extras. Once you have the PaymentID and OrderID, you can do a web api call with that PaymentID to get more details about that payment.
com.clover.intent.extra.ORDER_ID – String: The ID of the order.
com.clover.intent.extra.PAYMENT_ID – String: The ID of the new payment.
com.clover.intent.extra.AMOUNT – Long: The amount (in cents) of the payment.
Reference : https://docs.clover.com/build/android...
Mark R's answer is pretty good. Once you've got the Order using the ORDER_ID you can use the OrderCalc class to give you the information you want. Please take a look at the OrderCalc class to see all the functions available. In some cases you may need to do some simple math if there isn't a function that gives exactly what you want. Here is some example code:
String orderId = intent.getStringExtra(Intents.EXTRA_ORDER_ID);
String paymentId = intent.getStringExtra(Intents.EXTRA_PAYMENT_ID);
long amount = intent.getLongExtra(Intents.EXTRA_AMOUNT, 0l);
OrderConnector connector = new OrderConnector(...)
com.clover.sdk.v3.order.Order o = connector.getOrder(orderId);
OrderCalc oc = new OrderCalc(o);
long tax = oc.getTax();
long subtotal = oc.getLineSubtotal(o.getLineItems());
Thanks for the great tip! My software would need to be compatible with the 2000 software (& pro) so it must be by Rest API requests, thank you!
1 Person is following this question.