refined dealwaitingpayment.py