question

ondrej avatar image
ondrej asked Jeffrey Blattman answered

Info about order payment splitting

Hello, I am implementing a custom tender. I have problem accessing the payType field of the order, the value is always null, even if I do process a split payment.

Moreover during the processing I need to access some info about which items are being paid for, if a split payment takes place. Client can be eligible to earn some bonuses specific for items. When the order is split, I need to differentiate between 'his' items and other items (in the case of split by items).

I tried to use code similar to the one in OrderCalc, but the bundle is always null.

public Decimal getSplitPercent() {
  // TODO: consider removing when making this sdk public - used for transient calculations
  Bundle bundle = line.getBundle();
  LineItemPercent lineItemPercent = bundle.getParcelable(KEY_PERCENT);
  if (lineItemPercent != null) {
    return lineItemPercent.percent.multiply(HUNDRED);
  }
  return HUNDRED;
}

Is there a way to access that important info about order splitting in a custom tender?

Thank you, Ondrej

Orders
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

Jeffrey Blattman avatar image
Jeffrey Blattman answered

Split details are not communicated to custom tenders. Split percent isn't populated until after the payment is successful.

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