Commit 09c74f9b authored by rubofvil's avatar rubofvil
Browse files

Fix the failed contributions update

parent d35ca116
......@@ -72,13 +72,14 @@ class CRM_Core_Payment_RedsysIPN extends CRM_Core_Payment_BaseIPN {
}
CRM_Core_Error::debug_log_message("Redsys IPN Response: About to cancel contr \n input: " . print_r($input, TRUE) . "\n ids: " . print_r($ids, TRUE) . "\n objects: " . print_r($objects, TRUE));
try {
civicrm_api3('contribution', 'create', array('id' => $this->transaction_id, 'contribution_status_id' => 'Failed', 'cancel_reason' => $input['reasonCode']));
civicrm_api3('contribution', 'create', array('id' => $input['contributionID'], 'contribution_status_id' => 'Failed', 'cancel_reason' => $input['reasonCode']));
}
catch (CiviCRM_API3_Exception $e) {
if($e->getMessage()) {
CRM_Core_Error::debug_log_message("Redsys IPN Error Updating contribution: " . $e->getMessage());
}
}
return TRUE;
}
CRM_Core_Error::debug_log_message("Redsys IPN Response: About complete trans \n input: " . print_r($input, TRUE) . "\n ids: " . print_r($ids, TRUE) . "\n objects: " . print_r($objects, TRUE));
......
......@@ -88,6 +88,10 @@ After installing and activating the extension, you'll need to configure your pay
Version 1.9 works with CiviCRM 4.6 / 4.7 / 5.x (until 5.3.0).
Version 2.0 works with CiviCRM 5.3.0 or newer versions.
### Error Log
To search if is failing in some cases, search in ConfigLog from civicrm the workd "Redsys IPN Error"
## License ##
Redsys Payment Processor for CiviCRM. Copyright (C) 2013 - 2018 Amnesty International (originally developed by Ixiam http://www.ixiam.com).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment