Minor refactor: extract gateway order id to method

This will allow people to more easily override the order id passed
in to the payment gateway.  It will behave the same for existing
functionality.

Fixes #2732