I can't make the module work. I have the following message when select Credit Card at checkout :

Notice : Undefined offset: 1 dans commerce_atos_order_form() (ligne 752 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Notice : Undefined offset: 2 dans commerce_atos_order_form() (ligne 753 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Notice : Undefined offset: 3 dans commerce_atos_order_form() (ligne 754 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Request call error: request executable file not found.

I am using MAMP as local server and my configuration of the module is :

Path to the logo directory :
sites/default/files/atos/logos

Path to the binaries :
/Applications/MAMP/cgi-bin/atos/bin

Path to config files (param folder) :
/Applications/MAMP/cgi-bin/atos/param

atos/bin/ and atos/param/ are chmod 755

Any help would be appreciated.

Comments

lima2x’s picture

Priority: Normal » Critical

I moved the binaries and param folder to the libraries folder :

/Users/[...]/[sitename]/sites/all/libraries/atos/bin
/Users/[...]/[sitename]/sites/all/libraries/atos/param

and chmod 777 folders and files

I can save configuration in Credit card Atos so path and exec are checked.

But when checkout, I still have :
Notice : Undefined offset: 1 dans commerce_atos_order_form() (ligne 752 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Notice : Undefined offset: 2 dans commerce_atos_order_form() (ligne 753 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Notice : Undefined offset: 3 dans commerce_atos_order_form() (ligne 754 dans [...]/sites/all/modules/commerce_atos/commerce_atos.module).
Request call error: request executable file not found.

It looks like there is a path issue when execute the request line 748 ?

I checked on a dedicated server and I have the same issue.

lima2x’s picture

I installed Atos module on a brand new Ubuntu + Kickstart on a virtual machine with exactly the same configuration :

- bin and param in /sites/all/libraries/atos/
- logos in /sites/default/files/logo
- everything chmod 755

And it is a little bit better because after checkout, the payment page is opening with Credit cards links but no Card images and then payment is not working :

1 - In the source code of the page, the path built to get images are wrong, they are including twice the name of the site folder : http://localhost/[sitename]/[sitename]/sites/default/files/logo/[imagena...

2 - Clicking on one link I open the payment page on the bank side and enter a card number. Validation bring me back to the payment page of my website with the Credit cards links but the payment is not validated. My order is still a shopping cart with statut "Payment/checkout". Response doesn't work.

Item 1 shows clearly a path issue, maybe the second item and my previous posts issue are connected to this path issue ?

My website is not on the root directory of the web server : /www/[sitename]/... ?

Looking forward ...

jsacksick’s picture

First the logos path shouldn't have a slash at the beginning of the string.
Second how can you expect the bank to ping your server back if you're testing locally ?

lima2x’s picture

Thank you for your answer.

Sorry for the misunderstanding, but I didn't use any begenning or trailing slash for logo path and trailing slash for bin and param path. Everything was ok at configuration save.

OK for local server.

My first point and my previous issues are still alive ...

On which server configuration do you make it work ?

What do you think about a path issue ?

jsacksick’s picture

Priority: Critical » Normal

It's working on a debian for me, the logos path is built like that :

$base_url . $base_path . $pm_settings['commerce_atos_logo_path']

See line 475.

lima2x’s picture

My website is in a subdirectory and before building the logos' path you are using :

global $base_url, $base_path;

So $base_url includes the subdirectory, and

$base_url . $base_path

will set twice the subdirectory in the path.
I have replaced it by :

$base_url . '/'

and it is fine on Ubuntu.

jsacksick’s picture

Can you try the latest dev ?

lima2x’s picture

The "undefined offset" have desappeared but still have :
Request call error: request executable file not found.

jsacksick’s picture

To summarize this issue, it's working for you with Ubuntu, but not with MAMP ?

lima2x’s picture

Yes
It doesn't work neither on 1and1 mutualized server and on an OVH Debian + ISPConfig dedicated server.

jsacksick’s picture

This should be because of an issue with your provider (http://forum.webrankinfo.com/avec-paiement-securise-atos-sur-serveur-64bits-t69931.html) you can check this link.

lima2x’s picture

I've got it ...

1 - MAMP 2 has a knowed issue since july and can't excecute binaries with php over 5.2. This should be fixed in the next releases ...

2 - bin and param folders must be uploaded on the distant server via FTP with the binary mode. This could be added in the Notes of the module ?

After that, I still had a API call error but due to a too long bin path and I fixed it by moving the folders closer to my web root folder.

This issue took me nights and days and nearly a nervous breakdown but increased my competence ...

I close the post and thank jsacksick.

lima2x’s picture

Status: Active » Closed (fixed)