calculatePaymentAmount