Hi,

With the ATOS payment solution, we have the possibility to redirect automatically the customer to the website. To do this, we just have to add the variable DATA with the value "NO_RESPONSE_PAGE" to the query. So, I rewrite the function commerce_atos_exec :

function commerce_atos_exec($bin_path, $params) {
  $pairs = array();
  $params["data"] = "NO_RESPONSE_PAGE";
  
  foreach ($params as $key => $value) {
    $pairs[] = escapeshellarg("$key=$value");
  }

  if (strstr($_SERVER['SERVER_SOFTWARE'], 'Win32') || strstr($_SERVER['SERVER_SOFTWARE'], 'IIS')) {
    $command = '"' . escapeshellarg($bin_path) . ' ' .implode(' ', $pairs) . '"';
  }
  else {
    $command = $bin_path . ' ' . implode(' ', $pairs);
  }
  $result = exec($command);
  return explode('!', $result);
}

However, this solution doesn't work! In the documentation, they say that, with this configuration, the returned variable are in GET and not in POST. Besides, there are less variables in the GET response.

Do you try to work with NO_RESPONSE_PAGE?

Comments

cprouvot’s picture

Version: » 7.x-1.x-dev

Does anyone has the same problem?

jsacksick’s picture

I'd like to implement that, but I can't find any mention of this feature in the documentation, maybe I'll try to send a mail to atos, if anyone found something, feel free.

jsacksick’s picture

Status: Active » Fixed

Tested and it worked, the autoresponse is still getting the answer in the $_POST, http://drupalcode.org/project/commerce_atos.git/commit/ca849f5

cprouvot’s picture

Yes, it's work!

The autoresponse is still getting the answer in the $_POST but I think the normal response is getting in $_GET . Maybe, we have to modify the commerce_atos_redirect_form_validate() to get the date in $_GET when the commerce_atos_automatic_redirect is active.

What do you think about that?

jsacksick’s picture

I'm wondering if we really need that or not, when I ran some tests, the autoresponse was everytime happening before, and it doesn't enter the regular response callback.
You can try by adding a watchdog at the beginning of the regular response.

cprouvot’s picture

I will test it and I come back with an answer. I'm agree to say that the autoresponse is every time happening before but we need to see all the case and we know what the regular response is not in POST but in GET variables.

MarcElbichon’s picture

Can you set this feature configurable in settings form ?

jsacksick’s picture

That's already the case...

MarcElbichon’s picture

Great !

cprouvot’s picture

You just have to download the last release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Musa.thomas’s picture

Sorry but for it doesn't work, when I uncheck automaticly redirect, all is ok, order is validate. But if I check it, I'm redirect on checkout with an error "Payment failed at the payment server. Please review your information and try again." wich is lunch in commerce_payement.checkout_pane.inc of commerce module.

Musa.thomas’s picture

Status: Closed (fixed) » Active
Musa.thomas’s picture

Status: Active » Closed (fixed)

Ok I'm noob I didn't disable htpasswd sorry