woothemes/woocommerce — pull request #5563 by coenjacobs (2014-05-26 16:33:46+00:00)
Title: Transaction id method

Closes #5561 - thanks @maxrice for the suggestion, this looks cleaner indeed.

Second stab at #5157. I don't think that the field name should be standardised as that will be hard to maintain backwards compatibility with. It's probably not a good idea to change field names like that.

So my proposal is to include a stub on the abstract gateway class that can be overridden through the new `get_transaction_id_field_name()` method on that same class. If the gateway supports it, the field name can easily be accessed.

Downside to this approach is that each gateway needs to explicitly add compatibility for this, but that would be the case for any other way to standardise this. It's just a minor change for gateways though, as it only requires them to override the method (as demonstrated in the PayPal gateway in this pull request).