$this->completeTransaction($input, $ids, $objects, $transaction, $recur);
}
- function main($component = 'contribute') {
+ function main() {
// CRM_Core_Error::debug_var( 'GET' , $_GET , true, true );
// CRM_Core_Error::debug_var( 'POST', $_POST, true, true );
$objects = $ids = $input = array();
+ $component = CRM_Utils_Array::value('module', $_GET);
$input['component'] = $component;
// get the contribution and contact ids from the GET params
$this->completeTransaction($input, $ids, $objects, $transaction, $recur);
}
- function main($component = 'contribute') {
+ function main() {
CRM_Core_Error::debug_var('GET', $_GET, TRUE, TRUE);
CRM_Core_Error::debug_var('POST', $_POST, TRUE, TRUE);
-
$objects = $ids = $input = array();
- $input['component'] = $component;
+ $input['component'] = self::getValue('m');
// get the contribution and contact ids from the GET params
$ids['contact'] = self::getValue('c', TRUE);
$config = CRM_Core_Config::singleton();
if (empty($_GET)) {
- $rpInvoiceArray = array();
- $rpInvoiceArray = explode('&', $_POST['rp_invoice_id']);
- foreach ($rpInvoiceArray as $rpInvoiceValue) {
- $rpValueArray = explode('=', $rpInvoiceValue);
- if ($rpValueArray[0] == 'm') {
- $value = $rpValueArray[1];
- }
- }
$paypalIPN = new CRM_Core_Payment_PayPalProIPN();
}
else {
- $value = CRM_Utils_Array::value('module', $_GET);
$paypalIPN = new CRM_Core_Payment_PayPalIPN();
}
-switch ($value) {
- case 'contribute':
- $paypalIPN->main('contribute');
- break;
+$paypalIPN->main();
- case 'event':
- $paypalIPN->main('event');
- break;
-
- default:
- CRM_Core_Error::debug_log_message("Could not get module name from request url");
- echo "Could not get module name from request url<p>";
- break;
-}