[+] MO: Add authorizeaim to 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14933 b9a71923-0436-4b27-9f14-aed3839534dd
274
modules/authorizeaim/authorizeaim.php
Normal file
@@ -0,0 +1,274 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class authorizeAIM extends PaymentModule
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'authorizeaim';
|
||||
$this->tab = 'payments_gateways';
|
||||
$this->version = '1.3.2';
|
||||
$this->author = 'PrestaShop';
|
||||
//$this->limited_countries = array('us');
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = 'Authorize.net AIM (Advanced Integration Method)';
|
||||
$this->description = $this->l('Receive payment with Authorize.net');
|
||||
|
||||
/* For 1.4.3 and less compatibility */
|
||||
$updateConfig = array(
|
||||
'PS_OS_CHEQUE' => 1,
|
||||
'PS_OS_PAYMENT' => 2,
|
||||
'PS_OS_PREPARATION' => 3,
|
||||
'PS_OS_SHIPPING' => 4,
|
||||
'PS_OS_DELIVERED' => 5,
|
||||
'PS_OS_CANCELED' => 6,
|
||||
'PS_OS_REFUND' => 7,
|
||||
'PS_OS_ERROR' => 8,
|
||||
'PS_OS_OUTOFSTOCK' => 9,
|
||||
'PS_OS_BANKWIRE' => 10,
|
||||
'PS_OS_PAYPAL' => 11,
|
||||
'PS_OS_WS_PAYMENT' => 12);
|
||||
|
||||
foreach ($updateConfig as $u => $v)
|
||||
if (!Configuration::get($u) || (int)Configuration::get($u) < 1)
|
||||
{
|
||||
if (defined('_'.$u.'_') && (int)constant('_'.$u.'_') > 0)
|
||||
Configuration::updateValue($u, constant('_'.$u.'_'));
|
||||
else
|
||||
Configuration::updateValue($u, $v);
|
||||
}
|
||||
|
||||
/* Check if cURL is enabled */
|
||||
if (!is_callable('curl_exec'))
|
||||
$this->warning = $this->l('cURL extension must be enabled on your server to use this module.');
|
||||
|
||||
/* Backward compatibility */
|
||||
require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
return parent::install() &&
|
||||
$this->registerHook('orderConfirmation') &&
|
||||
$this->registerHook('payment') &&
|
||||
$this->registerHook('header') &&
|
||||
Configuration::updateValue('AUTHORIZE_AIM_DEMO', 1) &&
|
||||
Configuration::updateValue('AUTHORIZE_AIM_HOLD_REVIEW_OS', _PS_OS_ERROR);
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_LOGIN_ID');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_KEY');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_DEMO');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_CARD_VISA');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_CARD_MASTERCARD');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_CARD_DISCOVER');
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_CARD_AX');
|
||||
|
||||
Configuration::deleteByName('AUTHORIZE_AIM_HOLD_REVIEW_OS');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
public function hookOrderConfirmation($params)
|
||||
{
|
||||
if ($params['objOrder']->module != $this->name)
|
||||
return;
|
||||
|
||||
if ($params['objOrder']->getCurrentState() != Configuration::get('PS_OS_ERROR'))
|
||||
$this->context->smarty->assign(array('status' => 'ok', 'id_order' => intval($params['objOrder']->id)));
|
||||
else
|
||||
$this->context->smarty->assign('status', 'failed');
|
||||
|
||||
return $this->display(__FILE__, 'hookorderconfirmation.tpl');
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$html = '';
|
||||
if (Tools::isSubmit('submitModule'))
|
||||
{
|
||||
Configuration::updateValue('AUTHORIZE_AIM_LOGIN_ID', Tools::getvalue('authorizeaim_login_id'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_KEY', Tools::getvalue('authorizeaim_key'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_DEMO', Tools::getvalue('authorizeaim_demo_mode'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_CARD_VISA', Tools::getvalue('authorizeaim_card_visa'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_CARD_MASTERCARD', Tools::getvalue('authorizeaim_card_mastercard'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_CARD_DISCOVER', Tools::getvalue('authorizeaim_card_discover'));
|
||||
Configuration::updateValue('AUTHORIZE_AIM_CARD_AX', Tools::getvalue('authorizeaim_card_ax'));
|
||||
|
||||
Configuration::updateValue('AUTHORIZE_AIM_HOLD_REVIEW_OS', Tools::getvalue('authorizeaim_hold_review_os'));
|
||||
|
||||
$html .= $this->displayConfirmation($this->l('Configuration updated'));
|
||||
}
|
||||
|
||||
// For Hold for Review
|
||||
$orderStates = OrderState::getOrderStates((int)$this->context->cookie->id_lang);
|
||||
|
||||
|
||||
$html .= '
|
||||
<h2>'.$this->displayName.'</h2>
|
||||
<fieldset><legend><img src="../modules/'.$this->name.'/logo.gif" alt="" /> '.$this->l('Help').'</legend>
|
||||
<a href="http://api.prestashop.com/partner/authorize.net/" target="_blank" style="float: right;"><img src="../modules/'.$this->name.'/logo_authorize.png" alt="" /></a>
|
||||
<h3>'.$this->l('In your PrestaShop admin panel').'</h3>
|
||||
- '.$this->l('Fill the Login ID field with the one provided by Authorize.net').'<br />
|
||||
- '.$this->l('Fill the key field with the transaction key provided by Authorize.net').'<br />
|
||||
<span style="color: red;" >- '.$this->l('Warning: Your website must possess a SSL certificate to use the Authorize.net AIM payment system. You are responsible for the safety of your customers\' bank information. PrestaShop cannot be blamed for any security issue on your website.').'</span><br />
|
||||
<br />
|
||||
</fieldset><br />
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset class="width2">
|
||||
<legend><img src="../img/admin/contact.gif" alt="" />'.$this->l('Settings').'</legend>
|
||||
<label for="authorizeaim_login_id">'.$this->l('Login ID').'</label>
|
||||
<div class="margin-form"><input type="text" size="20" id="authorizeaim_login_id" name="authorizeaim_login_id" value="'.Configuration::get('AUTHORIZE_AIM_LOGIN_ID').'" /></div>
|
||||
<label for="authorizeaim_key">'.$this->l('Key').'</label>
|
||||
<div class="margin-form"><input type="text" size="20" id="authorizeaim_login_id" name="authorizeaim_key" value="'.Configuration::get('AUTHORIZE_AIM_KEY').'" /></div>
|
||||
<label for="authorizeaim_demo_mode">'.$this->l('Mode:').'</label>
|
||||
<div class="margin-form" id="authorizeaim_demo">
|
||||
<input type="radio" name="authorizeaim_demo_mode" value="0" style="vertical-align: middle;" '.(!Tools::getValue('authorizeaim_demo_mode', Configuration::get('AUTHORIZE_AIM_DEMO')) ? 'checked="checked"' : '').' />
|
||||
<span style="color: #080;">'.$this->l('Production').'</span>
|
||||
<input type="radio" name="authorizeaim_demo_mode" value="1" style="vertical-align: middle;" '.(Tools::getValue('authorizeaim_demo_mode', Configuration::get('AUTHORIZE_AIM_DEMO')) ? 'checked="checked"' : '').' />
|
||||
<span style="color: #900;">'.$this->l('Test').'</span>
|
||||
</div>
|
||||
<label for="authorizeaim_cards">'.$this->l('Cards:').'</label>
|
||||
<div class="margin-form" id="authorizeaim_cards">
|
||||
<input type="checkbox" name="authorizeaim_card_visa" '.(Configuration::get('AUTHORIZE_AIM_CARD_VISA') ? 'checked="checked"' : '').' />
|
||||
<img src="../modules/'.$this->name.'/cards/visa.gif" alt="visa" />
|
||||
<input type="checkbox" name="authorizeaim_card_mastercard" '.(Configuration::get('AUTHORIZE_AIM_CARD_MASTERCARD') ? 'checked="checked"' : '').' />
|
||||
<img src="../modules/'.$this->name.'/cards/mastercard.gif" alt="visa" />
|
||||
<input type="checkbox" name="authorizeaim_card_discover" '.(Configuration::get('AUTHORIZE_AIM_CARD_DISCOVER') ? 'checked="checked"' : '').' />
|
||||
<img src="../modules/'.$this->name.'/cards/discover.gif" alt="visa" />
|
||||
<input type="checkbox" name="authorizeaim_card_ax" '.(Configuration::get('AUTHORIZE_AIM_CARD_AX') ? 'checked="checked"' : '').' />
|
||||
<img src="../modules/'.$this->name.'/cards/ax.gif" alt="visa" />
|
||||
</div>
|
||||
|
||||
<label for="authorizeaim_hold_review_os">'.$this->l('"Hold for Review" order state').'</label>
|
||||
<div class="margin-form">
|
||||
<select id="authorizeaim_hold_review_os" name="authorizeaim_hold_review_os">';
|
||||
// Hold for Review order state selection
|
||||
foreach ($orderStates as $os)
|
||||
$html .= '
|
||||
<option value="'.(int)$os['id_order_state'].'"'.((int)$os['id_order_state'] == (int)Configuration::get('AUTHORIZE_AIM_HOLD_REVIEW_OS') ? ' selected' : '').'>'.
|
||||
Tools::stripslashes($os['name']).
|
||||
'</option>'."\n";
|
||||
$html .= '
|
||||
</select></div>
|
||||
|
||||
|
||||
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
|
||||
</fieldset>
|
||||
</form>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function hookPayment($params)
|
||||
{
|
||||
if (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off'))
|
||||
{
|
||||
$invoiceAddress = new Address((int)$params['cart']->id_address_invoice);
|
||||
|
||||
$authorizeAIMParams = array();
|
||||
$authorizeAIMParams['x_solution_ID'] = 'A1000006';
|
||||
$authorizeAIMParams['x_login'] = Configuration::get('AUTHORIZE_AIM_LOGIN_ID');
|
||||
$authorizeAIMParams['x_tran_key'] = Configuration::get('AUTHORIZE_AIM_KEY');
|
||||
$authorizeAIMParams['x_version'] = '3.1';
|
||||
$authorizeAIMParams['x_delim_data'] = 'TRUE';
|
||||
$authorizeAIMParams['x_delim_char'] = '|';
|
||||
$authorizeAIMParams['x_relay_response'] = 'FALSE';
|
||||
$authorizeAIMParams['x_type'] = 'AUTH_CAPTURE';
|
||||
$authorizeAIMParams['x_method'] = 'CC';
|
||||
$authorizeAIMParams['x_test_request'] = Configuration::get('AUTHORIZE_AIM_DEMO');
|
||||
$authorizeAIMParams['x_invoice_num'] = (int)$params['cart']->id;
|
||||
$authorizeAIMParams['x_amount'] = number_format($params['cart']->getOrderTotal(true, 3), 2, '.', '');
|
||||
$authorizeAIMParams['x_address'] = $invoiceAddress->address1.' '.$invoiceAddress->address2;
|
||||
$authorizeAIMParams['x_zip'] = $invoiceAddress->postcode;
|
||||
$authorizeAIMParams['x_first_name'] = $this->context->customer->firstname;
|
||||
$authorizeAIMParams['x_last_name'] = $this->context->customer->lastname;
|
||||
|
||||
$isFailed = Tools::getValue('aimerror');
|
||||
|
||||
$cards = array();
|
||||
$cards['visa'] = Configuration::get('AUTHORIZE_AIM_CARD_VISA') == 'on' ? 1 : 0;
|
||||
$cards['mastercard'] = Configuration::get('AUTHORIZE_AIM_CARD_MASTERCARD') == 'on' ? 1 : 0;
|
||||
$cards['discover'] = Configuration::get('AUTHORIZE_AIM_CARD_DISCOVER') == 'on' ? 1 : 0;
|
||||
$cards['ax'] = Configuration::get('AUTHORIZE_AIM_CARD_AX') == 'on' ? 1 : 0;
|
||||
|
||||
if (method_exists('Tools', 'getShopDomainSsl'))
|
||||
$url = 'https://'.Tools::getShopDomainSsl().__PS_BASE_URI__.'/modules/'.$this->name.'/';
|
||||
else
|
||||
$url = 'https://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/'.$this->name.'/';
|
||||
|
||||
$this->context->smarty->assign('p', $authorizeAIMParams);
|
||||
$this->context->smarty->assign('cards', $cards);
|
||||
$this->context->smarty->assign('isFailed', $isFailed);
|
||||
$this->context->smarty->assign('new_base_dir', $url);
|
||||
|
||||
return $this->display(__FILE__, 'authorizeaim.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
public function hookHeader()
|
||||
{
|
||||
if (_PS_VERSION_ < '1.5')
|
||||
Tools::addJS(_PS_JS_DIR_.'jquery/jquery.validate.creditcard2-1.0.1.js');
|
||||
else
|
||||
$this->context->controller->addJqueryPlugin('validate-creditcard');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the detail of a payment - Call before the validate order init
|
||||
* correctly the pcc object
|
||||
* See Authorize documentation to know the associated key => value
|
||||
* @param array fields
|
||||
*/
|
||||
public function setTransactionDetail($response)
|
||||
{
|
||||
// If Exist we can store the details
|
||||
if (isset($this->pcc))
|
||||
{
|
||||
$this->pcc->transaction_id = (string)$response[6];
|
||||
|
||||
// 50 => Card number (XXXX0000)
|
||||
$this->pcc->card_number = (string)substr($response[50], -4);
|
||||
|
||||
// 51 => Card Mark (Visa, Master card)
|
||||
$this->pcc->card_brand = (string)$response[51];
|
||||
|
||||
$this->pcc->card_expiration = (string)Tools::getValue('x_exp_date');
|
||||
|
||||
// 68 => Owner name
|
||||
$this->pcc->card_holder = (string)$response[68];
|
||||
}
|
||||
}
|
||||
}
|
||||
135
modules/authorizeaim/authorizeaim.tpl
Normal file
@@ -0,0 +1,135 @@
|
||||
{*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14297 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$module_dir}secure.png" />
|
||||
<p class="payment_module" >
|
||||
|
||||
{if $isFailed == 1}
|
||||
<p style="color: red;">{l s='Error, please verify the card information' mod='authorizeaim'}</p>
|
||||
{/if}
|
||||
|
||||
<form name="authorizeaim_form" id="authorizeaim_form" action="{$new_base_dir}validation.php" method="post">
|
||||
<span style="border: 1px solid #595A5E;display: block;padding: 0.6em;text-decoration: none;margin-left: 0.7em;">
|
||||
<a id="click_authorizeaim" href="#" title="{l s='Pay with authorizeaim' mod='authorizeaim'}" style="display: block;text-decoration: none; font-weight: bold;">
|
||||
{if $cards.visa == 1}<img src="{$module_dir}cards/visa.gif" alt="{l s='visa logo' mod='authorizeaim'}" style="vertical-align: middle;" />{/if}
|
||||
{if $cards.mastercard == 1}<img src="{$module_dir}cards/mastercard.gif" alt="{l s='mastercard logo' mod='authorizeaim'}" style="vertical-align: middle;" />{/if}
|
||||
{if $cards.discover == 1}<img src="{$module_dir}cards/discover.gif" alt="{l s='discover logo' mod='authorizeaim'}" style="vertical-align: middle;" />{/if}
|
||||
{if $cards.ax == 1}<img src="{$module_dir}cards/ax.gif" alt="{l s='american express logo' mod='authorizeaim'}" style="vertical-align: middle;" />{/if}
|
||||
{l s='Secured credit card payment with Authorize.net' mod='authorizeaim'}
|
||||
</a>
|
||||
|
||||
{if $isFailed == 0}
|
||||
<div id="aut2"style="display:none">
|
||||
{else}
|
||||
<div id="aut2">
|
||||
{/if}
|
||||
<br /><br />
|
||||
|
||||
<div style="width: 136px; height: 165px; float: left; padding-top:40px; padding-right: 20px; border-right: 1px solid #DDD;">
|
||||
<img src="{$module_dir}logoa.gif" alt="secure payment" />
|
||||
</div>
|
||||
{foreach from=$p key=k item=v}
|
||||
<input type="hidden" name="{$k}" value="{$v}" />
|
||||
{/foreach}
|
||||
|
||||
<label style="margin-top: 4px; margin-left: 40px;display: block;width: 90px;float: left;">{l s='Full name' mod='authorizeaim'}</label> <input type="text" name="name" id="fullname" size="30" maxlength="25S" /><img src="{$module_dir}secure.png" alt="" style="margin-left: 5px;" /><br /><br />
|
||||
|
||||
<label style="margin-top: 4px; margin-left: 40px;display: block;width: 90px;float: left;">{l s='Card Type' mod='authorizeaim'}</label>
|
||||
<select id="cardType">
|
||||
{if $cards.ax == 1}<option value="AmEx">American Express</option>{/if}
|
||||
{if $cards.visa == 1}<option value="Visa">Visa</option>{/if}
|
||||
{if $cards.mastercard == 1}<option value="MasterCard">MasterCard</option>{/if}
|
||||
{if $cards.discover == 1}<option value="Discover">Discover</option>{/if}
|
||||
</select>
|
||||
<img src="{$module_dir}secure.png" alt="" style="margin-left: 5px;" /><br /><br />
|
||||
|
||||
<label style="margin-top: 4px; margin-left: 40px;display: block;width: 90px;float: left;">{l s='Card number' mod='authorizeaim'}</label> <input type="text" name="x_card_num" id="cardnum" size="30" maxlength="16" autocomplete="Off" /><img src="{$module_dir}secure.png" alt="" style="margin-left: 5px;" /><br /><br />
|
||||
<label style="margin-top: 4px; margin-left: 40px;display: block;width: 90px;float: left;">{l s='Expiration date' mod='authorizeaim'}</label>
|
||||
<select id="x_exp_date_m" name="x_exp_date_m" style="width:60px;">{section name=date_m start=01 loop=13}
|
||||
<option value="{$smarty.section.date_m.index}">{$smarty.section.date_m.index}</option>{/section}
|
||||
</select>
|
||||
/
|
||||
<select name="x_exp_date_y">{section name=date_y start=11 loop=20}
|
||||
<option value="{$smarty.section.date_y.index}">20{$smarty.section.date_y.index}</option>{/section}
|
||||
</select>
|
||||
<img src="{$module_dir}secure.png" alt="" style="margin-left: 5px;" /><br /><br />
|
||||
<label style="margin-top: 4px; margin-left: 40px;display: block;width: 90px;float: left;">{l s='CVV' mod='authorizeaim'}</label> <input type="text" name="x_card_code" id="x_card_code" size="4" maxlength="4" /><img src="{$module_dir}secure.png" alt="" style="margin-left: 5px;"/> <img src="{$module_dir}help.png" id="cvv_help" title="{l s='the 3 last digits on the back of your credit card' mod='authorizeaim'}" alt="" /><br /><br />
|
||||
<img src="{$module_dir}cvv.png" id="cvv_help_img" alt=""style="display: none;margin-left: 211px;" />
|
||||
<input type="button" id="asubmit" value="{l s='Validate order' mod='authorizeaim'}" style="margin-left: 129px; padding-left: 25px; padding-right: 25px;" class="button" />
|
||||
<input type="hidden" controller="order-opc" />
|
||||
</div>
|
||||
</span>
|
||||
</form>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
var mess_error = "{l s='Please check your credit card information (Credit card type, number and expiration date)' mod='authorizeaim' js=1}";
|
||||
var mess_error2 = "{l s='Please specify your Full Name' mod='authorizeaim' js=1}";
|
||||
{literal}
|
||||
$(document).ready(function(){
|
||||
$('#x_exp_date_m').children('option').each(function()
|
||||
{
|
||||
if ($(this).val() < 10)
|
||||
{
|
||||
$(this).val('0' + $(this).val());
|
||||
$(this).html($(this).val())
|
||||
}
|
||||
});
|
||||
$('#click_authorizeaim').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#click_authorizeaim').fadeOut("fast",function(){
|
||||
$("#aut2").show();
|
||||
$('#click_authorizeaim').fadeIn('fast');
|
||||
});
|
||||
$('#click_authorizeaim').unbind();
|
||||
$('#click_authorizeaim').click(function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
$('#cvv_help').click(function(){
|
||||
$("#cvv_help_img").show();
|
||||
$('#cvv_help').unbind();
|
||||
});
|
||||
|
||||
$('#asubmit').click(function()
|
||||
{
|
||||
if ($('#fullname').val() == '')
|
||||
{
|
||||
alert(mess_error2);
|
||||
}
|
||||
else if (!validateCC($('#cardnum').val(), $('#cardType').val()) || $('#x_card_code').val() == '')
|
||||
{
|
||||
alert(mess_error);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#authorizeaim_form').submit();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
222
modules/authorizeaim/backward_compatibility/Context.php
Executable file
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 7723 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
// Retro 1.3, 'class_exists' cause problem with autoload...
|
||||
if (version_compare(_PS_VERSION_, '1.4', '<'))
|
||||
{
|
||||
// Not exist for 1.3
|
||||
class Shop extends ObjectModel
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function getShops()
|
||||
{
|
||||
return array(
|
||||
array('id_shop' => 1, 'name' => 'Default shop')
|
||||
);
|
||||
}
|
||||
|
||||
public static function getCurrentShop()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Not exist for 1.3 and 1.4
|
||||
class Context
|
||||
{
|
||||
/**
|
||||
* @var Context
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* @var Cart
|
||||
*/
|
||||
public $cart;
|
||||
|
||||
/**
|
||||
* @var Customer
|
||||
*/
|
||||
public $customer;
|
||||
|
||||
/**
|
||||
* @var Cookie
|
||||
*/
|
||||
public $cookie;
|
||||
|
||||
/**
|
||||
* @var Link
|
||||
*/
|
||||
public $link;
|
||||
|
||||
/**
|
||||
* @var Country
|
||||
*/
|
||||
public $country;
|
||||
|
||||
/**
|
||||
* @var Employee
|
||||
*/
|
||||
public $employee;
|
||||
|
||||
/**
|
||||
* @var Controller
|
||||
*/
|
||||
public $controller;
|
||||
|
||||
/**
|
||||
* @var Language
|
||||
*/
|
||||
public $language;
|
||||
|
||||
/**
|
||||
* @var Currency
|
||||
*/
|
||||
public $currency;
|
||||
|
||||
/**
|
||||
* @var AdminTab
|
||||
*/
|
||||
public $tab;
|
||||
|
||||
/**
|
||||
* @var Shop
|
||||
*/
|
||||
public $shop;
|
||||
|
||||
/**
|
||||
* @var Smarty
|
||||
*/
|
||||
public $smarty;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
global $cookie, $cart, $smarty, $link;
|
||||
|
||||
$this->tab = null;
|
||||
|
||||
if ($cookie)
|
||||
$this->cookie = $cookie;
|
||||
|
||||
$this->cart = $cart;
|
||||
$this->smarty = $smarty;
|
||||
$this->link = $link;
|
||||
|
||||
$this->controller = new ControllerBackwardModule();
|
||||
if ($cookie)
|
||||
{
|
||||
$this->currency = new Currency((int)$cookie->id_currency);
|
||||
$this->language = new Language((int)$cookie->id_lang);
|
||||
$this->country = new Country((int)$cookie->id_country);
|
||||
$this->customer = new Customer((int)$cookie->id_customer);
|
||||
$this->employee = new Employee((int)$cookie->id_employee);
|
||||
}
|
||||
$this->shop = new ShopBackwardModule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a singleton context
|
||||
*
|
||||
* @return Context
|
||||
*/
|
||||
public static function getContext()
|
||||
{
|
||||
if (!isset(self::$instance))
|
||||
self::$instance = new Context();
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone current context
|
||||
*
|
||||
* @return Context
|
||||
*/
|
||||
public function cloneContext()
|
||||
{
|
||||
return clone($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Shop context type (Shop::CONTEXT_ALL, etc.)
|
||||
*/
|
||||
public static function shop()
|
||||
{
|
||||
if (!self::$instance->shop->getContextType())
|
||||
return ShopBackwardModule::CONTEXT_ALL;
|
||||
return self::$instance->shop->getContextType();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Shop for Backward compatibility
|
||||
*/
|
||||
class ShopBackwardModule extends Shop
|
||||
{
|
||||
const CONTEXT_ALL = 1;
|
||||
|
||||
public function getContextType()
|
||||
{
|
||||
return ShopBackwardModule::CONTEXT_ALL;
|
||||
}
|
||||
|
||||
// Simulate shop for 1.3 / 1.4
|
||||
public function getID()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Controller for a Backward compatibility
|
||||
* Allow to use method declared in 1.5
|
||||
*/
|
||||
class ControllerBackwardModule
|
||||
{
|
||||
/**
|
||||
* @param $js_uri
|
||||
* @return void
|
||||
*/
|
||||
public function addJS($js_uri)
|
||||
{
|
||||
Tools::addJS($js_uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $css_uri
|
||||
* @param string $css_media_type
|
||||
* @return void
|
||||
*/
|
||||
public function addCSS($css_uri, $css_media_type = 'all')
|
||||
{
|
||||
Tools::addCSS($css_uri, $css_media_type);
|
||||
}
|
||||
}
|
||||
42
modules/authorizeaim/backward_compatibility/backward.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 7723 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
/**
|
||||
* Backward function compatibility
|
||||
* Need to be called for each module in 1.4
|
||||
*/
|
||||
|
||||
// Get out if the context is already defined
|
||||
if (!in_array('Context', get_declared_classes()))
|
||||
require_once(dirname(__FILE__).'/Context.php');
|
||||
|
||||
if (!isset($this) || isset($this->context))
|
||||
return;
|
||||
|
||||
$this->context = Context::getContext();
|
||||
$this->smarty = $this->context->smarty;
|
||||
|
||||
36
modules/authorizeaim/backward_compatibility/index.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 7776 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
BIN
modules/authorizeaim/cards/ax.gif
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
modules/authorizeaim/cards/discover.gif
Normal file
|
After Width: | Height: | Size: 504 B |
36
modules/authorizeaim/cards/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 7233 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
BIN
modules/authorizeaim/cards/mastercard.gif
Normal file
|
After Width: | Height: | Size: 595 B |
BIN
modules/authorizeaim/cards/visa.gif
Normal file
|
After Width: | Height: | Size: 451 B |
12
modules/authorizeaim/config.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>authorizeaim</name>
|
||||
<displayName><![CDATA[Authorize.net AIM (Advanced Integration Method)]]></displayName>
|
||||
<version><![CDATA[1.3.1]]></version>
|
||||
<description><![CDATA[Receive payment with Authorize.net]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[payments_gateways]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
BIN
modules/authorizeaim/cvv.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
44
modules/authorizeaim/de.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f745351b1387473d3d2de5bfe18d3562'] = 'Fehler, bitte Kreditkarteninformationen überprüfen';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1814fc250eea61e13aa95e81b61bf72a'] = 'Bezahlen Sie mit authorizeaim';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_442155d68aea78b4ef707796d76ca48c'] = 'Visa-Logo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f65943f43529e119969e533dc6f691f9'] = 'Master Card-Logo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_2937b5dab08029b1055b37c98a98d740'] = 'Discover-Logo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_3b8a6fa58a71e7448c264c9dc61e6904'] = 'American Express Logo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1edaf23879c3b52a8df80069d2af3cef'] = 'Sichere Kreditkartenzahlung mit Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f11b368cddfe37c47af9b9d91c6ba4f0'] = 'Vollständiger Name';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_379c80c789f0f3e0165b5e6d5df839ca'] = 'Karten-Typ';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a44217022190f5734b2f72ba1e4f8a79'] = 'Kartennummer';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_8c1279db4db86553e4b9682f78cf500e'] = 'Verfallsdatum';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_60a104dc50579d60cbc90158fada1dcf'] = 'CVV';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6149e52c36edb9ee4494d5412e42eef2'] = 'die letzten drei Ziffern auf der Rückseite Ihrer Kreditkarte';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_40566b26dcc126bce704f2c1d622a6a3'] = 'Bestellung bestätigen';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_5dfe4041e37dfb15cdbdfe8b977950f5'] = 'Bitte überprüfen Sie Ihre Kreditkarteninformationen (Kreditkarten-Typ, Kreditkarten-Nr. und Verfallsdatum)';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_90c9737c99792791c8fe7c9e469bae9c'] = 'Bitte geben Sie den kompletten Namen an';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_cb313e911b15b21b57f4fc7b53058e4f'] = 'Zahlung mit Authorize.net erhalten';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_9d5b40ff49295ac0b4a5a13a88ccd285'] = 'cURL muss aktiviert sein, um dieses Modul nutzen zu können.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Konfiguration aktualisiert';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Hilfe';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_11a4b229c0e206b831f729572618553f'] = 'In Ihrem PrestaShop Admin-Panel';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_bc6781f2b59d4e973bd0075baab62a40'] = 'Füllen Sie das Login-ID-Feld mit der von Authorize.net vorgesehenen Kennung aus';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_95eb440b753d6505aad5c3f72b50eec9'] = 'Füllen Sie das Schlüsselfeld mit dem Transaktionsschlüssel von Authorize.net aus';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a7180ba675bb293f415aab47e52a1732'] = 'Hinweis: Ihre Webseite muss ein SSL-Zertifikat besitzen, um Authorize.net AIM verwenden zu können. Sie selbst sind für die sichere Aufbewahrung und Übermittlung der von Ihren Kunden an Sie übermittelten personenbezogenen Daten wie z.B. die Bankdaten verantwortlich. Prestashop entzieht sich jeder Verantwortung falls die Daten gestohlen werden.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f3ef34226d51e9ca88eaa2f20d7ffb91'] = 'Login-ID';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_897356954c2cd3d41b221e3f24f99bba'] = 'Schlüssel';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1ee1c44c2dc81681f961235604247b81'] = 'Modus:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_756d97bb256b8580d4d71ee0c547804e'] = 'Produktion';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_0cbc6611f5540bd0809a388dc95a615b'] = 'Test';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_291cdb0a8abb42484f5d44dc20540ce6'] = 'Karten:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_b17f3f4dcf653a5776792498a9b44d6a'] = 'Aktualisierungseinstellungen';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Ihre Bestellung vom';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = ' ist abgeschlossen.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Ihre Bestellung wird so schnell wie möglich zugeschickt.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen, kontaktieren Sie bitte unseren';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kunden-Support';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Bei Ihrer Bestellung ist ein Fehler aufgetreten. Bitte wenden Sie sich an unseren';
|
||||
|
||||
?>
|
||||
4
modules/authorizeaim/en.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
43
modules/authorizeaim/es.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_cb313e911b15b21b57f4fc7b53058e4f'] = 'Recibir pagos con Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_9d5b40ff49295ac0b4a5a13a88ccd285'] = 'La extención cURL debe estar habilitada en su servidor para utilizar este modulo. ';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuración actualizada';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Ayuda';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_11a4b229c0e206b831f729572618553f'] = 'En su panel de administración de PrestaShop';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_bc6781f2b59d4e973bd0075baab62a40'] = 'Rellene el campo \"Nombre de usuario\" con el ID proporcionado por Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_95eb440b753d6505aad5c3f72b50eec9'] = 'Rellene el campo \"Clave\" con la clave de operación facilitada por Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a7180ba675bb293f415aab47e52a1732'] = 'Atención: Su sitio web debe poseer un certificado SSL para utilizar el módulo Authorize.net AIM. Usted es responsable de la seguridad de los datos bancarios de sus clientes. PrestaShop no podrá ser culpado en caso de problemas de seguridad en su sitio web.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f3ef34226d51e9ca88eaa2f20d7ffb91'] = 'Nombre de usuario';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_897356954c2cd3d41b221e3f24f99bba'] = 'Clave';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1ee1c44c2dc81681f961235604247b81'] = 'Modo:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_756d97bb256b8580d4d71ee0c547804e'] = 'Producción';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_0cbc6611f5540bd0809a388dc95a615b'] = 'Prueba';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_291cdb0a8abb42484f5d44dc20540ce6'] = 'Tarjetas:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_7c413866cd5708e4c390273762b5c479'] = 'Estado de la orden \"En espera de revisión\"';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_b17f3f4dcf653a5776792498a9b44d6a'] = 'Actualizar la configuración';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f745351b1387473d3d2de5bfe18d3562'] = 'Error, por favor compruebe sus datos bancarios';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1814fc250eea61e13aa95e81b61bf72a'] = 'Pagar con authorizeaim';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_442155d68aea78b4ef707796d76ca48c'] = 'Logotipo de Visa';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f65943f43529e119969e533dc6f691f9'] = 'Logotipo de MasterCard';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_2937b5dab08029b1055b37c98a98d740'] = 'Logotipo de Discover';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_3b8a6fa58a71e7448c264c9dc61e6904'] = 'Logotipo de American Express';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1edaf23879c3b52a8df80069d2af3cef'] = 'Pago seguro con Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f11b368cddfe37c47af9b9d91c6ba4f0'] = 'Nombre y apellidos';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_379c80c789f0f3e0165b5e6d5df839ca'] = 'Tipo de tarjeta';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a44217022190f5734b2f72ba1e4f8a79'] = 'Número de tarjeta';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_8c1279db4db86553e4b9682f78cf500e'] = 'Fecha de caducidad';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_60a104dc50579d60cbc90158fada1dcf'] = 'CVV';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6149e52c36edb9ee4494d5412e42eef2'] = 'los 3 últimos dígitos de la parte posterior de su tarjeta de crédito';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_40566b26dcc126bce704f2c1d622a6a3'] = 'Validar el pedido';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_5dfe4041e37dfb15cdbdfe8b977950f5'] = 'Por favor verifique le información de su tarjeta de crédito (tipo de tarjeta, fecha de expiración)';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_90c9737c99792791c8fe7c9e469bae9c'] = 'Por favor ponga su nombre completo';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Su orden en';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completa.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Su orden será enviada lo antes posible.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para cualquier pregunta o más información, por favor, contacte nuestro';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'servicio al cliente';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Hemos encontrado un problema con su orden. Si usted considera que esto es un error puede contactar a nuestro';
|
||||
42
modules/authorizeaim/fr.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_cb313e911b15b21b57f4fc7b53058e4f'] = 'Recevoir des paiments avec Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_9d5b40ff49295ac0b4a5a13a88ccd285'] = 'L\'extension cURL doit être activée sur votre serveur pour utiliser ce module.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aide';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_11a4b229c0e206b831f729572618553f'] = 'Dans votre panneau d\'aministration PrestaShop';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_bc6781f2b59d4e973bd0075baab62a40'] = 'Indiquez le login fourni par Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_95eb440b753d6505aad5c3f72b50eec9'] = 'Indiquez la clé de transaction fournie par Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a7180ba675bb293f415aab47e52a1732'] = 'Attention: votre site doit posséder un certificat SSL pour utiliser le module Authorize.net AIM. Vous êtes responsable de la sécurité des informations bancaires de vos clients. PrestaShop ne peut être tenu responsable en cas de problème de sécurité sur votre site.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f3ef34226d51e9ca88eaa2f20d7ffb91'] = 'Login';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_897356954c2cd3d41b221e3f24f99bba'] = 'Clé';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1ee1c44c2dc81681f961235604247b81'] = 'Mode';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_756d97bb256b8580d4d71ee0c547804e'] = 'Production';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_0cbc6611f5540bd0809a388dc95a615b'] = 'Test';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_291cdb0a8abb42484f5d44dc20540ce6'] = 'Cartes';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f745351b1387473d3d2de5bfe18d3562'] = 'Erreur, veuillez verifier vos informations bancaires';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1814fc250eea61e13aa95e81b61bf72a'] = 'Payer avec AuthorizeAIM';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_442155d68aea78b4ef707796d76ca48c'] = 'Logo Visa';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f65943f43529e119969e533dc6f691f9'] = 'Logo Mastercard';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_2937b5dab08029b1055b37c98a98d740'] = 'Logo Discover';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_3b8a6fa58a71e7448c264c9dc61e6904'] = 'Logo American Express';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1edaf23879c3b52a8df80069d2af3cef'] = 'Paiement sécurisé avec Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f11b368cddfe37c47af9b9d91c6ba4f0'] = 'Nom complet';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_379c80c789f0f3e0165b5e6d5df839ca'] = 'Type de carte';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_8c1279db4db86553e4b9682f78cf500e'] = 'Date d\'expiration';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_60a104dc50579d60cbc90158fada1dcf'] = 'Code CVV';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6149e52c36edb9ee4494d5412e42eef2'] = 'les 3 derniers chiffres au dos de votre carte';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_40566b26dcc126bce704f2c1d622a6a3'] = 'Valider la commande';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_5dfe4041e37dfb15cdbdfe8b977950f5'] = 'Veuillez vérifier vos informations bancaires (type de carte de crédit, numéro et date d\'expiration)';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_90c9737c99792791c8fe7c9e469bae9c'] = 'Merci de spécifier votre nom complet';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'Est reussie';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Votre commende vous sera expedié le plus rapidement possible';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question, contactez nous';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Service client';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Nous avons remarqué une erreur avec votre commande. Si vous pensez que c\'est une erreur, vous pouvez contacter notre';
|
||||
BIN
modules/authorizeaim/help.png
Normal file
|
After Width: | Height: | Size: 911 B |
36
modules/authorizeaim/hookorderconfirmation.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
{*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14297 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if $status == 'ok'}
|
||||
<p>{l s='Your order on' mod='authorizeaim'} <span class="bold">{$shop_name}</span> {l s='is complete.' mod='authorizeaim'}
|
||||
<br /><br /><span class="bold">{l s='Your order will be sent as soon as possible.' mod='authorizeaim'}</span>
|
||||
<br /><br />{l s='For any questions or for further information, please contact our' mod='authorizeaim'} <a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='authorizeaim'}</a>.
|
||||
</p>
|
||||
{else}
|
||||
<p class="warning">
|
||||
{l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='authorizeaim'}
|
||||
<a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='authorizeaim'}</a>.
|
||||
</p>
|
||||
{/if}
|
||||
36
modules/authorizeaim/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
44
modules/authorizeaim/it.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f745351b1387473d3d2de5bfe18d3562'] = 'Errore, vi preghiamo di verificare le informazioni della carta';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1814fc250eea61e13aa95e81b61bf72a'] = 'Paga con authorizeaim';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_442155d68aea78b4ef707796d76ca48c'] = 'logo visa';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f65943f43529e119969e533dc6f691f9'] = 'logo mastercard';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_2937b5dab08029b1055b37c98a98d740'] = 'logo discover';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_3b8a6fa58a71e7448c264c9dc61e6904'] = 'logo american express';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1edaf23879c3b52a8df80069d2af3cef'] = 'Pagamento sicuro con carta di credito con Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f11b368cddfe37c47af9b9d91c6ba4f0'] = 'Nome completo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_379c80c789f0f3e0165b5e6d5df839ca'] = 'Tipo di carta';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a44217022190f5734b2f72ba1e4f8a79'] = 'Numero di carta';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_8c1279db4db86553e4b9682f78cf500e'] = 'Data di scadenza';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_60a104dc50579d60cbc90158fada1dcf'] = 'CVV';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6149e52c36edb9ee4494d5412e42eef2'] = 'le ultime 3 cifre sul retro della vostra carta di credito';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_40566b26dcc126bce704f2c1d622a6a3'] = 'Convalida ordine';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_5dfe4041e37dfb15cdbdfe8b977950f5'] = 'Per favore verifica le informazione della tua carta (Tipo di carta, numero e data)';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_90c9737c99792791c8fe7c9e469bae9c'] = 'Inserisci il tuo nome completo';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_cb313e911b15b21b57f4fc7b53058e4f'] = 'Ricevi il pagamento con Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_9d5b40ff49295ac0b4a5a13a88ccd285'] = 'estensione cURL deve essere abilitato sul server per utilizzare questo modulo.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configurazione aggiornata';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aiuto';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_11a4b229c0e206b831f729572618553f'] = 'Nel tuo pannello admin PrestaShop';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_bc6781f2b59d4e973bd0075baab62a40'] = 'Riempi il campo ID Login con quello fornito da Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_95eb440b753d6505aad5c3f72b50eec9'] = 'Riempire il campo chiave con la chiave di transazione fornita da Authorize.net';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_a7180ba675bb293f415aab47e52a1732'] = 'Attenzione: Il tuo sito web deve possedere un certificato SSL per utilizzare il sistema AIM Authorize.net pagamento. L\'utente è responsabile per la sicurezza dei dati bancari dei vostri clienti \'. PrestaShop non possono essere incolpati per qualsiasi problema di sicurezza nel tuo sito web.';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_f3ef34226d51e9ca88eaa2f20d7ffb91'] = 'ID Login ';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_897356954c2cd3d41b221e3f24f99bba'] = 'Chiave';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_1ee1c44c2dc81681f961235604247b81'] = 'Modalità:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_756d97bb256b8580d4d71ee0c547804e'] = 'Produzione';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_0cbc6611f5540bd0809a388dc95a615b'] = 'Test';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_291cdb0a8abb42484f5d44dc20540ce6'] = 'Carte di credito:';
|
||||
$_MODULE['<{authorizeaim}prestashop>authorizeaim_b17f3f4dcf653a5776792498a9b44d6a'] = 'Aggiorna le impostazioni';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Il tuo ordine';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'è completo.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Il tuo ordine verrà inviato al più presto.';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti';
|
||||
$_MODULE['<{authorizeaim}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Abbiamo notato un problema con il tuo ordine. Se pensi che questo sia un errore, contatta la nostra';
|
||||
|
||||
?>
|
||||
BIN
modules/authorizeaim/logo.gif
Normal file
|
After Width: | Height: | Size: 79 B |
BIN
modules/authorizeaim/logo_authorize.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
modules/authorizeaim/logoa.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
modules/authorizeaim/secure.png
Normal file
|
After Width: | Height: | Size: 611 B |
133
modules/authorizeaim/validation.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
include(dirname(__FILE__). '/../../config/config.inc.php');
|
||||
/* will include backward file */
|
||||
include(dirname(__FILE__). '/authorizeaim.php');
|
||||
|
||||
$authorizeaim = new authorizeAIM();
|
||||
|
||||
/* SSL Tricks to bypass the redirect for the FrontController in 1.5 + */
|
||||
Configuration::updateValue('PS_SSL_ENABLED', 0);
|
||||
include(dirname(__FILE__). '/../../init.php');
|
||||
Configuration::updateValue('PS_SSL_ENABLED', 1);
|
||||
|
||||
/* Transform the POST from the template to a GET for the CURL */
|
||||
if (isset($_POST['x_exp_date_m']) && isset($_POST['x_exp_date_y']))
|
||||
{
|
||||
$_POST['x_exp_date'] = $_POST['x_exp_date_m'].$_POST['x_exp_date_y'];
|
||||
unset($_POST['x_exp_date_m']);
|
||||
unset($_POST['x_exp_date_y']);
|
||||
}
|
||||
$postString = '';
|
||||
foreach ($_POST as $key => $value)
|
||||
$postString .= $key.'='.urlencode($value).'&';
|
||||
|
||||
$postString = trim($postString, '&');
|
||||
|
||||
$url = 'https://secure.authorize.net/gateway/transact.dll';
|
||||
if (Configuration::get('AUTHORIZE_AIM_DEMO'))
|
||||
{
|
||||
$postString .= '&x_test_request=TRUE';
|
||||
$url = 'https://test.authorize.net/gateway/transact.dll';
|
||||
}
|
||||
|
||||
/* Do the CURL request ro Authorize.net */
|
||||
$request = curl_init($url);
|
||||
curl_setopt($request, CURLOPT_HEADER, 0);
|
||||
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($request, CURLOPT_POSTFIELDS, $postString);
|
||||
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
$postResponse = curl_exec($request);
|
||||
curl_close($request);
|
||||
|
||||
$response = explode('|', $postResponse);
|
||||
if (!isset($response[7]) || !isset($response[3]) || !isset($response[9]))
|
||||
{
|
||||
$msg = 'Authorize.net returned a malformed response for cart';
|
||||
if (isset($response[7]))
|
||||
$msg .= ' '.(int)$response[7];
|
||||
Logger::addLog($msg, 4);
|
||||
die('Authorize.net returned a malformed response, aborted.');
|
||||
}
|
||||
|
||||
/* Does the cart exist and is valid? */
|
||||
$cart = new Cart((int)$response[7]);
|
||||
if (!Validate::isLoadedObject($cart))
|
||||
{
|
||||
Logger::addLog('Cart loading failed for cart '.(int)$response[7], 4);
|
||||
die('An unrecoverable error occured with the cart '.(int)$repsonse[7]);
|
||||
}
|
||||
$customer = new Customer((int)$cart->id_customer);
|
||||
$message = $response[3];
|
||||
$payment_method = 'Authorize.net AIM';
|
||||
|
||||
switch ($response[0]) // Response code
|
||||
{
|
||||
case 1: // Payment accepted
|
||||
$authorizeaim->setTransactionDetail($response);
|
||||
$authorizeaim->validateOrder((int)$cart->id,
|
||||
Configuration::get('PS_OS_PAYMENT'), (float)$response[9],
|
||||
$payment_method, $message, NULL, NULL, false, $customer->secure_key);
|
||||
break ;
|
||||
|
||||
case 4: // Hold for review
|
||||
$authorizeaim->validateOrder((int)$cart->id,
|
||||
Configuration::get('AUTHORIZE_AIM_HOLD_REVIEW_OS'), (float)$response[9],
|
||||
$authorizeaim->displayName, $response[3]);
|
||||
break ;
|
||||
|
||||
default:
|
||||
$checkout_type = Configuration::get('PS_ORDER_PROCESS_TYPE') ?
|
||||
'order-opc' : 'order';
|
||||
$url = _PS_VERSION_ >= '1.5' ?
|
||||
'index.php?controller='.$checkout_type.'&' : $checkout_type.'.php?';
|
||||
$url .= 'step=3&cgv=1&aimerror=1';
|
||||
|
||||
if (!isset($_SERVER['HTTP_REFERER']) ||
|
||||
strstr($_SERVER['HTTP_REFERER'], 'order'))
|
||||
Tools::redirect($url);
|
||||
elseif (strstr($_SERVER['HTTP_REFERER'], '?'))
|
||||
Tools::redirect($_SERVER['HTTP_REFERER'].'&aimerror=1', '');
|
||||
else
|
||||
Tools::redirect($_SERVER['HTTP_REFERER'].'?aimerror=1', '');
|
||||
|
||||
exit;
|
||||
|
||||
/// @todo check the reason code and determine weither we should retry are
|
||||
/// mark the order as failed.
|
||||
$authorizeaim->validateOrder((int)$cart->id,
|
||||
Configuration::get('PS_OS_ERROR'), (float)$response[9],
|
||||
$payment_method, $message, NULL, NULL, false, $customer->secure_key);
|
||||
}
|
||||
|
||||
$url = 'index.php?controller=order-confirmation&';
|
||||
if (_PS_VERSION_ < '1.5')
|
||||
$url = 'order-confirmation.php?';
|
||||
|
||||
Tools::redirect($url.'id_module='.(int)$authorizeaim->id.'&id_cart='.
|
||||
(int)$cart->id.'&key='.$customer->secure_key);
|
||||