From 552b46347e47a30999f7c54f77b30d3b30b473fa Mon Sep 17 00:00:00 2001 From: Thibault UBUNTU Date: Wed, 6 Apr 2016 15:52:14 +0200 Subject: [PATCH] v0.1 paypal billing --- modules/blocklink01/fr.php | 28 -- modules/paybox/hookpayment.tpl | 33 +- .../{express => ____standard}/index.php | 0 .../{standard => ____standard}/paypal.tpl | 0 .../{standard => ____standard}/redirect.php | 0 .../{standard => ____standard}/redirect.tpl | 0 .../paypal/{payment => ___payment}/index.php | 0 .../{payment => ___payment}/payment.tpl | 16 +- .../{payment => ___payment}/paypalpayment.php | 33 +- .../paypal/{payment => ___payment}/submit.php | 90 +++- modules/paypal/__fr.php | 207 +++++++++ modules/paypal/about.tpl | 42 -- modules/paypal/api/paypal_lib.php | 1 + modules/paypal/api/paypalconnect.php | 93 ----- modules/paypal/api/paypallib.php | 63 --- modules/paypal/confirm.tpl | 66 --- modules/paypal/css/index.php | 35 -- modules/paypal/css/paypal.css | 52 --- modules/paypal/express/authentication.tpl | 200 --------- modules/paypal/express/login.tpl | 52 --- modules/paypal/express/paypalexpress.php | 105 ----- modules/paypal/express/shopping_cart.tpl | 27 -- modules/paypal/express/submit.php | 394 ------------------ modules/paypal/express_checkout/payment.php | 89 +++- modules/paypal/express_checkout/process.php | 83 +++- modules/paypal/fr.php | 207 --------- modules/paypal/paypal.php | 31 +- modules/paypal/paypal_orders.php | 44 +- modules/paypal/standard/index.php | 36 -- .../views/templates/front/__________confirm. | 86 ++++ .../hook/_express_checkout_payment.tpl | 84 ++++ .../hook/express_checkout_payment.tpl | 80 ---- override/classes/FrontController.php | 3 +- themes/site/css/style.css | 89 +++- themes/site/modules/paypal/confirm.tpl | 48 ++- .../paypal/express_checkout_payment.tpl | 105 +++++ themes/site/modules/paypal/fr.php | 2 + .../site/modules/paypal/payment/payment.tpl | 48 ++- .../hook/express_checkout_payment.tpl | 83 ++++ themes/site/order-payment.tpl | 37 +- themes/site_mobile/css/style.css | 2 - 41 files changed, 1107 insertions(+), 1587 deletions(-) rename modules/paypal/{express => ____standard}/index.php (100%) mode change 100755 => 100644 rename modules/paypal/{standard => ____standard}/paypal.tpl (100%) mode change 100755 => 100644 rename modules/paypal/{standard => ____standard}/redirect.php (100%) mode change 100755 => 100644 rename modules/paypal/{standard => ____standard}/redirect.tpl (100%) mode change 100755 => 100644 rename modules/paypal/{payment => ___payment}/index.php (100%) mode change 100755 => 100644 rename modules/paypal/{payment => ___payment}/payment.tpl (76%) mode change 100755 => 100644 rename modules/paypal/{payment => ___payment}/paypalpayment.php (82%) mode change 100755 => 100644 rename modules/paypal/{payment => ___payment}/submit.php (67%) mode change 100755 => 100644 create mode 100644 modules/paypal/__fr.php delete mode 100755 modules/paypal/about.tpl delete mode 100755 modules/paypal/api/paypalconnect.php delete mode 100755 modules/paypal/api/paypallib.php delete mode 100755 modules/paypal/confirm.tpl delete mode 100755 modules/paypal/css/index.php delete mode 100755 modules/paypal/css/paypal.css delete mode 100755 modules/paypal/express/authentication.tpl delete mode 100755 modules/paypal/express/login.tpl delete mode 100755 modules/paypal/express/paypalexpress.php delete mode 100755 modules/paypal/express/shopping_cart.tpl delete mode 100755 modules/paypal/express/submit.php delete mode 100755 modules/paypal/standard/index.php create mode 100644 modules/paypal/views/templates/front/__________confirm. create mode 100644 modules/paypal/views/templates/hook/_express_checkout_payment.tpl delete mode 100755 modules/paypal/views/templates/hook/express_checkout_payment.tpl create mode 100644 themes/site/modules/paypal/express_checkout_payment.tpl create mode 100644 themes/site/modules/paypal/templates/hook/express_checkout_payment.tpl diff --git a/modules/blocklink01/fr.php b/modules/blocklink01/fr.php index 8a114fcc..54060af1 100755 --- a/modules/blocklink01/fr.php +++ b/modules/blocklink01/fr.php @@ -11,31 +11,3 @@ $_MODULE['<{blocklink01}prestashop>blocklink01_3da9d5745155a430aac6d7de3b6de0c8' $_MODULE['<{blocklink01}prestashop>blocklink01_898536ebd630aa3a9844e9cd9d1ebb9b'] = 'Une erreur est survenue lors de la création du lien'; $_MODULE['<{blocklink01}prestashop>blocklink01_ce9beec1b47458523d46274adfd2acee'] = 'Une erreur est survenue lors de la mise à jour du lien'; $_MODULE['<{blocklink01}prestashop>blocklink01_7a7e3a8d8aefcb1d31b4fdfa1bdf9ee4'] = 'Le lien a été mis à jour avec succès'; -$_MODULE['<{blocklink01}prestashop>blocklink01_b18032737875f7947443c98824103a1f'] = 'Le champ \"titre\" ne peut être laissé vide.'; -$_MODULE['<{blocklink01}prestashop>blocklink01_43b38b9a2fe65059bed320bd284047e3'] = 'Le titre est invalide'; -$_MODULE['<{blocklink01}prestashop>blocklink01_eb74914f2759760be5c0a48f699f8541'] = 'Une erreur est survenue lors de la mise à jour du titre'; -$_MODULE['<{blocklink01}prestashop>blocklink01_5c0f7e2db8843204f422a369f2030b37'] = 'Le titre du bloc a été mis à jour avec succès'; -$_MODULE['<{blocklink01}prestashop>blocklink01_5d73d4c0bcb035a1405e066eb0cdf832'] = 'Une erreur est survenue lors de la suppression du lien'; -$_MODULE['<{blocklink01}prestashop>blocklink01_9bbcafcc85be214aaff76dffb8b72ce9'] = 'Le lien a été supprimé avec succès'; -$_MODULE['<{blocklink01}prestashop>blocklink01_7e5748d8c44f33c9cde08ac2805e5621'] = 'Ordre de tri mis à jour avec succès'; -$_MODULE['<{blocklink01}prestashop>blocklink01_46cff2568b00bc09d66844849d0b1309'] = 'Une erreur est survenue lors du changement de l\'ordre de tri'; -$_MODULE['<{blocklink01}prestashop>blocklink01_58e9b25bb2e2699986a3abe2c92fc82e'] = 'Ajouter un nouveau lien'; -$_MODULE['<{blocklink01}prestashop>blocklink01_ed2fc2838f7edb7607dd1cd19f3a82e0'] = 'Texte :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_1f3674ab0d54a38327e8e4a0d97788d4'] = 'Ouvrir nouvelle fenêtre :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_7f3ee1818e42cfd668e361d89b8595fb'] = 'Ajouter ce lien'; -$_MODULE['<{blocklink01}prestashop>blocklink01_27a5ff9957ea16466ef085b53381e26a'] = 'Editer ce lien'; -$_MODULE['<{blocklink01}prestashop>blocklink01_b22c8f9ad7db023c548c3b8e846cb169'] = 'Titre du bloc'; -$_MODULE['<{blocklink01}prestashop>blocklink01_2c906769e7f8b03cc1fedce4e24a20c2'] = 'Titre du bloc :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_67c94c1cba852f2d13eed115c938baf6'] = 'URL du bloc :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; -$_MODULE['<{blocklink01}prestashop>blocklink01_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration'; -$_MODULE['<{blocklink01}prestashop>blocklink01_53db43446b84dd2e9ddac626fc02ead3'] = 'Trier la liste :'; -$_MODULE['<{blocklink01}prestashop>blocklink01_d36e9f57ea37903f81d28f7a189b9649'] = 'par liens les plus récents'; -$_MODULE['<{blocklink01}prestashop>blocklink01_6ccdff04699ffe6956a6b1465907414a'] = 'les premiers liens entrés'; -$_MODULE['<{blocklink01}prestashop>blocklink01_387a8014f530f080bf2f3be723f8c164'] = 'Liste de liens'; -$_MODULE['<{blocklink01}prestashop>blocklink01_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; -$_MODULE['<{blocklink01}prestashop>blocklink01_9dffbf69ffba8bc38bc4e01abf4b1675'] = 'Texte'; -$_MODULE['<{blocklink01}prestashop>blocklink01_e6b391a8d2c4d45902a23a8b6585703d'] = 'URL'; -$_MODULE['<{blocklink01}prestashop>blocklink01_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; -$_MODULE['<{blocklink01}prestashop>blocklink01_cad0a4e92b29bcb1ff1fc4f8524cfdc2'] = 'Il n\'y a pas encore de liens'; diff --git a/modules/paybox/hookpayment.tpl b/modules/paybox/hookpayment.tpl index ff326a53..8599ebd1 100755 --- a/modules/paybox/hookpayment.tpl +++ b/modules/paybox/hookpayment.tpl @@ -1,12 +1,21 @@ -

- - {$pbx_text} - {l s='Pay with Paybox' mod='paybox'} - -

-
- - - {if isset($PBX_PAYBOX)}{/if} - {if isset($PBX_BACKUP1)}{/if} -
+
+
+
+ + +
+
+ {l s='Pay with Paybox' mod='paybox'} +
+
+ {$pbx_text} +
+
+
\ 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 @@

- {l s='Pay with PayPal' mod='paypal'} -
- {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 $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} + + {l s='Pay with PayPal' mod='paypal'}>

\ 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'}
  • -
-

-

{l s='Start using PayPal today!' mod='paypal'}

-
\ No newline at end of file diff --git a/modules/paypal/api/paypal_lib.php b/modules/paypal/api/paypal_lib.php index a25cf1f2..888204d4 100755 --- a/modules/paypal/api/paypal_lib.php +++ b/modules/paypal/api/paypal_lib.php @@ -57,6 +57,7 @@ class PaypalLib 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE') ); + $request = http_build_query($params, '', '&'); $request .= '&'.(!is_array($data) ? $data : http_build_query($data, '', '&')); diff --git a/modules/paypal/api/paypalconnect.php b/modules/paypal/api/paypalconnect.php deleted file mode 100755 index f45608ee..00000000 --- a/modules/paypal/api/paypalconnect.php +++ /dev/null @@ -1,93 +0,0 @@ -_logs[] = $this->l('Making new connection to').' \''.$host.$script.'\''; - if (function_exists('curl_exec')) - $return = $this->_connectByCURL($host.$script, $body); - if (isset($return) AND $return) - return $return; - $tmp = $this->_connectByFSOCK($host, $script, $body); - if (!$simple_mode || !preg_match('/[A-Z]+=/', $tmp, $result)) - return $tmp; - $pos = strpos($tmp, $result[0]); - $body = substr($tmp, $pos); - return $body; - } - - public function getLogs() - { - return $this->_logs; - } - - /************************************************************/ - /********************** CONNECT METHODS *********************/ - /************************************************************/ - - private function _connectByCURL($url, $body) - { - $ch = @curl_init(); - if (!$ch) - $this->_logs[] = $this->l('Connect failed with CURL method'); - else - { - $this->_logs[] = $this->l('Connect with CURL method successful'); - $this->_logs[] = ''.$this->l('Sending this params:').''; - $this->_logs[] = $body; - @curl_setopt($ch, CURLOPT_URL, 'https://'.$url); - @curl_setopt($ch, CURLOPT_POST, true); - @curl_setopt($ch, CURLOPT_POSTFIELDS, $body); - @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - @curl_setopt($ch, CURLOPT_HEADER, false); - @curl_setopt($ch, CURLOPT_TIMEOUT, 30); - @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - @curl_setopt($ch, CURLOPT_VERBOSE, true); - $result = @curl_exec($ch); - if (!$result) - $this->_logs[] = $this->l('Send with CURL method failed ! Error:').' '.curl_error($ch); - else - $this->_logs[] = $this->l('Send with CURL method successful'); - @curl_close($ch); - } - return (isset($result) ? $result : false); - } - - private function _connectByFSOCK($host, $script, $body) - { - $fp = @fsockopen('ssl://'.$host, 443, $errno, $errstr, 4); - if (!$fp) - $this->_logs[] = $this->l('Connect failed with fsockopen method'); - else - { - $header = $this->_makeHeader($host, $script, strlen($body)); - $this->_logs[] = $this->l('Connect with fsockopen method successful'); - $this->_logs[] = $this->l('Sending this params:').' '.$header.$body; - @fputs($fp, $header.$body); - $tmp = ''; - while (!feof($fp)) - $tmp .= trim(fgets($fp, 1024)); - fclose($fp); - $result = $tmp; - if (!$result) - $this->_logs[] = $this->l('Send with fsockopen method failed !'); - else - $this->_logs[] = $this->l('Send with fsockopen method successful'); - } - return (isset($result) ? $result : false); - } - - private function _makeHeader($host, $script, $lenght) - { - $header = 'POST '.strval($script).' HTTP/1.0'."\r\n" . - 'Host: '.strval($host)."\r\n". - 'Content-Type: application/x-www-form-urlencoded'."\r\n". - 'Content-Length: '.(int)($lenght)."\r\n". - 'Connection: close'."\r\n\r\n"; - return $header; - } -} diff --git a/modules/paypal/api/paypallib.php b/modules/paypal/api/paypallib.php deleted file mode 100755 index 93339da1..00000000 --- a/modules/paypal/api/paypallib.php +++ /dev/null @@ -1,63 +0,0 @@ -_logs; - } - - public function makeCall($host, $script, $methodName, $string) - { - // Making request string - $request = 'METHOD='.urlencode($methodName).'&VERSION='.urlencode(PAYPAL_API_VERSION); - $request .= '&PWD='.urlencode(Configuration::get('PAYPAL_API_PASSWORD')).'&USER='.urlencode(Configuration::get('PAYPAL_API_USER')); - $request .= '&SIGNATURE='.urlencode(Configuration::get('PAYPAL_API_SIGNATURE')).$string; - - // Making connection - include_once(_PS_MODULE_DIR_.'paypal/api/paypalconnect.php'); - $ppConnect = new PaypalConnect(); - $result = $ppConnect->makeConnection($host, $script, $request, true); - $this->_logs = $ppConnect->getLogs(); - - // Formating response value - $response = explode('&', $result); - foreach ($response as $k => $res) - { - $tmp = explode('=', $res); - if (!isset($tmp[1])) - $response[$tmp[0]] = urldecode($tmp[0]); - else - { - $response[$tmp[0]] = urldecode($tmp[1]); - unset($response[$k]); - } - } - if (!Configuration::get('PAYPAL_DEBUG_MODE')) - $this->_logs = array(); - $toExclude = array('TOKEN', 'SUCCESSPAGEREDIRECTREQUESTED', 'VERSION', 'BUILD', 'ACK', 'CORRELATIONID'); - $this->_logs[] = ''.$this->l('PayPal response:').''; - foreach ($response as $k => $res) - { - if (!Configuration::get('PAYPAL_DEBUG_MODE') AND in_array($k, $toExclude)) - continue; - $this->_logs[] = $k.' -> '.$res; - } - return $response; - } - - public function makeSimpleCall($host, $script, $request) - { - // Making connection - include_once(_PS_MODULE_DIR_.'paypal/api/paypalconnect.php'); - $ppConnect = new PaypalConnect(); - $result = $ppConnect->makeConnection($host, $script, $request); - $this->_logs = $ppConnect->getLogs(); - return $result; - } -} - diff --git a/modules/paypal/confirm.tpl b/modules/paypal/confirm.tpl deleted file mode 100755 index 7d00d5af..00000000 --- a/modules/paypal/confirm.tpl +++ /dev/null @@ -1,66 +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: 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"} - -

{l s='Order summary' mod='paypal'}

- -{assign var='current_step' value='payment'} -{include file="$tpl_dir./order-steps.tpl"} - -

{l s='PayPal payment' mod='paypal'}

-
- {if isset($ppToken)}{/if} - {if isset($payerID)}{/if} -

- {l s='PayPal' 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} - -

-

- {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}. -

-

- {if isset($paypalError)} - {l s='Return' mod='paypal'}

- {l s='Session expired, please go back and try again' mod='paypal'} - {else} - {l s='Other payment methods' mod='paypal'} - - {/if} -

-
- 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"} - -
- - -

- - - - *{l s='Required field' mod='paypal'} -

-
\ 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"} - -
-
-

{l s='This email has already been registered, please log in !' mod='paypal'}

-

- - -

-

- - -

-

- - - -

-

{l s='Forgot your password?' mod='paypal'}

-
-
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 -*} - -paypal \ 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='PayPal' 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} + +

