Because Money objects take care of proper rounding depending on Currency#subunit_to_unit.
To make it clearer - we had to work with JPY currency and there are no subunits. So every time there are some fractional numbers - it ends up with an error from PayPal API, which is fair enough. :)
However, another problem is that I have issues running your test suite.
I generate the dummy app, but it lacks some "iPad" link in tests, I do not yet know the details why.
Because Money objects take care of proper rounding depending on
Currency#subunit_to_unit
.To make it clearer - we had to work with JPY currency and there are no subunits. So every time there are some fractional numbers - it ends up with an error from PayPal API, which is fair enough. :)
We also needed a REST API version of your controller (which is worth a separate issue). Anyway, here's some draft code which demonstrates what needs to be done: https://github.com/FunkyloverOne/better_spree_paypal_express/commit/1d39a029b213fa1bbfdd3f1240fb09e841e626f7
I could open a PR later.
However, another problem is that I have issues running your test suite. I generate the dummy app, but it lacks some "iPad" link in tests, I do not yet know the details why.