updated the process_payment method