Re-introduce "Fix for on multiple payments."

This commit re-introduces f68dfc3ef07a05ba8c606c20e2698e4ed0bc1332.
Fix issue on checkouts controller.

This is a bug which occurs preventing orders from moving past the
payment state when promotions, or other adjustments are applied to the
order.

order.total is the amount to be paid, order.amount is the total of the
line items.

This issue was introduced in #5754
Merge pull request #19 from gmacdougall/fix-payment-adjustment-issue

Fix payment adjustment issue