Account created on 15 November 2010, about 14 years ago
#

Merge Requests

Recent comments

πŸ‡ͺπŸ‡ΈSpain rubofvil

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

πŸ‡ͺπŸ‡ΈSpain rubofvil

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,....

Production build 0.71.5 2024