2

When I register for one of the events on my site, no thank you screen is displayed. Instead I get an all white blank screen. The page source is empty, so not even a html tag. The URL of that screen is https://mysite.org/civicrm/\?civiwp\=CiviCRM\&q\=civicrm%2Fpayment%2Fipn%2F187%2F9

This happens:

  • I add an event with a thank you text,
    • I find in the tab 'online registration' a section 'Thank-you Screen'.
    • I fill out the three fields I find there, being 'Title', 'Introductory Text' and 'Footer text'.
    • I save and leave the page.
  • I register for the event, nearly everything works as expected:
    • I can do a (ideal) payment, which results in a registration record in the database,
    • I get an email and there is a bank account transaction.
  • But on completing the payment, I get a white screen with a strange looking URL (see above). To the user it looks like something went wrong (although this is not the case), so I do not dare to use this on my production site.

In the error log php_errorlog, I find some warnings, but they are generated during the handling of the forms. From the moment of starting the payment up until the white screen, no further messages appear in the error log.

I do not know if the white screen behavior is in the payment processor code, or in the code of civicrm itself.

What should I expect to happen when a payment is done? Should I see a rendered page with a ipn-url like I have?

Thanks in advance!

  • civicrm version: 5.26.2
  • wordpress installation
  • php 7.3

EDIT:

In order to get a feeling of what is happening, I added some debug-prints to the omnipay code, to method processPaymentNotification. That was maybe not the smartest thing to do, since it provides lots of information without me understanding if it is relevant.

It turns out that when I do a payment, this method is called a number of times, that it most of the times follows the same execution path, but in other cases exceptions are caught.

I could use some advice on them: can the exceptions be ignored, because they should occur? the (edited) log output is below (I truncated the file paths to make it more readable). You can clearly see the method is invoked more than once and that there are 'normal' runs and runs with messages.

