finish payment function