Refactored makePayment() signature

Total amount is now calculated from items
Critical bugfix on payment parsing
Tests modified to cover these features