QuickPay / magento-v2

Open Software License 3.0
5 stars 20 forks source link

main.CRITICAL: Warning: Cannot modify header information - headers already sent #14

Closed julianchristmas closed 3 years ago

julianchristmas commented 3 years ago

On Magento 2.3.x the following error is thrown when customers are passed onto Quickpay for payment:

main.CRITICAL: Warning: Cannot modify header information - headers already sent

The issue seems to be caused by the statement echo 'OK' in the M2.3 specific callback controller:

https://github.com/QuickPay/magento-v2/blob/238f8d11d145752fbef336c34d420fe90a9dd5d7/Controller/Payment/CallbackM23.php#L258

CodemakersDK commented 3 years ago

Updated with $this->getResponse()->setBody("OK");