Jun 27 15:17:41  [warning] Civi\Payment\PropertyBag related deprecation warnings:
We have merged input params into the property bag for now but please rewrite code to not use this.
Unknown property 'qfKey'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'entryURL'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'first_name' to 'firstName' for you, but please update your code to use the propper setters and getters.
We have translated 'last_name' to 'lastName' for you, but please update your code to use the propper setters and getters.
Unknown property 'email-Primary'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'hidden_processor'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'priceSetId'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'price_10'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'payment_processor_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'MAX_FILE_SIZE'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'is_primary'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'is_pay_later'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'contact_id' to 'contactID' for you, but please update your code to use the propper setters and getters.
Unknown property 'defaultRole'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_role_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'currencyID' to 'currency' for you, but please update your code to use the propper setters and getters.
Unknown property 'amount_level'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'amount'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'tax_amount'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'button'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_status'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_status_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'receive_date'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'contributionTypeID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'eventID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'item_name'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'fee_amount' to 'feeAmount' for you, but please update your code to use the propper setters and getters.
Unknown property 'participantID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participants_info'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'eventCustomFields'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'ip_address'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'component'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Array
(
    [civi.tag] => deprecated
)
Jun 27 15:17:48  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:17:48  [debug] LOC702
Jun 27 15:17:48  [debug] LOC7021
Jun 27 15:17:48  [debug] LOC7021c
Jun 27 15:17:48  [debug] LOC7022
Jun 27 15:17:48  [debug] LOC7022b
Jun 27 15:17:48  [debug] LOC704
Jun 27 15:17:48  [debug] LOC7051
Jun 27 15:17:48  [debug] LOC7052
Jun 27 15:18:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:18:03  [debug] LOC702
Jun 27 15:18:03  [debug] LOC7021
Jun 27 15:18:03  [debug] LOC7021c
Jun 27 15:18:03  [debug] LOC7022
Jun 27 15:18:03  [debug] LOC7022b
Jun 27 15:18:03  [debug] LOC704
Jun 27 15:18:03  [debug] LOC7051
Jun 27 15:18:03  [debug] LOC7052
Jun 27 15:18:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:18:03  [debug] LOC702
Jun 27 15:18:03  [debug] LOC7021
Jun 27 15:18:03  [debug] LOC7021c
Jun 27 15:18:03  [debug] catch InvalidRequestException
Jun 27 15:18:03  [debug]    msg: The transactionReference parameter is required
Jun 27 15:18:03  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:4))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:18:03  [debug] LOC7032
Jun 27 15:18:33  [info] Contribution record updated successfully
Jun 27 15:18:33  [info] Outbound mail has been disabled. Click <a href='https://civicrm-nw.rigpa.nl/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fadmin%2Fsetting%2Fsmtp&amp;reset=1'>Administer >> System Setting >> Outbound Email</a> to set the OutBound Email.
Jun 27 15:18:48  [debug] catch API3_Exception
Jun 27 15:18:48  [debug] Contribution already completed
Jun 27 15:18:48  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:7))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:18:48  [debug] LOC7054a
Jun 27 15:18:48  [debug] LOC7054c
Jun 27 15:18:48  [debug] LOC7055
Jun 27 15:19:18  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:19:18  [debug] LOC702
Jun 27 15:19:18  [debug] LOC7021
Jun 27 15:19:18  [debug] LOC7021c
Jun 27 15:19:18  [debug] LOC7022
Jun 27 15:19:18  [debug] LOC7022b
Jun 27 15:19:18  [debug] LOC704
Jun 27 15:19:18  [debug] LOC7051
Jun 27 15:19:18  [debug] LOC7052
Jun 27 15:20:03  [debug] LOC7053
Jun 27 15:20:03  [debug] LOC7055
Jun 27 15:21:33  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:21:33  [debug] LOC702
Jun 27 15:21:33  [debug] LOC7021
Jun 27 15:21:33  [debug] LOC7021c
Jun 27 15:21:33  [debug] LOC7022
Jun 27 15:21:33  [debug] LOC7022b
Jun 27 15:21:33  [debug] LOC704
Jun 27 15:21:33  [debug] LOC7051
Jun 27 15:21:33  [debug] LOC7052
Jun 27 15:22:18  [debug] LOC7053
Jun 27 15:22:18  [debug] LOC7055
Jun 27 15:25:48  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:25:48  [debug] LOC702
Jun 27 15:25:48  [debug] LOC7021
Jun 27 15:25:48  [debug] LOC7021c
Jun 27 15:25:48  [debug] LOC7022
Jun 27 15:25:48  [debug] LOC7022b
Jun 27 15:25:48  [debug] LOC704
Jun 27 15:25:48  [debug] LOC7051
Jun 27 15:25:48  [debug] LOC7052
Jun 27 15:26:33  [debug] LOC7053
Jun 27 15:26:33  [debug] LOC7055
Jun 27 15:32:50  [debug] LOC701civicrm/payment/ipn/185/9
Jun 27 15:32:50  [debug] LOC702
Jun 27 15:32:50  [debug] LOC7021
Jun 27 15:32:50  [debug] LOC7021c
Jun 27 15:32:50  [debug] LOC7022
Jun 27 15:32:50  [debug] LOC7022b
Jun 27 15:32:50  [debug] LOC704
Jun 27 15:32:50  [debug] LOC7051
Jun 27 15:32:50  [debug] catch API3_Exception
Jun 27 15:32:50  [debug] Expected one Contribution but found 0
Jun 27 15:32:50  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:7))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:32:50  [debug] LOC7054a
Jun 27 15:32:50  [debug] LOC7054b1
Jun 27 15:32:50  [error] ipn_completion failed
Array
(
    [0] => 185Expected one Contribution but found 0
)
Jun 27 15:34:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:34:03  [debug] LOC702
Jun 27 15:34:03  [debug] LOC7021
Jun 27 15:34:03  [debug] LOC7021c
Jun 27 15:34:03  [debug] LOC7022
Jun 27 15:34:03  [debug] LOC7022b
Jun 27 15:34:03  [debug] LOC704
Jun 27 15:34:03  [debug] LOC7051
Jun 27 15:34:03  [debug] LOC7052
Jun 27 15:34:48  [debug] LOC7053
Jun 27 15:34:48  [debug] LOC7055
Jun 27 15:50:18  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:50:18  [debug] LOC702
Jun 27 15:50:18  [debug] LOC7021
Jun 27 15:50:18  [debug] LOC7021c
Jun 27 15:50:19  [debug] LOC7022
Jun 27 15:50:19  [debug] LOC7022b
Jun 27 15:50:19  [debug] LOC704
Jun 27 15:50:19  [debug] LOC7051
Jun 27 15:50:19  [debug] LOC7052
Jun 27 15:51:04  [debug] LOC7053
Jun 27 15:51:04  [debug] LOC7055
Jun 27 15:53:07  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:53:07  [debug] LOC702
Jun 27 15:53:07  [debug] LOC7021
Jun 27 15:53:07  [debug] LOC7021c
Jun 27 15:53:07  [debug] catch InvalidRequestException
Jun 27 15:53:07  [debug]    msg: The transactionReference parameter is required
Jun 27 15:53:07  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(765): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:4))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}

