Hi,
I'm developing payment module in PS 1.7. On successful payment, the gateway will call validation url of the shop with supplied reference id.
Now I'm in doubt, whether to create the order before (note, that the user can hit back and select another payment), or create the order in the callback? (callback is called later by the gw, so session is not available)
Also what reference to use? I think cart id can be used, but the problem here is that meanwhile the user can open the shop in another tab and add products (probably not a big problem, i can test paid amount to prevent this).
Thanks for advice.