Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12972

No receipt sent for PayPal Pro Recurring Donations

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.3.5
    • Component/s: CiviContribute, CiviMail
    • Labels:
      None

      Description

      Using PayPal Pro's recurring donation service as the processor, when a recurring donation "ticks", including for the first time, the result is recorded correctly, and CiviCRM claims that it has sent a receipt. However, no receipt is actually sent.

      Looking at the logs, CiviCRM posts the array for the donation, records that "Contribution record was updated successfully", then posts the same array a second time, and spits out the following error:

      Jun 27 07:47:02 [info] $Fatal Error Details = Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -5
      [message] => DB Error: already exists
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_contribution (contact_id , financial_type_id , contribution_page_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_date , receipt_date , thankyou_date , source , contribution_recur_id , contribution_status_id ) VALUES ( 52 , 1 , 1 , 1 , 20130627074702 , 10.00 , 0.59 , 9.41 , '97286874E5998541T' , 'fc075fa545460447df8e06a63df178a7' , 'USD' , NULL , 20130627074702 , NULL , 'Donation Page' , 7 , 1 ) [nativecode=1062 ** Duplicate entry '97286874E5998541T' for key 'UI_contrib_trxn_id']
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_contribution (contact_id , financial_type_id , contribution_page_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_date , receipt_date , thankyou_date , source , contribution_recur_id , contribution_status_id ) VALUES ( 52 , 1 , 1 , 1 , 20130627074702 , 10.00 , 0.59 , 9.41 , '97286874E5998541T' , 'fc075fa545460447df8e06a63df178a7' , 'USD' , NULL , 20130627074702 , NULL , 'Donation Page' , 7 , 1 ) [nativecode=1062 ** Duplicate entry '97286874E5998541T' for key 'UI_contrib_trxn_id']
      [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contribution (contact_id , financial_type_id , contribution_page_id , payment_instrument_id , receive_date , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_date , receipt_date , thankyou_date , source , contribution_recur_id , contribution_status_id ) VALUES ( 52 , 1 , 1 , 1 , 20130627074702 , 10.00 , 0.59 , 9.41 , '97286874E5998541T' , 'fc075fa545460447df8e06a63df178a7' , 'USD' , NULL , 20130627074702 , NULL , 'Donation Page' , 7 , 1 ) [nativecode=1062 ** Duplicate entry '97286874E5998541T' for key 'UI_contrib_trxn_id']"]
      )

      Jun 27 07:47:02 [info] $backTrace = #0 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: already exists", -5, 16, (Array:2), "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
      #4 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-5, 16, (Array:2), "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
      #5 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -5, NULL, NULL, "INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...", "DB_Error", TRUE)
      #6 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-5, NULL, NULL, NULL, "1062 ** Duplicate entry '97286874E5998541T' for key 'UI_contrib_trxn_id'")
      #7 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
      #8 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
      #9 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
      #10 /home/website/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1055): DB_DataObject->_query("INSERT INTO civicrm_contribution (contact_id , financial_type_id , contributi...")
      #11 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(287): DB_DataObject->insert()
      #12 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/BaseIPN.php(464): CRM_Core_DAO->save()
      #13 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php(273): CRM_Core_Payment_BaseIPN->completeTransaction((Array:17), (Array:9), (Array:8), Object(CRM_Core_Transaction), TRUE)
      #14 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php(212): CRM_Core_Payment_PayPalProIPN->single((Array:17), (Array:9), (Array:8), TRUE, FALSE)
      #15 /home/website/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php(335): CRM_Core_Payment_PayPalProIPN->recur((Array:17), (Array:9), (Array:8), FALSE)
      #16 /home/website/public_html/wp-content/plugins/civicrm/civicrm/extern/ipn.php(60): CRM_Core_Payment_PayPalProIPN->main("contribute")
      #17

      {main}

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              grandesigns Jeff
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: