correct updatePayment logic and tests