The debug statements are inserted into the code as follows:

public function processPaymentNotification($params) {
    try {
    $this->createGateway($params['processor_id']);
    $originalRequest = $_REQUEST;
    $_REQUEST = $params;
    $response = NULL;
    Civi::log()->debug('LOC701'. $params['q']);
    //$rdump = print_r($params, true);
    //Civi::log()->debug($rdump);
    try {
    Civi::log()->debug('LOC702');
            Civi::log()->debug('LOC7021');
      if ($this->gateway->supportsAcceptNotification()) {
            Civi::log()->debug('LOC7021b');
        $response = $this->gateway->acceptNotification($params)->send();
      }
      else {
        Civi::log()->debug('LOC7021c');
        $response = $this->gateway->completePurchase($params)->send();
      }
        Civi::log()->debug('LOC7022');
      if ($response->getTransactionId()) {
        Civi::log()->debug('LOC7022b');
        $this->setContributionReference($response->getTransactionId(), 'strip');
      }
    }
    catch (\Omnipay\Common\Exception\InvalidRequestException $e) {
        Civi::log()->debug('catch InvalidRequestException');
         Civi::log()->debug('   msg: ' . $e->getMessage());
        require_once 'CRM/Core/Error.php';
        Civi::log()->debug (CRM_Core_Error::formatBacktrace(debug_backtrace()));

      $q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, ''));
      array_pop($q);
      $this->setContributionReference(array_pop($q));
      if (!civicrm_api3('Contribution', 'getcount', [
        'id' => $this->transaction_id,
        'contribution_status_id' => ['IN' => ['Completed', 'Pending']],
      ])) {
            Civi::log()->debug('LOC7031');
        $this->redirectOrExit('fail', $response);
      }
            Civi::log()->debug('LOC7032');
      $this->redirectOrExit('success', $response);
    }
    // Unset gateway once we are done with it per https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/55
    $this->gateway = NULL;

    Civi::log()->debug('LOC704');
    if ($response->isSuccessful()) {
      try {
    Civi::log()->debug('LOC7051');
        //cope with CRM14950 not being implemented
        $contribution = civicrm_api3('contribution', 'getsingle', [
          'id' => $this->transaction_id,
          //'return' => 'contribution_status_id, contribution_recur_id, contact_id, contribution_contact_id',
        ]);
    Civi::log()->debug('LOC7052');

        if ($this->getLock() && CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution['contribution_status_id']) !== 'Completed') {
          civicrm_api3('contribution', 'completetransaction', [
            'id' => $this->transaction_id,
            'trxn_id' => $response->getTransactionReference(),
            'payment_processor_id' => $params['processor_id'],
          ]);
        }
            Civi::log()->debug('LOC7053');
        if (!empty($contribution['contribution_recur_id']) && ($tokenReference = $response->getCardReference()) != FALSE) {
          $this->storePaymentToken($params, $contribution, $tokenReference);
        }
      }
      catch (CiviCRM_API3_Exception $e) {
         Civi::log()->debug('catch API3_Exception');
         Civi::log()->debug($e->getMessage());
         require_once 'CRM/Core/Error.php';
         Civi::log()->debug (CRM_Core_Error::formatBacktrace(debug_backtrace()));
            Civi::log()->debug('LOC7054a');
        if (stripos($e->getMessage(), 'Contribution already completed') === FALSE) {
          Civi::log()->debug('LOC7054b1');
          $this->handleError('error', 'ipn_completion failed', $this->transaction_id . $e->getMessage(), 9000, 'An error may have occurred. Please check your receipt is correct');
            Civi::log()->debug('LOC7054b2');
        }
        Civi::log()->debug('LOC7054c');
      }
      $_REQUEST = $originalRequest;
      Civi::log()->debug('LOC7055');
    }
    elseif ($this->transaction_id) {
      // Mark the contribution as failed (only allowed if status=Pending).
      // We get multiple requests from some processors (eg. Sagepay) where the contribution has already been marked as "Cancelled".
      try {
        Civi::log()->debug('LOC7056');
        $contribution = civicrm_api3('contribution', 'getsingle', [
          'id' => $this->transaction_id,
          'return' => 'contribution_status_id',
        ]);

        $contributionStatusName = CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution['contribution_status_id']);
        if ($contributionStatusName === 'Pending') {
          civicrm_api3('contribution', 'create', ['id' => $this->transaction_id, 'contribution_status_id' => 'Failed']);
        }
      }
      catch (Exception $e) {
        Civi::log()->debug('LOC7057');
        Civi::log()->error('CRM_Core_Payment_OmnipayMultiProcessor::processPaymentNotification: ' . $e->getMessage());
      }
    }

