4 * PxPay Functionality Copyright (C) 2008 Lucas Baker,
5 * Logistic Information Systems Limited (Logis)
6 * PxAccess Functionality Copyright (C) 2008 Eileen McNaughton
7 * Licensed to CiviCRM under the Academic Free License version 3.0.
9 * Grateful acknowledgements go to Donald Lobo for invaluable assistance
10 * in creating this payment processor module
13 if (defined('PANTHEON_ENVIRONMENT')) {
14 ini_set('session.save_handler', 'files');
18 require_once '../civicrm.config.php';
19 require_once 'CRM/Core/Config.php';
21 $config = CRM_Core_Config
::singleton();
22 $log = new CRM_Utils_SystemLogger();
23 $log->alert('payment_notification processor_name=Payment_Express', $_REQUEST);
25 * Get the password from the Payment Processor's table based on the DPS user id
26 * being passed back from the server
30 SELECT url_site, password, user_name, signature
31 FROM civicrm_payment_processor
32 LEFT JOIN civicrm_payment_processor_type ON civicrm_payment_processor_type.id = civicrm_payment_processor.payment_processor_type_id
33 WHERE civicrm_payment_processor_type.name = 'Payment_Express'
36 $params = array(1 => array($_GET['userid'], 'String'));
38 $dpsSettings = CRM_Core_DAO
::executeQuery($query, $params);
39 while ($dpsSettings->fetch()) {
40 $dpsUrl = $dpsSettings->url_site
;
41 $dpsUser = $dpsSettings->user_name
;
42 $dpsKey = $dpsSettings->password
;
43 $dpsMacKey = $dpsSettings->signature
;
53 require_once 'CRM/Core/Payment/PaymentExpressIPN.php';
54 $rawPostData = $_GET['result'];
55 CRM_Core_Payment_PaymentExpressIPN
::main($method, $rawPostData, $dpsUrl, $dpsUser, $dpsKey, $dpsMacKey);