// Merge -> revision 7906

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7909 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-05 13:26:44 +00:00
parent e4825ac555
commit 239f92eaf1
55 changed files with 174 additions and 1296 deletions
+17 -2
View File
@@ -297,6 +297,14 @@ abstract class PrepaidServices extends PaymentModule
foreach ($this->_getAllowedCurrencies() AS $currency)
{
$mid = Configuration::get($this->prefix.'MERCHANT_ID_'.$currency['iso_code']);
$certificateExiste = '';
$passwordExist = '';
if (file_exists($this->certificat_dir.$mid.'.pem'))
$certificateExiste = '<div style="color:#00b511; text-align:center;">'.$this->l('A certificate has been found for this configuration').' : '.$mid.'.pem'.'</div><br />';
if (Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code']))
$passwordExist = '<div style="color:#00b511; text-align:center;">'.$this->l('A password has already been saved');
$currencies_configuration .= '
<tr>
<td class="currency_label">'.$this->getL('configuration_in').' '.$currency['name'].' '.$currency['sign'].'</td>
@@ -310,10 +318,12 @@ abstract class PrepaidServices extends PaymentModule
<div class="margin-form">
<input type="file" name="ct_keyring_certificate_'.$currency['iso_code'].'" />
</div>
'.$certificateExiste.'
<label>'.$this->getL('keyring_pw').'</label>
<div class="margin-form">
<input type="text" name="ct_keyring_pw_'.$currency['iso_code'].'" value="'.Tools::htmlentitiesUTF8(Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code'])).'"/>
<input type="password" name="ct_keyring_pw_'.$currency['iso_code'].'" value=""/>
</div>
'.$passwordExist.'
</td>
</tr>';
}
@@ -511,6 +521,11 @@ abstract class PrepaidServices extends PaymentModule
$mid = trim(Tools::getValue('ct_merchant_id_'.$currency['iso_code']));
Configuration::updateValue($this->prefix.'MERCHANT_ID_'.$currency['iso_code'], $mid);
$pass = Tools::getValue('ct_keyring_pw_'.$currency['iso_code']);
if (!empty($pass))
Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code']));
Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code']));
if (isset($_FILES['ct_keyring_certificate_'.$currency['iso_code']]))
@@ -556,7 +571,7 @@ abstract class PrepaidServices extends PaymentModule
'payment_name' => $this->displayName,
'module_name' => $this->name));
return $this->display(__FILE__, 'payment.tpl');
return $this->display(dirname(__FILE__), 'payment.tpl');
}
+6 -2
View File
@@ -71,7 +71,9 @@ class PrepaidServicesAPI
$data_array = explode("\n", $data,7);
$resultcode = trim($data_array[0]);
$errorcode = trim($data_array[1]);
$errormessage = trim($data_array[2]);
//$errormessage = trim($data_array[2]);
// Todo : Find a way to have translation
$errormessage = 'Transaction could not be initiated due to connection problems. If the problem persists, please contact our support.';
return array($resultcode, $errorcode, $errormessage);
}
@@ -155,8 +157,10 @@ class PrepaidServicesAPI
$dataarray=explode("\n", $data,7);
$resultcode=trim($dataarray[0]);
$errorcode=trim($dataarray[1]);
$errormessage=trim($dataarray[2]);
//$errormessage=trim($dataarray[2]);
$errormessage = 'The transaction could not be completed. This may have happened due to a temporary connection problem.'.
' Please press the "reload" button in your browser or the link below to reload this page to retry completing your transaction. ';
return array ($resultcode, $errorcode, $errormessage);
}
else
+3 -5
View File
@@ -12,9 +12,6 @@ $_MODULE['<{cashticket}prestashop>cashticket-confirmation_2c987f462c2ab7fc63e061
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Il tuo ordine verrà inviato al più presto.';
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra';
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti';
$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido';
$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.';
$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con';
$_MODULE['<{cashticket}prestashop>cashticket_4512bbd48918c03027387a6c8e911342'] = 'CashTicket';
$_MODULE['<{cashticket}prestashop>cashticket_21d3d890383dc93343ce57c221ce5b3d'] = 'Si accettano pagamenti tramite CashTicket';
$_MODULE['<{cashticket}prestashop>cashticket_bed51f5187d4bf98e08f44d93f3098d9'] = 'Disposizione creata. In attesa di addebito.';
@@ -49,5 +46,6 @@ $_MODULE['<{cashticket}prestashop>cashticket_d929c5e5e5643c622400e837914206da']
$_MODULE['<{cashticket}prestashop>cashticket_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più';
$_MODULE['<{cashticket}prestashop>cashticket_930320ced1b8c376237844049b570a7f'] = 'Si verificato un errore, controlla i messaggi per maggiori informazioni';
$_MODULE['<{cashticket}prestashop>cashticket_a9ced76f2dd6907220fa95b3a136b04a'] = 'Importo non valido';
?>
$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido';
$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.';
$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con';