academe / Omnipay-Wirecard

Wirecard payment gateway driver for the Omnipay
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Implement test mode checks #10

Open judgej opened 7 years ago

judgej commented 7 years ago

Since the core Omnipay supports a test mode it would be nice to make use of it.

Wirecard uses the live gateway endpoints for all live, test and demo access, but has a range of customer IDs set aside to trigger various test modes. Since test mode is boolean - we are in test mode or not - we cannot use that flag to set the customer IDs and other parameters. However, if test mode is enabled, we can at least check that a known test customer ID is being used, and throw an exception if not.

This would just be an additional check to help prevent accidentally using live credentials in a test system or vice-versa. Not essential, just a nice-to-have.