Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
cprouvot CreditAttribution: cprouvot commentedDoes anyone has the same problem?
Comment #2
jsacksick CreditAttribution: jsacksick commentedI'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.
Comment #3
jsacksick CreditAttribution: jsacksick commentedTested and it worked, the autoresponse is still getting the answer in the $_POST, http://drupalcode.org/project/commerce_atos.git/commit/ca849f5
Comment #4
cprouvot CreditAttribution: cprouvot commentedYes, 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?
Comment #5
jsacksick CreditAttribution: jsacksick commentedI'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.
Comment #6
cprouvot CreditAttribution: cprouvot commentedI 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.
Comment #7
MarcElbichon CreditAttribution: MarcElbichon commentedCan you set this feature configurable in settings form ?
Comment #8
jsacksick CreditAttribution: jsacksick commentedThat's already the case...
Comment #9
MarcElbichon CreditAttribution: MarcElbichon commentedGreat !
Comment #10
cprouvot CreditAttribution: cprouvot commentedYou just have to download the last release.
Comment #12
Musa.thomasSorry 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.
Comment #13
Musa.thomasComment #14
Musa.thomasOk I'm noob I didn't disable htpasswd sorry