<?php

/** 
 * Paytrail IPN.
 *
 * Portions of this file were based off the payment processor extension tutorial at:
 * http://wiki.civicrm.org/confluence/display/CRMDOC/Example+of+creating+a+payment+processor+extension
 *
 */
session_start();
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
$config = CRM_Core_Config::singleton();
require_once 'PaytrailIPN.php';
com_github_anttikekki_payment_paytrailIPN::main();
 /**
  * singleton function used to manage this object
  *
  * @param string $mode the mode of operation: live or test
  * @param string $component name of CiviCRM component that is using this Payment Processor (contribute, event)
  * @param object $paymentProcessor the details of the payment processor being invoked
  *
  * @return object
  * @static
  */
 static function &singleton($mode, $component, &$paymentProcessor)
 {
     if (self::$_singleton === null) {
         self::$_singleton = new com_github_anttikekki_payment_paytrailIPN($mode, $paymentProcessor);
     }
     return self::$_singleton;
 }