rubofvil β created an issue.
rubofvil β created an issue.
Thx @karing PR, with first version https://github.com/colemanw/webform_civicrm/pull/886
rubofvil β created an issue.
Thx Francesc, but in this case Paypal is redirecting and sending the params with _GET and can use `CRM_Utils_System::redirect`
But we need to use a post in a form (with method _POST) like in doc "Formulario de envΓo de peticiΓ³n" (https://pagosonline.redsys.es/conexion-redireccion.html)
Pd. I tried to manage sending vars via _POST with Curl and a redirect with headers but i din't find a solution with this
In the file
vendor/twig/twig/src/Template.php
The function `ob_start` is avoding the redirect of the Redsys. The Twig is called to load the node (if the the webform is embeded into a node) after `exit` is called.
This patch fix the issue, but isn't a good solution. It's to understand the issue
diff --git a/vendor/twig/twig/src/Template.php b/vendor/twig/twig/src/Template.php
index 76d55cbcb..daf98c079 100644
--- a/vendor/twig/twig/src/Template.php
+++ b/vendor/twig/twig/src/Template.php
@@ -384,7 +384,12 @@ abstract class Template
if ($this->env->isDebug()) {
ob_start();
} else {
- ob_start(function () { return ''; });
+ if (!empty($_POST["hidden_processor"]) && $_POST["hidden_processor"] == "1") {
+ // Avoid executing ob_start allow the processor to continue
+ } else {
+ ob_start(function () { return ''; });
+ }
+
}
try {
$this->display($context);
A porpouse is make a development that in some cases the Twig not render a node or panel,....