\ No newline at end of file
diff --git a/modules/paypal/express/index.php b/modules/paypal/____standard/index.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/paypal/express/index.php
rename to modules/paypal/____standard/index.php
diff --git a/modules/paypal/standard/paypal.tpl b/modules/paypal/____standard/paypal.tpl
old mode 100755
new mode 100644
similarity index 100%
rename from modules/paypal/standard/paypal.tpl
rename to modules/paypal/____standard/paypal.tpl
diff --git a/modules/paypal/standard/redirect.php b/modules/paypal/____standard/redirect.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/paypal/standard/redirect.php
rename to modules/paypal/____standard/redirect.php
diff --git a/modules/paypal/standard/redirect.tpl b/modules/paypal/____standard/redirect.tpl
old mode 100755
new mode 100644
similarity index 100%
rename from modules/paypal/standard/redirect.tpl
rename to modules/paypal/____standard/redirect.tpl
diff --git a/modules/paypal/payment/index.php b/modules/paypal/___payment/index.php
old mode 100755
new mode 100644
similarity index 100%
rename from modules/paypal/payment/index.php
rename to modules/paypal/___payment/index.php
diff --git a/modules/paypal/payment/payment.tpl b/modules/paypal/___payment/payment.tpl
old mode 100755
new mode 100644
similarity index 76%
rename from modules/paypal/payment/payment.tpl
rename to modules/paypal/___payment/payment.tpl
index e703478c..ff3ca80f
--- a/modules/paypal/payment/payment.tpl
+++ b/modules/paypal/___payment/payment.tpl
@@ -26,13 +26,13 @@
\ No newline at end of file
diff --git a/modules/paypal/payment/paypalpayment.php b/modules/paypal/___payment/paypalpayment.php
old mode 100755
new mode 100644
similarity index 82%
rename from modules/paypal/payment/paypalpayment.php
rename to modules/paypal/___payment/paypalpayment.php
index ae6ed0b0..61e60692
--- a/modules/paypal/payment/paypalpayment.php
+++ b/modules/paypal/___payment/paypalpayment.php
@@ -34,7 +34,7 @@ class PaypalPayment extends Paypal
return (floor(round($value * 100, 2)) / 100);
}
- public function getAuthorisation()
+ public function getAuthorisation($billing_agreement = false, $id_billing = 0)
{
global $cookie, $cart;
@@ -114,13 +114,42 @@ class PaypalPayment extends Paypal
$request .= '&ADDROVERRIDE=1';
// Calling PayPal API
- include(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
+ if (!class_exists('PaypalLib')) {
+ include(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
+ }
+
+ if ($billing_agreement === true) {
+ $request .= '&L_BILLINGTYPE0=MerchantInitiatedBillingSingleAgreement';
+ $request .= '&L_BILLINGAGREEMENTDESCRIPTION0=www.bebeboutik.com';
+ } elseif ($id_billing != 0) {
+ $info_billing = $this->getInfoForBillingIdPayment($id_billing);
+ // check if id is for the customer
+ if ($info_billing) {
+ if($info_billing['id_customer'] == $cookie->id_customer) {
+ $request .= '&REFERENCEID='.urlencode($info_billing['agreement_id']);
+ $ppAPI = new PaypalLib();
+ $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'DoReferenceTransaction', $request);
+ $this->_logs = array_merge($this->_logs, $ppAPI->getLogs());
+ return $result;
+ }
+ }
+ }
+
$ppAPI = new PaypalLib();
$result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'SetExpressCheckout', $request);
$this->_logs = array_merge($this->_logs, $ppAPI->getLogs());
return $result;
}
+
+ public function getInfoForBillingIdPayment($id_billing) {
+ return Db::getInstance()->getRow('
+ SELECT `id_paypal_agreement`, `id_customer`, `agreement_id`
+ FROM `'._DB_PREFIX_.'paypal_customer_agreement`
+ WHERE `id_paypal_agreement` = ' . (int) $id_billing
+ );
+ }
+
public function getLogs()
{
return $this->_logs;
diff --git a/modules/paypal/payment/submit.php b/modules/paypal/___payment/submit.php
old mode 100755
new mode 100644
similarity index 67%
rename from modules/paypal/payment/submit.php
rename to modules/paypal/___payment/submit.php
index 76badc53..2b7e8856
--- a/modules/paypal/payment/submit.php
+++ b/modules/paypal/___payment/submit.php
@@ -30,14 +30,21 @@ $useSSL = true;
include_once(dirname(__FILE__).'/../../../config/config.inc.php');
include_once(dirname(__FILE__).'/../../../init.php');
+$controller->preProcess();
+
include_once(_PS_MODULE_DIR_.'paypal/paypal.php');
include_once(_PS_MODULE_DIR_.'paypal/payment/paypalpayment.php');
+include_once(_PS_MODULE_DIR_.'paypal/express_checkout/process.php');
+include_once(_PS_MODULE_DIR_.'paypal/express_checkout/submit.php');
+
$paypal = new Paypal();
if (!$paypal->active)
exit;
+
+
$ppPayment = new PaypalPayment();
$errors = array();
@@ -48,12 +55,37 @@ function getAuthorization()
{
global $ppPayment, $cookie, $cart;
- $result = $ppPayment->getAuthorisation();
+ // check paypal billing agreement id
+ $billing_requested = false;
+ $use_existing_billing = false;
+
+ // BILLING INFO
+ if (Tools::getValue('billing')) {
+ $billing_requested = true;
+ }
+
+ $id_billing = Tools::getValue('billing_agreement', 0);
+ $info_billing = array();
+ if ($id_billing != 0) {
+ $info_billing = $ppPayment->getInfoForBillingId($id_billing);
+ if ($info_billing) {
+ if($info_billing['id_customer'] == $cookie->id_customer) {
+ $use_existing_billing = true;
+ }
+ }
+ }
+
+ $result = $ppPayment->getAuthorisation($billing_requested, $id_billing);
$logs = $ppPayment->getLogs();
+
if (is_array($result) AND sizeof($result))
{
if (strtoupper($result['ACK']) == 'SUCCESS')
{
+ // if use billing agreement
+ if ($use_existing_billing) {
+ $ppPayment->validateReferenceTransaction($cookie, $cart, $result);
+ }
if (isset($result['TOKEN']))
{
$cookie->paypal_token = strval($result['TOKEN']);
@@ -91,12 +123,26 @@ function displayConfirm()
// Display all and exit
include(_PS_ROOT_DIR_.'/header.php');
- $smarty->assign(array(
- 'logo' => $ppPayment->getLogo(),
+ // check if user choose a account
+ $use_account = false;
+ if (Tools::getValue('id_agreement')) {
+ $id_billing = Tools::getValue('id_agreement');
+ $info_billing = $ppPayment->getInfoForBillingId($id_billing);
+ if ($info_billing) {
+ if($info_billing['id_customer'] == $cookie->id_customer) {
+ $use_account = true;
+ }
+ }
+ }
+
+ $smarty->assign(array(
+ 'use_account' => $use_account,
+ 'info_billing' => $info_billing,
'cust_currency' => $cart->id_currency,
'currency' => $ppPayment->getCurrency((int)$cart->id_currency),
'total' => $cart->getOrderTotal(true, Cart::BOTH),
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'. $ppPayment->name.'/',
+ 'accounts' => $ppPayment->getBillingAgreement($cookie->id_customer),
'mode' => 'payment/'
));
@@ -112,15 +158,15 @@ function submitConfirm()
if (!$cookie->isLogged(true))
{
header('location:../../../'); exit;
- die('Not logged');
+ Tools::redirect('index.php'); //die('Not logged');
}
elseif (!$id_currency = (int)(Tools::getValue('currency_payement')))
- die('No currency');
+ Tools::redirect('order.php'); //die('No currency');
elseif (!$cart->getOrderTotal(true, Cart::BOTH))
- die('Empty cart');
+ Tools::redirect('order.php'); //die('Empty cart');
$currency = new Currency((int)($id_currency));
if (!Validate::isLoadedObject($currency))
- die('Invalid currency');
+ Tools::redirect('order.php'); //die('Invalid currency');
$cookie->id_currency = (int)($id_currency);
getAuthorization();
}
@@ -131,22 +177,29 @@ function validOrder()
if (!$cookie->isLogged(true))
{
header('location:../../../'); exit;
- die('Not logged');
+ Tools::redirect('index.php'); //die('Not logged');
}
elseif (!$cart->getOrderTotal(true, Cart::BOTH))
- die('Empty cart');
+ Tools::redirect('order.php'); //die('Empty cart');
if (!$token = Tools::htmlentitiesUTF8(strval(Tools::getValue('token'))))
{
global $smarty;
$smarty->assign('paypalError', 'Invalid token');
displayConfirm();
- die('Invalid token');
+ Tools::redirect('order.php'); //die('Invalid token');
}
if ($token != strval($cookie->paypal_token))
- die('Invalid cookie token');
+ Tools::redirect('order.php'); //die('Invalid cookie token');
if (!$payerID = Tools::htmlentitiesUTF8(strval(Tools::getValue('PayerID'))))
- die('Invalid payerID');
- $ppPayment->makePayPalAPIValidation($cookie, $cart, $cart->id_currency, $payerID, 'payment');
+ Tools::redirect('order.php'); //die('Invalid payerID');
+
+
+ $ppec = new PaypalExpressCheckout();
+ if ($ppec->isProductsListStillRight()) {
+ die('test1');
+ } else {
+ die('test2');
+ }
}
// #####
@@ -157,12 +210,13 @@ if (!$cookie->isLogged(true))
elseif (!$cart->getOrderTotal(true, Cart::BOTH))
die('Empty cart');
+
// No submit, confirmation page
-if (!Tools::isSubmit('submitPayment') AND !Tools::getValue('fromPayPal'))
- displayConfirm();
-else
-{
- if (!isset($cookie->paypal_token) OR !$cookie->paypal_token)
+if (!Tools::isSubmit('submitPayment') AND !Tools::getValue('fromPayPal')) {
+ displayConfirm();
+} else {
+ if (!isset($cookie->paypal_token) OR !$cookie->paypal_token) {
submitConfirm();
+ }
validOrder();
}
diff --git a/modules/paypal/__fr.php b/modules/paypal/__fr.php
new file mode 100644
index 00000000..9c09b3e6
--- /dev/null
+++ b/modules/paypal/__fr.php
@@ -0,0 +1,207 @@
+about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?';
+$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.';
+$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?';
+$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.';
+$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?';
+$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.';
+$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.';
+$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.';
+$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !';
+$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
+$_MODULE['<{paypal}prestashop>confirm_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
+$_MODULE['<{paypal}prestashop>confirm_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_MODULE['<{paypal}prestashop>confirm_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande';
+$_MODULE['<{paypal}prestashop>confirm_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement PayPal';
+$_MODULE['<{paypal}prestashop>confirm_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer avec PayPal.';
+$_MODULE['<{paypal}prestashop>confirm_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un court résumé de votre commande :';
+$_MODULE['<{paypal}prestashop>confirm_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à';
+$_MODULE['<{paypal}prestashop>confirm_1f87346a16cf80c372065de3c54c86d9'] = '(TTC)';
+$_MODULE['<{paypal}prestashop>confirm_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons la devise suivante pour votre paiement :';
+$_MODULE['<{paypal}prestashop>confirm_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur \"Je confirme ma commande\"';
+$_MODULE['<{paypal}prestashop>confirm_988fd738de9c6d177440c5dcf69e73ce'] = 'Retour';
+$_MODULE['<{paypal}prestashop>confirm_22551b0fea4863f62ee37c847ce032a2'] = 'Session expirée, veuillez cliquer sur \"Retour\" et recommencez';
+$_MODULE['<{paypal}prestashop>confirm_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement';
+$_MODULE['<{paypal}prestashop>confirm_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande';
+$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur';
+$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.';
+$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.';
+$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.';
+$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre';
+$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client';
+$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
+$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Merci de vous reférer aux logs :';
+$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent';
+$_MODULE['<{paypal}prestashop>paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Accepter les paiements par cartes de paiement (CB, Visa, MasterCard, American Express, Aurore, Cofinoga, 4 étoiles) avec Paypal';
+$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Etes vous sûr de vouloir supprimer vos informations ?';
+$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.';
+$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.';
+$_MODULE['<{paypal}prestashop>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.';
+$_MODULE['<{paypal}prestashop>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".';
+$_MODULE['<{paypal}prestashop>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.';
+$_MODULE['<{paypal}prestashop>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v';
+$_MODULE['<{paypal}prestashop>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Résultat du remboursement de produit:';
+$_MODULE['<{paypal}prestashop>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.';
+$_MODULE['<{paypal}prestashop>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides';
+$_MODULE['<{paypal}prestashop>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide';
+$_MODULE['<{paypal}prestashop>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Message de paiement n\'est pas valide, merci de vérifier votre module !';
+$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide';
+$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Résultat de l\'opération de remboursement:';
+$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement fini avec PayPal !';
+$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur lors de la transaction !';
+$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat opération de récupération des fonds:';
+$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande achevée avec PayPal !';
+$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :';
+$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse e-mail PayPal par défaut, vous devez la remplacer par votre propre adresse';
+$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers';
+$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :';
+$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :';
+$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen';
+$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :';
+$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen';
+$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :';
+$_MODULE['<{paypal}prestashop>paypalconnect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers';
+$_MODULE['<{paypal}prestashop>paypalconnect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypalconnect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypalconnect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :';
+$_MODULE['<{paypal}prestashop>paypalconnect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :';
+$_MODULE['<{paypal}prestashop>paypalconnect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL';
+$_MODULE['<{paypal}prestashop>paypalconnect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen';
+$_MODULE['<{paypal}prestashop>paypalconnect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connection réussie avec la méthode fsockopen';
+$_MODULE['<{paypal}prestashop>paypalconnect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :';
+$_MODULE['<{paypal}prestashop>paypalconnect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen';
+$_MODULE['<{paypal}prestashop>paypallib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :';
+$_MODULE['<{paypal}prestashop>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.';
+$_MODULE['<{paypal}prestashop>authentication_cd42c6dd6cc4cd65cb5e13b729050469'] = 'Vérifiez vos informations';
+$_MODULE['<{paypal}prestashop>authentication_6335a00a08fde0fbb8f6d6630cdadd92'] = 'Vos informations personnelles';
+$_MODULE['<{paypal}prestashop>authentication_b78a3223503896721cca1303f776159b'] = 'Civilité';
+$_MODULE['<{paypal}prestashop>authentication_127469a6b4253ebb77adccc0dd48461e'] = 'M.';
+$_MODULE['<{paypal}prestashop>authentication_29e32764941c30d1bb41c601014fbdbd'] = 'Mme';
+$_MODULE['<{paypal}prestashop>authentication_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom';
+$_MODULE['<{paypal}prestashop>authentication_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom';
+$_MODULE['<{paypal}prestashop>authentication_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail';
+$_MODULE['<{paypal}prestashop>authentication_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
+$_MODULE['<{paypal}prestashop>authentication_bf2957630c4209f61a388a08c2154915'] = '(5 caractères min.)';
+$_MODULE['<{paypal}prestashop>authentication_aac772216aecbeca0e86d06671fe985a'] = 'Date de naissance';
+$_MODULE['<{paypal}prestashop>authentication_86f5978d9b80124f509bdb71786e929e'] = 'Janvier';
+$_MODULE['<{paypal}prestashop>authentication_659e59f062c75f81259d22786d6c44aa'] = 'Février';
+$_MODULE['<{paypal}prestashop>authentication_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars';
+$_MODULE['<{paypal}prestashop>authentication_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril';
+$_MODULE['<{paypal}prestashop>authentication_195fbb57ffe7449796d23466085ce6d8'] = 'Mai';
+$_MODULE['<{paypal}prestashop>authentication_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin';
+$_MODULE['<{paypal}prestashop>authentication_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet';
+$_MODULE['<{paypal}prestashop>authentication_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août';
+$_MODULE['<{paypal}prestashop>authentication_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre';
+$_MODULE['<{paypal}prestashop>authentication_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre';
+$_MODULE['<{paypal}prestashop>authentication_7e823b37564da492ca1629b4732289a8'] = 'Novembre';
+$_MODULE['<{paypal}prestashop>authentication_82331503174acbae012b2004f6431fa5'] = 'Décembre';
+$_MODULE['<{paypal}prestashop>authentication_6f6162d3a052bb330e9c60285c74c6c9'] = 'S\'inscrire à la newsletter';
+$_MODULE['<{paypal}prestashop>authentication_ac135c86084a47630c9eadb4edd5ef75'] = 'Recevez les offres spéciales de nos partenaires';
+$_MODULE['<{paypal}prestashop>authentication_455175f3f5be6306247babb349c0515a'] = 'Votre adresse';
+$_MODULE['<{paypal}prestashop>authentication_1c76cbfe21c6f44c1d1e59d54f3e4420'] = 'Société';
+$_MODULE['<{paypal}prestashop>authentication_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
+$_MODULE['<{paypal}prestashop>authentication_783cb853aae6984e51583b3bb80c09d2'] = 'Adresse (2)';
+$_MODULE['<{paypal}prestashop>authentication_9b514b51d03075005814a33edc74c958'] = 'Code postal';
+$_MODULE['<{paypal}prestashop>authentication_57d056ed0984166336b7879c2af3657f'] = 'Ville';
+$_MODULE['<{paypal}prestashop>authentication_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
+$_MODULE['<{paypal}prestashop>authentication_46a2a41cc6e552044816a2d04634545d'] = 'Etat';
+$_MODULE['<{paypal}prestashop>authentication_0f68b904e33d9ac04605aecc958bcf52'] = 'Informations complémentaires';
+$_MODULE['<{paypal}prestashop>authentication_fe66abce284ec8589e7d791185b5c442'] = 'Téléphone domicile';
+$_MODULE['<{paypal}prestashop>authentication_41c2fff4867cc204120f001e7af20f7a'] = 'Téléphone portable';
+$_MODULE['<{paypal}prestashop>authentication_6c1c4d5a22e3d6ed8385e7287233396f'] = 'Donnez un titre à cette adresse pour la retrouver plus facilement';
+$_MODULE['<{paypal}prestashop>authentication_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mon adresse';
+$_MODULE['<{paypal}prestashop>authentication_a0bfb8e59e6c13fc8d990781f77694fe'] = 'Continuer';
+$_MODULE['<{paypal}prestashop>authentication_19f823c6453c2b1ffd09cb715214813d'] = 'Champs requis';
+$_MODULE['<{paypal}prestashop>login_b40ad46c25c153a3d2fde078c0e1b0f8'] = 'Merci de vous identifier';
+$_MODULE['<{paypal}prestashop>login_abc57016a138dea055e0d8be6358f84e'] = 'Email déjà enregistrée, merci de vous identifier !';
+$_MODULE['<{paypal}prestashop>login_8b5dd64ab8d0b8158906796b53a200e2'] = 'Adresse e-mail';
+$_MODULE['<{paypal}prestashop>login_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
+$_MODULE['<{paypal}prestashop>login_bffe9a3c9a7e00ba00a11749e022d911'] = 'S\'identifier';
+$_MODULE['<{paypal}prestashop>login_01a569ddc6cf67ddec2a683f0a5f5956'] = 'Mot de passe oublié ?';
+$_MODULE['<{paypal}prestashop>paypalexpress_b601224a2a6c61f38738ca903fb019a2'] = 'Panier incorrect';
+$_MODULE['<{paypal}prestashop>paypalexpress_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise incorrecte';
+$_MODULE['<{paypal}prestashop>shopping_cart_aa91004934e1abdb620b5d0f0c18681c'] = 'Payer avec PayPal Express Checkout';
+$_MODULE['<{paypal}prestashop>submit_528d1f824243db48e40cb6223d32fa06'] = 'Aucun token donné par PayPal';
+$_MODULE['<{paypal}prestashop>submit_795277047da13b4fc74e02e050b1a675'] = 'PayPal a retourné une erreur';
+$_MODULE['<{paypal}prestashop>submit_b4133f1ba03a914134a5281a08231078'] = 'L\'autorisation à PayPal a échoué';
+$_MODULE['<{paypal}prestashop>submit_4935b58d37fda5bd60acc510cb324342'] = 'Impossible de trouver les informations du compte PayPal';
+$_MODULE['<{paypal}prestashop>submit_90aa7ebf75251f535a9bdd6ba671ae7a'] = 'Le token fournit par PayPal n\'est pas le même que celui du cookie';
+$_MODULE['<{paypal}prestashop>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible';
+$_MODULE['<{paypal}prestashop>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :';
+$_MODULE['<{paypal}prestashop>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout';
+$_MODULE['<{paypal}prestashop>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur';
+$_MODULE['<{paypal}prestashop>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse';
+$_MODULE['<{paypal}prestashop>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier';
+$_MODULE['<{paypal}prestashop>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.';
+$_MODULE['<{paypal}prestashop>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.';
+$_MODULE['<{paypal}prestashop>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.';
+$_MODULE['<{paypal}prestashop>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande';
+$_MODULE['<{paypal}prestashop>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.';
+$_MODULE['<{paypal}prestashop>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.';
+$_MODULE['<{paypal}prestashop>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.';
+$_MODULE['<{paypal}prestashop>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.';
+$_MODULE['<{paypal}prestashop>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.';
+$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.';
+$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.';
+$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
+$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
+$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Payez avec votre compte PayPal, carte de crédit (CB, Visa, Mastercard ...)';
+$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Payez avec votre compte PayPal';
+$_MODULE['<{paypal}prestashop>paypalpayment_ee9dc1e678d54c517f481583c3fb2db8'] = 'La devise est incorrecte';
+$_MODULE['<{paypal}prestashop>back_office_ae3cebe661e92cdfd12516419fef4f2d'] = 'Télécharger le';
+$_MODULE['<{paypal}prestashop>back_office_e73756d0d2306110f29ccf28cb69c412'] = 'Guide d\'intégration de PayPal';
+$_MODULE['<{paypal}prestashop>back_office_6506302a6e11077ecbc04b5932a65c4c'] = 'sur PrestaShop et suivez les étapes pas à pas';
+$_MODULE['<{paypal}prestashop>back_office_748eadce9cf4f2bde207b63c5441da07'] = 'Utilisez la Fonction PayPal Login';
+$_MODULE['<{paypal}prestashop>back_office_cded4ac9f77c68c750c243af1f5263c5'] = ' (*voir le ';
+$_MODULE['<{paypal}prestashop>back_office_606d8f704cf61d29bffd5195f28af29e'] = 'Guide d\'Intégration';
+$_MODULE['<{paypal}prestashop>back_office_a1694ad810c4ac5b56b59c47db01cb05'] = 'et suivre les étapes de mise en place';
+$_MODULE['<{paypal}prestashop>back_office_3650f874df7e9c6e822a872d02cee6d5'] = 'Cette fonction permet à vos clients de se connecter avec leurs identifiants PayPal pour raccourcir le tunnel d\'achat';
+$_MODULE['<{paypal}prestashop>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
+$_MODULE['<{paypal}prestashop>back_office_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
+$_MODULE['<{paypal}prestashop>back_office_9be4e88898c4e88363208d2472f4a406'] = 'Renseignez les informations liées à votre compte PayPal';
+$_MODULE['<{paypal}prestashop>back_office_4ff2e716a7d06ce5274b4090b39abad3'] = 'Voir';
+$_MODULE['<{paypal}prestashop>back_office_8646a5d7b2817d30950357da8d80a11f'] = 'le Guide d\'Intégration';
+$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !';
+$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal';
+$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
+$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition';
+$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds';
+$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal';
+$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
+$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté';
+$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"';
+$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?';
+$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction';
+$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal';
+$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
+$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition';
+$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition';
+$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement';
+$_MODULE['<{paypal}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:';
+$_MODULE['<{paypal}prestashop>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :';
+$_MODULE['<{paypal}prestashop>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction :';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est :';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction paypal est :';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_300225ee958b6350abc51805dab83c24'] = 'Continuer le shopping';
+$_MODULE['<{paypal}prestashop>order-confirmation-mobile_9390390581f54c65d6acfc8da4e17362'] = 'Revenir aux commandes.';
+$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande';
+$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande';
+$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes';
+$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
+$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande';
+$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal';
+$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)';
+$_MODULE['<{paypal}prestashop>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal';
+$_MODULE['<{paypal}prestashop>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal';
+$_MODULE['<{paypal}prestashop>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.';
diff --git a/modules/paypal/about.tpl b/modules/paypal/about.tpl
deleted file mode 100755
index b5b0dbd7..00000000
--- a/modules/paypal/about.tpl
+++ /dev/null
@@ -1,42 +0,0 @@
-{*
-* 2007-2011 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
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 7013 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-
{l s='What Is PayPal?' mod='paypal'}
-
-
-
{l s='PayPal, the trusted leader in online payments, enables buyers and businesses to send and receive money online. PayPal has over 100 million member accounts in 190 countries and regions. It\'s accepted by merchants everywhere, both on and off eBay.' mod='paypal'}
-
{l s='Is it safe to use?' mod='paypal'}
-
{l s='PayPal helps protect your credit card information with industry-leading security and fraud prevention systems. When you use PayPal, your financial information is never shared with the merchant.' mod='paypal'}
-
{l s='Why use PayPal?' mod='paypal'}
-
-
-
{l s='Make purchases or send money with PayPal - it\'s free' mod='paypal'}
-
{l s='Shop and pay conveniently by saving your information with PayPal' mod='paypal'}
-
{l s='PayPal is accepted by millions of businesses worldwide and is the preferred payment method on eBay' mod='paypal'}
-
-
diff --git a/modules/paypal/css/index.php b/modules/paypal/css/index.php
deleted file mode 100755
index 236beedd..00000000
--- a/modules/paypal/css/index.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-* @copyright 2007-2014 PrestaShop SA
-* @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;
\ No newline at end of file
diff --git a/modules/paypal/css/paypal.css b/modules/paypal/css/paypal.css
deleted file mode 100755
index 87dda98d..00000000
--- a/modules/paypal/css/paypal.css
+++ /dev/null
@@ -1,52 +0,0 @@
-#paypal-column-block p{text-align:center}
-.bold{font-weight:700}
-.clear{clear:both}
-#paypal-wrapper .half{width:44%}
-#paypal-wrapper{font-size:1.1em;position:relative}
-#paypal-wrapper ul li{text-align:left}
-#paypal-wrapper hr{border-top:1px solid #ccc!important;margin-bottom:0;margin-top:20px}
-#paypal-wrapper .toolbox{background:#fff2cf;border:1px solid #aaa;color:#000;display:none;font-size:10px;font-weight:400;left:730px;line-height:12px;padding:6px!important;position:absolute;text-transform:none;top:-10px!important;width:180px;z-index:100}
-.disabled,.disabled *,.disabled * *,.disabled * * *{color:#888!important}
-.disabled .paypal-button,.disabled input[type=submit]{background:#DDD!important;border:1px solid #999!important}
-#paypal-wrapper .inline{display:inline;margin-right:5px}
-#paypal-wrapper .box{margin:6px 1%;padding:12px;text-align:left}
-#paypal-wrapper .box ul{list-style:none;margin:0;padding:0}
-#paypal-wrapper .box ul.tick li{background:url(../img/blue_tick.png) no-repeat left 3px;padding:4px 26px}
-span.paypal-section{background:url(../img/sprites.png) no-repeat 0 0;color:#FFF!important;float:left;height:24px;line-height:24px;margin-right:8px;text-align:center;width:24px}
-.disabled span.paypal-section{background:url(../img/sprites.png) 0 24px}
-#paypal-slogan{font-size:1.8em;margin:0 0 5px;text-transform:uppercase}
-#paypal-slogan .light{color:#369}
-#paypal-slogan .dark{color:#036}
-#paypal-call-button{margin:-6px 0 0;padding:0}
-#paypal-call,#paypal-call-foonote{background:#e1e1e1 url(../img/bg-call-button.png) repeat-x;border:1px solid #d2d2d2;border-left-color:#ddd;border-radius:5px;border-right-color:#ddd;border-top-color:#e9e9e9;color:#369;display:block;margin:0;padding:10px 20px;width:auto}
-#paypal-call-foonote{background:none;border:none;font-size:.8em;max-width:320px;padding:2px 10px;text-align:justify}
-#paypal-get-identification{display:block;min-width:378px;text-align:center}
-#paypal-wrapper a,#fancybox-wrap a,.fancybox-wrap a{color:#036;text-decoration:underline}
-#paypal-wrapper h1,#paypal-wrapper h2,#paypal-wrapper h3,#paypal-wrapper h4,#paypal-wrapper h5,#paypal-wrapper h6,#fancybox-wrap h1,#fancybox-wrap h2,#fancybox-wrap h3,#fancybox-wrap h4,#fancybox-wrap h5,#fancybox-wrap h6,.fancybox-wrap h1,.fancybox-wrap h2,.fancybox-wrap h3,.fancybox-wrap h4,.fancybox-wrap h5,.fancybox-wrap h6{color:#036;font-family:Arial, Verdana, Helvetica, sans-serif;font-weight:400;text-transform:uppercase}
-#fancybox-wrap h3,.fancybox-wrap h3,#paypal-wrapper h3{font-size:1.4em;line-height:24px}
-#fancybox-wrap h4,.fancybox-wrap h4,#paypal-wrapper h4{font-size:1.2em;margin-bottom:5px;text-transform:none}
-#paypal-wrapper h1.inline + img,#paypal-wrapper h2.inline + img,#paypal-wrapper h3.inline + img,#paypal-wrapper h4.inline + img,#paypal-wrapper h5.inline + img,#paypal-wrapper h6.inline + img{vertical-align:-6px}
-#paypal-wrapper p{margin-top:10px;padding-bottom:0}
-#paypal-wrapper .form-block{margin-top:5px}
-#paypal-wrapper .form-block input{vertical-align:top}
-#paypal-wrapper dl dt{clear:both;line-height:20px;margin-bottom:2px;text-align:right;width:220px}
-#paypal-wrapper dl dd{margin:0 0 16px 10px}
-#paypal-wrapper label{display:inline-block;float:none;font-size:.9em;font-weight:400;margin-bottom:5px;padding-left:6px;padding-top:0;position:relative;text-align:left;width:auto}
-#paypal-wrapper dl dt label{margin:0;padding:0}
-#paypal-wrapper .description,#paypal-wrapper .paypal-signup-content{color:#666;font-size:.9em;font-weight:400;margin:2px 0;font-size:11px; font-style:italic;}
-label span.description{display:block;padding-left:16px}
-#paypal-wrapper input[type=submit],.fancybox-wrap button,#fancybox-wrap button,#paypal-wrapper .paypal-button{background:url(../img/bg-button.png) repeat-x;border:1px solid #f29116;border-radius:4px;color:#292929;cursor:pointer;display:inline-block;font-weight:700;height:25px;line-height:26px;padding:0 10px;text-decoration:none;text-shadow:0 1px 1px #DDD;text-transform:uppercase}
-#fancybox-wrap ul,.fancybox-wrap ul{font-size:1.1em;padding-left:10px}
-#fancybox-wrap button,.fancybox-wrap button{line-height:20px}
-#paypal-test-mode-confirmation{margin:30px;text-align:left;width:500px}
-#fancybox-wrap #buttons,.fancybox-wrap #buttons{margin-top:20px;text-align:right}
-#paypal-test-mode-confirmation button + button{margin-left:20px;margin-right:20px}
-#paypal-save-success,#paypal-save-failure{width:450px}
-#container_express_checkout{margin:auto;text-align:left}
-#payment_paypal_express_checkout{cursor:pointer}
-.paypal_error span{color:red;font-weight:bolder}
-.paypal_payment_acccepted span{color:green;font-weight:bolder}
-#paypal_configuration > .box{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
-#paypal-wrapper .left,#paypal-wrapper dl > *{float:left}
-#paypal-wrapper .right,.box ul.tick{float:right}
-.paypal-hide{display:none}
\ No newline at end of file
diff --git a/modules/paypal/express/authentication.tpl b/modules/paypal/express/authentication.tpl
deleted file mode 100755
index 0654143a..00000000
--- a/modules/paypal/express/authentication.tpl
+++ /dev/null
@@ -1,200 +0,0 @@
-{*
-* 2007-2011 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
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 6594 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-
-
-
{l s='Check your information' mod='paypal'}
-
-{assign var='current_step' value='login'}
-{include file="$tpl_dir./order-steps.tpl"}
-
-{include file="$tpl_dir./errors.tpl"}
-
-
\ No newline at end of file
diff --git a/modules/paypal/express/login.tpl b/modules/paypal/express/login.tpl
deleted file mode 100755
index 9d188a06..00000000
--- a/modules/paypal/express/login.tpl
+++ /dev/null
@@ -1,52 +0,0 @@
-{*
-* 2007-2011 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
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 6594 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-
{l s='Please log in' mod='paypal'}
-
-{assign var='current_step' value='login'}
-{include file="$tpl_dir./order-steps.tpl"}
-
-{include file="$tpl_dir./errors.tpl"}
-
-
diff --git a/modules/paypal/express/paypalexpress.php b/modules/paypal/express/paypalexpress.php
deleted file mode 100755
index 27292e32..00000000
--- a/modules/paypal/express/paypalexpress.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 7013 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-class PaypalExpress extends Paypal
-{
- protected $_logs = array();
-
- public function getAuthorisation()
- {
- global $cookie;
-
- // Getting cart informations
- $cart = new Cart((int)($cookie->id_cart));
- if (!Validate::isLoadedObject($cart))
- $this->_logs[] = $this->l('Not a valid cart');
- $currency = new Currency((int)($cart->id_currency));
- if (!Validate::isLoadedObject($currency))
- $this->_logs[] = $this->l('Not a valid currency');
-
- if (sizeof($this->_logs))
- return false;
-
- // Making request
- $returnURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/paypal/express/submit.php';
- $cancelURL = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'order.php';
- $paymentAmount = (float)$cart->getOrderTotal();
- $currencyCodeType = strval($currency->iso_code);
- $paymentType = Configuration::get('PAYPAL_CAPTURE') == 1 ? 'Authorization' : 'Sale';
- $request = '&Amt='.urlencode($paymentAmount).'&PAYMENTACTION='.urlencode($paymentType).'&ReturnUrl='.urlencode($returnURL).'&CANCELURL='.urlencode($cancelURL).'&CURRENCYCODE='.urlencode($currencyCodeType);
- if ($this->_pp_integral)
- $request .= '&SOLUTIONTYPE=Sole&LANDINGPAGE=Billing';
- else
- $request .= '&SOLUTIONTYPE=Mark&LANDINGPAGE=Login';
- $request .= '&LOCALECODE='.strtoupper($this->getCountryCode());
- if ($this->_header)
- $request .= '&HDRIMG='.urlencode($this->_header);
- // Customer informations
- $customer = new Customer((int)$cart->id_customer);
- $request .= '&EMAIL='.urlencode($customer->email);//customer
- // address of delivery
- $address = new Address((int)$cart->id_address_delivery);
- $country = new Country((int)$address->id_country);
- if ($address->id_state)
- $state = new State((int)$address->id_state);
- $request .= '&SHIPTONAME='.urlencode($address->firstname.' '.$address->lastname);
- $request .= '&SHIPTOSTREET='.urlencode($address->address1);
- $request .= '&SHIPTOSTREET2='.urlencode($address->address2);
- $request .= '&SHIPTOCITY='.urlencode($address->city);
- $request .= '&SHIPTOSTATE='.($address->id_state ? $state->iso_code : $country->iso_code);
- $request .= '&SHIPTOZIP='.urlencode($address->postcode);
- $request .= '&SHIPTOCOUNTRY='.urlencode($country->iso_code);
- $request .= '&SHIPTOPHONENUM='.urlencode($address->phone);
-
- // Calling PayPal API
- include(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
- $ppAPI = new PaypalLib();
- $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'SetExpressCheckout', $request);
- $this->_logs = array_merge($this->_logs, $ppAPI->getLogs());
- return $result;
- }
-
- public function getCustomerInfos()
- {
- global $cookie;
-
- // Making request
- $request = '&TOKEN='.urlencode(strval($cookie->paypal_token));
-
- // Calling PayPal API
- include(_PS_MODULE_DIR_.'paypal/api/paypallib.php');
- $ppAPI = new PaypalLib();
- $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetExpressCheckoutDetails', $request);
- $this->_logs = array_merge($this->_logs, $ppAPI->getLogs());
- return $result;
- }
-
- public function getLogs()
- {
- return $this->_logs;
- }
-}
diff --git a/modules/paypal/express/shopping_cart.tpl b/modules/paypal/express/shopping_cart.tpl
deleted file mode 100755
index 16904f20..00000000
--- a/modules/paypal/express/shopping_cart.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-{*
-* 2007-2011 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
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 6594 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-
\ No newline at end of file
diff --git a/modules/paypal/express/submit.php b/modules/paypal/express/submit.php
deleted file mode 100755
index a6d91719..00000000
--- a/modules/paypal/express/submit.php
+++ /dev/null
@@ -1,394 +0,0 @@
-
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 7662 $
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-include_once(dirname(__FILE__).'/../../../config/config.inc.php');
-include_once(dirname(__FILE__).'/../../../init.php');
-
-include_once(_PS_MODULE_DIR_.'paypal/paypal.php');
-include_once(_PS_MODULE_DIR_.'paypal/express/paypalexpress.php');
-
-$paypal = new Paypal();
-
-if (!$paypal->active)
- exit;
-
-$ppExpress = new PaypalExpress();
-$errors = array();
-
-// #####
-// Functions
-
-function getAuthorization()
-{
- global $ppExpress, $cookie;
-
- $result = $ppExpress->getAuthorisation();
- $logs = $ppExpress->getLogs();
- if (is_array($result) AND sizeof($result))
- {
- if (strtoupper($result['ACK']) == 'SUCCESS')
- {
- if (isset($result['TOKEN']))
- {
- $cookie->paypal_token = strval($result['TOKEN']);
- $cookie->paypal_token_date = time();
- header('Location: https://'.$ppExpress->getPayPalURL().'/webscr&cmd=_express-checkout&token='.urldecode(strval($cookie->paypal_token)));
- exit;
- }
- else
- $logs[] = ''.$ppExpress->l('No token given by PayPal', 'submit').'';
- }
- else
- $logs[] = ''.$ppExpress->l('PayPal returned error', 'submit').'';
- }
- $ppExpress->displayPayPalAPIError($ppExpress->l('Authorisation to PayPal failed', 'submit'), $logs);
-}
-
-function getInfos()
-{
- global $ppExpress, $cookie;
-
- $result = $ppExpress->getCustomerInfos();
- $logs = $ppExpress->getLogs();
-
- if (!is_array($result) OR !isset($result['ACK']) OR strtoupper($result['ACK']) != 'SUCCESS')
- {
- $logs[] = ''.$ppExpress->l('Cannot retrieve PayPal account information', 'submit').'';
- $ppExpress->displayPayPalAPIError($ppExpress->l('PayPal returned error', 'submit'), $logs);
- }
- elseif (!isset($result['TOKEN']) OR $result['TOKEN'] != $cookie->paypal_token)
- {
- $logs[] = ''.$ppExpress->l('Token given by PayPal is not the same as the cookie token', 'submit').'';
- $ppExpress->displayPayPalAPIError($ppExpress->l('PayPal returned error', 'submit'), $logs);
- }
- return $result;
-}
-
-function displayProcess($payerID)
-{
- global $cookie;
-
- $cookie->paypal_token = strval($cookie->paypal_token);
- $cookie->paypal_payer_id = $payerID;
- Tools::redirect('order.php?step=1&back=paypal');
-}
-
-function displayConfirm()
-{
- global $cookie, $smarty, $ppExpress, $cart, $payerID;
-
- if (!$cookie->isLogged(true))
- die('Not logged');
- if (!$payerID AND !$payerID = Tools::htmlentitiesUTF8(strval(Tools::getValue('payerID'))))
- die('No payer ID');
-
- // Display all and exit
- include(_PS_ROOT_DIR_.'/header.php');
-
- $smarty->assign(array(
- 'back' => 'paypal',
- 'logo' => $ppExpress->getLogo(),
- 'ppToken' => strval($cookie->paypal_token),
- 'cust_currency' => $cart->id_currency,
- 'currencies' => $ppExpress->getCurrency((int)$cart->id_currency),
- 'total' => $cart->getOrderTotal(true, Cart::BOTH),
- 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'. $ppExpress->name.'/',
- 'payerID' => $payerID,
- 'mode' => 'express/'
- ));
-
- echo $ppExpress->display('paypal.php', 'confirm.tpl');
- include(_PS_ROOT_DIR_.'/footer.php');
- die ;
-}
-
-function submitConfirm()
-{
- global $cookie, $smarty, $ppExpress, $cart;
-
- if (!$cookie->isLogged(true))
- die('Not logged');
- elseif (!$currency = (int)(Tools::getValue('currency_payement')))
- die('No currency');
- elseif (!$payerID = Tools::htmlentitiesUTF8(strval(Tools::getValue('payerID'))))
- die('No payer ID');
- elseif (!$cart->getOrderTotal(true, Cart::BOTH))
- die('Empty cart');
-
- $ppExpress->makePayPalAPIValidation($cookie, $cart, $currency, $payerID, 'express');
-}
-
-function submitAccount()
-{
- global $cookie, $errors, $smarty;
- $email = Tools::getValue('email');
- if (empty($email) OR !Validate::isEmail($email))
- $errors[] = Tools::displayError('e-mail not valid');
- elseif (!Validate::isPasswd(Tools::getValue('passwd')))
- $errors[] = Tools::displayError('invalid password');
- elseif (Customer::customerExists($email))
- $errors[] = Tools::displayError('someone has already registered with this e-mail address');
- elseif (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) AND !(Tools::getValue('months') == '' AND Tools::getValue('days') == '' AND Tools::getValue('years') == ''))
- $errors[] = Tools::displayError('invalid birthday');
- else
- {
- $customer = new Customer();
- if (Tools::isSubmit('newsletter'))
- {
- $customer->ip_registration_newsletter = pSQL(Tools::getRemoteAddr());
- $customer->newsletter_date_add = pSQL(date('Y-m-d h:i:s'));
- }
- $customer->birthday = (empty($_POST['years']) ? '' : (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']));
- /* Customer and address, same fields, caching data */
- $errors = $customer->validateControler();
- $address = new Address();
- $address->id_customer = 1;
- $errors = array_unique(array_merge($errors, $address->validateControler()));
- if (!sizeof($errors))
- {
- $customer->active = 1;
- if (!$customer->add())
- $errors[] = Tools::displayError('an error occurred while creating your account');
- else
- {
- $address->id_customer = (int)($customer->id);
- if (!$address->add())
- $errors[] = Tools::displayError('an error occurred while creating your address');
- else
- {
- if (Mail::Send((int)($cookie->id_lang), 'account', Mail::l('Welcome!'),
- array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))
- $smarty->assign('confirmation', 1);
- $cookie->id_customer = (int)($customer->id);
- $cookie->customer_lastname = $customer->lastname;
- $cookie->customer_firstname = $customer->firstname;
- $cookie->passwd = $customer->passwd;
- $cookie->logged = 1;
- $cookie->email = $customer->email;
- Module::hookExec('createAccount', array(
- '_POST' => $_POST,
- 'newCustomer' => $customer
- ));
-
- // Next !
- $payerID = strval(Tools::getValue('payerID'));
- displayProcess($payerID);
- }
- }
- }
- }
-}
-
-function submitLogin()
-{
- global $cookie, $errors;
-
- $passwd = trim(Tools::getValue('passwd'));
- $email = trim(Tools::getValue('email'));
- if (empty($email))
- $errors[] = Tools::displayError('e-mail address is required');
- elseif (empty($email) OR !Validate::isEmail($email))
- $errors[] = Tools::displayError('invalid e-mail address');
- elseif (empty($passwd))
- $errors[] = Tools::displayError('password is required');
- elseif (Tools::strlen($passwd) > 32)
- $errors[] = Tools::displayError('password is too long');
- elseif (!Validate::isPasswd($passwd))
- $errors[] = Tools::displayError('invalid password');
- else
- {
- $customer = new Customer();
- $authentication = $customer->getByemail(trim($email), trim($passwd));
- /* Handle brute force attacks */
- sleep(1);
- if (!$authentication OR !$customer->id)
- $errors[] = Tools::displayError('authentication failed');
- else
- {
- $cookie->id_customer = (int)($customer->id);
- $cookie->customer_lastname = $customer->lastname;
- $cookie->customer_firstname = $customer->firstname;
- $cookie->logged = 1;
- $cookie->passwd = $customer->passwd;
- $cookie->email = $customer->email;
- if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
- $cookie->id_cart = Cart::lastNoneOrderedCart($customer->id);
- Module::hookExec('authentication');
-
- // Next !
- $payerID = strval(Tools::getValue('payerID'));
- displayProcess($payerID);
- }
- }
-}
-
-function displayLogin()
-{
- global $cookie, $result, $email, $payerID, $errors, $ppExpress, $smarty;
-
- // Customer exists, login form
-
- // If customer already logged, check if same mail than PayPal, and go through, or unlog
- if ($cookie->isLogged(true) AND isset($result['EMAIL']) AND $cookie->email == $result['EMAIL'])
- displayProcess($payerID);
- elseif ($cookie->isLogged(true))
- $cookie->makeNewLog();
-
- // Smarty assigns
- $smarty->assign(array(
- 'email' => $email,
- 'ppToken' => strval($cookie->paypal_token),
- 'errors'=> $errors,
- 'payerID' => $payerID
- ));
-
- // Display all and exit
- include(_PS_ROOT_DIR_.'/header.php');
- echo $ppExpress->display('paypal.php', 'express/login.tpl');
- include(_PS_ROOT_DIR_.'/footer.php');
- die ;
-}
-
-function displayAccount()
-{
- global $cookie, $result, $email, $payerID, $errors, $ppExpress, $smarty;
-
- // Customer does not exists, signup form
-
- // If customer already logged, unlog him
- if ($cookie->isLogged(true))
- $cookie->makeNewLog();
-
- // Generate years, months and days
- if (isset($_POST['years']) AND is_numeric($_POST['years']))
- $selectedYears = (int)($_POST['years']);
- $years = Tools::dateYears();
- if (isset($_POST['months']) AND is_numeric($_POST['months']))
- $selectedMonths = (int)($_POST['months']);
- $months = Tools::dateMonths();
- if (isset($_POST['days']) AND is_numeric($_POST['days']))
- $selectedDays = (int)($_POST['days']);
- $days = Tools::dateDays();
-
- // Select the most appropriate country
- if (Tools::getValue('id_country'))
- $selectedCountry = (int)(Tools::getValue('id_country'));
- else if ((int)$result['COUNTRYCODE'])
- {
- $selectedCountry = Country::getByIso(strval($result['COUNTRYCODE']));
- }
- $countries = Country::getCountries((int)($cookie->id_lang), true);
-
- // Smarty assigns
- $smarty->assign(array(
- 'years' => $years,
- 'sl_year' => (isset($selectedYears) ? $selectedYears : 0),
- 'months' => $months,
- 'sl_month' => (isset($selectedMonths) ? $selectedMonths : 0),
- 'days' => $days,
- 'sl_day' => (isset($selectedDays) ? $selectedDays : 0),
- 'countries' => $countries,
- 'sl_country' => (isset($selectedCountry) ? $selectedCountry : 0),
- 'email' => $email,
- 'firstname' => (Tools::getValue('customer_firstname') ? Tools::htmlentitiesUTF8(strval(Tools::getValue('customer_firstname'))) : $result['FIRSTNAME']),
- 'lastname' => (Tools::getValue('customer_lastname') ? Tools::htmlentitiesUTF8(strval(Tools::getValue('customer_lastname'))) : $result['LASTNAME']),
- 'street' => (Tools::getValue('address1') ? Tools::htmlentitiesUTF8(strval(Tools::getValue('address1'))) : (isset($result['SHIPTOSTREET']) ? $result['SHIPTOSTREET'] : '')),
- 'city' => (Tools::getValue('city') ? Tools::htmlentitiesUTF8(strval(Tools::getValue('city'))) : (isset($result['SHIPTOCITY']) ? $result['SHIPTOCITY'] : '')),
- 'zip' => (Tools::getValue('postcode') ? Tools::htmlentitiesUTF8(strval(Tools::getValue('postcode'))) : (isset($result['SHIPTOZIP']) ? $result['SHIPTOZIP'] : '')),
- 'payerID' => $payerID,
- 'ppToken' => strval($cookie->paypal_token),
- 'errors'=> $errors
- ));
-
- // Display all and exit
- include(_PS_ROOT_DIR_.'/header.php');
- echo $ppExpress->display('paypal.php', 'express/authentication.tpl');
- include(_PS_ROOT_DIR_.'/footer.php');
- die ;
-}
-
-// #####
-// Process !!
-/*if (!$cookie->isLogged(true))
-{
- displayAccount();
- die('Not logged');
-}*/
-if (!$cart->getOrderTotal(true, Cart::BOTH))
- die('Empty cart');
-
-// No token, we need to get one by making PayPal Authorisation
-if (!isset($cookie->paypal_token) OR !$cookie->paypal_token)
- getAuthorization();
-else
-{
- // We have token, we need to confirm user informations (login or signup)
- if ((int)(Tools::getValue('confirm')))
- displayConfirm();
- elseif (Tools::isSubmit('submitAccount'))
- submitAccount();
- elseif (Tools::isSubmit('submitLogin'))
- submitLogin();
- elseif (Tools::isSubmit('submitPayment'))
- submitConfirm();
-
- // We got an error or we still not submit form
- if ((!Tools::isSubmit('submitAccount') AND !Tools::isSubmit('submitLogin')) OR sizeof($errors))
- {
- if (isset($cookie->paypal_token) AND isset($cookie->paypal_token_date) AND (time() - 10800 > $cookie->paypal_token_date))
- {
- // Token expired, unset it
- unset($cookie->paypal_token);
- Tools::redirect('modules/paypal/express/submit.php');
- }
- // We didn't submit form, getting PayPal informations
- if (!Tools::isSubmit('submitAccount') AND !Tools::isSubmit('submitLogin'))
- $result = getInfos();
-
- if (Tools::getValue('email') AND Tools::getValue('payerID'))
- {
- // Form was submitted (errors)
- $email = Tools::htmlentitiesUTF8(strval(Tools::getValue('email')));
- $payerID = Tools::htmlentitiesUTF8(strval(Tools::getValue('payerID')));
- }
- elseif (isset($result['EMAIL']) AND isset($result['PAYERID']))
- {
- // Displaying form for the first time
- $email = $result['EMAIL'];
- $payerID = $result['PAYERID'];
- }
- else
- {
- // Error in token, we need to make authorization again
- unset($cookie->paypal_token);
- Tools::redirect('modules/paypal/express/submit.php');
- }
- if (Customer::customerExists($email) OR Tools::isSubmit('submitLogin'))
- displayLogin();
- displayAccount();
- }
-}
diff --git a/modules/paypal/express_checkout/payment.php b/modules/paypal/express_checkout/payment.php
index c0665aba..81ffd548 100755
--- a/modules/paypal/express_checkout/payment.php
+++ b/modules/paypal/express_checkout/payment.php
@@ -108,8 +108,8 @@ function setCustomerAddress($ppec, $customer, $id = null)
return $address;
}
-if ($request_type && $ppec->type)
-{
+
+if ($request_type && $ppec->type) {
$id_product = (int)Tools::getValue('id_product');
$product_quantity = (int)Tools::getValue('quantity');
$id_product_attribute = Tools::getValue('id_p_attr');
@@ -146,14 +146,70 @@ if ($request_type && $ppec->type)
$login_user = $obj->getRefreshToken();
}
- /* Set details for a payment */
- $ppec->setExpressCheckout(($login_user ? $login_user->access_token : false));
+ // @ANTADIS send data biling true for return information
+ $save_billing = Tools::getValue('save_billing', false);
+
+ $id_billing_to_use = 0;
+ if (Tools::getValue('id_billing')) {
+ $id_billing = Tools::getValue('id_billing');
+ $tmp_billing = $ppec->getBilingInfo($id_billing);
+ if ($tmp_billing['id_customer'] == $ppec->context->customer->id) {
+ $id_billing_to_use = (int) $tmp_billing['id_paypal_agreement'];
+ }
+ }
- if ($ppec->hasSucceedRequest() && !empty($ppec->token))
- $ppec->redirectToAPI();
- /* Display Error and die with this method */
- else
- $ppec->displayPayPalAPIError($ppec->l('Error during the preparation of the Express Checkout payment'), $ppec->logs);
+ // @ANTADIS - if id_billing make transaction
+ if ($id_billing_to_use != 0) {
+ $ppec->DoReferenceTransaction($id_billing_to_use);
+ $amount_match = $ppec->rightPaymentProcess();
+
+ // PAIEMENT REUSSI
+ if ($ppec->hasSucceedRequest() && $amount_match) {
+ if (isset($ppec->result['PAYMENTSTATUS']))
+ $payment_status = $ppec->result['PAYMENTSTATUS'];
+ else
+ $payment_status = 'Error';
+
+ if (strcmp($payment_status, 'Completed') === 0) {
+ $payment_type = (int)Configuration::get('PS_OS_PAYMENT');
+ $message = $ppec->l('Payment accepted.').' ';
+ } elseif (strcmp($payment_status, 'Pending') === 0) {
+ $payment_type = (int)Configuration::get('PS_OS_PAYPAL');
+ $message = $ppec->l('Pending payment confirmation.').' ';
+ }
+
+ $cart = $ppec->context->cart;
+ $customer = $ppec->context->customer;
+
+ $shipping_cost_wt = $cart->getOrderShippingCost();
+ $transaction = PayPalOrder::getTransactionDetailsForDoReference($ppec, $payment_status, $shipping_cost_wt);
+ $ppec->context->cookie->id_cart = $cart->id;
+ $order_total = (float)$cart->getOrderTotal(true, Cart::BOTH);
+
+ $ppec->validateOrder((int)$cart->id, $payment_type, $order_total, $ppec->displayName, $message, $transaction,
+ (int)$cart->id_currency, false, $customer->secure_key, $ppec->context->shop, 1);
+
+ $order = new Order($ppec->currentOrder);
+ $module_tmp = new Paypal();
+ $redirect_after_payment = $ppec->context->link->getPageLink('order-confirmation.php').'?id_cart='.$cart->id.'&key='.$order->secure_key.'&id_module='.$module_tmp->id;
+ Tools::redirectLink($redirect_after_payment);
+ } else {
+ return Tools::redirectLink($ppec->context->link->getPageLink('order.php').'?step=3&cgv=1&paypal_error=1');
+ // $ppec->displayPayPalAPIError($ppec->l('Error during the preparation of the DoReferenceTransaction payment'), $ppec->logs);
+ }
+
+ } else {
+ /* Set details for a payment */
+ $ppec->setExpressCheckout(($login_user ? $login_user->access_token : false), ($save_billing ? true : false));
+
+ if ($ppec->hasSucceedRequest() && !empty($ppec->token))
+ $ppec->redirectToAPI();
+ /* Display Error and die with this method */
+ else
+ $ppec->displayPayPalAPIError($ppec->l('Error during the preparation of the Express Checkout payment'), $ppec->logs);
+ }
+
+
}
//If a token exist with payer_id, then we are back from the PayPal API
elseif (!empty($ppec->token) && ($ppec->token == $token) && ($ppec->payer_id = $payer_id))
@@ -301,9 +357,24 @@ if ($ppec->ready && !empty($ppec->token) && (Tools::isSubmit('confirmation') ||
$cart = $ppec->context->cart;
$customer = new Customer((int)$cart->id_customer);
+ // ANTADIS
+ $customer_info = array();
+ $customer_info['ID_CUSTOMER'] = $cart->id_customer;
+ $customer_info['EMAIL'] = $ppec->result['EMAIL'];
+ $customer_info['SHIPTOSTREET'] = $ppec->result['SHIPTOSTREET'];
+ $customer_info['SHIPTOCITY'] = $ppec->result['SHIPTOCITY'];
+ $customer_info['SHIPTONAME'] = $ppec->result['SHIPTONAME'];
+
// When all information are checked before, we can validate the payment to paypal
// and create the prestashop order
$ppec->doExpressCheckout();
+
+ // ANTADIS
+ // si on retourne le biling on le save
+ if (isset($ppec->result['BILLINGAGREEMENTID'])) {
+ $customer_info['BILLINGAGREEMENTID'] = $ppec->result['BILLINGAGREEMENTID'];
+ $ppec->saveBillingAgreement($customer_info);
+ }
validateOrder($customer, $cart, $ppec);
diff --git a/modules/paypal/express_checkout/process.php b/modules/paypal/express_checkout/process.php
index a0e03c50..dae3adbd 100755
--- a/modules/paypal/express_checkout/process.php
+++ b/modules/paypal/express_checkout/process.php
@@ -132,7 +132,44 @@ class PaypalExpressCheckout extends Paypal
return (bool)count($this->product_list);
}
- public function setExpressCheckout($access_token = false)
+ public function saveBillingAgreement($result) {
+ $sql = '
+ INSERT INTO `'._DB_PREFIX_.'paypal_customer_agreement` (`id_paypal_agreement`, `id_customer`, `agreement_id`, `email`, `name`, `city`, `address`, `date_add`, `date_upd`)
+ VALUES (
+ DEFAULT,
+ ' . (int) $result['ID_CUSTOMER'] . ',
+ "' . pSQL($result['BILLINGAGREEMENTID']) . '",
+ "'.(isset($result['EMAIL']) && $result['EMAIL'] ? pSQL($result['EMAIL']) : '') . '",
+ "'.(isset($result['SHIPTONAME']) && $result['SHIPTONAME'] ? pSQL($result['SHIPTONAME']) : '') . '",
+ "'.(isset($result['SHIPTOCITY']) && $result['SHIPTOCITY'] ? pSQL($result['SHIPTOCITY']) : '') . '",
+ "'.(isset($result['SHIPTOSTREET']) && $result['SHIPTOSTREET'] ? pSQL($result['SHIPTOSTREET']) : '') . '",
+ NOW(),
+ NOW()
+ )
+ ON DUPLICATE KEY UPDATE
+ `date_upd` = NOW()';
+ Db::getInstance()->execute($sql);
+ }
+
+ public function getBilingInfo($id_billing)
+ {
+ return Db::getInstance()->getRow('
+ SELECT `id_paypal_agreement`, `id_customer`, `email`, `name`, `city`, `address`
+ FROM `'._DB_PREFIX_.'paypal_customer_agreement`
+ WHERE `id_paypal_agreement` = ' . (int) $id_billing
+ );
+ }
+
+ protected function getBillingAgreementId($id_billing)
+ {
+ return Db::getInstance()->getValue('
+ SELECT `agreement_id`
+ FROM `'._DB_PREFIX_.'paypal_customer_agreement`
+ WHERE `id_paypal_agreement` = ' . (int) $id_billing
+ );
+ }
+
+ public function setExpressCheckout($access_token = false, $request_billing = false)
{
$this->method = 'SetExpressCheckout';
$this->setCancelUrl($fields);
@@ -150,6 +187,7 @@ class PaypalExpressCheckout extends Paypal
$fields['USER'] = Configuration::get('PAYPAL_API_USER');
$fields['PWD'] = Configuration::get('PAYPAL_API_PASSWORD');
$fields['SIGNATURE'] = Configuration::get('PAYPAL_API_SIGNATURE');
+
if ($access_token)
$fields['IDENTITYACCESSTOKEN'] = $access_token;
@@ -157,6 +195,7 @@ class PaypalExpressCheckout extends Paypal
$cart = Context::getContext()->cart;
$customer = Context::getContext()->customer;
+ // ANTADIS
// LOGO IMG Paypal
global $cookie;
$fields['LOGOIMG'] = 'https://static.bebeboutik.com/img/logo_'.$cookie->id_lang.'.png';
@@ -167,10 +206,50 @@ class PaypalExpressCheckout extends Paypal
$cart->secure_key = $customer->secure_key;
$cart->save();
}
+
+ // ANTADIS
+ if ($request_billing) {
+ $fields['L_BILLINGTYPE0'] = 'MerchantInitiatedBillingSingleAgreement';
+ $fields['L_BILLINGAGREEMENTDESCRIPTION0'] = 'www.bebeboutik.com';
+ }
$this->callAPI($fields);
$this->_storeToken();
}
+
+
+
+ public function DoReferenceTransaction($id_billing_to_use)
+ {
+ $this->method = 'DoReferenceTransaction';
+
+ $fields = array();
+ $this->initParameters();
+
+ $this->_setPaymentDetails($fields);
+ $fields['USER'] = Configuration::get('PAYPAL_API_USER');
+ $fields['PWD'] = Configuration::get('PAYPAL_API_PASSWORD');
+ $fields['SIGNATURE'] = Configuration::get('PAYPAL_API_SIGNATURE');
+
+ $fields['PAYMENTACTION'] = 'Sale';
+ $fields['AMT'] = $this->getTotalPaid();
+
+ $currency = new Currency((int)$this->context->cart->id_currency);
+ $fields['CURRENCYCODE'] = $currency->iso_code;
+
+ $fields['REFERENCEID'] = $this->getBillingAgreementId($id_billing_to_use);
+ $fields['IPADDRESS'] = $_SERVER['REMOTE_ADDR'];
+ // $shipping_cost_wt = $this->context->cart->getOrderShippingCost();
+ // $fields['SHIPPINGAMT'] = $shipping_cost_wt;
+ // $items_amount = $this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);
+ // $fields['ITEMAMT'] = $items_amount;
+
+ $this->callAPI($fields);
+ }
+
+ public function getCancelUrl() {
+ return $this->context->link->getPageLink('order.php', false, null, array('step' => '3'));
+ }
public function setCancelUrl(&$fields)
{
@@ -506,7 +585,7 @@ class PaypalExpressCheckout extends Paypal
else
$url = '/websc&cmd=_express-checkout';
- Tools::redirectLink('https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token));
+ Tools::redirectLink('https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token));
exit(0);
}
diff --git a/modules/paypal/fr.php b/modules/paypal/fr.php
index 9c09b3e6..e69de29b 100755
--- a/modules/paypal/fr.php
+++ b/modules/paypal/fr.php
@@ -1,207 +0,0 @@
-about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?';
-$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.';
-$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?';
-$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.';
-$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?';
-$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.';
-$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.';
-$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.';
-$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !';
-$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
-$_MODULE['<{paypal}prestashop>confirm_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
-$_MODULE['<{paypal}prestashop>confirm_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
-$_MODULE['<{paypal}prestashop>confirm_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande';
-$_MODULE['<{paypal}prestashop>confirm_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement PayPal';
-$_MODULE['<{paypal}prestashop>confirm_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer avec PayPal.';
-$_MODULE['<{paypal}prestashop>confirm_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un court résumé de votre commande :';
-$_MODULE['<{paypal}prestashop>confirm_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à';
-$_MODULE['<{paypal}prestashop>confirm_1f87346a16cf80c372065de3c54c86d9'] = '(TTC)';
-$_MODULE['<{paypal}prestashop>confirm_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons la devise suivante pour votre paiement :';
-$_MODULE['<{paypal}prestashop>confirm_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur \"Je confirme ma commande\"';
-$_MODULE['<{paypal}prestashop>confirm_988fd738de9c6d177440c5dcf69e73ce'] = 'Retour';
-$_MODULE['<{paypal}prestashop>confirm_22551b0fea4863f62ee37c847ce032a2'] = 'Session expirée, veuillez cliquer sur \"Retour\" et recommencez';
-$_MODULE['<{paypal}prestashop>confirm_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement';
-$_MODULE['<{paypal}prestashop>confirm_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande';
-$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur';
-$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.';
-$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.';
-$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.';
-$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre';
-$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client';
-$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
-$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
-$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Merci de vous reférer aux logs :';
-$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent';
-$_MODULE['<{paypal}prestashop>paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
-$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Accepter les paiements par cartes de paiement (CB, Visa, MasterCard, American Express, Aurore, Cofinoga, 4 étoiles) avec Paypal';
-$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Etes vous sûr de vouloir supprimer vos informations ?';
-$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.';
-$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.';
-$_MODULE['<{paypal}prestashop>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.';
-$_MODULE['<{paypal}prestashop>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".';
-$_MODULE['<{paypal}prestashop>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.';
-$_MODULE['<{paypal}prestashop>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v';
-$_MODULE['<{paypal}prestashop>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Résultat du remboursement de produit:';
-$_MODULE['<{paypal}prestashop>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.';
-$_MODULE['<{paypal}prestashop>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides';
-$_MODULE['<{paypal}prestashop>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide';
-$_MODULE['<{paypal}prestashop>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Message de paiement n\'est pas valide, merci de vérifier votre module !';
-$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide';
-$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Résultat de l\'opération de remboursement:';
-$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement fini avec PayPal !';
-$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur lors de la transaction !';
-$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat opération de récupération des fonds:';
-$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande achevée avec PayPal !';
-$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :';
-$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse e-mail PayPal par défaut, vous devez la remplacer par votre propre adresse';
-$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers';
-$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :';
-$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :';
-$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen';
-$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :';
-$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen';
-$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :';
-$_MODULE['<{paypal}prestashop>paypalconnect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers';
-$_MODULE['<{paypal}prestashop>paypalconnect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypalconnect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypalconnect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :';
-$_MODULE['<{paypal}prestashop>paypalconnect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :';
-$_MODULE['<{paypal}prestashop>paypalconnect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL';
-$_MODULE['<{paypal}prestashop>paypalconnect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen';
-$_MODULE['<{paypal}prestashop>paypalconnect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connection réussie avec la méthode fsockopen';
-$_MODULE['<{paypal}prestashop>paypalconnect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :';
-$_MODULE['<{paypal}prestashop>paypalconnect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen';
-$_MODULE['<{paypal}prestashop>paypallib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :';
-$_MODULE['<{paypal}prestashop>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.';
-$_MODULE['<{paypal}prestashop>authentication_cd42c6dd6cc4cd65cb5e13b729050469'] = 'Vérifiez vos informations';
-$_MODULE['<{paypal}prestashop>authentication_6335a00a08fde0fbb8f6d6630cdadd92'] = 'Vos informations personnelles';
-$_MODULE['<{paypal}prestashop>authentication_b78a3223503896721cca1303f776159b'] = 'Civilité';
-$_MODULE['<{paypal}prestashop>authentication_127469a6b4253ebb77adccc0dd48461e'] = 'M.';
-$_MODULE['<{paypal}prestashop>authentication_29e32764941c30d1bb41c601014fbdbd'] = 'Mme';
-$_MODULE['<{paypal}prestashop>authentication_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom';
-$_MODULE['<{paypal}prestashop>authentication_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom';
-$_MODULE['<{paypal}prestashop>authentication_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail';
-$_MODULE['<{paypal}prestashop>authentication_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
-$_MODULE['<{paypal}prestashop>authentication_bf2957630c4209f61a388a08c2154915'] = '(5 caractères min.)';
-$_MODULE['<{paypal}prestashop>authentication_aac772216aecbeca0e86d06671fe985a'] = 'Date de naissance';
-$_MODULE['<{paypal}prestashop>authentication_86f5978d9b80124f509bdb71786e929e'] = 'Janvier';
-$_MODULE['<{paypal}prestashop>authentication_659e59f062c75f81259d22786d6c44aa'] = 'Février';
-$_MODULE['<{paypal}prestashop>authentication_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars';
-$_MODULE['<{paypal}prestashop>authentication_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril';
-$_MODULE['<{paypal}prestashop>authentication_195fbb57ffe7449796d23466085ce6d8'] = 'Mai';
-$_MODULE['<{paypal}prestashop>authentication_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin';
-$_MODULE['<{paypal}prestashop>authentication_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet';
-$_MODULE['<{paypal}prestashop>authentication_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août';
-$_MODULE['<{paypal}prestashop>authentication_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre';
-$_MODULE['<{paypal}prestashop>authentication_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre';
-$_MODULE['<{paypal}prestashop>authentication_7e823b37564da492ca1629b4732289a8'] = 'Novembre';
-$_MODULE['<{paypal}prestashop>authentication_82331503174acbae012b2004f6431fa5'] = 'Décembre';
-$_MODULE['<{paypal}prestashop>authentication_6f6162d3a052bb330e9c60285c74c6c9'] = 'S\'inscrire à la newsletter';
-$_MODULE['<{paypal}prestashop>authentication_ac135c86084a47630c9eadb4edd5ef75'] = 'Recevez les offres spéciales de nos partenaires';
-$_MODULE['<{paypal}prestashop>authentication_455175f3f5be6306247babb349c0515a'] = 'Votre adresse';
-$_MODULE['<{paypal}prestashop>authentication_1c76cbfe21c6f44c1d1e59d54f3e4420'] = 'Société';
-$_MODULE['<{paypal}prestashop>authentication_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
-$_MODULE['<{paypal}prestashop>authentication_783cb853aae6984e51583b3bb80c09d2'] = 'Adresse (2)';
-$_MODULE['<{paypal}prestashop>authentication_9b514b51d03075005814a33edc74c958'] = 'Code postal';
-$_MODULE['<{paypal}prestashop>authentication_57d056ed0984166336b7879c2af3657f'] = 'Ville';
-$_MODULE['<{paypal}prestashop>authentication_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
-$_MODULE['<{paypal}prestashop>authentication_46a2a41cc6e552044816a2d04634545d'] = 'Etat';
-$_MODULE['<{paypal}prestashop>authentication_0f68b904e33d9ac04605aecc958bcf52'] = 'Informations complémentaires';
-$_MODULE['<{paypal}prestashop>authentication_fe66abce284ec8589e7d791185b5c442'] = 'Téléphone domicile';
-$_MODULE['<{paypal}prestashop>authentication_41c2fff4867cc204120f001e7af20f7a'] = 'Téléphone portable';
-$_MODULE['<{paypal}prestashop>authentication_6c1c4d5a22e3d6ed8385e7287233396f'] = 'Donnez un titre à cette adresse pour la retrouver plus facilement';
-$_MODULE['<{paypal}prestashop>authentication_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mon adresse';
-$_MODULE['<{paypal}prestashop>authentication_a0bfb8e59e6c13fc8d990781f77694fe'] = 'Continuer';
-$_MODULE['<{paypal}prestashop>authentication_19f823c6453c2b1ffd09cb715214813d'] = 'Champs requis';
-$_MODULE['<{paypal}prestashop>login_b40ad46c25c153a3d2fde078c0e1b0f8'] = 'Merci de vous identifier';
-$_MODULE['<{paypal}prestashop>login_abc57016a138dea055e0d8be6358f84e'] = 'Email déjà enregistrée, merci de vous identifier !';
-$_MODULE['<{paypal}prestashop>login_8b5dd64ab8d0b8158906796b53a200e2'] = 'Adresse e-mail';
-$_MODULE['<{paypal}prestashop>login_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
-$_MODULE['<{paypal}prestashop>login_bffe9a3c9a7e00ba00a11749e022d911'] = 'S\'identifier';
-$_MODULE['<{paypal}prestashop>login_01a569ddc6cf67ddec2a683f0a5f5956'] = 'Mot de passe oublié ?';
-$_MODULE['<{paypal}prestashop>paypalexpress_b601224a2a6c61f38738ca903fb019a2'] = 'Panier incorrect';
-$_MODULE['<{paypal}prestashop>paypalexpress_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise incorrecte';
-$_MODULE['<{paypal}prestashop>shopping_cart_aa91004934e1abdb620b5d0f0c18681c'] = 'Payer avec PayPal Express Checkout';
-$_MODULE['<{paypal}prestashop>submit_528d1f824243db48e40cb6223d32fa06'] = 'Aucun token donné par PayPal';
-$_MODULE['<{paypal}prestashop>submit_795277047da13b4fc74e02e050b1a675'] = 'PayPal a retourné une erreur';
-$_MODULE['<{paypal}prestashop>submit_b4133f1ba03a914134a5281a08231078'] = 'L\'autorisation à PayPal a échoué';
-$_MODULE['<{paypal}prestashop>submit_4935b58d37fda5bd60acc510cb324342'] = 'Impossible de trouver les informations du compte PayPal';
-$_MODULE['<{paypal}prestashop>submit_90aa7ebf75251f535a9bdd6ba671ae7a'] = 'Le token fournit par PayPal n\'est pas le même que celui du cookie';
-$_MODULE['<{paypal}prestashop>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible';
-$_MODULE['<{paypal}prestashop>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :';
-$_MODULE['<{paypal}prestashop>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout';
-$_MODULE['<{paypal}prestashop>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur';
-$_MODULE['<{paypal}prestashop>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse';
-$_MODULE['<{paypal}prestashop>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier';
-$_MODULE['<{paypal}prestashop>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.';
-$_MODULE['<{paypal}prestashop>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.';
-$_MODULE['<{paypal}prestashop>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.';
-$_MODULE['<{paypal}prestashop>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande';
-$_MODULE['<{paypal}prestashop>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.';
-$_MODULE['<{paypal}prestashop>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.';
-$_MODULE['<{paypal}prestashop>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.';
-$_MODULE['<{paypal}prestashop>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.';
-$_MODULE['<{paypal}prestashop>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.';
-$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.';
-$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.';
-$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
-$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
-$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Payez avec votre compte PayPal, carte de crédit (CB, Visa, Mastercard ...)';
-$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Payez avec votre compte PayPal';
-$_MODULE['<{paypal}prestashop>paypalpayment_ee9dc1e678d54c517f481583c3fb2db8'] = 'La devise est incorrecte';
-$_MODULE['<{paypal}prestashop>back_office_ae3cebe661e92cdfd12516419fef4f2d'] = 'Télécharger le';
-$_MODULE['<{paypal}prestashop>back_office_e73756d0d2306110f29ccf28cb69c412'] = 'Guide d\'intégration de PayPal';
-$_MODULE['<{paypal}prestashop>back_office_6506302a6e11077ecbc04b5932a65c4c'] = 'sur PrestaShop et suivez les étapes pas à pas';
-$_MODULE['<{paypal}prestashop>back_office_748eadce9cf4f2bde207b63c5441da07'] = 'Utilisez la Fonction PayPal Login';
-$_MODULE['<{paypal}prestashop>back_office_cded4ac9f77c68c750c243af1f5263c5'] = ' (*voir le ';
-$_MODULE['<{paypal}prestashop>back_office_606d8f704cf61d29bffd5195f28af29e'] = 'Guide d\'Intégration';
-$_MODULE['<{paypal}prestashop>back_office_a1694ad810c4ac5b56b59c47db01cb05'] = 'et suivre les étapes de mise en place';
-$_MODULE['<{paypal}prestashop>back_office_3650f874df7e9c6e822a872d02cee6d5'] = 'Cette fonction permet à vos clients de se connecter avec leurs identifiants PayPal pour raccourcir le tunnel d\'achat';
-$_MODULE['<{paypal}prestashop>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
-$_MODULE['<{paypal}prestashop>back_office_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
-$_MODULE['<{paypal}prestashop>back_office_9be4e88898c4e88363208d2472f4a406'] = 'Renseignez les informations liées à votre compte PayPal';
-$_MODULE['<{paypal}prestashop>back_office_4ff2e716a7d06ce5274b4090b39abad3'] = 'Voir';
-$_MODULE['<{paypal}prestashop>back_office_8646a5d7b2817d30950357da8d80a11f'] = 'le Guide d\'Intégration';
-$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !';
-$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal';
-$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
-$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition';
-$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds';
-$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal';
-$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
-$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté';
-$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"';
-$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?';
-$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction';
-$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal';
-$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :';
-$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition';
-$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition';
-$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement';
-$_MODULE['<{paypal}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:';
-$_MODULE['<{paypal}prestashop>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :';
-$_MODULE['<{paypal}prestashop>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction :';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est :';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction paypal est :';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_300225ee958b6350abc51805dab83c24'] = 'Continuer le shopping';
-$_MODULE['<{paypal}prestashop>order-confirmation-mobile_9390390581f54c65d6acfc8da4e17362'] = 'Revenir aux commandes.';
-$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande';
-$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande';
-$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes';
-$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
-$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
-$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande';
-$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal';
-$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)';
-$_MODULE['<{paypal}prestashop>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal';
-$_MODULE['<{paypal}prestashop>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal';
-$_MODULE['<{paypal}prestashop>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.';
diff --git a/modules/paypal/paypal.php b/modules/paypal/paypal.php
index f398e7b2..bb9ae1f9 100755
--- a/modules/paypal/paypal.php
+++ b/modules/paypal/paypal.php
@@ -543,6 +543,7 @@ class PayPal extends PaymentModule
{
$cart = $this->context->cart;
+ $this->context->smarty->assign('accounts', $this->getBillingAgreement($cart->id_customer));
$this->getTranslations();
$this->context->smarty->assign(array(
'custom' => Tools::jsonEncode(array('id_cart' => $cart->id, 'hash' => sha1(serialize($cart->nbProducts())))),
@@ -582,8 +583,6 @@ class PayPal extends PaymentModule
{
if (!$this->active)
return null;
-
- return $this->fetchTemplate('confirmation.tpl');
}
public function hookRightColumn()
@@ -1360,7 +1359,30 @@ class PayPal extends PaymentModule
}
}
- public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $transaction = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null)
+
+ public function getBillingAgreement($id_customer)
+ {
+ return Db::getInstance()->executeS('
+ SELECT `id_paypal_agreement`, `email`, `name`, `city`, `address`
+ FROM `'._DB_PREFIX_.'paypal_customer_agreement`
+ WHERE `id_customer` = ' . (int) $id_customer
+ );
+ }
+
+ public function getCustomerInfos()
+ {
+ global $cookie;
+
+ // Making request
+ $request = '&TOKEN='.urlencode(strval($cookie->paypal_token));
+
+ $ppAPI = new PaypalLib();
+ $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetExpressCheckoutDetails', $request);
+ $this->_logs = array_merge($this->_logs, $ppAPI->getLogs());
+ return $result;
+ }
+
+ public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $transaction = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null, $is_billing = 0)
{
if ($this->active)
{
@@ -1374,12 +1396,13 @@ class PayPal extends PaymentModule
parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amount_paid, $payment_method, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key, $shop);
if (count($transaction) > 0)
- PayPalOrder::saveOrder((int)$this->currentOrder, $transaction);
+ PayPalOrder::saveOrder((int)$this->currentOrder, $transaction, $is_billing);
$this->setPayPalAsConfigured();
}
}
+
protected function getGiftWrappingPrice()
{
if (version_compare(_PS_VERSION_, '1.5.3.0', '>='))
diff --git a/modules/paypal/paypal_orders.php b/modules/paypal/paypal_orders.php
index d5727fc9..e7b21aba 100755
--- a/modules/paypal/paypal_orders.php
+++ b/modules/paypal/paypal_orders.php
@@ -87,6 +87,40 @@ class PayPalOrder
);
}
}
+
+ // @ANTADIS
+ public static function getTransactionDetailsForDoReference($ppec = false, $payment_status = false, $total_shipping =0)
+ {
+ if ($ppec && $payment_status)
+ {
+ $transaction_id = pSQL($ppec->result['TRANSACTIONID']);
+ return array(
+ 'currency' => pSQL($ppec->result['CURRENCYCODE']),
+ 'id_invoice' => null,
+ 'id_transaction' => $transaction_id,
+ 'transaction_id' => $transaction_id,
+ 'total_paid' => (float)$ppec->result['AMT'],
+ 'shipping' => (float) $total_shipping,
+ // 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'],
+ 'payment_date' => pSQL($ppec->result['ORDERTIME']),
+ 'payment_status' => pSQL($payment_status)
+ );
+ }
+ else
+ {
+ $transaction_id = pSQL(Tools::getValue(ID_TRANSACTION));
+ return array(
+ 'currency' => pSQL(Tools::getValue(CURRENCY)),
+ 'id_invoice' => pSQL(Tools::getValue(ID_INVOICE)),
+ 'id_transaction' => $transaction_id,
+ 'transaction_id' => $transaction_id,
+ 'total_paid' => (float)Tools::getValue(TOTAL_PAID),
+ 'shipping' => (float)Tools::getValue(SHIPPING),
+ 'payment_date' => pSQL(Tools::getValue(PAYMENT_DATE)),
+ 'payment_status' => pSQL($payment_status)
+ );
+ }
+ }
public static function getOrderById($id_order)
{
@@ -109,17 +143,17 @@ class PayPalOrder
return 0;
}
- public static function saveOrder($id_order, $transaction)
+ public static function saveOrder($id_order, $transaction, $is_billing = 0)
{
$order = new Order((int)$id_order);
$total_paid = (float)$transaction['total_paid'];
-
+
if (!isset($transaction['payment_status']) || !$transaction['payment_status'])
$transaction['payment_status'] = 'NULL';
Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'paypal_order`
- (`id_order`, `id_transaction`, `id_invoice`, `currency`, `total_paid`, `shipping`, `capture`, `payment_date`, `payment_method`, `payment_status`)
+ (`id_order`, `id_transaction`, `id_invoice`, `currency`, `total_paid`, `shipping`, `capture`, `payment_date`, `payment_method`, `payment_status`, `is_billing`)
VALUES ('.(int)$id_order.', \''.pSQL($transaction['id_transaction']).'\', \''.pSQL($transaction['id_invoice']).'\',
\''.pSQL($transaction['currency']).'\',
\''.$total_paid.'\',
@@ -127,7 +161,9 @@ class PayPalOrder
\''.(int)Configuration::get('PAYPAL_CAPTURE').'\',
\''.pSQL($transaction['payment_date']).'\',
\''.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').'\',
- \''.pSQL($transaction['payment_status']).'\')'
+ \''.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').'\',
+ \''.pSQL($transaction['payment_status']).'\',
+ \''.(int) $is_billing.'\')'
);
}
diff --git a/modules/paypal/standard/index.php b/modules/paypal/standard/index.php
deleted file mode 100755
index b559f985..00000000
--- a/modules/paypal/standard/index.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-* @copyright 2007-2011 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;
\ No newline at end of file
diff --git a/modules/paypal/views/templates/front/__________confirm. b/modules/paypal/views/templates/front/__________confirm.
new file mode 100644
index 00000000..a8e11167
--- /dev/null
+++ b/modules/paypal/views/templates/front/__________confirm.
@@ -0,0 +1,86 @@
+{*
+* 2007-2011 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
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6653 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+{capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture}
+{include file="$tpl_dir./breadcrumb.tpl"}
+
+
+{assign var='current_step' value='payment'}
+{include file="$tpl_dir./order-steps.tpl"}
+
+
{l s='Order summary' mod='paypal'}
+
+
+
{l s='PayPal payment' mod='paypal'}
+
+
+
+
+
+
+ {l s='You have chosen to pay with PayPal.' mod='paypal'}
+
+ {l s='Here is a short summary of your order:' mod='paypal'}
+
+
+ - {l s='The total amount of your order is' mod='paypal'}
+ {convertPriceWithCurrency price=$total currency=$currency} {if $use_taxes == 1}{l s='(tax incl.)' mod='paypal'}{/if}
+
+ - {l s='We accept the following currency to be sent by PayPal:' mod='paypal'} {$currency->name}
+
+
+
+
+
+
+
+
+
diff --git a/modules/paypal/views/templates/hook/_express_checkout_payment.tpl b/modules/paypal/views/templates/hook/_express_checkout_payment.tpl
new file mode 100644
index 00000000..2134e893
--- /dev/null
+++ b/modules/paypal/views/templates/hook/_express_checkout_payment.tpl
@@ -0,0 +1,84 @@
+{*
+* 2007-2014 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
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
{l s='You have registered accounts, you can use them to pay' mod='paypal'}
+ {foreach from=$accounts item=account}
+
+
+
+
+
+
+
+ {/foreach}
+
+ {/if}
+
+
diff --git a/modules/paypal/views/templates/hook/express_checkout_payment.tpl b/modules/paypal/views/templates/hook/express_checkout_payment.tpl
deleted file mode 100755
index 3a6b10ef..00000000
--- a/modules/paypal/views/templates/hook/express_checkout_payment.tpl
+++ /dev/null
@@ -1,80 +0,0 @@
-{*
-* 2007-2014 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
-* @copyright 2007-2014 PrestaShop SA
-* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*}
-
-{if $smarty.const._PS_VERSION_ >= 1.6}
-
-
diff --git a/themes/site/modules/paypal/express_checkout_payment.tpl b/themes/site/modules/paypal/express_checkout_payment.tpl
new file mode 100644
index 00000000..04f2181e
--- /dev/null
+++ b/themes/site/modules/paypal/express_checkout_payment.tpl
@@ -0,0 +1,105 @@
+{*
+* 2007-2014 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
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
{l s='You have registered accounts, you can use them to pay' mod='paypal'}
+ {foreach from=$accounts item=account}
+
+
+
+
+
+
+
+ {/foreach}
+
+ {/if}
+
+
+
+
+{literal}
+
+{/literal}
\ No newline at end of file
diff --git a/themes/site/modules/paypal/fr.php b/themes/site/modules/paypal/fr.php
index 5abff384..c824ceb5 100755
--- a/themes/site/modules/paypal/fr.php
+++ b/themes/site/modules/paypal/fr.php
@@ -40,3 +40,5 @@ $_MODULE['<{paypal}site>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec
$_MODULE['<{paypal}site>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Payez avec votre compte PayPal, carte de crédit (CB, Visa, Mastercard ...)';
$_MODULE['<{paypal}site>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Payez avec votre compte PayPal';
$_MODULE['<{paypal}site>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec votre compte PayPal';
+$_MODULE['<{paypal}site>express_checkout_payment_9166266e8de0b0f8ac4e87c8f35c8bfa'] = 'Sauvegarder mon compte pour un futur achat';
+$_MODULE['<{paypal}site>express_checkout_payment_e19e2f09002009081b41655e7c143bd5'] = 'Vous avez des comptes enregistrés, vous pouvez les utiliser pour payer';
diff --git a/themes/site/modules/paypal/payment/payment.tpl b/themes/site/modules/paypal/payment/payment.tpl
index 1e09678c..f9030228 100755
--- a/themes/site/modules/paypal/payment/payment.tpl
+++ b/themes/site/modules/paypal/payment/payment.tpl
@@ -1,5 +1,5 @@
{*
-* 2007-2011 PrestaShop
+* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -24,13 +24,39 @@
* International Registered Trademark & Property of PrestaShop SA
*}
-
+
+ {if $integral}
+ {l s='Pay with your PayPal account, credit card (CB, Visa, Mastercard...), or private credit card' mod='paypal'}
+ {else}
+ {l s='Pay with your PayPal account' mod='paypal'}
+ {/if}
+
+
+
+
+
+ {if $accounts}
+
+
Vous avez des comptes enregistrés vous pouvez les utiliser pour payer :
+ {foreach from=$accounts item=account}
+
+
+
+
+
+
+
+
+ {/foreach}
+
+ {/if}
+
\ No newline at end of file
diff --git a/themes/site/modules/paypal/templates/hook/express_checkout_payment.tpl b/themes/site/modules/paypal/templates/hook/express_checkout_payment.tpl
new file mode 100644
index 00000000..20816c9a
--- /dev/null
+++ b/themes/site/modules/paypal/templates/hook/express_checkout_payment.tpl
@@ -0,0 +1,83 @@
+{*
+* 2007-2014 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
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
{l s='Vous avez des comptes enregistrés, vous pouvez les utiliser pour payer' mod='paypal'}
+ {foreach from=$accounts item=account}
+
+
+
+
+
+
+
+ {/foreach}
+
+ {/if}
+
+
diff --git a/themes/site/order-payment.tpl b/themes/site/order-payment.tpl
index 9379106b..f72e4aca 100755
--- a/themes/site/order-payment.tpl
+++ b/themes/site/order-payment.tpl
@@ -70,8 +70,43 @@
Si tienes cualquier duda o problema, puedes contactar con el Servicio de atención al cliente (http://www.bebeboutik.es/contactenos) y escribirnos un mensaje o bien llamar al 902 044 399 y uno de nuestros agentes te atenderá.
{/if}
-