+
+ +
+ +
+ +

+ {if $use_account} + {l s='Vous allez utiliser votre compte paypal :' mod='paypal'} {$billing_info.email} + + {else} + + + {/if} +

+ +

+ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}. +

+

+ {l s='Other payment methods' mod='paypal'} + + + + + + + + +

+
+ 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 +*} + + +
+
+
+ + +
+
+ {if isset($use_mobile) && $use_mobile} + + {else} + {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {else} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {/if} + {/if} +
+
+ + {$PayPal_content.payment_choice} + + + + + +
+
+ + {if $accounts} + + {/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} - - - - -{else} -

- - {$PayPal_content.payment_choice} - {if isset($use_mobile) && $use_mobile} - - {else} - {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} - {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} - {else} - {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} - {/if} - {/if} - - -

- -

- -{/if} - -
- - - - -
\ No newline at end of file diff --git a/override/classes/FrontController.php b/override/classes/FrontController.php index 777bb3d1..fc44d635 100755 --- a/override/classes/FrontController.php +++ b/override/classes/FrontController.php @@ -378,6 +378,7 @@ class FrontController extends FrontControllerCore { 'module-contactform-press', 'module-ant_support-help', 'module-ant_support_form-support', + 'module-paypal-express_checkout-payment', ); $displayRight = array( @@ -401,7 +402,7 @@ class FrontController extends FrontControllerCore { 'module-advsendtoafriend-sendtoafriend-form', 'featured', 'list-tag-sales', */ ); - + $countCols = count(array_keys($displayLeft + $displayRight, $page_name)); $addclass = ''; diff --git a/themes/site/css/style.css b/themes/site/css/style.css index 1d5813c5..af207e6b 100755 --- a/themes/site/css/style.css +++ b/themes/site/css/style.css @@ -3319,36 +3319,70 @@ table.std tfoot tr.cart_total_price.endline td, #block-order-detail tr.endline t vertical-align: middle; text-decoration: none; margin-right: 20px; - float: none !important; + float: left; } #order #center_column #HOOK_PAYMENT p.payment_module, #order #center_column #HOOK_PAYMENT div.payment_module { background: #fff; - float: left; - height: 250px; - margin-bottom: 30px; - margin-right: 15px; - text-align: center; - width: 335px; - border: 15px solid transparent; + margin-bottom: 15px; + text-align: center; + clear: both; + border: 10px solid transparent; -moz-border-image: -moz-linear-gradient(top, #e1e3e2 0%, #f3f3f3 100%); -webkit-border-image: -webkit-linear-gradient(top, #e1e3e2 0%, #f3f3f3 100%); border-image: linear-gradient(to bottom, #e1e3e2 0%, #f3f3f3 100%); border-image-slice: 1; + overflow: auto; } - .title_payment { - font-family: georgia,times new roman,serif; - display: block; - font-size: 18px; - border-bottom: 4px double #e9e5e6; - text-align: center; - margin: 20px; - font-style: italic; - color: #222; - padding-bottom: 20px; + div.payment_module .inner { + overflow: auto; + cursor: pointer; + } + .input_radio { + float: left; + padding: 20px 15px; } - #order #center_column #HOOK_PAYMENT p a:hover { text-decoration: none;} + .img_payment { + float: left; + width: 100px; + margin-top: 6px; + } + .img_payment img {width: 75px;} + .title_payment { + color: #222; + display: block; + float: left; + font-family: georgia,times new roman,serif; + font-size: 18px; + font-style: italic; + line-height: 60px; + margin-left: 30px; + text-align: center; + } + .save_info { clear: both; display: block; margin-left: 180px; position: relative; top: -10px} + .save_info input { float: left; position: relative; top: 3px;} + .save_info label { float: left; } + #order #center_column #HOOK_PAYMENT p a:hover { text-decoration: none;} + .account_payment { + margin: 5px 20px 20px; + border-top: 1px solid #adadae; + clear: both; + padding: 15px 0 0; + } + #order #center_column #HOOK_PAYMENT .account_payment .title { + font-family: tahoma; + color: #6d777d; + text-align: left; + text-transform: uppercase; + margin-bottom: 15px; + padding-bottom: 0; + } + .account_payment .box_account { cursor: pointer; overflow: auto } + .account_payment .box_account input { float: left; position: relative; top: 3px;} + .account_payment .box_account label { float: left; cursor: pointer; color: #444d52 } + +.submitPayment{ float: right;} #order #center_column #HOOK_PAYMENT p.payment_module:hover, #order #center_column #HOOK_PAYMENT div.payment_module:hover { background: #ffffff; @@ -5661,6 +5695,23 @@ div#giftvoucher_ask_infos_block .gv_customization > .gv_param input { font-size: 13px; } +.paypal_account { + background: #fff none repeat scroll 0 0; + border: 1px solid #ccc; + margin: 10px 0 5px; + padding: 15px; + overflow: auto; +} +.paypal_account input[type="radio"] { + float: left; + margin-right: 7px; + position: relative; + top: 3px; +} +.paypal_account label { + float: left; +} + @keyframes slideInDown { 0% { -webkit-transform: translateY(-500px); diff --git a/themes/site/modules/paypal/confirm.tpl b/themes/site/modules/paypal/confirm.tpl index 7d00d5af..fef44db3 100755 --- a/themes/site/modules/paypal/confirm.tpl +++ b/themes/site/modules/paypal/confirm.tpl @@ -27,30 +27,49 @@ {capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} -

{l s='Order summary' mod='paypal'}

{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'}

{if isset($ppToken)}{/if} {if isset($payerID)}{/if} -

- {l s='PayPal' 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} + +

+ {l s='PayPal' 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} +

+
+ +
+ +

+ {if $use_account} + {l s='Vous allez utiliser votre compte paypal :' mod='paypal'} {$info_billing.email} + + {else} + + + {/if}

-

+ +

{l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}.

@@ -62,5 +81,6 @@ {/if}

+
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 +*} + + +
+
+
+ + +
+
+ {if isset($use_mobile) && $use_mobile} + + {else} + {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {else} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {/if} + {/if} +
+
+ + {$PayPal_content.payment_choice} + + + + + +
+
+ + {if $accounts} + + {/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 *} -

- - {l s='Pay with PayPal' mod='paypal'} - {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} - -

+
+
+
+ +
+
+ {l s='Pay with PayPal' mod='paypal'} +
+
+ + {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} +
+ + {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 +*} + +
+
+
+ + +
+
+ {if isset($use_mobile) && $use_mobile} + + {else} + {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {else} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {/if} + {/if} +
+
+ + {$PayPal_content.payment_choice} + + + + + +
+
+ + {if $accounts} + + {/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} -

{l s='Previous'}

+

+ {l s='Previous'} + {l s='Valider ma commande'} +

{else} {/if} + + +{literal} + +{/literal} \ No newline at end of file diff --git a/themes/site_mobile/css/style.css b/themes/site_mobile/css/style.css index 4ffdf0ee..d2512330 100755 --- a/themes/site_mobile/css/style.css +++ b/themes/site_mobile/css/style.css @@ -2852,7 +2852,6 @@ body#order #HOOK_PAYMENT .payment_module{ border-image: linear-gradient(to bottom, #e1e3e2 0%, #f3f3f3 100%); border-image-slice: 1; overflow: auto; - height: auto; } body#order #HOOK_PAYMENT p a span.title_payment { font-family: georgia,times new roman,serif; @@ -4390,7 +4389,6 @@ body#index .jqibuttons span.gradient{ .module-contactform-input-group { margin: 12px 0; - margin-left: 0 !important; } .module-contactform-input-group input, .module-contactform-input-group textarea { margin-top: 3px;