before payment gateway