Digging further, I think I hit the reason for the blank screen. The white screen is the result of the InvalidRequestException

Jun 28 14:51:25  [debug] catch InvalidRequestException
Jun 28 14:51:25  [debug]    msg: The transactionReference parameter is required

Because of this exception, the code calls (LOC7032):

$this->redirectOrExit('success', $response);

Which does a $redirectUrl = $this->getStoredUrl('success');, giving an empty value for that url. For that reason, nothing is output. If add an else to the code that echos a html string, this html is showed instead of the blank screen!

I'd be happy to get help in further debugging this (I am no php programmer). My next effort would be finding the reason for the transactionReference parameter is required-message, but I don't know if this is a waste of time. ANY advice helps!

From the debuglogging, I can see that processPaymentNotification() is called multiple times in a row. The third call raises an exception and displays a white screen. The difference between the first two calls and the third are the parameters: the first two have

(
    [civiwp] => CiviCRM
    [q] => civicrm/payment/ipn/202/9
    [id] => tr_sqMmu4sK6R
    [noheader] => 1
    [processor_id] => 9
    [IDS_request_uri] => /civicrm/?civiwp=CiviCRM&q=civicrm%2Fpayment%2Fipn%2F202%2F9
    [IDS_user_agent] => Mollie HTTP client/1.0
)

while the third has

(
    [civiwp] => CiviCRM
    [q] => civicrm/payment/ipn/202/9
    [noheader] => 1
    [processor_id] => 9
)

you see? The id has gone. and exactly this id is used as transactionReference, what the exception was about. Believe me, I can't go further than this on my own, this is way beyond my understanding of the application. Who can help me understand what is going on?

5
  • Can you check php error log for any 500 error? Commented Apr 9, 2020 at 12:03
  • 1
    Do you see anything in error logs Commented Apr 13, 2020 at 15:19
  • does this happen with Pay Later as well as paid registrations. if only the latter what payment gateway and have you checked you are being returned to the correct url?
    – petednz - fuzion
    Commented Jun 27, 2020 at 23:32
  • Pete, I'm not experiencing this with pay later. Only if I do a (production or test) payment via payment processor omnipay (mollie payment). I am not experienced enough to be able to see from the url if it is correct or not. It looks OK, but if it is correct, I cannot say. How can I determine that? I would not be surprised if this problem is related to Monica's question civicrm.stackexchange.com/questions/35982/…
    – ruud
    Commented Jun 28, 2020 at 7:49
  • I realize that with pay later, you stay in the same session. That is why there is no problem there: the return URL is correctly retrieved from the session. In the case of a payment 'something happens' to the session and the return URL is vanished -> white screen.
    – ruud
    Commented Jul 6, 2020 at 7:36

2 Answers 2

2

The reason for the problem is in the session: the white page is probably caused by the returnURL being an empty string. This is because the session parameters are not retrieved as they should. I posted this question as follow up: session problem causes white screen

0
1

this issue is resolved since upgrading from civicrm 5.26 to civicrm 5.28 AND upgrading the omnipay multiprocessor plugin to 3.13. Without upgrading the plugin, the white screen still showed up. Now it is all perfect again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.