Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

OOFF Contribution Status change batch fails #721

Open kainuk opened 1 month ago

kainuk commented 1 month ago

After sending the xml file with OOFF transactions, successfully to the bank, the batch that updates the status from Pending to Complete fails. The batch stops in the screen below.

2024-05-31_08-23

In the background an error is thrown.

TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in implode() (line 187 of /var/www/html/web/sites/default/files/civicrm/ext/org.project60.sepa/CRM/Sepa/Logic/Queue/Close.php).

I have this error on the latest version of the sepa code with a PHP 8.1 install and CiviCRM 5.67 on Drupal 10.

pminf commented 3 weeks ago

I can confirm this issue with latest CiviCRM 5.74.1, also using PHP 8.1.

In our case \CRM_Sepa_Logic_Queue_Close::$origin_status_ids is null, which leads to an error with the implode function.

ooff-debug

bjendres commented 3 weeks ago

Thanks for reporting @kainuk and @pminf! Will you be working on a PR, or "just" reporting?

kainuk commented 3 weeks ago

Hi @bjendres, I have made a PR, see https://github.com/Project60/org.project60.sepa/pull/722 , but I would like feedback on it.