Hi,
We have customized the default functionality of generation of order no. Earlier it used to get generated before being redirected to payment gateway. In this process if Admin wants to add order for a customer from Admin Panel, he/she can do it from 'Place order (Impersonate)' tab in customer details page (admin area).
Now the customized part comes into play, as per clients'requirement we are now generating order no. only when succeessful payment is made through payment gateway i.e on response url configuered at payment gateway api.
It ensures order to be placed only for paid transactions.

This requirement came with a flaw i.e. if customer pays through payment gateway and is not able to redirect to that response url (Internet connection failure) an order will not be generated as the flow breaks.
In this case how can Admin create an order for customer part from admin panel and then map payment details to it?

Kindly help me out in resolving the same.