recurly / recurly-js

Simple subscription billing in the browser
https://js.recurly.com/
MIT License
646 stars 139 forks source link

fix tax calculations on next object with single-use coupons #858

Closed wsethbrown closed 10 months ago

wsethbrown commented 10 months ago

When utilizing single-use coupons, the next object in RJS was miscalculating the tax, falling back on the now objects subtotal for calculations. This resulted in lower taxes for the next object. image

Gating the logic of the next object's discountAmount behind whether coupon.single_use is being used ensures the next object's discount amount applies properly.