In addition to the settings available for each gateway in Commerce > Settings > Gateways
screen, the config items below can be placed into a commerce-gateways.php
file in your craft/config
directory.
This allows for the overriding of gateway settings. You still need to configure the Gateway in the control panel so you can reference the gateways handle
as the key to the Gateway's settings.
Example:
<?php
return [
'ewayGatewayHandle' => [
'testMode' => getenv('EWAY_TEST_MODE'),
'apiKey' => getenv('EWAY_API_KEY'),
'password' => getenv('EWAY_PASSWORD'),
'CSEKey' => getenv('EWAY_CSE_KEY'),
],
'paypalProGateway' => [
'testMode' => getenv('PAYPAL_PRO_TEST_MODE'),
'password' => getenv('PAYPAL_PRO_PASSWORD'),
'username' => getenv('PAYPAL_PRO_USERNAME'),
'signature' => getenv('PAYPAL_PRO_SIGNATURE'),
],
];