Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NG Processor: Throws error for event payment #17

Open
Detsieber opened this issue May 3, 2023 · 4 comments
Open

NG Processor: Throws error for event payment #17

Detsieber opened this issue May 3, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs:funding There's no sufficient funding for this ticket

Comments

@Detsieber
Copy link
Member

Actual behaviour:

The "new" SEPA processor throws an error during registration/payment on event page:

CRM_Core_Exception: Expected one Contribution but found 25 in /var/www/civicrm/pro/drupal/web/sites/default/files/civicrm/ext/org.project60.sepapp/CRM/Core/Payment/SDDNGPostProcessor.php on line 84

Exception trace

| Function | Location

0 | civicrm_api3() | /var/www/civicrm/pro/drupal/web/sites/default/files/civicrm/ext/org.project60.sepapp/CRM/Core/Payment/SDDNGPostProcessor.php:84
1 | CRM_Core_Payment_SDDNGPostProcessor::createPendingMandate() | /var/www/civicrm/pro/drupal/web/sites/default/files/civicrm/ext/org.project60.sepapp/sepapp.php:240
2 | sepapp_civicrm_postProcess() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:275
3 | CRM_Utils_Hook->runHooks() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Utils/Hook/DrupalBase.php:73
4 | CRM_Utils_Hook_DrupalBase->invokeViaUF() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:310
5 | Civi\Core\CiviEventDispatcher::delegateToUF() | /var/www/civicrm/pro/drupal/vendor/symfony/event-dispatcher/EventDispatcher.php:251
6 | Symfony\Component\EventDispatcher\EventDispatcher->callListeners() | /var/www/civicrm/pro/drupal/vendor/symfony/event-dispatcher/EventDispatcher.php:73
7 | Symfony\Component\EventDispatcher\EventDispatcher->dispatch() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php:260
8 | Civi\Core\CiviEventDispatcher->dispatch() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:167
9 | CRM_Utils_Hook->invoke() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Utils/Hook.php:490
10 | CRM_Utils_Hook::postProcess() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Form.php:599
11 | CRM_Core_Form->postProcessHook() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Form.php:574
12 | CRM_Core_Form->mainProcess() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/StateMachine.php:144
13 | CRM_Core_StateMachine->perform() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Next.php:43
14 | CRM_Core_QuickForm_Action_Next->perform() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php:203
15 | HTML_QuickForm_Controller->handle() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php:103
16 | HTML_QuickForm_Page->handle() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Controller.php:355
17 | CRM_Core_Controller->run() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:319
18 | CRM_Core_Invoke::runItem() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:69
19 | CRM_Core_Invoke::_invoke() | /var/www/civicrm/pro/drupal/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:36
20 | CRM_Core_Invoke::invoke() | /var/www/civicrm/pro/drupal/web/modules/contrib/civicrm/src/Civicrm.php:88
21 | Drupal\civicrm\Civicrm->invoke() | /var/www/civicrm/pro/drupal/web/modules/contrib/civicrm/src/Controller/CivicrmController.php:80
22 | Drupal\civicrm\Controller\CivicrmController->main() | unknown:unknown
23 | call_user_func_array() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123
24 | Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/Render/Renderer.php:580
25 | Drupal\Core\Render\Renderer->executeInRenderContext() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:124
26 | Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:97
27 | Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() | /var/www/civicrm/pro/drupal/vendor/symfony/http-kernel/HttpKernel.php:169
28 | Symfony\Component\HttpKernel\HttpKernel->handleRaw() | /var/www/civicrm/pro/drupal/vendor/symfony/http-kernel/HttpKernel.php:81
29 | Symfony\Component\HttpKernel\HttpKernel->handle() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php:58
30 | Drupal\Core\StackMiddleware\Session->handle() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php:48
31 | Drupal\Core\StackMiddleware\KernelPreHandle->handle() | /var/www/civicrm/pro/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:106
32 | Drupal\page_cache\StackMiddleware\PageCache->pass() | /var/www/civicrm/pro/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php:85
33 | Drupal\page_cache\StackMiddleware\PageCache->handle() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php:48
34 | Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php:51
35 | Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() | /var/www/civicrm/pro/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23
36 | Stack\StackedHttpKernel->handle() | /var/www/civicrm/pro/drupal/web/core/lib/Drupal/Core/DrupalKernel.php:718
37 | Drupal\Core\DrupalKernel->handle() | /var/www/civicrm/pro/drupal/web/index.php:19
38 | {main} |  

Entschuldigung, aufgrund eines Fehlers kann die Anfrage im Moment nicht ausgeführt werden. Bitte den Administrator oder Service-Anbieter kontaktieren und die Fehlermeldung sowie Details zur ausgeführten Aktion dafür bereithalten.
Expected one Contribution but found 25

Expected behaviour:

Event payments with SEPAPP NG should work as specified.

@TobiasVoigt
Copy link

Confirmed.

@eptbertram
Copy link

I ran in error "Expected one Contribution but found 25" with my CiviCRM 5.67.0 on WordPress 6.4.2 (PHP 8.1.27), too. Release 1.2-alpha1 and 1.2-beta1 didn't helped me here.

WP-Log shows:
Warning: Undefined array key "trxn_id" in /var/www/vhosts/meine.dvpw.de/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php on line 981
&
Deprecated: Deprecated function doDirectPayment, use doPayment. in /var/www/vhosts/meine.dvpw.de/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 1113

Oh boy, I wish I could help...

@bjendres
Copy link
Member

Yes, I feel your pain. This extension needs a proper overhaul or re-implementation; a lot of things have changed in that area, but we currently don't have any clients having that issue.

@bjendres bjendres added bug Something isn't working help wanted Extra attention is needed needs:funding There's no sufficient funding for this ticket labels Jan 30, 2024
vurt2 pushed a commit to vurt2/org.project60.sepapp that referenced this issue Nov 12, 2024
…rapper for contribution completetransaction does not work so we use hook_postSave_civicrm_contribution() instead.
@vurt2
Copy link
Collaborator

vurt2 commented Nov 12, 2024

Just made a PR that fixes the problem. I tried to get the api wrapper working that sets the contribution id - but the action completetransaction is never called. So as a workarround I used hook_civicrm_postSave_[table_name] to set the id.

vurt2 added a commit that referenced this issue Nov 20, 2024
NG Processor: Throws error for event payment #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs:funding There's no sufficient funding for this ticket
Projects
None yet
Development

No branches or pull requests

5 participants