hello,

Hello,

thanks for this great module, i installed it (uc_atos) and im having a problem

Order and payment go ok but when i go back to the site after paying (payment is ok i called my bank "la poste"), i have an error message and the things i ordered are still in the cart.

Is there something i did wrong or forgot to do ?

i attached a file for you to see

thanks to you all

CommentFileSizeAuthor
sips.jpg92.38 KBjoachim desarmenien

Comments

joachim desarmenien’s picture

i found this code snippet

//Extraction of the data
$response = _uc_atos_response_extract($_POST['DATA']);
if ( ! ( isset($response['code'])
and $response['code'] == 0
and isset($response['order_id'])
and is_numeric($response['order_id'])
and isset($response['response_code'])
)) {
watchdog('uc_atos', t('API ATOS/SIPS error : ') . ( isset($response['error']) ? strip_tags($response['error']) : '[no message]'));
return t("ATOS/SIPS error : Error during order data analyze. Please, try again or contact administrator.");
}

how can i check what response code is sent when the user goes back to the site
apparently i don't get the good code, so the order is not processed and the cart is nit emptied

can anyone help me out ?

thanks

joachim desarmenien’s picture

i loooked at the watchdog database table
which is triggered by
watchdog('uc_atos', t('API ATOS/SIPS error : ') . ( isset($response['error']) ? strip_tags($response['error']) : '[no message]'));

and i have this in it

0 uc_atos API ATOS/SIPS error : [no message] a:0:{} 5 http://fbwn.net/xxxxxxx ip adress numbers

does that mean that response code == 0, what should it be to work

joachim desarmenien’s picture

i did a bit of research

i thik i got something

in the function

function _uc_atos_response_extract($message) {
$params = array(
'pathfile' => variable_get('uc_atos_api_pathfile', $_SERVER['DOCUMENT_ROOT'].'/atos/param/pathfile'),
'message' => $message,
);
var_dump($params);

//We launch the response binary
$launcher = variable_get('uc_atos_api_pathresponse', $_SERVER['DOCUMENT_ROOT'].'/atos/response');
foreach($params as $key => $value) {
$launcher .= ( empty($params[$key]) ? '' : ' ' . escapeshellarg($key . '=' . $value));
}
var_dump($launcher);

$result=stripslashes(exec($launcher));
var_dump($result);

//We parse the result
$tmp = explode('!', $result);
....

var_dump($params);

array(2) { ["pathfile"]=> string(57) "/atos/param/pathfile" ["message"]=> string(1144) "20203431346030........" }

var_dump($launcher);

string(1275) "/atos/response 'pathfile=/atos/param/pathfile' 'message=202034313460302850......'"

var_dump($result);

string(0) ""

the exec function fails is it because it gets bad data, or could it be because of my host

thanks you very much for your help

safe_mode is off

joachim desarmenien’s picture

Status: Active » Fixed

got the solution

if it ever happens to someone

change the permissions of your binaries and it will work out fine

Status: Fixed » Closed (fixed)

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

Countzero’s picture

Status: Closed (fixed) » Active

Hi all,

Sorry to reopen this issue, but I stumble on the same problem.

Eveything works fine, except for the error after the payment is processed.

I tried various permissions on the executables, and none worked : I always get the exact same error.

I would be very grateful if somebody could lend a hand on this subject, and, as usual, it would be even better if it was soon ;-).

I'll keep on researching and post here if I manage to make it work as expected.

Thanks

(sidenote : I had to force the country code string to 'fr' (french) in the .module file, otherwise it insisted on picking up the us certificate, which of course was not there).

Countzero’s picture

Status: Active » Fixed

OK, I found the solution.

I understood from the comment above that I had to mess with the files in atos/bin, while it concerned the response and request files in atos/.

A chmod +x on the request files did the trick. I couldn't manage to set the right permissions on it. As it is outside the web root, I don't mater too much.

Thank you and sorry for the unneeded noise.

Cheers

Status: Fixed » Closed (fixed)

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