Builds a basket whose item prices add up to the payment total to the kuruş, which
iyzico requires. Spreads the discount over the items in proportion to their totals,
giving rounding leftovers to the items with the largest remainders (ties go to the
larger item, then the earlier one), and adds shipping as an item. All arithmetic is
done in minor units.
Throws ValidationError for non-positive prices, an invalid quantity or percent, a
discount that is not smaller than the item total, or a discount that would bring
an item down to zero.
Builds a basket whose item prices add up to the payment total to the kuruş, which iyzico requires. Spreads the discount over the items in proportion to their totals, giving rounding leftovers to the items with the largest remainders (ties go to the larger item, then the earlier one), and adds shipping as an item. All arithmetic is done in minor units.
Throws
ValidationErrorfor non-positive prices, an invalid quantity or percent, a discount that is not smaller than the item total, or a discount that would bring an item down to zero.