Atos proposes a function than can be implemented in the reponse.php file to skip the "back to the store" button and i cannot find where to paste it. The response.php file is in the sample/ folder of Atos' package, is there another version of this file in the module files ?

Thanks for your answer.

Best regards

CommentFileSizeAuthor
#8 uc_atos.patch4.04 KBanrikun
#3 uc_atos.zip6.74 KBcedricus

Comments

eme’s picture

This could be indeed interesting, but more info is needed about this funtion. Moreover, there is no response.php file that I know. I presume you are talking about call_response.php?

Please provide any link to this function to show us.

eme’s picture

Status: Active » Postponed (maintainer needs more info)
cedricus’s picture

StatusFileSize
new6.74 KB

Hi
I've just installed your module and I think I found the solution for the redirection to skip that annoying ''retour a la boutique page' and also solve the problem for the anonymous user.
I'm still in test mode but it seems to be working like a charm.
I don't really know how to post a patch so will tell you now .
on your function ' uc_atos_form($order)'
add this parameter
."$parm data=NO_RESPONSE_PAGE"

that will then redirect straight back to order/complete;
but by doing that the values are passed with the $_GET method so change any $_POST[] to $_GET[]
then I think we can delete the autoresponse function which is now useless.
I've attached the uc_atos.module file.

eme’s picture

Status: Postponed (maintainer needs more info) » Needs review

Interesting idea. To be extensively tested!

Little question for you : are the account created for each customer even when anonymous with your fix?

cedricus’s picture

Hi
I've tested it with all the possibility including with anonymous has the site I'm building only use that functionality and i was aware of that issue.
My setup also use role expiration.
All is created in good order I haven't had one issue.
I did about 50 test on this.
I found this trick on the webaffaire doc I phoned them to be sure and they told me the procedure so it's an option that they provide, I found two guys talking about it on a blog for magento, they have used this method too, of course that doesn't mean that it's good but it worked.

I agree it probably needs more test but, this will have to do for me right now as the site is now live and all my test have been successful.

here's the reference
in the guidepersonalisationdespages_webaffaires.doc
page 18.

eme’s picture

Good, thanks, I'll take that as well on production websites and test it. I think that's clearly the best way to do that. Has to be commited when reviewed. If there is any bug, I'll go back here.

anrikun’s picture

Isn't there a bug in cancel callback?

<?php
function uc_atos_cancel() {
  global $user;

  unset($_SESSION['cart_order']);

  if (isset($_GET['DATA'])) {
    drupal_set_message(t('Error during order process, please, try again or contact administrator.'));
    drupal_goto('cart');
    return;
  }

  $response = _uc_atos_response_extract($_GET['DATA']);
  if ( ! (isset($response['order_id']) and is_numeric($response['order_id']))) {
    drupal_set_message(t('Error during order process, please, try again or contact administrator.'));
    drupal_goto('cart');
    return;
  }

  uc_order_comment_save(intval($response['order_id']), $user->uid, t('This order has been explicitly canceled by the user.'), 'order');
  if (uc_order_update_status($response['order_id'], uc_order_state_default('canceled'))) {
    drupal_set_message(t('Votre ordre a bien été annulé.'), 'status');
  }
  else {
    drupal_set_message(t('Error during order process, please, try again or contact administrator.'));
    watchdog('uc_atos', t("The order @order couldn't be marked as 'Canceled'.", array('@order' => intval($response['order_id']))), WATCHDOG_WARNING, NULL);
  }

  drupal_goto('cart');
}
?>

Line 326, it should be

<?php
if (!isset($_GET['DATA'])) {
?>

instead of

<?php
if (isset($_GET['DATA'])) {
?>

Another minor bug (?): the French "Votre ordre a bien été annulé." should be written in English.
(strange translation by the way: it should be "Votre commande a bien été annulée" !)

anrikun’s picture

Title: How to skip the "retour à la boutique" ("back to the store") button ? » Skipping the "retour à la boutique" button and solving the anonymous user problem
Category: support » bug
StatusFileSize
new4.04 KB

Here is a patch with cedricus's (#3) changes and mine.
Needs review.

anrikun’s picture

Title: Skipping the "retour à la boutique" button and solving the anonymous user problem » How to skip the "retour à la boutique" button
Category: bug » support
Status: Needs review » Active

I've been testing #3 for a while and I'm having problems with it: this method doesn't seem to work with 3D Secure.
I'm changing this to "support request" as it's not a bug.

anrikun’s picture

Status: Active » Closed (won't fix)

Marking this as "won't fix" as skipping the "retour à la boutique" button is not supported.

eme’s picture

Not supported only for 3D Secure? Do you have any clue why? It is the as device that does not support it?

eme’s picture

It is not supported only for 3D Secure? And it is not supported because of the atos device or because of this specific module?

anrikun’s picture

The data=NO_RESPONSE_PAGE param doesn't seem to work with 3D Secure (the order is cancelled), that's why I have decided not to use it.

This module supports 3D secure.