phpFinTS icon indicating copy to clipboard operation
phpFinTS copied to clipboard

SEPA direct debit

Open timrasche opened this issue 2 years ago • 6 comments

Is it possible to force the paramater "einzelbuchungGewuenscht" on Action "SendSEPADirectDebit" to reliable value of "true"?

timrasche avatar Nov 23 '22 17:11 timrasche

Not today. In fact, it's either null by default or false in this special case, which looks a little suspicious to me.

I wonder if instead of

if (!$useSingleDirectDebit) {
    if ($hidxes->getParameter()->einzelbuchungErlaubt) {
        $hkdxe->einzelbuchungGewuenscht = false;
    }
}

we perhaps want

if ($hidxes->getParameter()->einzelbuchungErlaubt) {
    $hkdxe->einzelbuchungGewuenscht = $useSingleDirectDebit;
}

Philipp91 avatar Nov 23 '22 20:11 Philipp91

@Philipp91 Thanks for review, and i agree. Think need exactly this.

timrasche avatar Nov 24 '22 08:11 timrasche

You can patch it in and try it out, send a PR if it worked.

Philipp91 avatar Nov 24 '22 18:11 Philipp91

Just a heads up, $useSingleDirectDebit is only the type of request that is send to the bank (HIDME or HKDME). It has nothing to do with einzelbuchungGewuenscht except that einzelbuchungGewuenscht is only available for HKDME.

ampaze avatar Dec 01 '22 08:12 ampaze

hm ok, can we bring up this topic? I cant see any line of code in the examples or other parts to use this value "einzelbuchungGewuenscht" in combination with multiple sepa direct debits or transfers. Its mandatory on our software to list account statements as single lines and not in a collective way.

timrasche avatar Apr 19 '24 14:04 timrasche

Just setting it to true would potentially change functionality of software using this lib, including ours.

Options are:

  • extend SendSEPADirectDebit and overwrite createRequest and change einzelbuchungGewuenscht as needed.
  • we could take a look at the PAIN messages used and see if the information could be derived from the XML

ampaze avatar Apr 19 '24 14:04 ampaze