CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Base IPN sending receipts when GUI says not to.
Pages: [1]

Author Topic: Base IPN sending receipts when GUI says not to.  (Read 968 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Base IPN sending receipts when GUI says not to.
October 27, 2011, 04:47:03 pm
I am investigating a complaint that when a back-office membership is paid for using credit card the IPN code triggers an email receipt even though the user has selected not to send a receipt in the UI. (this is for Authorize.net although the code seems to be in BaseIPN)

Looking at the BaseIPN code it seems to be aware of $values['is_email_receipt'] but this doesn't determine whether or not a receipt is sent out - I feel like we've had a different flavour of this complaint before - people not wanting regular receipts to go out to those with recurring payments (only at the start).


It feels like adding if($values['is_email_receipt'] ){} around the   self::sendMail (LINE 600) would *fix* it but not sure the implications beyond that.

It does seem like sending receipts should be optional.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Base IPN sending receipts when GUI says not to.
October 31, 2011, 01:24:04 pm
Index: CRM/Core/Payment/BaseIPN.php
===================================================================
--- CRM/Core/Payment/BaseIPN.php   (revision 37113)
+++ CRM/Core/Payment/BaseIPN.php   (working copy)
@@ -597,8 +597,9 @@
         CRM_Core_Error::debug_log_message( "Contribution record updated successfully" );
         $transaction->commit( );
   Here's what above looks like as a patch

     
Code: [Select]
-        self::sendMail( $input, $ids, $objects, $values, $recur, false );
-
+        if(CRM_Utils_Array::value('is_email_receipt',$values)){
+          self::sendMail( $input, $ids, $objects, $values, $recur, false );
+     }
         CRM_Core_Error::debug_log_message( "Success: Database updated and mail sent" );
     }
     
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Base IPN sending receipts when GUI says not to.
October 31, 2011, 01:35:17 pm
Issue posted on bug tracker:
http://issues.civicrm.org/jira/browse/CRM-9132

I've asked Deepak to confirm that there's no "reason" why the code should be ignoring this setting.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Base IPN sending receipts when GUI says not to.

This forum was archived on 2017-11-26.