Skip to content

Instantly share code, notes, and snippets.

@bossanova808
Created October 18, 2016 23:13
Show Gist options
  • Save bossanova808/a2e68906db4150769273ae20a98db2da to your computer and use it in GitHub Desktop.
Save bossanova808/a2e68906db4150769273ae20a98db2da to your computer and use it in GitHub Desktop.
Example working Craft Commerce config file for payment details
<?php
// This controls and contains what keys/passwords are used for dev/live environments.
return [
// THIS * ENTRY MUST BE PRESENT - EVEN IF EMPTY!
'*' => array(
),
// DEV Details - i.e. your Paypal sandbox details for example
'dev.whatever.net' => array(
'paymentMethodSettings' => [
//eWay Sandbox
'1' => [
'testMode' => true,
'apiKey' => 'whatever',
'password' => 'whatever',
'CSEKey' => 'whatever',
],
// 2 - MANUAL
// 3 - DUMMY
// 4 - Paypal Express
'4' => [
'testMode' => true,
'password' => 'whatever',
'username' => 'whatever',
'signature' => 'whatever'
],
],
),
// PRODUCTION Details - live payment stuff here
'whatever.com' => array(
'paymentMethodSettings' => [
//eWay LIVE
'1' => [
'testMode' => false,
'apiKey' => 'whatever',
'password' => 'whatever',
'CSEKey' => 'whatever',
],
// 2 - MANUAL
// 3 - DUMMY
// 4 - Paypal Express
'4' => [
'testMode' => false,
'password' => 'whatever',
'username' => 'whatever',
'signature' => 'whatever'
],
],
),
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment