merged changes dev lisa-autocancel
authorLisa Marie Maginnis <lisam@fsf.org>
Mon, 15 Aug 2016 21:07:08 +0000 (17:07 -0400)
committerLisa Marie Maginnis <lisam@fsf.org>
Mon, 15 Aug 2016 21:07:08 +0000 (17:07 -0400)
1  2 
trustcommerceIPN.php

index a2e5fc6924bd33e599609609ff32aff02dffce41,a7c7be3a87ece113773eec9dcbd4e569123b651b..28ce87bca51a0f882918c88dce6e1e7798d66aaa
@@@ -203,9 -282,13 +282,16 @@@ EOF
        echo $msg;
        CRM_Core_Error::debug_log_message($msg);
  
-       return $this->failed($objects, $transaction, $input);
 +      /* Disable cancelling transactions */
 +      $input['skipComponentSync'] = 1;
++
+       /* Action for repeated failures */
+       if(MAX_FAILURES <= $this->getLastFailures($ids['contributionRecur'])) {
+       //$this->disableAutoRenew(($ids['contributionRecur']));
+       $this->disableAutorenew($ids['processor_id']);
+       }
+       
+       return $this->failed($objects, $transaction);
      }
  
      if ($sendNotification) {