mattrogowski
Well-known member
I'm creating a new payment provider integration, and it requires a certain response to be output when the webhook has been processed. Currently
I can't extend this, so means I can only respond with the log message, which isn't what I need, and I don't really want to change what the log message is, as I need to return XML and this isn't going to be suitable as the log message. If this was a method in the payment provider, it could return this by default, but allow it to be overridden. Every other aspect can be overridden, but there is an (incorrect) assumption that the payment gateway doesn't need any custom response data. I'm sure some other payment gateways may require specific responses to callbacks, and this seems like a limitation that doesn't need to exist.
payment_callback.php
returns output with this:
PHP:
$response
->body(htmlspecialchars($state->logMessage))
->send($request);
I can't extend this, so means I can only respond with the log message, which isn't what I need, and I don't really want to change what the log message is, as I need to return XML and this isn't going to be suitable as the log message. If this was a method in the payment provider, it could return this by default, but allow it to be overridden. Every other aspect can be overridden, but there is an (incorrect) assumption that the payment gateway doesn't need any custom response data. I'm sure some other payment gateways may require specific responses to callbacks, and this seems like a limitation that doesn't need to exist.
Last edited:
Upvote
0