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) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Email notification sent if "Pay Later" selected, but not if payment is Paypal
Pages: [1] 2

Author Topic: Email notification sent if "Pay Later" selected, but not if payment is Paypal  (Read 2603 times)

passadena

  • Guest
Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 12:14:24 pm
First, thanks for all the support everyone provides here. 

Another question:

Email notifications are being sent to registrants if they select "Pay Later" by check, but not if they go through the Paypal checkout.  IPN is working, and they do get their status updated to "Registered", but no confirmation email is sent.   

In CRM/Event/Form/Registration/Confirm.php, it looks like sendMail is only called if "Pay Later" is checked;  I presume this is because some code somewhere else is waiting for the IPN confirmation before sending mail.   Anyone know where this code is located, or whether/how this is supposed to work by design?

Thanks!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 12:20:47 pm

CRM/Core/Payment/BaseIPN.php (search for sendMail)

can you check your apache error logs to see if u've been getting any civicrm related php errors

thanx

lobo

 
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 02:53:50 pm
I checked my apache logs, and I don't see any relevant errors.  There are some warnings (see below), but I don't think they are related:

<b>Warning</b>:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />

I looked at the file you pointed me to.  I'm still trying to trace through the code, but I was wondering if you could direct me to where I'd go to find these debug messages printed out:

CRM_Core_Error::debug_log_message( "Success: Database updated and mail sent" );

Do I need the debugging mode enabled? (which, the helper text tells me not to do on a production site.)

Thanks for the help.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 03:02:48 pm

there should be a log file in this directory:

files/civicrm/en_US/ConfigAndLog/

the file should be called CiviCRM.32 character hash.log

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 03:13:30 pm
Thanks.  This is helpful.  So looking in the log, indeed I see  "Contribution record updated successfully"  but there is no entry for "Success: Database updated and mail sent".   No other error messages either.   

If you have any suggestions for how to debug what's going on inside the sendMail function, that'd be appreciated.

from BaseIPN.php:

        CRM_Core_Error::debug_log_message( "Contribution record updated successfully" );
        $transaction->commit( );

        self::sendMail( $input, $ids, $objects, $values, $recur, false );

        CRM_Core_Error::debug_log_message( "Success: Database updated and mail sent" );

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 03:42:34 pm

if u r not getting the second message, u should check your php logs and/or your mail logs. seems like php / the script is dying in the process of sending email

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 03:58:52 pm
Thanks.  I just turned on my php logging.  I don't see any mail errors.  In fact, mail is sent out fine to "Pay Later" folks.   I can't seem to replicate this behavior unless I do a real registration though.  A test registration gives me: 

Aug 05 15:49:37  [info] returning since contribution status is pending

Know a good way around this so I can debug?   

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:01:36 pm

sorry, no

you should try it doing real registrations, IMO and ensure that it does work (or isolate and fix the issue if it does not)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:07:08 pm
Ok, I'm going to have to create a new event that is much cheaper than $90 to test this out.  :-)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:32:18 pm
You can use the test version of  contribution page for this - although it's always a nightmare with paypal to come up with an appropriate test credit card number!
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

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:37:29 pm
Unfortunately, the test version of the registration goes to the Paypal sandbox instead of a real payment, and this in turn doesn't change the registrant's status to completed. 

Lobo, I tried a live test, and did not get any php errors or mail errors, and also did not get a confirmation email if I go through Paypal.  Again, if I do "Pay Later" or register for a free event, then I DO get a confirmation email just fine. 

Is there a way to test this on the Civi demo site?  Or is it not set up to receive real payments and send out real emails?


passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:40:43 pm
Argh... I'm not looking forward to paying $1 for every test of this registration page.  :-)   

If anyone else has ideas, do let me know.  I'm thinking there must be some way to fool the system into thinking that a IPN reply from the Paypal sandbox is just as good as an IPN reply from the real Paypal system, no?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:42:16 pm
Paypal is a nightmare to work with - I can give you some payment express test credentials to try
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

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:45:18 pm
Thanks Eileen.  Sorry for my ignorance, but what would the Paypal Express test credentials allow me to do?

passadena

  • Guest
Re: Email notification sent if "Pay Later" selected, but not if payment is Paypal
August 05, 2010, 04:58:24 pm
Ok, so the php script dies somewhere in here:

            if ( $contribution->payment_instrument_id ) {
                $paymentInstrument = CRM_Contribute_PseudoConstant::paymentInstrument();
                $template->assign( 'paidBy', $paymentInstrument[$contribution->payment_instrument_id] );
            }

Any ideas?   

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Email notification sent if "Pay Later" selected, but not if payment is Paypal

This forum was archived on 2017-11-26.