Closed Tarom11 closed 2 years ago
You should be able to set the payment date on the PaymentInformation
level
$payment = new PaymentInformation(
'payment-001',
'InnoMuster AG',
new BIC('ZKBKCHZZ80A'),
new IBAN('CH6600700110000204481')
);
$payment->setExecutionDate(new \DateTime());
Thank you very much. Do you know which date format to use here?
It uses a DateTime
class, you can set the date with the following format
$payment->setExecutionDate(new \DateTime('2022-12-31'));
You can also use other/custom format. Refer to the DateTime documentation: https://www.php.net/manual/en/class.datetime.php
The library will format the date for the XML with the following
$this->executionDate->format('Y-m-d')
If you don't provide an execution date, the library will use the date of today: PaymentInformation.php#L87
Thank you very much. Will test it right away.
Thank you for this great tool. Is it possible to enter the payment date as well? Unfortunately I have not found it.
Best regards from St. Gallen Tarom