DEV and Production Environments Settings

From Littledamien Wiki
Jump to navigation Jump to search

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.