2019 Sep 18 4:08 PM - edited 2024 Feb 04 6:09 AM
Below is the code snippet where we are passing abstractOrderModel(CartModel) as a request parameter to the cybersource tax calculation service.
final PaymentServiceRequest request = new TaxRequestBuilder().addParam(ORDER, abstractOrder).setMerchantId(getMerchantId()).build();
if (abstractOrder instanceof CartModel)
{
request.addParam(JdPaymentTransactionCreatorContext.isTransient, Boolean.TRUE);
}
final PaymentServiceResult result = paymentServiceExecutor.execute(request);
We are sending only abstract order which contains all the cartentries and total amounts and there is no discounts available. But in the above result object, it returns taxes that are calculated on the discounted prices. where are we specifying the taxable amount to the cybersource service.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.