Commit 33c19fae authored by jsacksick's avatar jsacksick

Add README.txt file + cs corrections.

parent dd143de7
Commerce Atos payment method module.
Should work with the following banks :
- Crédit Agricole (e-transactions)
- Banque Populaire (CyberPlus)
- BNP Paribas (Mercanet)
- La Poste (Scellius)
- LCL (Sherlocks)
- HSBC (Elysnet)
- Société Générale (Sogenactif)
- Crédit du Nord (Webaffaires)
Requirements :
The atos library, you can download it here :
http://www.e-transactions.credit-agricole.fr/formulaire_telechargement.htm
In production mode, the certif file.
Configuration :
Once installed, you must configure the path of the atos binaries in the payment
methods settings by going to (admin/commerce/config/payment-methods).
Notes :
- The bin path must not exceed 77 characters.
\ No newline at end of file
......@@ -290,8 +290,7 @@ function commerce_atos_settings_form_submit($form, &$form_state) {
}
/**
* Payment method callback: redirect form, we're building the request that is
* going to be sent to atos after the necessary checks.
* Payment method callback: redirect form.
*/
function commerce_atos_redirect_form($form, &$form_state, $order, $payment_method) {
// Retrieve the user to maybe override the language of the payment platform.
......@@ -351,7 +350,7 @@ function commerce_atos_redirect_form($form, &$form_state, $order, $payment_metho
$language = ((!empty($user->language) && isset($languages[_commerce_atos_map_iso_to_language($user->language)])) ? _commerce_atos_map_iso_to_language($user->language) : $pm_settings['commerce_atos_language_iso']);
$settings = array(
'amount' => $amount,
'automatic_response_url' => url('commerce_atos/autoresponse/' . $order->order_id . '/' . $payment_method['instance_id'], array('absolute' => TRUE, 'https' => FALSE, )),
'automatic_response_url' => url('commerce_atos/autoresponse/' . $order->order_id . '/' . $payment_method['instance_id'], array('absolute' => TRUE, 'https' => FALSE)),
'cancel_return_url' => url('checkout/' . $order->order_id . '/payment/back/' . $order->data['payment_redirect_key'], array('absolute' => TRUE)),
'customer_email' => $order->mail,
'customer_id' => $order->uid,
......@@ -417,9 +416,9 @@ function commerce_atos_redirect_form($form, &$form_state, $order, $payment_metho
*
* @param $order
* The fully loaded order being paid for.
* @param $settings
* @param array $settings
* An array of settings used for the request.
* @param $pm_settings
* @param array $pm_settings
* An array containing the payment method settings.
*
* @return
......@@ -439,7 +438,7 @@ function commerce_atos_order_form($form, &$form_state, $order, $settings, $pm_se
drupal_set_message(t('Request call error: request executable file not found.'), 'error');
watchdog('commerce_atos', 'Request call error: request executable file not found.', array(), WATCHDOG_ERROR);
}
else if ($code != 0) {
elseif ($code != 0) {
drupal_set_message(t('Atos payment API call error.'), 'error');
watchdog('commerce_atos', 'Atos payment API call error %error', array('%error' => $error), WATCHDOG_ERROR);
}
......
......@@ -10,8 +10,8 @@ define('COMMERCE_ATOS_DEFAULT_MODE', 'demo');
/**
* Implements hook_commerce_payment_method_info().
**/
function commerce_atos_commerce_payment_method_info(){
*/
function commerce_atos_commerce_payment_method_info() {
$display_title = t('Credit card');
$display_means = variable_get('commerce_atos_display_means', TRUE);
$payment_means = variable_get('commerce_atos_payment_means_logos', array());
......@@ -88,7 +88,6 @@ function commerce_atos_get_merchant_countries() {
/**
* Get the currency code of the provided store currency.
* If $flip is TRUE, return the store currency of the provided currency code.
*/
function commerce_atos_get_currency_code($store_currency = NULL, $flip = FALSE) {
$currencies = array(
......@@ -279,7 +278,7 @@ function _commerce_atos_finalize_process($payment_method, $order, $charge, $resp
* @param $dump
* A PHP print_r of both the request and the response for debugging purpose.
*
* @return
* @return boolean
* A boolean indicating whether or not the request and response match.
*/
function _commerce_atos_request_response_match($request, $response, $dump) {
......@@ -305,7 +304,6 @@ function _commerce_atos_request_response_match($request, $response, $dump) {
/**
* Parse a response based on the provided POST data.
* Return an array containing the response fields.
*/
function commerce_atos_parse_response($message, $bin_path, $pathfile_path) {
$params = array(
......@@ -372,8 +370,7 @@ function commerce_atos_transaction($payment_method, $order, $charge, $status, $r
}
/**
* Execute an ATOS/SIPS binary.
* Return an array of results.
* Execute an ATOS/SIPS binary. Return an array of results.
*/
function _commerce_atos_exec($bin_path, $params) {
$pairs = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment