DEV and Production Environments Settings: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "==Application Configuration== *<code>/_config/app_config.php</code> *<code>IS_DEV</code> constant **All definitions that are specific to an environment should be wrapped in an...")
 
(No difference)

Latest revision as of 14:10, 2 March 2012

Application Configuration[edit]

  • /_config/app_config.php
  • IS_DEV constant
    • All definitions that are specific to an environment should be wrapped in an if...else... block using this value.
    • (It's not possible to put the Const keyword within a conditional block in a PHP class.)
    • An alternative to relying on a PHP class constant would be to return a value from a public static function. The conditional block would be placed within the function. Not pretty, but more reliable than remembering to edit the class for a production environment.

Authorize.net[edit]

The only setting necessary to submit test transactions is x_test_request within the post data sent to the Authorize.net payment gateway.

Luzern Labs[edit]

  • /_classes/cart/cart_order_class.php
    • cart_order_class::ORDER_EMAIL_ADDRESS()
      Static function that returns a testing email address when IS_DEV is TRUE. Returns production email address otherwise.
    • cart_order_class::execute_payment_transation()
      • "x_test_request" value within post values sent to Authorize.net. Set to FALSE for real transactions. TRUE for test transactions.
      • The x_test_request assignment is wrapped in an IS_DEV conditional statement and should always be TRUE in development and FALSE in production.