Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0 beta #90

Open
wants to merge 4 commits into
base: RC_4.1.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/param/parmcom.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
/.project
/nbproject/
/.idea/
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Deny from all
</Files>
<Files "*.pub.php">
Allow from all
</Files>
</Files>
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# TggAtos Module for Prestashop 1.5 and Prestashop 1.6
# TggAtos Module *BETA VERSION* for Prestashop 1.7
## ATOS SIPS 600 payment gateway

If you are looking for PrestaShop 1.4, 1.5 and 1.6 please see 4.x module versions

###### This module helped you earning money ?
Please contribute back

Expand All @@ -10,14 +12,14 @@ Suggested donation: 25 &euro; for basic user, 80 &euro; for professionals which

Donations help me to find time to develop and maintain the module and to answer support requests.

### Release 3.4.0
### BETA 5.0.0

#### RELEASE-CANDIDATE feedback requests
- Check that silent response works well (not yet checked due the use of a local virtual machine as server)
- Production use feedbacks with:
- details about used functionnalities
- Exploitation feedback with:
- details about used features
- details about production environment configuration:
- general public Web Hosting if relevant (exemple: "Mutualised Pro hosting from OVH company" or "Dedicated web server from OVH company", the last one is only relevant if you didn't change much of the configuration options that may affect module operation)
- general public Web Hosting if relevant (example: "Mutualised Pro hosting from OVH company" or "Dedicated web server from OVH company", the last one is only relevant if you didn't change much of the configuration options that may affect module operation)
- OS used with distribution and version
- HTTP server, and multi process module if relevant, with version
- PHP integration type and version
Expand All @@ -33,20 +35,21 @@ http://prestashop.blog.capillotracteur.fr/2013/02/10/debut-de-la-phase-release-c
Sorry, it is a french blog, but they can be submitted in english as well.

#### Environment used to test current version
- Debian 7 x86_64
- apache2-mpm-prefork (I prefer mpm-worker for production server but this is a dedicated local virtual machine with Eclipse project folder mounted from Windows host machine)
- libapache2-mod-php5
- PHP5
- Debian 9 x86_64
- Apache 2.4
- PHP7.0-FPM

#### Prerequisites
- (hosting) PHP5 >= 5.3
- (hosting) PHP5 >= 5.4
- (hosting) safe_mode off
- (hosting) exec() function not disabled, and able to execute ATOS SIPS binaries
- (prestashop) version >= 1.5
- (prestashop) version >= 1.7
- (you) good web hosting configuration technical level and good knowledge of security issues
- (you) basic undestanding of the way an ATOS SIPS gateway works and it's configuration

#### Installation (differences with a simple PrestaShop module)

##### Generic method
- Make sure the module folder is named `tggatos`, the project content must be located in `modules/tggatos`.
- Replace `tggatos/bin/` content with binaries compatible with your system provided by your SIPS service provider
- Update `tggatos/param/parmcom.<sips_service_provider_codename>` with content of default parmcom provided by your SIPS service provider
Expand All @@ -57,7 +60,23 @@ Sorry, it is a french blog, but they can be submitted in english as well.
- Relocate `tggatos/param` somewhere safe from public access, outside HTTP document root, update module configuration in advanced panel.
- Relocate `tggatos/log` folder, update module configuration in basic panel.
- Check if access control policies match your environment and configuration, modify if needed.
- If you experience any trouble please set PrestaShop constant `_PS_MODE_DEV_` to TRUE, enable PHP error logging and set error reporting to -1 (all) while troubleshooting
- If you experience any trouble please set PrestaShop constant `_PS_MODE_DEV_` to TRUE, enable PHP error logging and set error reporting to -1 (all) while troubleshooting

##### Installation via a linux webserver shell using git (recommended method)

```bash
shopuser@webserver:prestashop$ cd modules
shopuser@webserver:prestashop/modules$ git clone --depth 1 -b 5.0.0-beta https://github.com/TrogloGeek/prestashop-tggatos-module.git tggatos
shopuser@webserver:prestashop/modules$ cd tggatos
shopuser@webserver:prestashop/modules/tggatos$ git checkout -b local
```

`git clone` arguments explained:
- (optional) `--depth 1` will reduce network and disk usage by truncating git history
- `-b 5.0.0-beta` will checkout the selected branch or tag name, required if you use `--depth 1`
- (required) `tggatos` will clone the module in this directory name instead of the GitHub project name `prestashop-tggatos-module`

`git checkout -b local` will create a branch named `local` so you can later commit local changes if needed

#### Release cycle
I do not have enough feedback to manage a real release cycle, and I don't use it myself, I do run alpha tests on it but it is only a set of basic tests to try to check if I introduced side effects with last changes, never trust my checks, please run your owns.
Expand Down
18 changes: 4 additions & 14 deletions autodispatch/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ function tggatos_registerRequestValue($name, $value)
function tggatos_autodispatch($file)
{
$controller = basename($file, '.pub.php');
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
//PrestaShop 1.5+
eval('class TggAtosModuleFrontController extends ModuleFrontController {}');
foreach (array('controller' => $controller, 'fc' => 'module', 'module' => 'tggatos') as $name => $value)
tggatos_registerRequestValue($name, $value);
Dispatcher::getInstance()->dispatch();
} else {
//PrestaShop 1.4
require_once implode(DIRECTORY_SEPARATOR, array(dirname(dirname(__FILE__)), 'ps14', 'classes', 'TggAtosModuleFrontController.php'));
require_once implode(DIRECTORY_SEPARATOR, array(dirname(dirname(__FILE__)), 'controllers', 'front', $controller.'.php'));
$controller = 'TggAtos'.Tools::toCamelCase(str_replace('-', '_', $controller), true);
//require_once implode(DIRECTORY_SEPARATOR, array(dirname(dirname(__FILE__)), 'ps14', 'controllers', 'front', $controller.'.php'));
ControllerFactory::getController($controller.'ModuleFrontController')->run();
}
//PrestaShop 1.5+
foreach (array('controller' => $controller, 'fc' => 'module', 'module' => 'tggatos') as $name => $value)
tggatos_registerRequestValue($name, $value);
Dispatcher::getInstance()->dispatch();
}
4 changes: 0 additions & 4 deletions autodispatch/paymentfailure.pub.php

This file was deleted.

4 changes: 0 additions & 4 deletions autodispatch/paymentgateway.pub.php

This file was deleted.

4 changes: 0 additions & 4 deletions autodispatch/silentresponse.pub.php

This file was deleted.

2 changes: 1 addition & 1 deletion autodispatch/userreturn.pub.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
require_once 'init.php';
//This controller does not use Prestashop Routing because ATOS/SIPS does not support GET parameters when using GET redirection form...
tggatos_autodispatch(__FILE__);
tggatos_autodispatch(__FILE__);
Loading