Updated discount javascript and modified payment.