@JanettThanks for the reply. I was thinking the same, that order is still not created that is why it's empty. Order reference comes after the validation is done. The code you sent it throws error
Exception on hook paymentOptions for module . Notice: Undefined variable: params
And the requirement is different here. The gateway team already gets the order id but additionally they have asked for the order reference too. So i need to find a way to capture that order reference just after the validation is done and then pass it to gateway.
I'm thinking of this possible scenarios:
-> I can just pass '$merchant_ref_number = trim( (string) $order_id ); as it was before becoz it successfully redirects to payment page and then i can capture the order reference after the validation and send to the gateway. can it be achieved? has anyone done this before? Please help.
If you can help me with this, it would be really great. 🙂