diff --git a/.travis.yml b/.travis.yml
index 0e1aff37b..6f81f0d74 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,4 +33,4 @@ after_failure:
- cat /etc/apache2/sites-available/000-default.conf
- sudo cat /var/log/php-fpm.log
- sudo ls -l /var/log/apache2
- - sudo cat /var/log/apache2/other_vhosts_access.log
\ No newline at end of file
+ - sudo cat /var/log/apache2/other_vhosts_access.log
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 76252a9d8..300606fa1 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,33 @@
+####################################
+# V1.3.2
+####################################
+
+## Added Features:
+
+[+] CO : pscleaner module is added for cleaning demo data from QloApps.
+
+[+] FO : Option for Guest checkout is given at Preferences->Orders tab. So Guest Checkout is enabled.
+
+[+] FO : Option for Shorter registration/address form is given at Preferences->Customers tab. (In this case address will be created from customer chosen room type's hotel address automatically).
+
+[+] CO : wkfooterexploreblock :: Admin can add custom explore links to show at footer explore block and navigation menu also. table 'htl_custom_explore_link' added with multilang.
+
+## Improved/changed features:
+
+[-] BO : New category option from "quick access" links is removed.
+[+] FO : Checkout page design has been changed.
+[+] CO : Images validation improved.
+
+
+## Bug/Issues Resolved:
+
+[-] CO : 56% Installation issue.
+
+[-] BO : Dashboard graphs not loading issues on php 7.2
+[-] BO : feature update issue on not selecting image while updating the feature.
+[-] BO : Category bug resolve (Should not be created updated deleted from anywhere). Will be handled from hotel creation/updation/deletion.
+
+
####################################
# V1.3.1
####################################
@@ -342,4 +372,4 @@
[-] MO : wktestimonialblock : Fixed while adding the image in valid format on configuration page then showing error page.
[-] MO : wkpaypaladaptive : Fixed paypal is not working because paypal api has been changed.
[-] MO : wkpaypaladaptive : Fixed fopen issues fixed, done by CURL.
-[-] MO : wkpaypaladaptive : Fixed payment negative value bug fixed.
\ No newline at end of file
+[-] MO : wkpaypaladaptive : Fixed payment negative value bug fixed.
diff --git a/admin/themes/default/template/controllers/products/associations.tpl b/admin/themes/default/template/controllers/products/associations.tpl
index 66267aa1e..9193cac80 100644
--- a/admin/themes/default/template/controllers/products/associations.tpl
+++ b/admin/themes/default/template/controllers/products/associations.tpl
@@ -38,9 +38,9 @@
diff --git a/classes/Address.php b/classes/Address.php
index c86b8c5ad..89efc1a18 100644
--- a/classes/Address.php
+++ b/classes/Address.php
@@ -203,6 +203,8 @@ class AddressCore extends ObjectModel
if (Validate::isUnsignedId($this->id_customer)) {
Customer::resetAddressCache($this->id_customer, $this->id);
}
+ // reset checkout process if addresses deletes
+ CheckoutProcess::refreshCheckoutProcess();
if (!$this->isUsed()) {
return parent::delete();
diff --git a/classes/Category.php b/classes/Category.php
index 770470233..daaa86676 100644
--- a/classes/Category.php
+++ b/classes/Category.php
@@ -433,10 +433,11 @@ class CategoryCore extends ObjectModel
}
$right = (int)$n++;
- Db::getInstance()->execute('
- UPDATE '._DB_PREFIX_.'category
- SET nleft = '.(int)$left.', nright = '.(int)$right.'
- WHERE id_category = '.(int)$id_category.' LIMIT 1');
+ Db::getInstance()->execute(
+ 'UPDATE '._DB_PREFIX_.'category
+ SET nleft = '.(int)$left.', nright = '.(int)$right.'
+ WHERE id_category = '.(int)$id_category.' LIMIT 1'
+ );
}
/**
diff --git a/classes/Feature.php b/classes/Feature.php
index c67c0971b..fc9f2ba32 100644
--- a/classes/Feature.php
+++ b/classes/Feature.php
@@ -41,7 +41,7 @@ class FeatureCore extends ObjectModel
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
/* Lang fields */
- 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128),
+ 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128),
),
);
diff --git a/classes/Hook.php b/classes/Hook.php
index b4fcfc83b..61fa8de41 100644
--- a/classes/Hook.php
+++ b/classes/Hook.php
@@ -418,8 +418,7 @@ class HookCore extends ObjectModel
*
* @return string/array modules output
*/
- public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,
- $use_push = false, $id_shop = null)
+ public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = null)
{
if (defined('PS_INSTALLATION_IN_PROGRESS')) {
return;
@@ -462,7 +461,11 @@ class HookCore extends ObjectModel
// Look on modules list
$altern = 0;
- $output = '';
+ if ($array_return) {
+ $output = array();
+ } else {
+ $output = '';
+ }
if ($disable_non_native_modules && !isset(Hook::$native_module)) {
Hook::$native_module = Module::getNativeModuleList();
diff --git a/classes/checkoutProcess/AbstractCheckoutStep.php b/classes/checkoutProcess/AbstractCheckoutStep.php
new file mode 100644
index 000000000..185e131dc
--- /dev/null
+++ b/classes/checkoutProcess/AbstractCheckoutStep.php
@@ -0,0 +1,82 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+abstract class AbstractCheckoutStep implements CheckoutStepInterface
+{
+ public $step_is_reachable = 0;
+ public $step_is_complete = 0;
+ public $step_is_current = 0;
+ public $step_key;
+ private $checkoutProcess;
+
+ public function __construct()
+ {
+ $this->context = Context::getContext();
+ }
+
+ public function setCheckoutProcess(CheckoutProcess $checkoutProcess)
+ {
+ $this->checkoutProcess = $checkoutProcess;
+
+ return $this;
+ }
+
+ public function setReachable($step_is_reachable)
+ {
+ $this->step_is_reachable = $step_is_reachable;
+
+ return $this;
+ }
+
+ public function isReachable()
+ {
+ return $this->step_is_reachable;
+ }
+
+ public function setComplete($step_is_complete)
+ {
+ $this->step_is_complete = $step_is_complete;
+
+ return $this;
+ }
+
+ public function isComplete()
+ {
+ return $this->step_is_complete;
+ }
+
+ public function setCurrent($step_is_current)
+ {
+ $this->step_is_current = $step_is_current;
+
+ return $this;
+ }
+
+ public function isCurrent()
+ {
+ return $this->step_is_current;
+ }
+}
diff --git a/classes/checkoutProcess/CheckoutCartSummaryStep.php b/classes/checkoutProcess/CheckoutCartSummaryStep.php
new file mode 100644
index 000000000..d58ec04d2
--- /dev/null
+++ b/classes/checkoutProcess/CheckoutCartSummaryStep.php
@@ -0,0 +1,44 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+class CheckoutCartSummaryStep extends AbstractCheckoutStep
+{
+ public function __construct() {
+ parent::__construct();
+ $this->step_key = 'checkout_rooms_summary';
+ }
+
+ public function handleRequest()
+ {
+ // set data in checkout_session cookie
+ if (Tools::getValue('proceed_to_customer_dtl')) {
+ $this->step_is_reachable = 1;
+ $this->step_is_complete = 1;
+ $this->step_is_current = 0;
+ $this->context->cookie->__set('cart_summary_proceeded', 1);
+ } elseif ($this->context->cookie->__get('cart_summary_proceeded')) {
+ $this->step_is_reachable = 1;
+ $this->step_is_complete = 1;
+ $this->step_is_current = 0;
+ }
+
+ return $this;
+ }
+}
diff --git a/classes/checkoutProcess/CheckoutCustomerDetailsStep.php b/classes/checkoutProcess/CheckoutCustomerDetailsStep.php
new file mode 100644
index 000000000..813da1edb
--- /dev/null
+++ b/classes/checkoutProcess/CheckoutCustomerDetailsStep.php
@@ -0,0 +1,77 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+class CheckoutCustomerDetailsStep extends AbstractCheckoutStep
+{
+ public function __construct() {
+ parent::__construct();
+ $this->step_key = 'checkout_customer';
+ }
+
+ public function handleRequest()
+ {
+ $idAddressDelivery = $this->context->cart->id_address_delivery;
+ $objAddress = new Address($idAddressDelivery);
+ if (Tools::getValue('proceed_to_customer_dtl')) {
+ $this->step_is_reachable = 1;
+ $this->step_is_current = 1;
+ if ($idAddressDelivery) {
+ if (!Validate::isLoadedObject($objAddress)) {
+ if ($this->context->cookie->__get('customer_details_proceeded')) {
+ $this->step_is_current = 0;
+ $this->step_is_complete = 1;
+ }
+ }
+ }
+ } elseif (Tools::getValue('proceed_to_payment')) {
+ $this->step_is_reachable = 1;
+ $this->step_is_current = 1;
+ if ($idAddressDelivery) {
+ if (Validate::isLoadedObject($objAddress)) {
+ $this->step_is_current = 0;
+ $this->step_is_complete = 1;
+ $this->context->cookie->__set('customer_details_proceeded', 1);
+ }
+ }
+ } elseif ($this->context->cookie->__get('customer_details_proceeded')
+ || $this->context->cookie->__get('cart_summary_proceeded')
+ ) {
+ if ($idAddressDelivery) {
+ if (!Validate::isLoadedObject($objAddress)) {
+ $this->context->cookie->__set('customer_details_proceeded', 0);
+ $this->step_is_reachable = 1;
+ $this->step_is_current = 1;
+ }
+ } else {
+ $this->step_is_reachable = 1;
+ $this->step_is_current = 1;
+ $this->context->cookie->__set('customer_details_proceeded', 0);
+ }
+ } elseif ($this->context->customer->logged) {
+ $this->step_is_reachable = 1;
+ if ($idAddressDelivery) {
+ $this->step_is_complete = 1;
+ } else {
+ $this->step_is_complete = 0;
+ $this->step_is_current = 1;
+ }
+ }
+ }
+}
diff --git a/classes/checkoutProcess/CheckoutPaymentStep.php b/classes/checkoutProcess/CheckoutPaymentStep.php
new file mode 100644
index 000000000..11d902e3d
--- /dev/null
+++ b/classes/checkoutProcess/CheckoutPaymentStep.php
@@ -0,0 +1,37 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+class CheckoutPaymentStep extends AbstractCheckoutStep
+{
+ public function __construct() {
+ parent::__construct();
+ $this->step_key = 'checkout_payment';
+ }
+
+ public function handleRequest()
+ {
+ if ($this->context->cookie->__get('customer_details_proceeded')) {
+ $this->step_is_reachable = 1;
+ $this->step_is_current = 1;
+ $this->step_is_complete = 0;
+ }
+ }
+}
+
diff --git a/classes/checkoutProcess/CheckoutProcess.php b/classes/checkoutProcess/CheckoutProcess.php
new file mode 100644
index 000000000..0944d3d44
--- /dev/null
+++ b/classes/checkoutProcess/CheckoutProcess.php
@@ -0,0 +1,109 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+class CheckoutProcess
+{
+ public $steps = array();
+
+ public function handleRequest()
+ {
+ foreach ($this->steps as $step) {
+ $step->handleRequest();
+ }
+ return $this;
+ }
+
+ public function addStep(CheckoutStepInterface $step)
+ {
+ $step->setCheckoutProcess($this);
+ $this->steps[] = $step;
+ return $this;
+ }
+
+ public function getSteps()
+ {
+ return $this->steps;
+ }
+
+ public function setNextStepReachable()
+ {
+ foreach ($this->getSteps() as $step) {
+ if (!$step->isReachable()) {
+ $step->setReachable(true);
+ break;
+ }
+ if (!$step->isComplete()) {
+ break;
+ }
+ }
+
+ return $this;
+ }
+
+ public function markCurrentStep()
+ {
+ $steps = $this->getSteps();
+
+ foreach ($steps as $step) {
+ if ($step->isCurrent()) {
+ // If a step marked itself as current
+ // then we assume it has a good reason
+ // to do so and we don't auto-advance.
+ return $this;
+ }
+ }
+
+ foreach ($steps as $position => $step) {
+ $nextStep = ($position < count($steps) - 1) ? $steps[$position + 1] : null;
+
+ if ($step->isReachable() && (!$step->isComplete() || ($nextStep && !$nextStep->isReachable()))) {
+ $step->setCurrent(true);
+
+ return $this;
+ }
+ }
+
+ return $this;
+ }
+
+ public function invalidateAllStepsAfterCurrent()
+ {
+ $markAsUnreachable = false;
+ foreach ($this->getSteps() as $step) {
+ if ($markAsUnreachable) {
+ $step->setComplete(false)->setReachable(false);
+ }
+
+ if ($step->isCurrent()) {
+ $markAsUnreachable = true;
+ }
+ }
+
+ return $this;
+ }
+
+ // if any event occurred which is changing cart/address/payment/customer then reset cehckout cookies
+ public static function refreshCheckoutProcess()
+ {
+ $context = Context::getContext();
+ $context->cookie->__set('cart_summary_proceeded', 0);
+ $context->cookie->__set('customer_details_proceeded', 0);
+ }
+}
diff --git a/modules/wkfooterexploreblock/views/js/wkFooterExploreBlockFront.js b/classes/checkoutProcess/CheckoutStepInterface.php
similarity index 73%
rename from modules/wkfooterexploreblock/views/js/wkFooterExploreBlockFront.js
rename to classes/checkoutProcess/CheckoutStepInterface.php
index 7b6419a20..7c7b6d28f 100644
--- a/modules/wkfooterexploreblock/views/js/wkFooterExploreBlockFront.js
+++ b/classes/checkoutProcess/CheckoutStepInterface.php
@@ -1,3 +1,4 @@
+context = Context::getContext();
+ Tools::redirectAdmin($this->context->link->getAdminLink('AdminDashboard'));
+
$this->bootstrap = true;
$this->table = 'category';
$this->className = 'Category';
@@ -54,8 +59,6 @@ class AdminCategoriesControllerCore extends AdminController
$this->_defaultOrderBy = 'position';
$this->allow_export = true;
- $this->context = Context::getContext();
-
$this->fieldImageSettings = array(
'name' => 'image',
'dir' => 'c'
diff --git a/controllers/admin/AdminCustomerPreferencesController.php b/controllers/admin/AdminCustomerPreferencesController.php
index d490a647c..61e816aeb 100644
--- a/controllers/admin/AdminCustomerPreferencesController.php
+++ b/controllers/admin/AdminCustomerPreferencesController.php
@@ -113,6 +113,13 @@ class AdminCustomerPreferencesControllerCore extends AdminController
'cast' => 'intval',
'type' => 'bool'
),
+ 'PS_CUSTOMER_ADDRESS_CREATION' => array(
+ 'title' => $this->l('Enable customer address creation at checkout'),
+ 'hint' => $this->l('If disabled, At checkout process, guest has to fill only personal details and address will be created according to the hotel address which rooms guest has in his cart. If enabled, guest has to fill his address details in checkout process.'),
+ 'validation' => 'isBool',
+ 'cast' => 'intval',
+ 'type' => 'bool'
+ ),
),
'submit' => array('title' => $this->l('Save')),
),
diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php
index 33828661a..6ef65f568 100644
--- a/controllers/admin/AdminFeaturesController.php
+++ b/controllers/admin/AdminFeaturesController.php
@@ -29,697 +29,677 @@
*/
class AdminFeaturesControllerCore extends AdminController
{
- public $bootstrap = true;
- protected $position_identifier = 'id_feature';
- protected $feature_name;
+ public $bootstrap = true;
+ protected $position_identifier = 'id_feature';
+ protected $feature_name;
- public function __construct()
- {
- $this->table = 'feature';
- $this->className = 'Feature';
- $this->list_id = 'feature';
- $this->identifier = 'id_feature';
- $this->lang = true;
- $this->imageType = 'png';
- $this->fieldImageSettings = array(
- 'name' => 'icon',
- 'dir' => 'rf'
- );
+ public function __construct()
+ {
+ $this->table = 'feature';
+ $this->className = 'Feature';
+ $this->list_id = 'feature';
+ $this->identifier = 'id_feature';
+ $this->lang = true;
+ $this->imageType = 'png';
+ $this->fieldImageSettings = array(
+ 'name' => 'icon',
+ 'dir' => 'rf'
+ );
- $this->fields_list = array(
- 'id_feature' => array(
- 'title' => $this->l('ID'),
- 'align' => 'center',
- 'class' => 'fixed-width-xs'
- ),
- 'name' => array(
- 'title' => $this->l('Name'),
- 'width' => 'auto',
- 'filter_key' => 'b!name'
- ),
- 'logo' => array(
- 'title' => $this->l('Icon'),
- 'align' => 'text-center',
- 'image' => 'rf',
- 'orderby' => false,
- 'search' => false,
- 'class' => 'fixed-width-xs'
- ),/*by webkul to show feature image*/
- /*'value' => array(
- 'title' => $this->l('Values'),
- 'orderby' => false,
- 'search' => false,
- 'align' => 'center',
- 'class' => 'fixed-width-xs'
- ),*/
- 'position' => array(
- 'title' => $this->l('Position'),
- 'filter_key' => 'a!position',
- 'align' => 'center',
- 'class' => 'fixed-width-xs',
- 'position' => 'position'
- )
- );
+ $this->fields_list = array(
+ 'id_feature' => array(
+ 'title' => $this->l('ID'),
+ 'align' => 'center',
+ 'class' => 'fixed-width-xs'
+ ),
+ 'name' => array(
+ 'title' => $this->l('Name'),
+ 'width' => 'auto',
+ 'filter_key' => 'b!name'
+ ),
+ 'logo' => array(
+ 'title' => $this->l('Icon'),
+ 'align' => 'text-center',
+ 'image' => 'rf',
+ 'orderby' => false,
+ 'search' => false,
+ 'class' => 'fixed-width-xs'
+ ),/*by webkul to show feature image*/
+ /*'value' => array(
+ 'title' => $this->l('Values'),
+ 'orderby' => false,
+ 'search' => false,
+ 'align' => 'center',
+ 'class' => 'fixed-width-xs'
+ ),*/
+ 'position' => array(
+ 'title' => $this->l('Position'),
+ 'filter_key' => 'a!position',
+ 'align' => 'center',
+ 'class' => 'fixed-width-xs',
+ 'position' => 'position'
+ )
+ );
- $this->bulk_actions = array(
- 'delete' => array(
- 'text' => $this->l('Delete selected'),
- 'icon' => 'icon-trash',
- 'confirm' => $this->l('Delete selected items?')
- )
- );
- parent::__construct();
- }
+ $this->bulk_actions = array(
+ 'delete' => array(
+ 'text' => $this->l('Delete selected'),
+ 'icon' => 'icon-trash',
+ 'confirm' => $this->l('Delete selected items?')
+ )
+ );
+ parent::__construct();
+ }
- /**
- * AdminController::renderList() override
- * @see AdminController::renderList()
- */
- public function renderList()
- {
- /*$this->addRowAction('view');*//*by webkul*/
- $this->addRowAction('edit');
- $this->addRowAction('delete');
+ /**
+ * AdminController::renderList() override
+ * @see AdminController::renderList()
+ */
+ public function renderList()
+ {
+ /*$this->addRowAction('view');*//*by webkul*/
+ $this->addRowAction('edit');
+ $this->addRowAction('delete');
- return parent::renderList();
- }
+ return parent::renderList();
+ }
- /**
- * Change object type to feature value (use when processing a feature value)
- */
- protected function setTypeValue()
- {
- $this->table = 'feature_value';
- $this->className = 'FeatureValue';
- $this->identifier = 'id_feature_value';
- }
+ /**
+ * Change object type to feature value (use when processing a feature value)
+ */
+ protected function setTypeValue()
+ {
+ $this->table = 'feature_value';
+ $this->className = 'FeatureValue';
+ $this->identifier = 'id_feature_value';
+ }
- /**
- * Change object type to feature (use when processing a feature)
- */
- protected function setTypeFeature()
- {
- $this->table = 'feature';
- $this->className = 'Feature';
- $this->identifier = 'id_feature';
- }
+ /**
+ * Change object type to feature (use when processing a feature)
+ */
+ protected function setTypeFeature()
+ {
+ $this->table = 'feature';
+ $this->className = 'Feature';
+ $this->identifier = 'id_feature';
+ }
- public function renderView()
- {
- if (($id = Tools::getValue('id_feature')))
- {
- $this->setTypeValue();
- $this->list_id = 'feature_value';
- $this->lang = true;
+ public function renderView()
+ {
+ if (($id = Tools::getValue('id_feature'))) {
+ $this->setTypeValue();
+ $this->list_id = 'feature_value';
+ $this->lang = true;
- // Action for list
- $this->addRowAction('edit');
- $this->addRowAction('delete');
+ // Action for list
+ $this->addRowAction('edit');
+ $this->addRowAction('delete');
- if (!Validate::isLoadedObject($obj = new Feature((int)$id)))
- {
- $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' '.$this->table.' '.Tools::displayError('(cannot load object)');
- return;
- }
+ if (!Validate::isLoadedObject($obj = new Feature((int)$id))) {
+ $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' '.$this->table.' '.Tools::displayError('(cannot load object)');
+ return;
+ }
- $this->feature_name = $obj->name;
- $this->toolbar_title = $this->feature_name[$this->context->employee->id_lang];
- $this->fields_list = array(
- 'id_feature_value' => array(
- 'title' => $this->l('ID'),
- 'align' => 'center',
- 'class' => 'fixed-width-xs'
- ),
- 'value' => array(
- 'title' => $this->l('Value')
- )
- );
+ $this->feature_name = $obj->name;
+ $this->toolbar_title = $this->feature_name[$this->context->employee->id_lang];
+ $this->fields_list = array(
+ 'id_feature_value' => array(
+ 'title' => $this->l('ID'),
+ 'align' => 'center',
+ 'class' => 'fixed-width-xs'
+ ),
+ 'value' => array(
+ 'title' => $this->l('Value')
+ )
+ );
- $this->_where = sprintf('AND `id_feature` = %d', (int)$id);
- self::$currentIndex = self::$currentIndex.'&id_feature='.(int)$id.'&viewfeature';
- $this->processFilter();
- return parent::renderList();
- }
- }
+ $this->_where = sprintf('AND `id_feature` = %d', (int)$id);
+ self::$currentIndex = self::$currentIndex.'&id_feature='.(int)$id.'&viewfeature';
+ $this->processFilter();
+ return parent::renderList();
+ }
+ }
- /**
- * AdminController::renderForm() override
- * @see AdminController::renderForm()
- */
- public function renderForm()
- {
- if (!($obj = $this->loadObject(true))) {
+ /**
+ * AdminController::renderForm() override
+ * @see AdminController::renderForm()
+ */
+ public function renderForm()
+ {
+ if (!($obj = $this->loadObject(true))) {
return;
}
- $ps_img_url = _PS_IMG_DIR_.'rf/'.$obj->id.'.png';
- if ($img_exist = file_exists($ps_img_url))
- {
- $img_url = '../../hotelcommerce/img/rf/'.$obj->id.'.png';
- $image = "";
- }
+ $ps_img_url = _PS_IMG_DIR_.'rf/'.$obj->id.'.png';
+ if ($img_exist = file_exists($ps_img_url)) {
+ $img_url = '../../hotelcommerce/img/rf/'.$obj->id.'.png';
+ $image = "";
+ }
- $this->toolbar_title = $this->l('Add a new feature');
- $this->fields_form = array(
- 'legend' => array(
- 'title' => $this->l('Feature'),
- 'icon' => 'icon-info-sign'
- ),
- 'input' => array(
- array(
- 'type' => 'text',
- 'label' => $this->l('Name'),
- 'name' => 'name',
- 'lang' => true,
- 'size' => 33,
- 'hint' => $this->l('Invalid characters:').' <>;=#{}',
- 'required' => true
- ),
- array(
- 'type' => 'file',
- 'label' => $this->l('Feature Logo'),
- 'name' => 'logo',
- 'image' => $img_exist ? $image : false,
- 'display_image' => true,
- 'hint' => $this->l('Upload a feature logo.'),
- 'required' => true
- )
- )
- );
+ $this->toolbar_title = $this->l('Add a new feature');
+ $this->fields_form = array(
+ 'legend' => array(
+ 'title' => $this->l('Feature'),
+ 'icon' => 'icon-info-sign'
+ ),
+ 'input' => array(
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Name'),
+ 'name' => 'name',
+ 'lang' => true,
+ 'size' => 33,
+ 'hint' => $this->l('Enter a name for the feature. Invalid characters:').' <>;=#{}',
+ 'required' => true
+ ),
+ array(
+ 'type' => 'file',
+ 'label' => $this->l('Feature Logo'),
+ 'name' => 'logo',
+ 'image' => $img_exist ? $image : false,
+ 'display_image' => true,
+ 'hint' => $this->l('Upload a feature logo.'),
+ 'required' => true
+ )
+ )
+ );
- if (Shop::isFeatureActive())
- {
- $this->fields_form['input'][] = array(
- 'type' => 'shop',
- 'label' => $this->l('Shop association'),
- 'name' => 'checkBoxShopAsso',
- );
- }
+ if (Shop::isFeatureActive()) {
+ $this->fields_form['input'][] = array(
+ 'type' => 'shop',
+ 'label' => $this->l('Shop association'),
+ 'name' => 'checkBoxShopAsso',
+ );
+ }
- $this->fields_form['submit'] = array(
- 'title' => $this->l('Save'),
- );
+ $this->fields_form['submit'] = array(
+ 'title' => $this->l('Save'),
+ );
- return parent::renderForm();
- }
+ return parent::renderForm();
+ }
- public function initPageHeaderToolbar()
- {
- if (empty($this->display))
- {
- $this->page_header_toolbar_btn['new_feature'] = array(
- 'href' => self::$currentIndex.'&addfeature&token='.$this->token,
- 'desc' => $this->l('Add new feature', null, null, false),
- 'icon' => 'process-icon-new'
- );
+ public function initPageHeaderToolbar()
+ {
+ if (empty($this->display)) {
+ $this->page_header_toolbar_btn['new_feature'] = array(
+ 'href' => self::$currentIndex.'&addfeature&token='.$this->token,
+ 'desc' => $this->l('Add new feature', null, null, false),
+ 'icon' => 'process-icon-new'
+ );
+ }
- /*$this->page_header_toolbar_btn['new_feature_value'] = array(
- 'href' => self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token,
- 'desc' => $this->l('Add new feature value', null, null, false),
- 'icon' => 'process-icon-new'
- );*//*by webkul feature value will be added from add feature buttun in form of image*/
- }
+ if ($this->display == 'view') {
+ $this->page_header_toolbar_btn['new_feature_value'] = array(
+ 'href' => self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token,
+ 'desc' => $this->l('Add new feature value', null, null, false),
+ 'icon' => 'process-icon-new'
+ );
+ }
- if ($this->display == 'view')
- $this->page_header_toolbar_btn['new_feature_value'] = array(
- 'href' => self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token,
- 'desc' => $this->l('Add new feature value', null, null, false),
- 'icon' => 'process-icon-new'
- );
+ parent::initPageHeaderToolbar();
+ }
- parent::initPageHeaderToolbar();
- }
+ /**
+ * AdminController::initToolbar() override
+ * @see AdminController::initToolbar()
+ */
+ public function initToolbar()
+ {
+ switch ($this->display) {
+ case 'editFeatureValue':
+ case 'add':
+ case 'edit':
+ $this->toolbar_btn['save'] = array(
+ 'href' => '#',
+ 'desc' => $this->l('Save')
+ );
- /**
- * AdminController::initToolbar() override
- * @see AdminController::initToolbar()
- */
- public function initToolbar()
- {
- switch ($this->display)
- {
- case 'editFeatureValue':
- case 'add':
- case 'edit':
- $this->toolbar_btn['save'] = array(
- 'href' => '#',
- 'desc' => $this->l('Save')
- );
+ if ($this->display == 'editFeatureValue') {
+ $this->toolbar_btn['save-and-stay'] = array(
+ 'short' => 'SaveAndStay',
+ 'href' => '#',
+ 'desc' => $this->l('Save and add another value'),
+ 'force_desc' => true,
+ );
+ }
- if ($this->display == 'editFeatureValue')
- $this->toolbar_btn['save-and-stay'] = array(
- 'short' => 'SaveAndStay',
- 'href' => '#',
- 'desc' => $this->l('Save and add another value'),
- 'force_desc' => true,
- );
+ // Default cancel button - like old back link
+ $back = Tools::safeOutput(Tools::getValue('back', ''));
+ if (empty($back)) {
+ $back = self::$currentIndex.'&token='.$this->token;
+ }
- // Default cancel button - like old back link
- $back = Tools::safeOutput(Tools::getValue('back', ''));
- if (empty($back))
- $back = self::$currentIndex.'&token='.$this->token;
+ $this->toolbar_btn['back'] = array(
+ 'href' => $back,
+ 'desc' => $this->l('Back to the list')
+ );
+ break;
+ case 'view':
+ $this->toolbar_btn['newAttributes'] = array(
+ 'href' => self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token,
+ 'desc' => $this->l('Add new feature values')
+ );
+ $this->toolbar_btn['back'] = array(
+ 'href' => self::$currentIndex.'&token='.$this->token,
+ 'desc' => $this->l('Back to the list')
+ );
+ break;
+ default:
+ parent::initToolbar();
+ }
+ }
- $this->toolbar_btn['back'] = array(
- 'href' => $back,
- 'desc' => $this->l('Back to the list')
- );
- break;
- case 'view':
- $this->toolbar_btn['newAttributes'] = array(
- 'href' => self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token,
- 'desc' => $this->l('Add new feature values')
- );
- $this->toolbar_btn['back'] = array(
- 'href' => self::$currentIndex.'&token='.$this->token,
- 'desc' => $this->l('Back to the list')
- );
- break;
- default:
- parent::initToolbar();
- }
- }
+ public function initToolbarTitle()
+ {
+ $bread_extended = $this->breadcrumbs;
- public function initToolbarTitle()
- {
- $bread_extended = $this->breadcrumbs;
+ switch ($this->display) {
+ case 'edit':
+ $bread_extended[] = $this->l('Edit New Feature');
+ $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
+ break;
- switch ($this->display)
- {
- case 'edit':
- $bread_extended[] = $this->l('Edit New Feature');
- $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
- break;
+ case 'add':
+ $bread_extended[] = $this->l('Add New Feature');
+ $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
+ break;
- case 'add':
- $bread_extended[] = $this->l('Add New Feature');
- $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
- break;
+ case 'view':
+ $bread_extended[] = $this->feature_name[$this->context->employee->id_lang];
+ $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
+ break;
- case 'view':
- $bread_extended[] = $this->feature_name[$this->context->employee->id_lang];
- $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
- break;
+ case 'editFeatureValue':
+ if (($idFeature_value = Tools::getValue('id_feature_value'))) {
+ if (($id = Tools::getValue('id_feature'))) {
+ if (Validate::isLoadedObject($obj = new Feature((int)$id))) {
+ $bread_extended[] = ''.$obj->name[$this->context->employee->id_lang].'';
+ }
- case 'editFeatureValue':
- if (($id_feature_value = Tools::getValue('id_feature_value')))
- {
- if (($id = Tools::getValue('id_feature')))
- {
- if (Validate::isLoadedObject($obj = new Feature((int)$id)))
- $bread_extended[] = ''.$obj->name[$this->context->employee->id_lang].'';
+ if (Validate::isLoadedObject($obj = new FeatureValue((int)Tools::getValue('id_feature_value')))) {
+ $bread_extended[] = sprintf($this->l('Edit: %s'), $obj->value[$this->context->employee->id_lang]);
+ }
+ } else {
+ $bread_extended[] = $this->l('Edit Value');
+ }
+ } else {
+ $bread_extended[] = $this->l('Add New Value');
+ }
- if (Validate::isLoadedObject($obj = new FeatureValue((int)Tools::getValue('id_feature_value'))))
- $bread_extended[] = sprintf($this->l('Edit: %s'), $obj->value[$this->context->employee->id_lang]);
- }
- else
- $bread_extended[] = $this->l('Edit Value');
- }
- else
- $bread_extended[] = $this->l('Add New Value');
+ if (count($bread_extended) > 0) {
+ $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
+ }
+ break;
+ }
- if (count($bread_extended) > 0)
- $this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
- break;
- }
+ $this->toolbar_title = $bread_extended;
+ }
- $this->toolbar_title = $bread_extended;
- }
+ /**
+ * AdminController::renderForm() override
+ * @see AdminController::renderForm()
+ */
+ public function initFormFeatureValue()
+ {
+ $this->setTypeValue();
- /**
- * AdminController::renderForm() override
- * @see AdminController::renderForm()
- */
- public function initFormFeatureValue()
- {
- $this->setTypeValue();
+ $this->fields_form[0]['form'] = array(
+ 'legend' => array(
+ 'title' => $this->l('Feature value'),
+ 'icon' => 'icon-info-sign'
+ ),
+ 'input' => array(
+ array(
+ 'type' => 'select',
+ 'label' => $this->l('Feature'),
+ 'name' => 'id_feature',
+ 'options' => array(
+ 'query' => Feature::getFeatures($this->context->language->id),
+ 'id' => 'id_feature',
+ 'name' => 'name'
+ ),
+ 'required' => true
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Value'),
+ 'name' => 'value',
+ 'lang' => true,
+ 'size' => 33,
+ 'hint' => $this->l('Invalid characters:').' <>;=#{}',
+ 'required' => true
+ ),
+ ),
+ 'submit' => array(
+ 'title' => $this->l('Save'),
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save then add another value'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save'
+ )
+ )
+ );
- $this->fields_form[0]['form'] = array(
- 'legend' => array(
- 'title' => $this->l('Feature value'),
- 'icon' => 'icon-info-sign'
- ),
- 'input' => array(
- array(
- 'type' => 'select',
- 'label' => $this->l('Feature'),
- 'name' => 'id_feature',
- 'options' => array(
- 'query' => Feature::getFeatures($this->context->language->id),
- 'id' => 'id_feature',
- 'name' => 'name'
- ),
- 'required' => true
- ),
- array(
- 'type' => 'text',
- 'label' => $this->l('Value'),
- 'name' => 'value',
- 'lang' => true,
- 'size' => 33,
- 'hint' => $this->l('Invalid characters:').' <>;=#{}',
- 'required' => true
- ),
- ),
- 'submit' => array(
- 'title' => $this->l('Save'),
- ),
- 'buttons' => array(
- 'save-and-stay' => array(
- 'title' => $this->l('Save then add another value'),
- 'name' => 'submitAdd'.$this->table.'AndStay',
- 'type' => 'submit',
- 'class' => 'btn btn-default pull-right',
- 'icon' => 'process-icon-save'
- )
- )
- );
+ $this->fields_value['id_feature'] = (int)Tools::getValue('id_feature');
- $this->fields_value['id_feature'] = (int)Tools::getValue('id_feature');
+ // Create Object FeatureValue
+ $feature_value = new FeatureValue(Tools::getValue('id_feature_value'));
- // Create Object FeatureValue
- $feature_value = new FeatureValue(Tools::getValue('id_feature_value'));
+ $this->tpl_vars = array(
+ 'feature_value' => $feature_value,
+ );
- $this->tpl_vars = array(
- 'feature_value' => $feature_value,
- );
+ $this->getlanguages();
+ $helper = new HelperForm();
+ $helper->show_cancel_button = true;
- $this->getlanguages();
- $helper = new HelperForm();
- $helper->show_cancel_button = true;
+ $back = Tools::safeOutput(Tools::getValue('back', ''));
+ if (empty($back)) {
+ $back = self::$currentIndex.'&token='.$this->token;
+ }
+ if (!Validate::isCleanHtml($back)) {
+ die(Tools::displayError());
+ }
- $back = Tools::safeOutput(Tools::getValue('back', ''));
- if (empty($back))
- $back = self::$currentIndex.'&token='.$this->token;
- if (!Validate::isCleanHtml($back))
- die(Tools::displayError());
+ $helper->back_url = $back;
+ $helper->currentIndex = self::$currentIndex;
+ $helper->token = $this->token;
+ $helper->table = $this->table;
+ $helper->identifier = $this->identifier;
+ $helper->override_folder = 'feature_value/';
+ $helper->id = $feature_value->id;
+ $helper->toolbar_scroll = false;
+ $helper->tpl_vars = $this->tpl_vars;
+ $helper->languages = $this->_languages;
+ $helper->default_form_language = $this->default_form_language;
+ $helper->allow_employee_form_lang = $this->allow_employee_form_lang;
+ $helper->fields_value = $this->getFieldsValue($feature_value);
+ $helper->toolbar_btn = $this->toolbar_btn;
+ $helper->title = $this->l('Add a new feature value');
+ $this->content .= $helper->generateForm($this->fields_form);
+ }
- $helper->back_url = $back;
- $helper->currentIndex = self::$currentIndex;
- $helper->token = $this->token;
- $helper->table = $this->table;
- $helper->identifier = $this->identifier;
- $helper->override_folder = 'feature_value/';
- $helper->id = $feature_value->id;
- $helper->toolbar_scroll = false;
- $helper->tpl_vars = $this->tpl_vars;
- $helper->languages = $this->_languages;
- $helper->default_form_language = $this->default_form_language;
- $helper->allow_employee_form_lang = $this->allow_employee_form_lang;
- $helper->fields_value = $this->getFieldsValue($feature_value);
- $helper->toolbar_btn = $this->toolbar_btn;
- $helper->title = $this->l('Add a new feature value');
- $this->content .= $helper->generateForm($this->fields_form);
- }
+ /**
+ * AdminController::initContent() override
+ * @see AdminController::initContent()
+ */
+ public function initContent()
+ {
+ if (Feature::isFeatureActive()) {
+ // toolbar (save, cancel, new, ..)
+ $this->initTabModuleList();
+ $this->initToolbar();
+ $this->initPageHeaderToolbar();
+ if ($this->display == 'edit' || $this->display == 'add') {
+ if (!$this->loadObject(true)) {
+ return;
+ }
+ $this->content .= $this->renderForm();
+ } elseif ($this->display == 'view') {
+ // Some controllers use the view action without an object
+ if ($this->className) {
+ $this->loadObject(true);
+ }
+ $this->content .= $this->renderView();
+ } elseif ($this->display == 'editFeatureValue') {
+ if (!$this->object = new FeatureValue((int)Tools::getValue('id_feature_value'))) {
+ return;
+ }
- /**
- * AdminController::initContent() override
- * @see AdminController::initContent()
- */
- public function initContent()
- {
- if (Feature::isFeatureActive())
- {
- // toolbar (save, cancel, new, ..)
- $this->initTabModuleList();
- $this->initToolbar();
- $this->initPageHeaderToolbar();
- if ($this->display == 'edit' || $this->display == 'add')
- {
- if (!$this->loadObject(true))
- return;
- $this->content .= $this->renderForm();
- }
- elseif ($this->display == 'view')
- {
- // Some controllers use the view action without an object
- if ($this->className)
- $this->loadObject(true);
- $this->content .= $this->renderView();
- }
- elseif ($this->display == 'editFeatureValue')
- {
- if (!$this->object = new FeatureValue((int)Tools::getValue('id_feature_value')))
- return;
+ $this->content .= $this->initFormFeatureValue();
+ } elseif (!$this->ajax) {
+ // If a feature value was saved, we need to reset the values to display the list
+ $this->setTypeFeature();
+ $this->content .= $this->renderList();
+ }
+ } else {
+ $url = ''.$this->l('Performance').'';
+ $this->displayWarning(sprintf($this->l('This feature has been disabled. You can activate it here: %s.'), $url));
+ }
- $this->content .= $this->initFormFeatureValue();
- }
- elseif (!$this->ajax)
- {
- // If a feature value was saved, we need to reset the values to display the list
- $this->setTypeFeature();
- $this->content .= $this->renderList();
- }
- }
- else
- {
- $url = ''.$this->l('Performance').'';
- $this->displayWarning(sprintf($this->l('This feature has been disabled. You can activate it here: %s.'), $url));
- }
+ $this->context->smarty->assign(
+ array(
+ 'content' => $this->content,
+ 'url_post' => self::$currentIndex.'&token='.$this->token,
+ 'show_page_header_toolbar' => $this->show_page_header_toolbar,
+ 'page_header_toolbar_title' => $this->page_header_toolbar_title,
+ 'page_header_toolbar_btn' => $this->page_header_toolbar_btn
+ )
+ );
+ }
- $this->context->smarty->assign(array(
- 'content' => $this->content,
- 'url_post' => self::$currentIndex.'&token='.$this->token,
- 'show_page_header_toolbar' => $this->show_page_header_toolbar,
- 'page_header_toolbar_title' => $this->page_header_toolbar_title,
- 'page_header_toolbar_btn' => $this->page_header_toolbar_btn
- ));
- }
+ public function initProcess()
+ {
+ // Are we working on feature values?
+ if (Tools::getValue('id_feature_value')
+ || Tools::isSubmit('deletefeature_value')
+ || Tools::isSubmit('submitAddfeature_value')
+ || Tools::isSubmit('addfeature_value')
+ || Tools::isSubmit('updatefeature_value')
+ || Tools::isSubmit('submitBulkdeletefeature_value')
+ ) {
+ $this->setTypeValue();
+ }
- public function initProcess()
- {
- // Are we working on feature values?
- if (Tools::getValue('id_feature_value')
- || Tools::isSubmit('deletefeature_value')
- || Tools::isSubmit('submitAddfeature_value')
- || Tools::isSubmit('addfeature_value')
- || Tools::isSubmit('updatefeature_value')
- || Tools::isSubmit('submitBulkdeletefeature_value'))
- $this->setTypeValue();
+ if (Tools::getIsset('viewfeature')) {
+ $this->list_id = 'feature_value';
- if (Tools::getIsset('viewfeature'))
- {
- $this->list_id = 'feature_value';
+ if (isset($_POST['submitReset'.$this->list_id])) {
+ $this->processResetFilters();
+ }
+ } else {
+ $this->list_id = 'feature';
+ $this->_defaultOrderBy = 'position';
+ $this->_defaultOrderWay = 'ASC';
+ }
- if (isset($_POST['submitReset'.$this->list_id]))
- $this->processResetFilters();
- }
- else
- {
- $this->list_id = 'feature';
- $this->_defaultOrderBy = 'position';
- $this->_defaultOrderWay = 'ASC';
- }
+ parent::initProcess();
+ }
- parent::initProcess();
+ public function postProcess()
+ {
+ if (!Feature::isFeatureActive()) {
+ return;
+ }
- }
+ if ($this->table == 'feature_value' && ($this->action == 'save' || $this->action == 'delete' || $this->action == 'bulkDelete')) {
+ Hook::exec(
+ 'displayFeatureValuePostProcess',
+ array('errors' => &$this->errors)
+ );
+ } else { // send errors as reference to allow displayFeatureValuePostProcess to stop saving process
+ Hook::exec(
+ 'displayFeaturePostProcess',
+ array('errors' => &$this->errors)
+ );
+ } // send errors as reference to allow displayFeaturePostProcess to stop saving process
- public function postProcess()
- {
- if (!Feature::isFeatureActive())
- return;
+ parent::postProcess();
- if ($this->table == 'feature_value' && ($this->action == 'save' || $this->action == 'delete' || $this->action == 'bulkDelete'))
- Hook::exec('displayFeatureValuePostProcess',
- array('errors' => &$this->errors)); // send errors as reference to allow displayFeatureValuePostProcess to stop saving process
- else
- Hook::exec('displayFeaturePostProcess',
- array('errors' => &$this->errors)); // send errors as reference to allow displayFeaturePostProcess to stop saving process
+ if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) {
+ $this->display = 'editFeatureValue';
+ }
+ }
- parent::postProcess();
+ /**
+ * Override processAdd to change SaveAndStay button action
+ * @see classes/AdminControllerCore::processAdd()
+ */
+ public function processAdd()
+ {
+ $object = parent::processAdd();
- if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add'))
- $this->display = 'editFeatureValue';
- }
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
+ if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) {
+ $this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token;
+ } else {
+ $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
+ }
+ } elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors)) {
+ $this->display = 'editFeatureValue';
+ }
- /**
- * Override processAdd to change SaveAndStay button action
- * @see classes/AdminControllerCore::processAdd()
- */
- public function processAdd()
- {
- $object = parent::processAdd();
+ return $object;
+ }
- if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
- {
- if( $this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add') )
- $this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token;
- else
- $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
- }
- elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors))
- $this->display = 'editFeatureValue';
+ /**
+ * Override processUpdate to change SaveAndStay button action
+ * @see classes/AdminControllerCore::processUpdate()
+ */
+ public function processUpdate()
+ {
+ $object = parent::processUpdate();
- return $object;
- }
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
+ $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
+ }
- /**
- * Override processUpdate to change SaveAndStay button action
- * @see classes/AdminControllerCore::processUpdate()
- */
- public function processUpdate()
- {
- $object = parent::processUpdate();
+ return $object;
+ }
- if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
- $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
-
- return $object;
- }
-
- /**
- * Call the right method for creating or updating object
- *
- * @return mixed
- */
- public function processSave()
- {
- if ($this->table == 'feature')
- {
- $id_feature = (int)Tools::getValue('id_feature');
- // Adding last position to the feature if not exist
- if ($id_feature <= 0)
- {
- $sql = 'SELECT `position`+1
+ /**
+ * Call the right method for creating or updating object
+ *
+ * @return mixed
+ */
+ public function processSave()
+ {
+ if ($this->table == 'feature') {
+ $idFeature = (int)Tools::getValue('id_feature');
+ // Adding last position to the feature if not exist
+ if ($idFeature <= 0) {
+ $sql = 'SELECT `position`+1
FROM `'._DB_PREFIX_.'feature`
ORDER BY position DESC';
- // set the position of the new feature in $_POST for postProcess() method
- $_POST['position'] = DB::getInstance()->getValue($sql);
- }
- // clean \n\r characters
- foreach ($_POST as $key => $value)
- if (preg_match('/^name_/Ui', $key))
- $_POST[$key] = str_replace ('\n', '', str_replace('\r', '', $value));
- //validate feature image
- if(isset($_FILES['logo']) && $_FILES['logo']['tmp_name'])
- $this->validAddFeatureImage($_FILES['logo']);
- else
- $this->errors[] = Tools::displayError('Please upload a feature image.');
+ // set the position of the new feature in $_POST for postProcess() method
+ $_POST['position'] = DB::getInstance()->getValue($sql);
+ }
+ // clean \n\r characters
+ foreach ($_POST as $key => $value) {
+ if (preg_match('/^name_/Ui', $key)) {
+ $_POST[$key] = str_replace('\n', '', str_replace('\r', '', $value));
+ }
+ }
+ $featureImage = $_FILES['logo'];
+ if (!$idFeature || (isset($featureImage['tmp_name']) && $featureImage['tmp_name'])) {
+ if ($featureImage && $featureImage['tmp_name'] && $featureImage['name']) {
+ if ($error = ImageManager::validateUpload($featureImage, Tools::getMaxUploadSize())) {
+ $this->errors[] = $error;
+ }
+ } else {
+ $this->errors[] = $this->l('Please select an image for this feature.');
+ }
+ }
- $obj_feature = parent::processSave();
- if (!count($this->errors))
- {
- $img_path = _PS_IMG_DIR_.'rf/'.$obj_feature->id.'.png';
+ $objFeature = parent::processSave();
+ if (!count($this->errors)) {
+ // save feature image
+ if (isset($featureImage['tmp_name']) && $featureImage['tmp_name']) {
+ // if already feature image then delete it once before uploading new image
+ if ($idFeature) {
+ $currentImg = _PS_TMP_IMG_DIR_.'feature_mini_'.$objFeature->id.'_'.$this->context->shop->id.'.png';
+ if (file_exists($currentImg)) {
+ unlink($currentImg);
+ }
+ }
+ // upload feature image
+ $imgPath = _PS_IMG_DIR_.'rf/'.$objFeature->id.'.png';
+ if (!ImageManager::resize($featureImage['tmp_name'], $imgPath)) {
+ $this->errors[] = $this->l('Some error occurred while uploding feature image. Please try again.');
+ }
+ }
- //by webkul to save image of feature with feature name
- $feature_values = FeatureValue::getFeatureValuesWithLang(1, $obj_feature->id);
+ if ($featureValues = FeatureValue::getFeatureValuesWithLang(
+ $this->context->language->id,
+ $objFeature->id
+ )) {
+ $objFeatureValue = new FeatureValue($featureValues[0]['id_feature_value']);
+ } else {
+ $objFeatureValue = new FeatureValue();
+ }
+ $objFeatureValue->id_feature = $objFeature->id;
+ foreach (Language::getLanguages(true) as $lang) {
+ $objFeatureValue->value[$lang['id_lang']] = $objFeature->id.'.png';
+ }
+ $objFeatureValue->save();
+ return $objFeature;
+ }
+ }
+ }
- if ($feature_values)
- $obj_feature_value = new FeatureValue($feature_values[0]['id_feature_value']);
- else
- $obj_feature_value = new FeatureValue();
+ /**
+ * AdminController::getList() override
+ * @see AdminController::getList()
+ *
+ * @param int $id_lang
+ * @param string|null $order_by
+ * @param string|null $order_way
+ * @param int $start
+ * @param int|null $limit
+ * @param int|bool $id_lang_shop
+ *
+ * @throws PrestaShopException
+ */
+ public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
+ {
+ if ($this->table == 'feature_value') {
+ $this->_where .= ' AND (a.custom = 0 OR a.custom IS NULL)';
+ }
+ parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
- $current_file = _PS_TMP_IMG_DIR_.'feature_mini_'.$obj_feature->id.'_'.$this->context->shop->id.'.png';
- if (file_exists($current_file))
- unlink($current_file);
+ if ($this->table == 'feature') {
+ $nb_items = count($this->_list);
+ for ($i = 0; $i < $nb_items; ++$i) {
+ $item = &$this->_list[$i];
- $this->uploadFeatureImage($_FILES['logo'], $img_path);
- $obj_feature_value->id_feature = $obj_feature->id;
-
- foreach (Language::getLanguages(true) as $lang)
- $obj_feature_value->value[$lang['id_lang']] = $obj_feature->id.'.png';
-
- $obj_feature_value->save();
- return $obj_feature;
- }
-
- }
- }
+ $query = new DbQuery();
+ $query->select('COUNT(fv.id_feature_value) as count_values');
+ $query->from('feature_value', 'fv');
+ $query->where('fv.id_feature ='.(int)$item['id_feature']);
+ $query->where('(fv.custom=0 OR fv.custom IS NULL)');
+ $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
+ $item['value'] = (int)$res;
+ unset($query);
+ }
+ }
+ }
- // upload feature image by webkul
- public function uploadFeatureImage($image, $feature_img_path)
- {
- if (isset($image))
- {
- if ($image['size'] > 0)
- ImageManager::resize($image['tmp_name'], $feature_img_path);
- }
- }
+ public function ajaxProcessUpdatePositions()
+ {
+ if ($this->tabAccess['edit'] === '1') {
+ $way = (int)Tools::getValue('way');
+ $idFeature = (int)Tools::getValue('id');
+ $positions = Tools::getValue('feature');
- // validate feature image by webkul
- public function validAddFeatureImage($image)
- {
- if ($image['size'] > 0)
- {
- if ($image['tmp_name'] != "")
- {
- if(!ImageManager::isCorrectImageFileExt($image['name']))
- $this->errors[] = Tools::displayError(''.$_FILES['logo']['name'].' : Image format not recognized, allowed formats are: .gif, .jpg, .png', false);
- }
- }
- else
- return true;
- }
+ $new_positions = array();
+ foreach ($positions as $k => $v) {
+ if (!empty($v)) {
+ $new_positions[] = $v;
+ }
+ }
- /**
- * AdminController::getList() override
- * @see AdminController::getList()
- *
- * @param int $id_lang
- * @param string|null $order_by
- * @param string|null $order_way
- * @param int $start
- * @param int|null $limit
- * @param int|bool $id_lang_shop
- *
- * @throws PrestaShopException
- */
- public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
- {
- if ($this->table == 'feature_value')
- $this->_where .= ' AND (a.custom = 0 OR a.custom IS NULL)';
+ foreach ($new_positions as $position => $value) {
+ $pos = explode('_', $value);
- parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
+ if (isset($pos[2]) && (int)$pos[2] === $idFeature) {
+ if ($feature = new Feature((int)$pos[2])) {
+ if (isset($position) && $feature->updatePosition($way, $position, $idFeature)) {
+ echo 'ok position '.(int)$position.' for feature '.(int)$pos[1].'\r\n';
+ } else {
+ echo '{"hasError" : true, "errors" : "Can not update feature '.(int)$idFeature.' to position '.(int)$position.' "}';
+ }
+ } else {
+ echo '{"hasError" : true, "errors" : "This feature ('.(int)$idFeature.') can t be loaded"}';
+ }
- if ($this->table == 'feature')
- {
- $nb_items = count($this->_list);
- for ($i = 0; $i < $nb_items; ++$i)
- {
- $item = &$this->_list[$i];
-
- $query = new DbQuery();
- $query->select('COUNT(fv.id_feature_value) as count_values');
- $query->from('feature_value', 'fv');
- $query->where('fv.id_feature ='.(int)$item['id_feature']);
- $query->where('(fv.custom=0 OR fv.custom IS NULL)');
- $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
- $item['value'] = (int)$res;
- unset($query);
- }
- }
- }
-
- public function ajaxProcessUpdatePositions()
- {
- if ($this->tabAccess['edit'] === '1')
- {
- $way = (int)Tools::getValue('way');
- $id_feature = (int)Tools::getValue('id');
- $positions = Tools::getValue('feature');
-
- $new_positions = array();
- foreach ($positions as $k => $v)
- if (!empty($v))
- $new_positions[] = $v;
-
- foreach ($new_positions as $position => $value)
- {
- $pos = explode('_', $value);
-
- if (isset($pos[2]) && (int)$pos[2] === $id_feature)
- {
- if ($feature = new Feature((int)$pos[2]))
- if (isset($position) && $feature->updatePosition($way, $position, $id_feature))
- echo 'ok position '.(int)$position.' for feature '.(int)$pos[1].'\r\n';
- else
- echo '{"hasError" : true, "errors" : "Can not update feature '.(int)$id_feature.' to position '.(int)$position.' "}';
- else
- echo '{"hasError" : true, "errors" : "This feature ('.(int)$id_feature.') can t be loaded"}';
-
- break;
- }
- }
- }
- }
+ break;
+ }
+ }
+ }
+ }
}
diff --git a/controllers/admin/AdminOrderPreferencesController.php b/controllers/admin/AdminOrderPreferencesController.php
index b739b5dbb..62202b9b5 100644
--- a/controllers/admin/AdminOrderPreferencesController.php
+++ b/controllers/admin/AdminOrderPreferencesController.php
@@ -73,13 +73,13 @@ class AdminOrderPreferencesControllerCore extends AdminController
'value' => PS_ORDER_PROCESS_OPC,
'identifier' => 'value',
),*/
- /*'PS_GUEST_CHECKOUT_ENABLED' => array(
+ 'PS_GUEST_CHECKOUT_ENABLED' => array(
'title' => $this->l('Enable guest checkout'),
'hint' => $this->l('Allow guest visitors to place an order without registering.'),
'validation' => 'isBool',
'cast' => 'intval',
- 'type' => 'hidden'
- ),*/
+ 'type' => 'bool'
+ ),
/*'PS_DISALLOW_HISTORY_REORDERING' => array(
'title' => $this->l('Disable Reordering Option'),
'hint' => $this->l('Disable the option to allow customers to reorder in one click from the order history page (required in some European countries).'),
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index 480bba03b..17d6600e0 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -476,12 +476,14 @@ class AdminProductsControllerCore extends AdminController
$full_tree = Tools::getValue('fullTree', 0);
$use_check_box = Tools::getValue('useCheckBox', 1);
$selected = Tools::getValue('selected', array());
+ $id_tree = Tools::getValue('type');
$input_name = str_replace(array('[', ']'), '', Tools::getValue('inputName', null));
$tree = new HelperTreeCategories('subtree_associated_categories');
$tree->setTemplate('subtree_associated_categories.tpl')
->setUseCheckBox($use_check_box)
- ->setUseSearch(true)
+ ->setUseSearch(false)
+ ->setIdTree($id_tree)
->setSelectedCategories($selected)
->setFullTree($full_tree)
->setChildrenOnly(true)
@@ -3666,7 +3668,8 @@ class AdminProductsControllerCore extends AdminController
->setHeaderTemplate('tree_associated_header.tpl')
->setRootCategory($root->id)
->setUseCheckBox(true)
- ->setUseSearch(true)
+ ->setUseSearch(false)
+ ->setFullTree(0)
->setSelectedCategories($categories);
$data->assign(array('default_category' => $default_category,
diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php
index 384dfed0b..02d9fa483 100644
--- a/controllers/front/AuthController.php
+++ b/controllers/front/AuthController.php
@@ -26,710 +26,814 @@
class AuthControllerCore extends FrontController
{
- public $ssl = true;
- public $php_self = 'authentication';
- public $auth = false;
-
- /**
- * @var bool create_account
- */
- protected $create_account;
- protected $id_country;
-
- /**
- * Initialize auth controller
- * @see FrontController::init()
- */
- public function init()
- {
- parent::init();
-
- if (!Tools::getIsset('step') && $this->context->customer->isLogged() && !$this->ajax)
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
-
- if (Tools::getValue('create_account'))
- $this->create_account = true;
- }
-
- /**
- * Set default medias for this controller
- * @see FrontController::setMedia()
- */
- public function setMedia()
- {
- parent::setMedia();
- if (!$this->useMobileTheme())
- $this->addCSS(_THEME_CSS_DIR_.'authentication.css');
-
- $this->addCSS(_THEME_CSS_DIR_.'htl-reservation-general.css');// webkul
-
- $this->addJqueryPlugin('typewatch');
- $this->addJS(array(
- _THEME_JS_DIR_.'tools/vatManagement.js',
- _THEME_JS_DIR_.'tools/statesManagement.js',
- _THEME_JS_DIR_.'authentication.js',
- _PS_JS_DIR_.'validate.js'
- ));
- }
-
- /**
- * Run ajax process
- * @see FrontController::displayAjax()
- */
- public function displayAjax()
- {
- $this->display();
- }
-
- /**
- * Assign template vars related to page content
- * @see FrontController::initContent()
- */
- public function initContent()
- {
- parent::initContent();
-
- $this->context->smarty->assign('genders', Gender::getGenders());
-
- $this->assignDate();
-
- $this->assignCountries();
-
- $newsletter = Configuration::get('PS_CUSTOMER_NWSL') || (Module::isInstalled('blocknewsletter') && Module::getInstanceByName('blocknewsletter')->active);
- $this->context->smarty->assign('newsletter', $newsletter);
- $this->context->smarty->assign('optin', (bool)Configuration::get('PS_CUSTOMER_OPTIN'));
-
- $back = Tools::getValue('back');
- $key = Tools::safeOutput(Tools::getValue('key'));
-
- if (!empty($key))
- $back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
-
- if ($back == Tools::secureReferrer(Tools::getValue('back')))
- $this->context->smarty->assign('back', html_entity_decode($back));
- else
- $this->context->smarty->assign('back', Tools::safeOutput($back));
-
- if (Tools::getValue('display_guest_checkout'))
- {
- if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
- $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
- else
- $countries = Country::getCountries($this->context->language->id, true);
-
- $this->context->smarty->assign(array(
- 'inOrderProcess' => true,
- 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
- 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
- 'sl_country' => (int)$this->id_country,
- 'countries' => $countries
- ));
- }
-
- if (Tools::getValue('create_account'))
- $this->context->smarty->assign('email_create', 1);
-
- if (Tools::getValue('multi-shipping') == 1)
- $this->context->smarty->assign('multi_shipping', true);
- else
- $this->context->smarty->assign('multi_shipping', false);
-
- $this->context->smarty->assign('field_required', $this->context->customer->validateFieldsRequiredDatabase());
-
- $this->assignAddressFormat();
-
- // Call a hook to display more information on form
- $this->context->smarty->assign(array(
- 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'),
- 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop')
- ));
-
- // Just set $this->template value here in case it's used by Ajax
- $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl');
-
- if ($this->ajax)
- {
- // Call a hook to display more information on form
- $this->context->smarty->assign(array(
- 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
- 'genders' => Gender::getGenders()
- ));
-
- $return = array(
- 'hasError' => !empty($this->errors),
- 'errors' => $this->errors,
- 'page' => $this->context->smarty->fetch($this->template),
- 'token' => Tools::getToken(false)
- );
- $this->ajaxDie(Tools::jsonEncode($return));
- }
- }
-
- /**
- * Assign date var to smarty
- */
- protected function assignDate()
- {
- $selectedYears = (int)(Tools::getValue('years', 0));
- $years = Tools::dateYears();
- $selectedMonths = (int)(Tools::getValue('months', 0));
- $months = Tools::dateMonths();
- $selectedDays = (int)(Tools::getValue('days', 0));
- $days = Tools::dateDays();
-
- $this->context->smarty->assign(array(
- 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
- 'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), //retro compat
- 'years' => $years,
- 'sl_year' => $selectedYears,
- 'months' => $months,
- 'sl_month' => $selectedMonths,
- 'days' => $days,
- 'sl_day' => $selectedDays
- ));
- }
-
- /**
- * Assign countries var to smarty
- */
- protected function assignCountries()
- {
- $this->id_country = (int)Tools::getCountry();
- if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
- $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
- else
- $countries = Country::getCountries($this->context->language->id, true);
- $this->context->smarty->assign(array(
- 'countries' => $countries,
- 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
- 'sl_country' => (int)$this->id_country,
- 'vat_management' => Configuration::get('VATNUMBER_MANAGEMENT')
- ));
- }
-
- /**
- * Assign address var to smarty
- */
- protected function assignAddressFormat()
- {
- $addressItems = array();
- $addressFormat = AddressFormat::getOrderedAddressFields((int)$this->id_country, false, true);
- $requireFormFieldsList = AddressFormat::getFieldsRequired();
-
- foreach ($addressFormat as $addressline)
- foreach (explode(' ', $addressline) as $addressItem)
- $addressItems[] = trim($addressItem);
-
- // Add missing require fields for a new user susbscription form
- foreach ($requireFormFieldsList as $fieldName)
- if (!in_array($fieldName, $addressItems))
- $addressItems[] = trim($fieldName);
-
- foreach (array('inv', 'dlv') as $addressType)
- $this->context->smarty->assign(array(
- $addressType.'_adr_fields' => $addressFormat,
- $addressType.'_all_fields' => $addressItems,
- 'required_fields' => $requireFormFieldsList
- ));
- }
-
- /**
- * Start forms process
- * @see FrontController::postProcess()
- */
- public function postProcess()
- {
- if (Tools::isSubmit('SubmitCreate'))
- $this->processSubmitCreate();
-
- if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount'))
- $this->processSubmitAccount();
-
- if (Tools::isSubmit('SubmitLogin'))
- $this->processSubmitLogin();
- }
-
- /**
- * Process login
- */
- protected function processSubmitLogin()
- {
- Hook::exec('actionBeforeAuthentication');
- $passwd = trim(Tools::getValue('passwd'));
- $_POST['passwd'] = null;
- $email = trim(Tools::getValue('email'));
- if (empty($email))
- $this->errors[] = Tools::displayError('An email address required.');
- elseif (!Validate::isEmail($email))
- $this->errors[] = Tools::displayError('Invalid email address.');
- elseif (empty($passwd))
- $this->errors[] = Tools::displayError('Password is required.');
- elseif (!Validate::isPasswd($passwd))
- $this->errors[] = Tools::displayError('Invalid password.');
- else
- {
- $customer = new Customer();
- $authentication = $customer->getByEmail(trim($email), trim($passwd));
- if (isset($authentication->active) && !$authentication->active)
- $this->errors[] = Tools::displayError('Your account isn\'t available at this time, please contact us');
- elseif (!$authentication || !$customer->id)
- $this->errors[] = Tools::displayError('Authentication failed.');
- else
- {
- $this->context->cookie->id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: CompareProduct::getIdCompareByIdCustomer($customer->id);
- $this->context->cookie->id_customer = (int)($customer->id);
- $this->context->cookie->customer_lastname = $customer->lastname;
- $this->context->cookie->customer_firstname = $customer->firstname;
- $this->context->cookie->logged = 1;
- $customer->logged = 1;
- $this->context->cookie->is_guest = $customer->isGuest();
- $this->context->cookie->passwd = $customer->passwd;
- $this->context->cookie->email = $customer->email;
-
- // Add customer to the context
- $this->context->customer = $customer;
-
- if (Configuration::get('PS_CART_FOLLOWING') && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0) && $id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id))
- $this->context->cart = new Cart($id_cart);
- else
- {
- $id_carrier = (int)$this->context->cart->id_carrier;
- $this->context->cart->id_carrier = 0;
- $this->context->cart->setDeliveryOption(null);
- $this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId((int)($customer->id));
- $this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId((int)($customer->id));
- }
- $this->context->cart->id_customer = (int)$customer->id;
- $this->context->cart->secure_key = $customer->secure_key;
-
- if ($this->ajax && isset($id_carrier) && $id_carrier && Configuration::get('PS_ORDER_PROCESS_TYPE'))
- {
- $delivery_option = array($this->context->cart->id_address_delivery => $id_carrier.',');
- $this->context->cart->setDeliveryOption($delivery_option);
- }
-
- $this->context->cart->save();
- $this->context->cookie->id_cart = (int)$this->context->cart->id;
- $this->context->cookie->write();
- $this->context->cart->autosetProductAddress();
-
- Hook::exec('actionAuthentication');
-
- // Login information have changed, so we check if the cart rules still apply
- CartRule::autoRemoveFromCart($this->context);
- CartRule::autoAddToCart($this->context);
-
- if (!$this->ajax && $back = Tools::getValue('back'))
- {
- if ($back == Tools::secureReferrer(Tools::getValue('back')))
- Tools::redirect(html_entity_decode($back));
-
- $back = $back ? $back : 'my-account';
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : $back));
- }
- }
- }
- if ($this->ajax)
- {
- $return = array(
- 'hasError' => !empty($this->errors),
- 'errors' => $this->errors,
- 'token' => Tools::getToken(false)
- );
- $this->ajaxDie(Tools::jsonEncode($return));
- }
- else
- $this->context->smarty->assign('authentification_error', $this->errors);
-
- }
-
- /**
- * Process the newsletter settings and set the customer infos.
- *
- * @param Customer $customer Reference on the customer Object.
- *
- * @note At this point, the email has been validated.
- */
- protected function processCustomerNewsletter(&$customer)
- {
- if (Tools::getValue('newsletter'))
- {
- $customer->ip_registration_newsletter = pSQL(Tools::getRemoteAddr());
- $customer->newsletter_date_add = pSQL(date('Y-m-d H:i:s'));
-
- if ($module_newsletter = Module::getInstanceByName('blocknewsletter'))
- {
- /** @var Blocknewsletter $module_newsletter */
- if ($module_newsletter->active)
- $module_newsletter->confirmSubscription(Tools::getValue('email'));
- }
- }
- }
-
- /**
- * Process submit on an account
- */
- protected function processSubmitAccount()
- {
- Hook::exec('actionBeforeSubmitAccount');
- $this->create_account = true;
- if (Tools::isSubmit('submitAccount'))
- $this->context->smarty->assign('email_create', 1);
- // New Guest customer
- if (!Tools::getValue('is_new_customer', 1) && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED'))
- $this->errors[] = Tools::displayError('You cannot create a guest account.');
- if (!Tools::getValue('is_new_customer', 1))
- $_POST['passwd'] = md5(time()._COOKIE_KEY_);
- if ($guest_email = Tools::getValue('guest_email'))
- $_POST['email'] = $guest_email;
- // Checked the user address in case he changed his email address
- if (Validate::isEmail($email = Tools::getValue('email')) && !empty($email))
- if (Customer::customerExists($email))
- $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
- // Preparing customer
- $customer = new Customer();
- $lastnameAddress = Tools::getValue('lastname');
- $firstnameAddress = Tools::getValue('firstname');
- $_POST['lastname'] = Tools::getValue('customer_lastname', $lastnameAddress);
- $_POST['firstname'] = Tools::getValue('customer_firstname', $firstnameAddress);
- $addresses_types = array('address');
- if (!Configuration::get('PS_ORDER_PROCESS_TYPE') && Configuration::get('PS_GUEST_CHECKOUT_ENABLED') && Tools::getValue('invoice_address'))
- $addresses_types[] = 'address_invoice';
-
- $error_phone = false;
- if (Configuration::get('PS_ONE_PHONE_AT_LEAST'))
- {
- if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer'))
- {
- if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
- $error_phone = true;
- }
- elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE'))
- || (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create'))
- || (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Tools::getValue('email_create')))
- && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')))
- $error_phone = true;
- }
-
- if ($error_phone)
- $this->errors[] = Tools::displayError('You must register at least one phone number.');
-
- $this->errors = array_unique(array_merge($this->errors, $customer->validateController()));
-
- // Check the requires fields which are settings in the BO
- $this->errors = $this->errors + $customer->validateFieldsRequiredDatabase();
-
- if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount'))
- {
- if (!count($this->errors))
- {
- if (Tools::isSubmit('newsletter'))
- $this->processCustomerNewsletter($customer);
-
- $customer->firstname = Tools::ucwords($customer->firstname);
- $customer->birthday = (empty($_POST['years']) ? '' : (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days'));
- if (!Validate::isBirthDate($customer->birthday))
- $this->errors[] = Tools::displayError('Invalid date of birth.');
-
- // New Guest customer
- $customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0);
- $customer->active = 1;
-
- if (!count($this->errors))
- {
- if ($customer->add())
- {
- if (!$customer->is_guest)
- if (!$this->sendConfirmationMail($customer))
- $this->errors[] = Tools::displayError('The email cannot be sent.');
-
- $this->updateContext($customer);
-
- $this->context->cart->update();
- Hook::exec('actionCustomerAccountAdd', array(
- '_POST' => $_POST,
- 'newCustomer' => $customer
- ));
- if ($this->ajax)
- {
- $return = array(
- 'hasError' => !empty($this->errors),
- 'errors' => $this->errors,
- 'isSaved' => true,
- 'id_customer' => (int)$this->context->cookie->id_customer,
- 'id_address_delivery' => $this->context->cart->id_address_delivery,
- 'id_address_invoice' => $this->context->cart->id_address_invoice,
- 'token' => Tools::getToken(false)
- );
- $this->ajaxDie(Tools::jsonEncode($return));
- }
-
- if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back))
- Tools::redirect(html_entity_decode($back));
-
- // redirection: if cart is not empty : redirection to the cart
- if (count($this->context->cart->getProducts(true)) > 0)
- {
- $multi = (int)Tools::getValue('multi-shipping');
- Tools::redirect('index.php?controller=order'.($multi ? '&multi-shipping='.$multi : ''));
- }
- // else : redirection to the account
- else
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
- }
- else
- $this->errors[] = Tools::displayError('An error occurred while creating your account.');
- }
- }
-
- }
- else // if registration type is in one step, we save the address
- {
- $_POST['lastname'] = $lastnameAddress;
- $_POST['firstname'] = $firstnameAddress;
- $post_back = $_POST;
- // Preparing addresses
- foreach ($addresses_types as $addresses_type)
- {
- $$addresses_type = new Address();
- $$addresses_type->id_customer = 1;
-
- if ($addresses_type == 'address_invoice')
- foreach ($_POST as $key => &$post)
- if ($tmp = Tools::getValue($key.'_invoice'))
- $post = $tmp;
-
- $this->errors = array_unique(array_merge($this->errors, $$addresses_type->validateController()));
- if ($addresses_type == 'address_invoice')
- $_POST = $post_back;
-
- if (!($country = new Country($$addresses_type->id_country)) || !Validate::isLoadedObject($country))
- $this->errors[] = Tools::displayError('Country cannot be loaded with address->id_country');
-
- if (!$country->active)
- $this->errors[] = Tools::displayError('This country is not active.');
-
- $postcode = $$addresses_type->postcode;
- /* Check zip code format */
- if ($country->zip_code_format && !$country->checkZipCode($postcode))
- $this->errors[] = sprintf(Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'), str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format))));
- elseif (empty($postcode) && $country->need_zip_code)
- $this->errors[] = Tools::displayError('A Zip / Postal code is required.');
- elseif ($postcode && !Validate::isPostCode($postcode))
- $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.');
-
- if ($country->need_identification_number && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni'))))
- $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.');
- elseif (!$country->need_identification_number)
- $$addresses_type->dni = null;
-
- if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount'))
- if (!($country = new Country($$addresses_type->id_country, Configuration::get('PS_LANG_DEFAULT'))) || !Validate::isLoadedObject($country))
- $this->errors[] = Tools::displayError('Country is invalid');
- $contains_state = isset($country) && is_object($country) ? (int)$country->contains_states: 0;
- $id_state = isset($$addresses_type) && is_object($$addresses_type) ? (int)$$addresses_type->id_state: 0;
- if ((Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount')) && $contains_state && !$id_state)
- $this->errors[] = Tools::displayError('This country requires you to choose a State.');
- }
- }
-
- if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == ''))
- $this->errors[] = Tools::displayError('Invalid date of birth');
-
- if (!count($this->errors))
- {
- if (Customer::customerExists(Tools::getValue('email')))
- $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
- if (Tools::isSubmit('newsletter'))
- $this->processCustomerNewsletter($customer);
-
- $customer->birthday = (empty($_POST['years']) ? '' : (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days'));
- if (!Validate::isBirthDate($customer->birthday))
- $this->errors[] = Tools::displayError('Invalid date of birth');
-
- if (!count($this->errors))
- {
- $customer->active = 1;
- // New Guest customer
- if (Tools::isSubmit('is_new_customer'))
- $customer->is_guest = !Tools::getValue('is_new_customer', 1);
- else
- $customer->is_guest = 0;
- if (!$customer->add())
- $this->errors[] = Tools::displayError('An error occurred while creating your account.');
- else
- {
- foreach ($addresses_types as $addresses_type)
- {
- $$addresses_type->id_customer = (int)$customer->id;
- if ($addresses_type == 'address_invoice')
- foreach ($_POST as $key => &$post)
- if ($tmp = Tools::getValue($key.'_invoice'))
- $post = $tmp;
-
- $this->errors = array_unique(array_merge($this->errors, $$addresses_type->validateController()));
- if ($addresses_type == 'address_invoice')
- $_POST = $post_back;
- if (!count($this->errors) && (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax || Tools::isSubmit('submitGuestAccount')) && !$$addresses_type->add())
- $this->errors[] = Tools::displayError('An error occurred while creating your address.');
- }
- if (!count($this->errors))
- {
- if (!$customer->is_guest)
- {
- $this->context->customer = $customer;
- $customer->cleanGroups();
- // we add the guest customer in the default customer group
- $customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP')));
- if (!$this->sendConfirmationMail($customer))
- $this->errors[] = Tools::displayError('The email cannot be sent.');
- }
- else
- {
- $customer->cleanGroups();
- // we add the guest customer in the guest customer group
- $customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP')));
- }
- $this->updateContext($customer);
- $this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId((int)$customer->id);
- $this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId((int)$customer->id);
- if (isset($address_invoice) && Validate::isLoadedObject($address_invoice))
- $this->context->cart->id_address_invoice = (int)$address_invoice->id;
-
- if ($this->ajax && Configuration::get('PS_ORDER_PROCESS_TYPE'))
- {
- $delivery_option = array((int)$this->context->cart->id_address_delivery => (int)$this->context->cart->id_carrier.',');
- $this->context->cart->setDeliveryOption($delivery_option);
- }
-
- // If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated
- $this->context->cart->update();
-
- // Avoid articles without delivery address on the cart
- $this->context->cart->autosetProductAddress();
-
- Hook::exec('actionCustomerAccountAdd', array(
- '_POST' => $_POST,
- 'newCustomer' => $customer
- ));
- if ($this->ajax)
- {
- $return = array(
- 'hasError' => !empty($this->errors),
- 'errors' => $this->errors,
- 'isSaved' => true,
- 'id_customer' => (int)$this->context->cookie->id_customer,
- 'id_address_delivery' => $this->context->cart->id_address_delivery,
- 'id_address_invoice' => $this->context->cart->id_address_invoice,
- 'token' => Tools::getToken(false)
- );
- $this->ajaxDie(Tools::jsonEncode($return));
- }
- // if registration type is in two steps, we redirect to register address
- if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount'))
- Tools::redirect('index.php?controller=address');
-
- if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back))
- Tools::redirect(html_entity_decode($back));
-
- // redirection: if cart is not empty : redirection to the cart
- if (count($this->context->cart->getProducts(true)) > 0)
- Tools::redirect('index.php?controller=order'.($multi = (int)Tools::getValue('multi-shipping') ? '&multi-shipping='.$multi : ''));
- // else : redirection to the account
- else
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
- }
- }
- }
- }
-
- if (count($this->errors))
- {
- //for retro compatibility to display guest account creation form on authentication page
- if (Tools::getValue('submitGuestAccount'))
- $_GET['display_guest_checkout'] = 1;
-
- if (!Tools::getValue('is_new_customer'))
- unset($_POST['passwd']);
- if ($this->ajax)
- {
- $return = array(
- 'hasError' => !empty($this->errors),
- 'errors' => $this->errors,
- 'isSaved' => false,
- 'id_customer' => 0
- );
- $this->ajaxDie(Tools::jsonEncode($return));
- }
- $this->context->smarty->assign('account_error', $this->errors);
- }
- }
-
- /**
- * Process submit on a creation
- */
- protected function processSubmitCreate()
- {
- if (!Validate::isEmail($email = Tools::getValue('email_create')) || empty($email))
- $this->errors[] = Tools::displayError('Invalid email address.');
- elseif (Customer::customerExists($email))
- {
- $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
- $_POST['email'] = Tools::getValue('email_create');
- unset($_POST['email_create']);
- }
- else
- {
- $this->create_account = true;
- $this->context->smarty->assign('email_create', Tools::safeOutput($email));
- $_POST['email'] = $email;
- }
- }
-
- /**
- * Update context after customer creation
- * @param Customer $customer Created customer
- */
- protected function updateContext(Customer $customer)
- {
- $this->context->customer = $customer;
- $this->context->smarty->assign('confirmation', 1);
- $this->context->cookie->id_customer = (int)$customer->id;
- $this->context->cookie->customer_lastname = $customer->lastname;
- $this->context->cookie->customer_firstname = $customer->firstname;
- $this->context->cookie->passwd = $customer->passwd;
- $this->context->cookie->logged = 1;
- // if register process is in two steps, we display a message to confirm account creation
- if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE'))
- $this->context->cookie->account_created = 1;
- $customer->logged = 1;
- $this->context->cookie->email = $customer->email;
- $this->context->cookie->is_guest = !Tools::getValue('is_new_customer', 1);
- // Update cart address
- $this->context->cart->secure_key = $customer->secure_key;
- }
-
- /**
- * sendConfirmationMail
- * @param Customer $customer
- * @return bool
- */
- protected function sendConfirmationMail(Customer $customer)
- {
- if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL'))
- return true;
-
- return Mail::Send(
- $this->context->language->id,
- 'account',
- Mail::l('Welcome!'),
- array(
- '{firstname}' => $customer->firstname,
- '{lastname}' => $customer->lastname,
- '{email}' => $customer->email,
- '{passwd}' => Tools::getValue('passwd')),
- $customer->email,
- $customer->firstname.' '.$customer->lastname
- );
- }
+ public $ssl = true;
+ public $php_self = 'authentication';
+ public $auth = false;
+
+ /**
+ * @var bool create_account
+ */
+ protected $create_account;
+ protected $id_country;
+
+ /**
+ * Initialize auth controller
+ * @see FrontController::init()
+ */
+ public function init()
+ {
+ parent::init();
+
+ if (!Tools::getIsset('step') && $this->context->customer->isLogged() && !$this->ajax) {
+ Tools::redirect(
+ 'index.php?controller='.
+ (($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account')
+ );
+ }
+
+ if (Tools::getValue('create_account')) {
+ $this->create_account = true;
+ }
+ }
+
+ /**
+ * Set default medias for this controller
+ * @see FrontController::setMedia()
+ */
+ public function setMedia()
+ {
+ parent::setMedia();
+ if (!$this->useMobileTheme()) {
+ $this->addCSS(_THEME_CSS_DIR_.'authentication.css');
+ }
+
+ $this->addCSS(_THEME_CSS_DIR_.'htl-reservation-general.css');// webkul
+
+ $this->addJqueryPlugin('typewatch');
+ $this->addJS(
+ array(
+ _THEME_JS_DIR_.'tools/vatManagement.js',
+ _THEME_JS_DIR_.'tools/statesManagement.js',
+ _THEME_JS_DIR_.'authentication.js',
+ _PS_JS_DIR_.'validate.js'
+ )
+ );
+ }
+
+ /**
+ * Run ajax process
+ * @see FrontController::displayAjax()
+ */
+ public function displayAjax()
+ {
+ $this->display();
+ }
+
+ /**
+ * Assign template vars related to page content
+ * @see FrontController::initContent()
+ */
+ public function initContent()
+ {
+ parent::initContent();
+
+ $this->context->smarty->assign('genders', Gender::getGenders());
+
+ $this->assignDate();
+
+ $this->assignCountries();
+
+ $newsletter = Configuration::get('PS_CUSTOMER_NWSL') || (Module::isInstalled('blocknewsletter') && Module::getInstanceByName('blocknewsletter')->active);
+
+ $this->context->smarty->assign('newsletter', $newsletter);
+ $this->context->smarty->assign('optin', (bool)Configuration::get('PS_CUSTOMER_OPTIN'));
+
+ $back = Tools::getValue('back');
+ $key = Tools::safeOutput(Tools::getValue('key'));
+
+ if (!empty($key)) {
+ $back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
+ }
+
+ if ($back == Tools::secureReferrer(Tools::getValue('back'))) {
+ $this->context->smarty->assign('back', html_entity_decode($back));
+ } else {
+ $this->context->smarty->assign('back', Tools::safeOutput($back));
+ }
+
+ if (Tools::getValue('display_guest_checkout')) {
+ if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) {
+ $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
+ } else {
+ $countries = Country::getCountries($this->context->language->id, true);
+ }
+
+ $this->context->smarty->assign(
+ array(
+ 'inOrderProcess' => true,
+ 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
+ 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
+ 'sl_country' => (int)$this->id_country,
+ 'countries' => $countries
+ )
+ );
+ }
+
+ if (Tools::getValue('create_account')) {
+ $this->context->smarty->assign('email_create', 1);
+ }
+
+ if (Tools::getValue('multi-shipping') == 1) {
+ $this->context->smarty->assign('multi_shipping', true);
+ } else {
+ $this->context->smarty->assign('multi_shipping', false);
+ }
+
+ $this->context->smarty->assign('field_required', $this->context->customer->validateFieldsRequiredDatabase());
+
+ $this->assignAddressFormat();
+
+ // Call a hook to display more information on form
+ $this->context->smarty->assign(
+ array(
+ 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'),
+ 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop')
+ )
+ );
+
+ // Just set $this->template value here in case it's used by Ajax
+ $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl');
+
+ if ($this->ajax) {
+ // Call a hook to display more information on form
+ $this->context->smarty->assign(
+ array(
+ 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
+ 'genders' => Gender::getGenders()
+ )
+ );
+
+ $return = array(
+ 'hasError' => !empty($this->errors),
+ 'errors' => $this->errors,
+ 'page' => $this->context->smarty->fetch($this->template),
+ 'token' => Tools::getToken(false)
+ );
+ $this->ajaxDie(Tools::jsonEncode($return));
+ }
+ }
+
+ /**
+ * Assign date var to smarty
+ */
+ protected function assignDate()
+ {
+ $selectedYears = (int)(Tools::getValue('years', 0));
+ $years = Tools::dateYears();
+ $selectedMonths = (int)(Tools::getValue('months', 0));
+ $months = Tools::dateMonths();
+ $selectedDays = (int)(Tools::getValue('days', 0));
+ $days = Tools::dateDays();
+
+ $this->context->smarty->assign(
+ array(
+ 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
+ 'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), //retro compat
+ 'years' => $years,
+ 'sl_year' => $selectedYears,
+ 'months' => $months,
+ 'sl_month' => $selectedMonths,
+ 'days' => $days,
+ 'sl_day' => $selectedDays
+ )
+ );
+ }
+
+ /**
+ * Assign countries var to smarty
+ */
+ protected function assignCountries()
+ {
+ $this->id_country = (int)Tools::getCountry();
+ if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) {
+ $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
+ } else {
+ $countries = Country::getCountries($this->context->language->id, true);
+ }
+ $this->context->smarty->assign(
+ array(
+ 'countries' => $countries,
+ 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
+ 'sl_country' => (int)$this->id_country,
+ 'vat_management' => Configuration::get('VATNUMBER_MANAGEMENT')
+ )
+ );
+ }
+
+ /**
+ * Assign address var to smarty
+ */
+ protected function assignAddressFormat()
+ {
+ $addressItems = array();
+ $addressFormat = AddressFormat::getOrderedAddressFields((int)$this->id_country, false, true);
+ $requireFormFieldsList = AddressFormat::getFieldsRequired();
+
+ foreach ($addressFormat as $addressline) {
+ foreach (explode(' ', $addressline) as $addressItem) {
+ $addressItems[] = trim($addressItem);
+ }
+ }
+
+ // Add missing require fields for a new user susbscription form
+ foreach ($requireFormFieldsList as $fieldName) {
+ if (!in_array($fieldName, $addressItems)) {
+ $addressItems[] = trim($fieldName);
+ }
+ }
+
+ foreach (array('inv', 'dlv') as $addressType) {
+ $this->context->smarty->assign(
+ array(
+ $addressType.'_adr_fields' => $addressFormat,
+ $addressType.'_all_fields' => $addressItems,
+ 'required_fields' => $requireFormFieldsList
+ )
+ );
+ }
+ }
+
+ /**
+ * Start forms process
+ * @see FrontController::postProcess()
+ */
+ public function postProcess()
+ {
+ if (Tools::isSubmit('SubmitCreate')) {
+ $this->processSubmitCreate();
+ }
+
+ if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount')) {
+ $this->processSubmitAccount();
+ }
+
+ if (Tools::isSubmit('SubmitLogin')) {
+ $this->processSubmitLogin();
+ }
+ }
+
+ /**
+ * Process login
+ */
+ protected function processSubmitLogin()
+ {
+ Hook::exec('actionBeforeAuthentication');
+ $passwd = trim(Tools::getValue('passwd'));
+ $_POST['passwd'] = null;
+ $email = trim(Tools::getValue('email'));
+
+ if (empty($email)) {
+ $this->errors[] = Tools::displayError('An email address required.');
+ } elseif (!Validate::isEmail($email)) {
+ $this->errors[] = Tools::displayError('Invalid email address.');
+ } elseif (empty($passwd)) {
+ $this->errors[] = Tools::displayError('Password is required.');
+ } elseif (!Validate::isPasswd($passwd)) {
+ $this->errors[] = Tools::displayError('Invalid password.');
+ } else {
+ $customer = new Customer();
+ $authentication = $customer->getByEmail(trim($email), trim($passwd));
+ if (isset($authentication->active) && !$authentication->active) {
+ $this->errors[] = Tools::displayError('Your account isn\'t available at this time, please contact us');
+ } elseif (!$authentication || !$customer->id) {
+ $this->errors[] = Tools::displayError('Authentication failed.');
+ } else {
+ $this->context->cookie->id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: CompareProduct::getIdCompareByIdCustomer($customer->id);
+ $this->context->cookie->id_customer = (int)($customer->id);
+ $this->context->cookie->customer_lastname = $customer->lastname;
+ $this->context->cookie->customer_firstname = $customer->firstname;
+ $this->context->cookie->logged = 1;
+ $customer->logged = 1;
+ $this->context->cookie->is_guest = $customer->isGuest();
+ $this->context->cookie->passwd = $customer->passwd;
+ $this->context->cookie->email = $customer->email;
+
+ // Add customer to the context
+ $this->context->customer = $customer;
+
+ if (Configuration::get('PS_CART_FOLLOWING')
+ && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0) && $id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id)
+ ) {
+ $this->context->cart = new Cart($id_cart);
+ } else {
+ $id_carrier = (int)$this->context->cart->id_carrier;
+ $this->context->cart->id_carrier = 0;
+ $this->context->cart->setDeliveryOption(null);
+ $this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId(
+ (int)($customer->id)
+ );
+ $this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId(
+ (int)($customer->id)
+ );
+ }
+ $this->context->cart->id_customer = (int)$customer->id;
+ $this->context->cart->secure_key = $customer->secure_key;
+
+ if ($this->ajax && isset($id_carrier) && $id_carrier && Configuration::get('PS_ORDER_PROCESS_TYPE')) {
+ $delivery_option = array($this->context->cart->id_address_delivery => $id_carrier.',');
+ $this->context->cart->setDeliveryOption($delivery_option);
+ }
+
+ $this->context->cart->save();
+ $this->context->cookie->id_cart = (int)$this->context->cart->id;
+ $this->context->cookie->write();
+ $this->context->cart->autosetProductAddress();
+
+ Hook::exec('actionAuthentication');
+
+ // Login information have changed, so we check if the cart rules still apply
+ CartRule::autoRemoveFromCart($this->context);
+ CartRule::autoAddToCart($this->context);
+
+ if (!$this->ajax && $back = Tools::getValue('back')) {
+ if ($back == Tools::secureReferrer(Tools::getValue('back'))) {
+ Tools::redirect(html_entity_decode($back));
+ }
+
+ $back = $back ? $back : 'my-account';
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : $back));
+ }
+ }
+ }
+ if ($this->ajax) {
+ $return = array(
+ 'hasError' => !empty($this->errors),
+ 'errors' => $this->errors,
+ 'token' => Tools::getToken(false)
+ );
+ $this->ajaxDie(Tools::jsonEncode($return));
+ } else {
+ $this->context->smarty->assign('authentification_error', $this->errors);
+ }
+ }
+
+ /**
+ * Process the newsletter settings and set the customer infos.
+ *
+ * @param Customer $customer Reference on the customer Object.
+ *
+ * @note At this point, the email has been validated.
+ */
+ protected function processCustomerNewsletter(&$customer)
+ {
+ if (Tools::getValue('newsletter')) {
+ $customer->ip_registration_newsletter = pSQL(Tools::getRemoteAddr());
+ $customer->newsletter_date_add = pSQL(date('Y-m-d H:i:s'));
+
+ if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) {
+ /** @var Blocknewsletter $module_newsletter */
+ if ($module_newsletter->active) {
+ $module_newsletter->confirmSubscription(Tools::getValue('email'));
+ }
+ }
+ }
+ }
+
+ /**
+ * Process submit on an account
+ */
+ protected function processSubmitAccount()
+ {
+ Hook::exec('actionBeforeSubmitAccount');
+ $this->create_account = true;
+ if (Tools::isSubmit('submitAccount')) {
+ $this->context->smarty->assign('email_create', 1);
+ }
+ // New Guest customer
+ if (!Tools::getValue('is_new_customer', 1) && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) {
+ $this->errors[] = Tools::displayError('You cannot create a guest account.');
+ }
+ if (!Tools::getValue('is_new_customer', 1)) {
+ $_POST['passwd'] = md5(time()._COOKIE_KEY_);
+ }
+ if ($guest_email = Tools::getValue('guest_email')) {
+ $_POST['email'] = $guest_email;
+ }
+ // Checked the user address in case he changed his email address
+ if (Validate::isEmail($email = Tools::getValue('email')) && !empty($email)) {
+ if (Customer::customerExists($email)) {
+ $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
+ }
+ }
+ // Preparing customer
+ $customer = new Customer();
+ $lastnameAddress = Tools::getValue('lastname');
+ $firstnameAddress = Tools::getValue('firstname');
+ $_POST['lastname'] = Tools::getValue('customer_lastname', $lastnameAddress);
+ $_POST['firstname'] = Tools::getValue('customer_firstname', $firstnameAddress);
+ $addresses_types = array('address');
+
+ if (!Configuration::get('PS_ORDER_PROCESS_TYPE') && Configuration::get('PS_GUEST_CHECKOUT_ENABLED') && Tools::getValue('invoice_address')) {
+ $addresses_types[] = 'address_invoice';
+ }
+ $error_phone = false;
+ if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) {
+ if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer')) {
+ if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')) {
+ $error_phone = true;
+ }
+ } elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE'))
+ || (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create'))
+ || (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Tools::getValue('email_create')))
+ && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
+ ) {
+ $error_phone = true;
+ }
+ }
+
+ if ($error_phone) {
+ $this->errors[] = Tools::displayError('You must register at least one phone number.');
+ }
+
+ // if PS_CUSTOMER_ADDRESS_CREATION is disabled And customer has no addresses then create customer address
+ // with the details of first hotel which rooms he has in cart
+ if (!Configuration::get('PS_CUSTOMER_ADDRESS_CREATION')
+ && isset($this->context->cart->id)
+ && $this->context->cart->id
+ ) {
+ if (Module::isInstalled('hotelreservationsystem')) {
+ include_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
+ $objHtlCart = new HotelCartBookingData();
+ if ($htlCartInfo = $objHtlCart->getCartCurrentDataByCartId($this->context->cart->id)) {
+ if (isset($htlCartInfo[0]['id_hotel']) && ($idHotel = $htlCartInfo[0]['id_hotel'])) {
+ if (Validate::isLoadedObject($objHotel = new HotelBranchInformation($idHotel))) {
+ $_POST['lastname'] = Tools::getValue('customer_lastname');
+ $_POST['firstname'] = Tools::getValue('customer_firstname');
+ $_POST['address1'] = $objHotel->address;
+ $_POST['city'] = $objHotel->city;
+ $_POST['postcode'] = $objHotel->zipcode;
+ $_POST['alias'] = 'My address';
+ $_POST['id_country'] = $objHotel->country_id;
+ $_POST['id_state'] = $objHotel->state_id;
+ // if form is shorter then address name will be customer name
+ $lastnameAddress = $_POST['lastname'];
+ $firstnameAddress = $_POST['firstname'];
+
+ }
+ }
+ }
+ }
+ }
+ // End
+ $this->errors = array_unique(array_merge($this->errors, $customer->validateController()));
+ // Check the requires fields which are settings in the BO
+ $this->errors = $this->errors + $customer->validateFieldsRequiredDatabase();
+
+ if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) {
+ if (!count($this->errors)) {
+ if (Tools::isSubmit('newsletter')) {
+ $this->processCustomerNewsletter($customer);
+ }
+
+ $customer->firstname = Tools::ucwords($customer->firstname);
+ $customer->birthday = (empty($_POST['years']) ? '' : (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days'));
+ if (!Validate::isBirthDate($customer->birthday)) {
+ $this->errors[] = Tools::displayError('Invalid date of birth.');
+ }
+
+ // New Guest customer
+ $customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0);
+ $customer->active = 1;
+
+ if (!count($this->errors)) {
+ if ($customer->add()) {
+ if (!$customer->is_guest) {
+ if (!$this->sendConfirmationMail($customer)) {
+ // webkul - we will not stop process on email delivery fails
+ //$this->errors[] = Tools::displayError('The email cannot be sent.');
+ }
+ }
+
+ $this->updateContext($customer);
+
+ $this->context->cart->update();
+ Hook::exec(
+ 'actionCustomerAccountAdd',
+ array(
+ '_POST' => $_POST,
+ 'newCustomer' => $customer
+ )
+ );
+ if ($this->ajax) {
+ $return = array(
+ 'hasError' => !empty($this->errors),
+ 'errors' => $this->errors,
+ 'isSaved' => true,
+ 'id_customer' => (int)$this->context->cookie->id_customer,
+ 'id_address_delivery' => $this->context->cart->id_address_delivery,
+ 'id_address_invoice' => $this->context->cart->id_address_invoice,
+ 'token' => Tools::getToken(false)
+ );
+ $this->ajaxDie(Tools::jsonEncode($return));
+ }
+
+ if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back)) {
+ Tools::redirect(html_entity_decode($back));
+ }
+
+ // redirection: if cart is not empty : redirection to the cart
+ if (count($this->context->cart->getProducts(true)) > 0) {
+ $multi = (int)Tools::getValue('multi-shipping');
+ Tools::redirect('index.php?controller=order'.($multi ? '&multi-shipping='.$multi : ''));
+ } else { // else : redirection to the account
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
+ }
+ } else {
+ $this->errors[] = Tools::displayError('An error occurred while creating your account.');
+ }
+ }
+ }
+ } else { // if registration type is in one step, we save the address
+ $_POST['lastname'] = $lastnameAddress;
+ $_POST['firstname'] = $firstnameAddress;
+ $post_back = $_POST;
+ // Preparing addresses
+ foreach ($addresses_types as $addresses_type) {
+ $$addresses_type = new Address();
+ $$addresses_type->id_customer = 1;
+
+ if ($addresses_type == 'address_invoice') {
+ foreach ($_POST as $key => &$post) {
+ if ($tmp = Tools::getValue($key.'_invoice')) {
+ $post = $tmp;
+ }
+ }
+ }
+
+ $this->errors = array_unique(array_merge($this->errors, $$addresses_type->validateController()));
+ if ($addresses_type == 'address_invoice') {
+ $_POST = $post_back;
+ }
+
+ if (!($country = new Country($$addresses_type->id_country)) || !Validate::isLoadedObject($country)) {
+ $this->errors[] = Tools::displayError('Country cannot be loaded with address->id_country');
+ }
+
+ if (!$country->active) {
+ $this->errors[] = Tools::displayError('This country is not active.');
+ }
+
+ $postcode = $$addresses_type->postcode;
+ /* Check zip code format */
+ if ($country->zip_code_format && !$country->checkZipCode($postcode)) {
+ $this->errors[] = sprintf(Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'), str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format))));
+ } elseif (empty($postcode) && $country->need_zip_code) {
+ $this->errors[] = Tools::displayError('A Zip / Postal code is required.');
+ } elseif ($postcode && !Validate::isPostCode($postcode)) {
+ $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.');
+ }
+
+ if ($country->need_identification_number
+ && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni')))
+ ) {
+ $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.');
+ } elseif (!$country->need_identification_number) {
+ $$addresses_type->dni = null;
+ }
+
+ if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount')) {
+ if (!($country = new Country($$addresses_type->id_country, Configuration::get('PS_LANG_DEFAULT')))
+ || !Validate::isLoadedObject($country)
+ ) {
+ $this->errors[] = Tools::displayError('Country is invalid');
+ }
+ }
+ $contains_state = isset($country) && is_object($country) ? (int)$country->contains_states: 0;
+ $id_state = isset($$addresses_type) && is_object($$addresses_type) ? (int)$$addresses_type->id_state: 0;
+ if ((Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount'))
+ && $contains_state
+ && !$id_state
+ ) {
+ $this->errors[] = Tools::displayError('This country requires you to choose a State.');
+ }
+ }
+ }
+
+ if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years'))
+ && !(Tools::getValue('months') == ''
+ && Tools::getValue('days') == ''
+ && Tools::getValue('years') == '')
+ ) {
+ $this->errors[] = Tools::displayError('Invalid date of birth');
+ }
+
+ if (!count($this->errors)) {
+ if (Customer::customerExists(Tools::getValue('email'))) {
+ $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
+ }
+ if (Tools::isSubmit('newsletter')) {
+ $this->processCustomerNewsletter($customer);
+ }
+
+ $customer->birthday = (empty($_POST['years']) ? '' : (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days'));
+ if (!Validate::isBirthDate($customer->birthday)) {
+ $this->errors[] = Tools::displayError('Invalid date of birth');
+ }
+
+ if (!count($this->errors)) {
+ $customer->active = 1;
+ // New Guest customer
+ if (Tools::isSubmit('is_new_customer')) {
+ $customer->is_guest = !Tools::getValue('is_new_customer', 1);
+ } else {
+ $customer->is_guest = 0;
+ }
+ if (!$customer->add()) {
+ $this->errors[] = Tools::displayError('An error occurred while creating your account.');
+ } else {
+ foreach ($addresses_types as $addresses_type) {
+ $$addresses_type->id_customer = (int)$customer->id;
+ if ($addresses_type == 'address_invoice') {
+ foreach ($_POST as $key => &$post) {
+ if ($tmp = Tools::getValue($key.'_invoice')) {
+ $post = $tmp;
+ }
+ }
+ }
+ $this->errors = array_unique(array_merge($this->errors, $$addresses_type->validateController()));
+ if ($addresses_type == 'address_invoice') {
+ $_POST = $post_back;
+ }
+ if (!count($this->errors) && (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax || Tools::isSubmit('submitGuestAccount')) && !$$addresses_type->add()) {
+ $this->errors[] = Tools::displayError('An error occurred while creating your address.');
+ }
+ }
+ if (!count($this->errors)) {
+ if (!$customer->is_guest) {
+ $this->context->customer = $customer;
+ $customer->cleanGroups();
+ // we add the guest customer in the default customer group
+ $customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP')));
+ if (!$this->sendConfirmationMail($customer)) {
+ // webkul - we will not stop process on email delivery fails
+ //$this->errors[] = Tools::displayError('The email cannot be sent.');
+ }
+ } else {
+ $customer->cleanGroups();
+ // we add the guest customer in the guest customer group
+ $customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP')));
+ }
+ $this->updateContext($customer);
+ $this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId(
+ (int)$customer->id
+ );
+ $this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId(
+ (int)$customer->id
+ );
+ if (isset($address_invoice) && Validate::isLoadedObject($address_invoice)) {
+ $this->context->cart->id_address_invoice = (int)$address_invoice->id;
+ }
+
+ if ($this->ajax && Configuration::get('PS_ORDER_PROCESS_TYPE')) {
+ $delivery_option = array(
+ (int)$this->context->cart->id_address_delivery => (int)$this->context->cart->id_carrier.','
+ );
+ $this->context->cart->setDeliveryOption($delivery_option);
+ }
+
+ // If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated
+ $this->context->cart->update();
+
+ // Avoid articles without delivery address on the cart
+ $this->context->cart->autosetProductAddress();
+
+ Hook::exec(
+ 'actionCustomerAccountAdd', array(
+ '_POST' => $_POST,
+ 'newCustomer' => $customer
+ )
+ );
+ if ($this->ajax) {
+ $return = array(
+ 'hasError' => !empty($this->errors),
+ 'errors' => $this->errors,
+ 'isSaved' => true,
+ 'id_customer' => (int)$this->context->cookie->id_customer,
+ 'id_address_delivery' => $this->context->cart->id_address_delivery,
+ 'id_address_invoice' => $this->context->cart->id_address_invoice,
+ 'token' => Tools::getToken(false)
+ );
+ $this->ajaxDie(Tools::jsonEncode($return));
+ }
+ // if registration type is in two steps, we redirect to register address
+ if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE')
+ && !$this->ajax
+ && !Tools::isSubmit('submitGuestAccount')
+ ) {
+ Tools::redirect('index.php?controller=address');
+ }
+
+ if (($back = Tools::getValue('back')) && $back == Tools::secureReferrer($back)) {
+ Tools::redirect(html_entity_decode($back));
+ }
+
+ // redirection: if cart is not empty : redirection to the cart
+ if (count($this->context->cart->getProducts(true)) > 0) {
+ Tools::redirect('index.php?controller=order'.($multi = (int)Tools::getValue('multi-shipping') ? '&multi-shipping='.$multi : ''));
+ } else { // else : redirection to the account
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
+ }
+ }
+ }
+ }
+ }
+
+ if (count($this->errors)) {
+ //for retro compatibility to display guest account creation form on authentication page
+ if (Tools::getValue('submitGuestAccount')) {
+ $_GET['display_guest_checkout'] = 1;
+ }
+
+ if (!Tools::getValue('is_new_customer')) {
+ unset($_POST['passwd']);
+ }
+ if ($this->ajax) {
+ $return = array(
+ 'hasError' => !empty($this->errors),
+ 'errors' => $this->errors,
+ 'isSaved' => false,
+ 'id_customer' => 0
+ );
+ $this->ajaxDie(Tools::jsonEncode($return));
+ }
+ $this->context->smarty->assign('account_error', $this->errors);
+ }
+ }
+
+ /**
+ * Process submit on a creation
+ */
+ protected function processSubmitCreate()
+ {
+ if (!Validate::isEmail($email = Tools::getValue('email_create')) || empty($email)) {
+ $this->errors[] = Tools::displayError('Invalid email address.');
+ } elseif (Customer::customerExists($email)) {
+ $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
+ $_POST['email'] = Tools::getValue('email_create');
+ unset($_POST['email_create']);
+ } else {
+ $this->create_account = true;
+ $this->context->smarty->assign('email_create', Tools::safeOutput($email));
+ $_POST['email'] = $email;
+ }
+ }
+
+ /**
+ * Update context after customer creation
+ * @param Customer $customer Created customer
+ */
+ protected function updateContext(Customer $customer)
+ {
+ $this->context->customer = $customer;
+ $this->context->smarty->assign('confirmation', 1);
+ $this->context->cookie->id_customer = (int)$customer->id;
+ $this->context->cookie->customer_lastname = $customer->lastname;
+ $this->context->cookie->customer_firstname = $customer->firstname;
+ $this->context->cookie->passwd = $customer->passwd;
+ $this->context->cookie->logged = 1;
+ // if register process is in two steps, we display a message to confirm account creation
+ if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE')) {
+ $this->context->cookie->account_created = 1;
+ }
+ $customer->logged = 1;
+ $this->context->cookie->email = $customer->email;
+ $this->context->cookie->is_guest = !Tools::getValue('is_new_customer', 1);
+ // Update cart address
+ $this->context->cart->secure_key = $customer->secure_key;
+ }
+
+ /**
+ * Confirmation mail to the customer
+ * @param Customer $customer
+ * @return [bool] true if maail sent or false
+ */
+ protected function sendConfirmationMail(Customer $customer)
+ {
+ if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL')) {
+ return true;
+ }
+
+ return Mail::Send(
+ $this->context->language->id,
+ 'account',
+ Mail::l('Welcome!'),
+ array(
+ '{firstname}' => $customer->firstname,
+ '{lastname}' => $customer->lastname,
+ '{email}' => $customer->email,
+ '{passwd}' => Tools::getValue('passwd')),
+ $customer->email,
+ $customer->firstname.' '.$customer->lastname
+ );
+ }
}
diff --git a/controllers/front/CartController.php b/controllers/front/CartController.php
index 2f29bbc14..ff6ed7d27 100644
--- a/controllers/front/CartController.php
+++ b/controllers/front/CartController.php
@@ -72,14 +72,19 @@ class CartControllerCore extends FrontController
if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid())) {
if (Tools::getIsset('add') || Tools::getIsset('update')) {
$this->processChangeProductInCart();
+ CheckoutProcess::refreshCheckoutProcess();
} elseif (Tools::getIsset('delete')) {
$this->processDeleteProductInCart();
+ CheckoutProcess::refreshCheckoutProcess();
} elseif (Tools::getIsset('changeAddressDelivery')) {
$this->processChangeProductAddressDelivery();
+ CheckoutProcess::refreshCheckoutProcess();
} elseif (Tools::getIsset('allowSeperatedPackage')) {
$this->processAllowSeperatedPackage();
+ CheckoutProcess::refreshCheckoutProcess();
} elseif (Tools::getIsset('duplicate')) {
$this->processDuplicateProduct();
+ CheckoutProcess::refreshCheckoutProcess();
}
// Make redirection
if (!$this->errors && !$this->ajax) {
@@ -392,7 +397,7 @@ class CartControllerCore extends FrontController
if ($chkQty < $req_rm) {
$obj_htl_cart_booking_data = new HotelCartBookingData();
$obj_htl_cart_booking_data->id_cart = $this->context->cart->id;
- $obj_htl_cart_booking_data->id_guest = $this->context->cookie->id_guest;
+ $obj_htl_cart_booking_data->id_guest = $this->context->cart->id_guest;
$obj_htl_cart_booking_data->id_customer = $id_customer;
$obj_htl_cart_booking_data->id_currency = $id_currency;
$obj_htl_cart_booking_data->id_product = $val_hotel_room_info['id_product'];
diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php
index 53a712f79..4b99ef6eb 100644
--- a/controllers/front/GuestTrackingController.php
+++ b/controllers/front/GuestTrackingController.php
@@ -68,7 +68,6 @@ class GuestTrackingControllerCore extends FrontController
if (!empty($order_reference)) {
$order_collection = Order::getByReference($order_reference);
}
-
$email = Tools::getValue('email');
if (empty($order_reference) && empty($id_order)) {
@@ -117,11 +116,12 @@ class GuestTrackingControllerCore extends FrontController
if (count($this->errors)) {
sleep(1);
}
-
- $this->context->smarty->assign(array(
- 'action' => $this->context->link->getPageLink('guest-tracking.php', true),
- 'errors' => $this->errors,
- ));
+ $this->context->smarty->assign(
+ array(
+ 'action' => $this->context->link->getPageLink('guest-tracking.php', true),
+ 'errors' => $this->errors,
+ )
+ );
$this->setTemplate(_PS_THEME_DIR_.'guest-tracking.tpl');
}
@@ -143,7 +143,24 @@ class GuestTrackingControllerCore extends FrontController
$order_list[] = $order;
}
+ //by webkul to show order details properly on order history page
+ if ($hotelresInstalled = Module::isInstalled('hotelreservationsystem')) {
+ include_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
+ $objHtlBranchInfo = new HotelBranchInformation();
+ $objBookingDetail = new HotelBookingDetail();
+ $objRoomType = new HotelRoomType();
+ $objCustomerAdv = new HotelCustomerAdvancedPayment();
+ $objOrdRefundInfo = new HotelOrderRefundInfo();
+ $objRefundStages = new HotelOrderRefundStages();
+
+ $nonRequestedRooms = 0;
+ $anyBackOrder = 0;
+ $processedProducts = array();
+ $cartHotelData = array();
+ }
+
foreach ($order_list as &$order) {
+ $idOrder = $order->id;
/** @var Order $order */
$order->id_order_state = (int)$order->getCurrentState();
$order->invoice = (OrderState::invoiceAvailable((int)$order->id_order_state) && $order->invoice_number);
@@ -169,20 +186,155 @@ class GuestTrackingControllerCore extends FrontController
}
$order->hook_orderdetaildisplayed = Hook::exec('displayOrderDetail', array('order' => $order));
+ // enter the details of the booking the order
+ if ($hotelresInstalled) {
+ if ($orderProducts = $order->getProducts()) {
+ foreach ($orderProducts as $type_key => $type_value) {
+ if (in_array($type_value['product_id'], $processedProducts)) {
+ continue;
+ }
+ $processedProducts[] = $type_value['product_id'];
+
+ $objProduct = new Product($type_value['product_id'], false, $this->context->language->id);
+ $cover_image_arr = $objProduct->getCover($type_value['product_id']);
+
+ if (!empty($cover_image_arr)) {
+ $cover_img = $this->context->link->getImageLink($objProduct->link_rewrite, $objProduct->id.'-'.$cover_image_arr['id_image'], 'small_default');
+ } else {
+ $cover_img = $this->context->link->getImageLink($objProduct->link_rewrite, $this->context->language->iso_code.'-default', 'small_default');
+ }
+
+ if (isset($customer->id)) {
+ $obj_cart = new Cart($order->id_cart);
+ $order_bk_data = $objBookingDetail->getOnlyOrderBookingData($idOrder, $obj_cart->id_guest, $type_value['product_id'], $customer->id);
+ } else {
+ $order_bk_data = $objBookingDetail->getOnlyOrderBookingData($idOrder, $customer->id_guest, $type_value['product_id']);
+ }
+ $rm_dtl = $objRoomType->getRoomTypeInfoByIdProduct($type_value['product_id']);
+
+ $cartHotelData[$type_key]['id_product'] = $type_value['product_id'];
+ $cartHotelData[$type_key]['cover_img'] = $cover_img;
+ $cartHotelData[$type_key]['adult'] = $rm_dtl['adult'];
+ $cartHotelData[$type_key]['children'] = $rm_dtl['children'];
+
+ // by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
+
+
+ //END
+ foreach ($order_bk_data as $data_k => $data_v) {
+ $date_join = strtotime($data_v['date_from']).strtotime($data_v['date_to']);
+
+ /*Product price when order was created*/
+ $order_details_obj = new OrderDetail($data_v['id_order_detail']);
+ $prod_ord_dtl_name = $order_details_obj->product_name;
+ $cartHotelData[$type_key]['name'] = $prod_ord_dtl_name;
+
+ $cartHotelData[$type_key]['paid_unit_price_tax_excl'] = ($order_details_obj->total_price_tax_excl)/$order_details_obj->product_quantity;
+ $cartHotelData[$type_key]['paid_unit_price_tax_incl'] = ($order_details_obj->total_price_tax_incl)/$order_details_obj->product_quantity;
+
+ //work on entring refund data
+
+ $ord_refnd_info = $objOrdRefundInfo->getOderRefundInfoByIdOrderIdProductByDate($idOrder, $type_value['product_id'], $data_v['date_from'], $data_v['date_to']);
+ if ($ord_refnd_info) {
+ $stage_name = $objRefundStages->getNameById($ord_refnd_info['refund_stage_id']);
+ } else {
+ $stage_name = '';
+ $nonRequestedRooms = 1;
+ }
+ if (isset($cartHotelData[$type_key]['date_diff'][$date_join])) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
+
+ $num_days = $cartHotelData[$type_key]['date_diff'][$date_join]['num_days'];
+ $var_quant = (int) $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'];
+
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
+ if ($data_v['is_back_order']) {
+ $anyBackOrder = 1;
+ }
+ //refund_stage
+ $cartHotelData[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
+ } else {
+ $num_days = $objBookingDetail->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
+
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'] = 1;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['data_form'] = $data_v['date_from'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['data_to'] = $data_v['date_to'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
+
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
+ if ($data_v['is_back_order']) {
+ $anyBackOrder = 1;
+ }
+ //refund_stage
+ $cartHotelData[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
+ }
+
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_tax_excl'] = $order_details_obj->unit_price_tax_excl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_tax_incl'] = $order_details_obj->unit_price_tax_incl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_excl'] = $order_details_obj->unit_price_tax_excl + $order_details_obj->reduction_amount_tax_excl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] = $order_details_obj->unit_price_tax_incl + $order_details_obj->reduction_amount_tax_incl;
+
+ $feature_price_diff = (float)($cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']);
+ $cartHotelData[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff;
+
+ //enter hotel name
+ $hotelInfo = $objHtlBranchInfo->hotelBranchesInfo(
+ Configuration::get('PS_LANG_DEFAULT'),
+ 2,
+ 0,
+ $data_v['id_hotel']
+ );
+ $cartHotelData[$type_key]['hotel_name'] = $hotelInfo['hotel_name'];
+ }
+ }
+ //For Advanced Payment
+ $order_adv_dtl = $objCustomerAdv->getCstAdvPaymentDtlByIdOrder($idOrder);
+ }
+ }
+ // end booking details entries
+ $redirectTermsLink = $this->context->link->getCMSLink(
+ new CMS(3, $this->context->language->id),
+ null, $this->context->language->id
+ );
+
+ $this->context->smarty->assign(
+ array(
+ 'any_back_order' => $anyBackOrder,
+ 'shw_bo_msg' => Configuration::get('WK_SHOW_MSG_ON_BO'),
+ 'back_ord_msg' => Configuration::get('WK_BO_MESSAGE'),
+ 'order_has_invoice' => $order->hasInvoice(),
+ 'redirect_link_terms', $redirectTermsLink,
+ 'cart_htl_data' => $cartHotelData,
+ 'non_requested_rooms' => $nonRequestedRooms,
+ 'order_adv_dtl' => $order_adv_dtl
+ )
+ );
+ //end
+
Hook::exec('actionOrderDetail', array('carrier' => $order->carrier, 'order' => $order));
}
- $this->context->smarty->assign(array(
- 'shop_name' => Configuration::get('PS_SHOP_NAME'),
- 'order_collection' => $order_list,
- 'return_allowed' => false,
- 'invoiceAllowed' => (int)Configuration::get('PS_INVOICE'),
- 'is_guest' => true,
- 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
- 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
- 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
- 'use_tax' => Configuration::get('PS_TAX'),
- ));
+ $this->context->smarty->assign(
+ array(
+ 'shop_name' => Configuration::get('PS_SHOP_NAME'),
+ 'order_collection' => $order_list,
+ 'return_allowed' => false,
+ 'invoiceAllowed' => (int)Configuration::get('PS_INVOICE'),
+ 'is_guest' => true,
+ 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
+ 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
+ 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
+ 'use_tax' => Configuration::get('PS_TAX'),
+ )
+ );
}
public function setMedia()
diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php
index 3bd0f307b..2b794c5d5 100644
--- a/controllers/front/OrderDetailController.php
+++ b/controllers/front/OrderDetailController.php
@@ -321,21 +321,28 @@ class OrderDetailControllerCore extends FrontController
$customer = new Customer($order->id_customer);
//by webkul to show order details properly on order history page
- if (Module::isInstalled('hotelreservationsystem')) {
- require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
+
+ if ($hotelresInstalled = Module::isInstalled('hotelreservationsystem')) {
+ include_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
$objHtlBranchInfo = new HotelBranchInformation();
- $obj_cart_bk_data = new HotelCartBookingData();
- $obj_htl_bk_dtl = new HotelBookingDetail();
- $obj_rm_type = new HotelRoomType();
- $non_requested_rooms = 0;
- $any_back_order = 0;
- $processed_product = array();
+ $objBookingDetail = new HotelBookingDetail();
+ $objRoomType = new HotelRoomType();
+ $objCustomerAdv = new HotelCustomerAdvancedPayment();
+ $objOrdRefundInfo = new HotelOrderRefundInfo();
+
+ $nonRequestedRooms = 0;
+ $anyBackOrder = 0;
+ $processedProducts = array();
+ $cartHotelData = array();
+ }
+
+ if ($hotelresInstalled) {
if (!empty($products)) {
foreach ($products as $type_key => $type_value) {
- if (in_array($type_value['product_id'], $processed_product)) {
+ if (in_array($type_value['product_id'], $processedProducts)) {
continue;
}
- $processed_product[] = $type_value['product_id'];
+ $processedProducts[] = $type_value['product_id'];
$product = new Product($type_value['product_id'], false, $this->context->language->id);
$cover_image_arr = $product->getCover($type_value['product_id']);
@@ -348,85 +355,79 @@ class OrderDetailControllerCore extends FrontController
if (isset($customer->id)) {
$obj_cart = new Cart($order->id_cart);
- $order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($order->id, $obj_cart->id_guest, $type_value['product_id'], $customer->id);
+ $order_bk_data = $objBookingDetail->getOnlyOrderBookingData($order->id, $obj_cart->id_guest, $type_value['product_id'], $customer->id);
} else {
- $order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($order->id, $customer->id_guest, $type_value['product_id']);
+ $order_bk_data = $objBookingDetail->getOnlyOrderBookingData($order->id, $customer->id_guest, $type_value['product_id']);
}
- $rm_dtl = $obj_rm_type->getRoomTypeInfoByIdProduct($type_value['product_id']);
+ $rm_dtl = $objRoomType->getRoomTypeInfoByIdProduct($type_value['product_id']);
- $cart_htl_data[$type_key]['id_product'] = $type_value['product_id'];
- $cart_htl_data[$type_key]['cover_img'] = $cover_img;
- $cart_htl_data[$type_key]['adult'] = $rm_dtl['adult'];
- $cart_htl_data[$type_key]['children'] = $rm_dtl['children'];
+ $cartHotelData[$type_key]['id_product'] = $type_value['product_id'];
+ $cartHotelData[$type_key]['cover_img'] = $cover_img;
+ $cartHotelData[$type_key]['adult'] = $rm_dtl['adult'];
+ $cartHotelData[$type_key]['children'] = $rm_dtl['children'];
- // by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
-
- $hotelCartBookingData = new HotelCartBookingData();
- //END
foreach ($order_bk_data as $data_k => $data_v) {
$date_join = strtotime($data_v['date_from']).strtotime($data_v['date_to']);
/*Product price when order was created*/
$order_details_obj = new OrderDetail($data_v['id_order_detail']);
$prod_ord_dtl_name = $order_details_obj->product_name;
- $cart_htl_data[$type_key]['name'] = $prod_ord_dtl_name;
+ $cartHotelData[$type_key]['name'] = $prod_ord_dtl_name;
- $cart_htl_data[$type_key]['paid_unit_price_tax_excl'] = ($order_details_obj->total_price_tax_excl)/$order_details_obj->product_quantity;
- $cart_htl_data[$type_key]['paid_unit_price_tax_incl'] = ($order_details_obj->total_price_tax_incl)/$order_details_obj->product_quantity;
+ $cartHotelData[$type_key]['paid_unit_price_tax_excl'] = ($order_details_obj->total_price_tax_excl)/$order_details_obj->product_quantity;
+ $cartHotelData[$type_key]['paid_unit_price_tax_incl'] = ($order_details_obj->total_price_tax_incl)/$order_details_obj->product_quantity;
//work on entring refund data
- $obj_ord_ref_info = new HotelOrderRefundInfo();
- $ord_refnd_info = $obj_ord_ref_info->getOderRefundInfoByIdOrderIdProductByDate($id_order, $type_value['product_id'], $data_v['date_from'], $data_v['date_to']);
+ $ord_refnd_info = $objOrdRefundInfo->getOderRefundInfoByIdOrderIdProductByDate($id_order, $type_value['product_id'], $data_v['date_from'], $data_v['date_to']);
if ($ord_refnd_info) {
- $obj_refund_stages = new HotelOrderRefundStages();
- $stage_name = $obj_refund_stages->getNameById($ord_refnd_info['refund_stage_id']);
+ $stage_name = $objRefundStages->getNameById($ord_refnd_info['refund_stage_id']);
} else {
$stage_name = '';
- $non_requested_rooms = 1;
+ $nonRequestedRooms = 1;
}
- if (isset($cart_htl_data[$type_key]['date_diff'][$date_join])) {
- $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
+ if (isset($cartHotelData[$type_key]['date_diff'][$date_join])) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'] += 1;
- $num_days = $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'];
- $var_quant = (int) $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'];
+ $num_days = $cartHotelData[$type_key]['date_diff'][$date_join]['num_days'];
+ $var_quant = (int) $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'];
- $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
if ($data_v['is_back_order']) {
- $any_back_order = 1;
+ $anyBackOrder = 1;
}
//refund_stage
- $cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
} else {
- $num_days = $obj_htl_bk_dtl->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
+ $num_days = $objBookingDetail->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
- $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] = 1;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['data_form'] = $data_v['date_from'];
- $cart_htl_data[$type_key]['date_diff'][$date_join]['data_to'] = $data_v['date_to'];
- $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'] = 1;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['data_form'] = $data_v['date_from'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['data_to'] = $data_v['date_to'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['num_days'] = $num_days;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl'];
- $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl'];
- $cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl'];
+ $cartHotelData[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order'];
if ($data_v['is_back_order']) {
- $any_back_order = 1;
+ $anyBackOrder = 1;
}
//refund_stage
- $cart_htl_data[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['stage_name'] = $stage_name;
}
- $cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_excl'] = $order_details_obj->unit_price_tax_excl;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_tax_incl'] = $order_details_obj->unit_price_tax_incl;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_excl'] = $order_details_obj->unit_price_tax_excl + $order_details_obj->reduction_amount_tax_excl;
- $cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] = $order_details_obj->unit_price_tax_incl + $order_details_obj->reduction_amount_tax_incl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_tax_excl'] = $order_details_obj->unit_price_tax_excl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_tax_incl'] = $order_details_obj->unit_price_tax_incl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_excl'] = $order_details_obj->unit_price_tax_excl + $order_details_obj->reduction_amount_tax_excl;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] = $order_details_obj->unit_price_tax_incl + $order_details_obj->reduction_amount_tax_incl;
- $feature_price_diff = (float)($cart_htl_data[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']);
- $cart_htl_data[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff;
+ $feature_price_diff = (float)($cartHotelData[$type_key]['date_diff'][$date_join]['product_price_without_reduction_tax_incl'] - $cartHotelData[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl']);
+ $cartHotelData[$type_key]['date_diff'][$date_join]['feature_price_diff'] = $feature_price_diff;
//enter hotel name
$hotelInfo = $objHtlBranchInfo->hotelBranchesInfo(
@@ -435,66 +436,64 @@ class OrderDetailControllerCore extends FrontController
0,
$data_v['id_hotel']
);
- $cart_htl_data[$type_key]['hotel_name'] = $hotelInfo['hotel_name'];
+ $cartHotelData[$type_key]['hotel_name'] = $hotelInfo['hotel_name'];
}
}
- $redirect_link_terms = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);
- $this->context->smarty->assign('redirect_link_terms', $redirect_link_terms);
- $this->context->smarty->assign('cart_htl_data', $cart_htl_data);
- $this->context->smarty->assign('non_requested_rooms', $non_requested_rooms);
+ $redirectTermsLink = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);
//For Advanced Payment
- $obj_customer_adv = new HotelCustomerAdvancedPayment();
- $order_adv_dtl = $obj_customer_adv->getCstAdvPaymentDtlByIdOrder($order->id);
- if ($order_adv_dtl) {
- $this->context->smarty->assign('order_adv_dtl', $order_adv_dtl);
- }
+ $orderAdvDetail = $objCustomerAdv->getCstAdvPaymentDtlByIdOrder($order->id);
- $shw_bo_msg = Configuration::get('WK_SHOW_MSG_ON_BO');
- $bo_msg = Configuration::get('WK_BO_MESSAGE');
- $this->context->smarty->assign(array(
- 'any_back_order' => $any_back_order,
- 'shw_bo_msg' => $shw_bo_msg,
- 'back_ord_msg' => $bo_msg,
- ));
- $order_has_invoice = $order->hasInvoice();
- $this->context->smarty->assign('order_has_invoice', $order_has_invoice);
+ $this->context->smarty->assign(
+ array(
+ 'any_back_order' => $anyBackOrder,
+ 'shw_bo_msg' => Configuration::get('WK_SHOW_MSG_ON_BO'),
+ 'back_ord_msg' => Configuration::get('WK_BO_MESSAGE'),
+ 'order_has_invoice' => $order->hasInvoice(),
+ 'redirect_link_terms', $redirectTermsLink,
+ 'cart_htl_data' => $cartHotelData,
+ 'non_requested_rooms' => $nonRequestedRooms,
+ 'order_adv_dtl' => $orderAdvDetail
+ )
+ );
}
}
//end
- $this->context->smarty->assign(array(
- 'shop_name' => strval(Configuration::get('PS_SHOP_NAME')),
- 'order' => $order,
- 'return_allowed' => (int) $order->isReturnable(),
- 'currency' => new Currency($order->id_currency),
- 'order_state' => (int) $id_order_state,
- 'invoiceAllowed' => (int) Configuration::get('PS_INVOICE'),
- 'invoice' => (OrderState::invoiceAvailable($id_order_state) && count($order->getInvoicesCollection())),
- 'logable' => (bool) $order_status->logable,
- 'order_history' => $order->getHistory($this->context->language->id, false, true),
- 'products' => $products,
- 'discounts' => $order->getCartRules(),
- 'carrier' => $carrier,
- 'address_invoice' => $addressInvoice,
- 'invoiceState' => (Validate::isLoadedObject($addressInvoice) && $addressInvoice->id_state) ? new State($addressInvoice->id_state) : false,
- 'address_delivery' => $addressDelivery,
- 'inv_adr_fields' => $inv_adr_fields,
- 'dlv_adr_fields' => $dlv_adr_fields,
- 'invoiceAddressFormatedValues' => $invoiceAddressFormatedValues,
- 'deliveryAddressFormatedValues' => $deliveryAddressFormatedValues,
- 'deliveryState' => (Validate::isLoadedObject($addressDelivery) && $addressDelivery->id_state) ? new State($addressDelivery->id_state) : false,
- 'is_guest' => false,
- 'messages' => CustomerMessage::getMessagesByOrderId((int) $order->id, false),
- 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
- 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
- 'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
- 'use_tax' => Configuration::get('PS_TAX'),
- 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
- /* DEPRECATED: customizedDatas @since 1.5 */
- 'customizedDatas' => $customizedDatas,
- /* DEPRECATED: customizedDatas @since 1.5 */
- 'reorderingAllowed' => !(bool) Configuration::get('PS_DISALLOW_HISTORY_REORDERING'),
- ));
+ $this->context->smarty->assign(
+ array(
+ 'shop_name' => strval(Configuration::get('PS_SHOP_NAME')),
+ 'order' => $order,
+ 'return_allowed' => (int) $order->isReturnable(),
+ 'currency' => new Currency($order->id_currency),
+ 'order_state' => (int) $id_order_state,
+ 'invoiceAllowed' => (int) Configuration::get('PS_INVOICE'),
+ 'invoice' => (OrderState::invoiceAvailable($id_order_state) && count($order->getInvoicesCollection())),
+ 'logable' => (bool) $order_status->logable,
+ 'order_history' => $order->getHistory($this->context->language->id, false, true),
+ 'products' => $products,
+ 'discounts' => $order->getCartRules(),
+ 'carrier' => $carrier,
+ 'address_invoice' => $addressInvoice,
+ 'invoiceState' => (Validate::isLoadedObject($addressInvoice) && $addressInvoice->id_state) ? new State($addressInvoice->id_state) : false,
+ 'address_delivery' => $addressDelivery,
+ 'inv_adr_fields' => $inv_adr_fields,
+ 'dlv_adr_fields' => $dlv_adr_fields,
+ 'invoiceAddressFormatedValues' => $invoiceAddressFormatedValues,
+ 'deliveryAddressFormatedValues' => $deliveryAddressFormatedValues,
+ 'deliveryState' => (Validate::isLoadedObject($addressDelivery) && $addressDelivery->id_state) ? new State($addressDelivery->id_state) : false,
+ 'is_guest' => false,
+ 'messages' => CustomerMessage::getMessagesByOrderId((int) $order->id, false),
+ 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE,
+ 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD,
+ 'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
+ 'use_tax' => Configuration::get('PS_TAX'),
+ 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
+ /* DEPRECATED: customizedDatas @since 1.5 */
+ 'customizedDatas' => $customizedDatas,
+ /* DEPRECATED: customizedDatas @since 1.5 */
+ 'reorderingAllowed' => !(bool) Configuration::get('PS_DISALLOW_HISTORY_REORDERING'),
+ )
+ );
if ($carrier->url && $order->shipping_number) {
$this->context->smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url));
diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php
index aea787a4f..c78832de9 100644
--- a/controllers/front/OrderOpcController.php
+++ b/controllers/front/OrderOpcController.php
@@ -382,33 +382,65 @@ class OrderOpcControllerCore extends ParentOrderController
break;
}
}
+ if ($this->context->cart->id_address_delivery) {
+ // send address formatted layout data
+ if (Validate::isLoadedObject($address = new Address($this->context->cart->id_address_delivery))) {
+ $addressLayout = AddressFormat::getFormattedLayoutData($address);
+ $orderedAddressFields = AddressFormat::getOrderedAddressFields($address->id_country, false, true);
+ $this->context->smarty->assign(
+ array(
+ 'orderedAddressFields' => $orderedAddressFields,
+ 'addressLayout' => $addressLayout
+ )
+ );
+ }
+ }
- $this->context->smarty->assign(array(
- 'free_shipping' => $free_shipping,
- 'isGuest' => isset($this->context->cookie->is_guest) ? $this->context->cookie->is_guest : 0,
- 'countries' => $countries,
- 'sl_country' => (int)Tools::getCountry(),
- 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
- 'errorCarrier' => Tools::displayError('You must choose a carrier.', false),
- 'errorTOS' => Tools::displayError('You must accept the Terms of Service.', false),
- 'isPaymentStep' => isset($_GET['isPaymentStep']) && $_GET['isPaymentStep'],
- 'genders' => Gender::getGenders(),
- 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
- 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'),
- 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop')
- ));
+ // assign checkout process steps
+ $this->setCheckoutProcess();
+
+ // if there is cookie variable in the url the redirect
+ if (Tools::getValue('proceed_to_customer_dtl') || Tools::getValue('proceed_to_payment')) {
+ Tools::redirect($this->context->link->getPageLink('order-opc', null, $this->context->language->id));
+ }
+
+ $this->context->smarty->assign('checkout_process_steps', $this->checkoutProcess->getSteps());
+ $this->context->smarty->assign(
+ array(
+ 'THEME_DIR' => _THEME_DIR_,
+ 'PS_CUSTOMER_ADDRESS_CREATION' => Configuration::get('PS_CUSTOMER_ADDRESS_CREATION'),
+ 'free_shipping' => $free_shipping,
+ 'isGuest' => isset($this->context->cookie->is_guest) ? $this->context->cookie->is_guest : 0,
+ 'countries' => $countries,
+ 'sl_country' => (int)Tools::getCountry(),
+ 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
+ 'errorCarrier' => Tools::displayError('You must choose a carrier.', false),
+ 'errorTOS' => Tools::displayError('You must accept the Terms of Service.', false),
+ 'isPaymentStep' => isset($_GET['isPaymentStep']) && $_GET['isPaymentStep'],
+ 'genders' => Gender::getGenders(),
+ 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
+ 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'),
+ 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop')
+ )
+ );
$years = Tools::dateYears();
$months = Tools::dateMonths();
$days = Tools::dateDays();
- $this->context->smarty->assign(array(
- 'years' => $years,
- 'months' => $months,
- 'days' => $days,
- ));
+ $this->context->smarty->assign(
+ array(
+ 'years' => $years,
+ 'months' => $months,
+ 'days' => $days,
+ )
+ );
/* Load guest informations */
- if ($this->isLogged && $this->context->cookie->is_guest) {
- $this->context->smarty->assign('guestInformations', $this->_getGuestInformations());
+ if ($this->isLogged) {
+ if ($this->context->cookie->is_guest) {
+ $this->context->smarty->assign('guestInformations', $this->_getGuestInformations());
+ } else {
+ $this->context->smarty->assign('guestInformations', (array)$this->context->customer);
+ }
}
// ADDRESS
if ($this->isLogged) {
@@ -433,11 +465,14 @@ class OrderOpcControllerCore extends ParentOrderController
$id_product = Tools::getValue('id_product');
$date_from = Tools::getValue('date_from');
$date_to = Tools::getValue('date_to');
-
$obj_cart_bk_data = new HotelCartBookingData();
- $cart_data_dlt = $obj_cart_bk_data->deleteRoomDataFromOrderLine($this->context->cart->id, $this->context->cart->id_guest, $id_product, $date_from, $date_to);
-
- if ($cart_data_dlt) {
+ if ($cart_data_dlt = $obj_cart_bk_data->deleteRoomDataFromOrderLine(
+ $this->context->cart->id,
+ $this->context->cart->id_guest,
+ $id_product,
+ $date_from,
+ $date_to
+ )) {
Tools::redirect($link->getPageLink('order-opc', null, $this->context->language->id));
}
}
@@ -447,7 +482,7 @@ class OrderOpcControllerCore extends ParentOrderController
$this->setTemplate(_PS_THEME_DIR_ . 'order-opc-advanced.tpl');
} else {
if (Module::isInstalled('hotelreservationsystem')) {
- require_once(_PS_MODULE_DIR_.'hotelreservationsystem/define.php');
+ require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
$obj_cart_bk_data = new HotelCartBookingData();
$obj_htl_bk_dtl = new HotelBookingDetail();
@@ -498,9 +533,8 @@ class OrderOpcControllerCore extends ParentOrderController
}
}
$this->context->smarty->assign('cartChanged', $cartChanged);
- $cart_htl_data = HotelCartBookingData::getHotelCartBookingData();
- if ($cart_htl_data) {
- $this->context->smarty->assign('cart_htl_data', $cart_htl_data);
+ if ($cartBookingInfo = HotelCartBookingData::getHotelCartBookingData()) {
+ $this->context->smarty->assign('cart_htl_data', $cartBookingInfo);
}
// For Advanced Payment
@@ -567,7 +601,6 @@ class OrderOpcControllerCore extends ParentOrderController
$customer_adv_dtl['total_to_be_paid'] = ($customer_adv_dtl['total_paid_amount'] - $total_discount) > 0 ? ($customer_adv_dtl['total_paid_amount'] - $total_discount) : 0;
$this->context->smarty->assign('customer_adv_dtl', $customer_adv_dtl);
}
-
$this->context->smarty->assign('adv_amount', $adv_amount);
$this->context->smarty->assign('advance_payment_active', $advance_payment_active);
}
@@ -585,6 +618,25 @@ class OrderOpcControllerCore extends ParentOrderController
}
}
+ // sets checkout process steps as per current values
+ private function setCheckoutProcess()
+ {
+ $this->checkoutProcess = new CheckoutProcess();
+ // add the steps you want to add in checkout process
+ $this->checkoutProcess
+ ->addStep(new CheckoutCartSummaryStep())
+ ->addStep(new CheckoutCustomerDetailsStep())
+ ->addStep(new CheckoutPaymentStep());
+
+ $this->checkoutProcess->handleRequest();
+
+ // for making steps synced
+ $this->checkoutProcess
+ ->setNextStepReachable()
+ ->markCurrentStep()
+ ->invalidateAllStepsAfterCurrent();
+ }
+
protected function _getGuestInformations()
{
$customer = $this->context->customer;
@@ -866,7 +918,6 @@ class OrderOpcControllerCore extends ParentOrderController
$dlv_adr_fields[] = trim($field_name);
}
}
-
foreach ($require_form_fields_list as $field_name) {
if (!in_array($field_name, $inv_adr_fields)) {
$inv_adr_fields[] = trim($field_name);
@@ -886,11 +937,13 @@ class OrderOpcControllerCore extends ParentOrderController
${$adr_type.'_adr_fields'} = array_unique(${$adr_type.'_adr_fields'});
${$adr_type.'_all_fields'} = array_unique(${$adr_type.'_all_fields'});
- $this->context->smarty->assign(array(
- $adr_type.'_adr_fields' => ${$adr_type.'_adr_fields'},
- $adr_type.'_all_fields' => ${$adr_type.'_all_fields'},
- 'required_fields' => $require_form_fields_list
- ));
+ $this->context->smarty->assign(
+ array(
+ $adr_type.'_adr_fields' => ${$adr_type.'_adr_fields'},
+ $adr_type.'_all_fields' => ${$adr_type.'_all_fields'},
+ 'required_fields' => $require_form_fields_list
+ )
+ );
}
}
diff --git a/install/controllers/console/process.php b/install/controllers/console/process.php
index 14b149a4f..ce14e3ee5 100644
--- a/install/controllers/console/process.php
+++ b/install/controllers/console/process.php
@@ -244,6 +244,7 @@ class InstallControllerConsoleProcess extends InstallControllerConsole
'admin_lastname' => $this->datas->admin_lastname,
'admin_password' => $this->datas->admin_password,
'admin_email' => $this->datas->admin_email,
+ 'marketing_consent' => $this->datas->marketing_consent,
'configuration_agrement' => true,
'send_informations' => true,
));
diff --git a/install/controllers/http/configure.php b/install/controllers/http/configure.php
index e4b95e34e..37a2bd6d0 100644
--- a/install/controllers/http/configure.php
+++ b/install/controllers/http/configure.php
@@ -49,6 +49,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
$this->session->admin_lastname = trim(Tools::getValue('admin_lastname'));
$this->session->admin_email = trim(Tools::getValue('admin_email'));
$this->session->send_informations = Tools::getValue('send_informations');
+ $this->session->marketing_consent = Tools::getValue('marketing_consent');
if ($this->session->send_informations) {
// Qlo Notification
$qloData = [
@@ -59,6 +60,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
'firstname' => Tools::ucfirst(Tools::getValue('admin_firstname')),
'lastname' => Tools::ucfirst(Tools::getValue('admin_lastname')),
'countryCode' => Tools::getValue('shop_country'),
+ 'marketingConsent' => Tools::getValue('marketing_consent'),
];
$objModelInstall = new InstallModelInstall();
$objModelInstall->setNotification($qloData);
diff --git a/install/controllers/http/process.php b/install/controllers/http/process.php
index e655ed656..55104f8b3 100644
--- a/install/controllers/http/process.php
+++ b/install/controllers/http/process.php
@@ -194,17 +194,18 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->initializeContext();
$success = $this->model_install->configureShop(array(
- 'shop_name' => $this->session->shop_name,
- 'shop_activity' => $this->session->shop_activity,
- 'shop_country' => $this->session->shop_country,
- 'shop_timezone' => $this->session->shop_timezone,
- 'admin_firstname' => $this->session->admin_firstname,
- 'admin_lastname' => $this->session->admin_lastname,
- 'admin_password' => $this->session->admin_password,
- 'admin_email' => $this->session->admin_email,
- 'send_informations' => $this->session->send_informations,
- 'configuration_agrement' => $this->session->configuration_agrement,
- 'rewrite_engine' => $this->session->rewrite_engine,
+ 'shop_name' => $this->session->shop_name,
+ 'shop_activity' => $this->session->shop_activity,
+ 'shop_country' => $this->session->shop_country,
+ 'shop_timezone' => $this->session->shop_timezone,
+ 'admin_firstname' => $this->session->admin_firstname,
+ 'admin_lastname' => $this->session->admin_lastname,
+ 'admin_password' => $this->session->admin_password,
+ 'admin_email' => $this->session->admin_email,
+ 'marketing_consent' => $this->session->marketing_consent,
+ 'send_informations' => $this->session->send_informations,
+ 'configuration_agrement' => $this->session->configuration_agrement,
+ 'rewrite_engine' => $this->session->rewrite_engine,
));
if (!$success || $this->model_install->getErrors()) {
diff --git a/install/controllers/http/system.php b/install/controllers/http/system.php
index e4a983836..0f63f4e92 100644
--- a/install/controllers/http/system.php
+++ b/install/controllers/http/system.php
@@ -160,4 +160,4 @@ class InstallControllerHttpSystem extends InstallControllerHttp
$this->displayTemplate('system');
}
-}
\ No newline at end of file
+}
diff --git a/install/data/xml/quick_access.xml b/install/data/xml/quick_access.xml
index 0543a29e2..d73081f87 100644
--- a/install/data/xml/quick_access.xml
+++ b/install/data/xml/quick_access.xml
@@ -5,9 +5,6 @@
-
- index.php?controller=AdminCategories&addcategory
-
index.php?controller=AdminProducts&addproduct
diff --git a/install/data/xml/tab.xml b/install/data/xml/tab.xml
index ece6b8358..c23e31636 100644
--- a/install/data/xml/tab.xml
+++ b/install/data/xml/tab.xml
@@ -69,9 +69,9 @@
AdminProducts
-
+
diff --git a/install/fixtures/fashion/data/connections.xml b/install/fixtures/fashion/data/connections.xml
index 71f5b3b3f..658572b73 100644
--- a/install/fixtures/fashion/data/connections.xml
+++ b/install/fixtures/fashion/data/connections.xml
@@ -9,7 +9,7 @@
-
+ http://www.qloapps.com
diff --git a/install/install_version.php b/install/install_version.php
index e62af781f..3f0c148cf 100644
--- a/install/install_version.php
+++ b/install/install_version.php
@@ -25,4 +25,4 @@
*/
define('_PS_INSTALL_VERSION_', '1.6.1.1');
-define('_QLO_INSTALL_VERSION_', '1.3.1');
\ No newline at end of file
+define('_QLO_INSTALL_VERSION_', '1.3.2');
\ No newline at end of file
diff --git a/install/langs/bg/data/quick_access.xml b/install/langs/bg/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/bg/data/quick_access.xml
+++ b/install/langs/bg/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/en/data/quick_access.xml b/install/langs/en/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/en/data/quick_access.xml
+++ b/install/langs/en/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/hr/data/quick_access.xml b/install/langs/hr/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/hr/data/quick_access.xml
+++ b/install/langs/hr/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/hu/data/quick_access.xml b/install/langs/hu/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/hu/data/quick_access.xml
+++ b/install/langs/hu/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/lt/data/quick_access.xml b/install/langs/lt/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/lt/data/quick_access.xml
+++ b/install/langs/lt/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/mk/data/quick_access.xml b/install/langs/mk/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/mk/data/quick_access.xml
+++ b/install/langs/mk/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/no/data/quick_access.xml b/install/langs/no/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/no/data/quick_access.xml
+++ b/install/langs/no/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/si/data/quick_access.xml b/install/langs/si/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/si/data/quick_access.xml
+++ b/install/langs/si/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/sr/data/quick_access.xml b/install/langs/sr/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/sr/data/quick_access.xml
+++ b/install/langs/sr/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/sv/data/quick_access.xml b/install/langs/sv/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/sv/data/quick_access.xml
+++ b/install/langs/sv/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/langs/zh/data/quick_access.xml b/install/langs/zh/data/quick_access.xml
index 72e5a5b9b..35bc0ba4a 100644
--- a/install/langs/zh/data/quick_access.xml
+++ b/install/langs/zh/data/quick_access.xml
@@ -2,7 +2,6 @@
-
diff --git a/install/models/install.php b/install/models/install.php
index 5e5ac546e..104c61b35 100644
--- a/install/models/install.php
+++ b/install/models/install.php
@@ -611,6 +611,7 @@ class InstallModelInstall extends InstallAbstractModel
'firstname' => Tools::ucfirst($data['admin_firstname']),
'lastname' => Tools::ucfirst($data['admin_lastname']),
'countryCode' => $data['shop_country'],
+ 'marketingConsent' => $data['marketing_consent'],
];
// Qlo Notification
diff --git a/install/theme/views/configure.phtml b/install/theme/views/configure.phtml
index 4af733cbc..e11c71847 100644
--- a/install/theme/views/configure.phtml
+++ b/install/theme/views/configure.phtml
@@ -155,10 +155,14 @@ var default_iso = 'session->shop_country ?>';
displayError('admin_password_confirm') ?>
-
- l('The information you give us is collected by us and is subject to data processing and statistics. Under the current "Act on Data Processing, Data Files and Individual Liberties" you have the right to access, rectify and oppose to the processing of your personal data through this link.'), 'mailto:support@qloapps.com'); ?>
+
+ l('The information you give us is collected by us and is subject to data processing and statistics. Under the current "Act on Data Processing, Data Files and Individual Liberties" you have the right to access, rectify and oppose to the processing of your personal data through this link.'), 'mailto:support@qloapps.com'); ?>
+
+
+
\ No newline at end of file
diff --git a/modules/paypal/mails/de/error_reporting.txt b/modules/paypal/mails/de/error_reporting.txt
new file mode 100644
index 000000000..c8f23e331
--- /dev/null
+++ b/modules/paypal/mails/de/error_reporting.txt
@@ -0,0 +1,9 @@
+ Hallo,
+
+ Fehlerbericht aus Ihrem PayPalAPI Modul
+
+ Bei einem Kunden ist ein Problem mit dem PayPalAPI Modul aufgetreten, lesen Sie den Bericht:
+
+ {logs}
+
+ {shop_url} powered by PrestaShop™
diff --git a/modules/paypal/mails/de/index.php b/modules/paypal/mails/de/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/mails/de/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/mails/en/error_reporting.html b/modules/paypal/mails/en/error_reporting.html
new file mode 100644
index 000000000..139e8749b
--- /dev/null
+++ b/modules/paypal/mails/en/error_reporting.html
@@ -0,0 +1,42 @@
+
+
+
+
+ Message from {shop_name}
+
+
+
+
+
+
+
+
+
+
+
Hi,
+
+
+
+
Error reporting from your PayPalAPI module
+
+
+
+
+ A client has encountered a problem with the module PayPalAPI, see the report:
+
+
+
\ No newline at end of file
diff --git a/modules/paypal/mails/es/error_reporting.txt b/modules/paypal/mails/es/error_reporting.txt
new file mode 100644
index 000000000..a293fc640
--- /dev/null
+++ b/modules/paypal/mails/es/error_reporting.txt
@@ -0,0 +1,9 @@
+ Hola,
+
+ Informe de error a partir de su módulo PayPalAPI
+
+ Un cliente ha encontrado un problema con el módulo PayPalAPI:
+
+ {logs}
+
+ {shop_url} lanzado por PrestaShop™
diff --git a/modules/paypal/mails/es/index.php b/modules/paypal/mails/es/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/mails/es/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/mails/fr/error_reporting.html b/modules/paypal/mails/fr/error_reporting.html
new file mode 100644
index 000000000..4ff398be4
--- /dev/null
+++ b/modules/paypal/mails/fr/error_reporting.html
@@ -0,0 +1,42 @@
+
+
+
+
+ Message from {shop_name}
+
+
+
+
+
+
+
+
+
+
+
Bonjour,
+
+
+
+
Rapport d'erreur à partir de votre module PayPalAPI
+
+
+
+
+ Un client a rencontré un problème avec le module PayPalAPI:
+
';
+ return $tab;
+ }
+}
diff --git a/modules/paypal/paypal_install.php b/modules/paypal/paypal_install.php
new file mode 100644
index 000000000..4de3e2e6e
--- /dev/null
+++ b/modules/paypal/paypal_install.php
@@ -0,0 +1,287 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+class PayPalInstall
+{
+ /**
+ * Create PayPal tables
+ */
+ public function createTables()
+ {
+ /* Set database */
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
+ `id_order` int(10) unsigned NOT NULL,
+ `id_transaction` varchar(255) NOT NULL,
+ `id_invoice` varchar(255) DEFAULT NULL,
+ `currency` varchar(10) NOT NULL,
+ `total_paid` varchar(50) NOT NULL,
+ `shipping` varchar(50) NOT NULL,
+ `capture` int(2) NOT NULL,
+ `payment_date` varchar(50) NOT NULL,
+ `payment_method` int(2) unsigned NOT NULL,
+ `payment_status` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id_order`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) {
+ return false;
+ }
+
+ /* Set database */
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` (
+ `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_customer` int(10) unsigned NOT NULL,
+ `paypal_email` varchar(255) NOT NULL,
+ PRIMARY KEY (`id_paypal_customer`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1')) {
+ return false;
+ }
+
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_login_user` (
+ `id_paypal_login_user` INT(11) AUTO_INCREMENT,
+ `id_customer` INT(11) NOT NULL,
+ `token_type` VARCHAR(255) NOT NULL,
+ `expires_in` VARCHAR(255) NOT NULL,
+ `refresh_token` VARCHAR(255) NOT NULL,
+ `id_token` VARCHAR(255) NOT NULL,
+ `access_token` VARCHAR(255) NOT NULL,
+ `account_type` VARCHAR(255) NOT NULL,
+ `user_id` VARCHAR(255) NOT NULL,
+ `verified_account` VARCHAR(255) NOT NULL,
+ `zoneinfo` VARCHAR(255) NOT NULL,
+ `age_range` VARCHAR(255) NOT NULL,
+ PRIMARY KEY (`id_paypal_login_user`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) {
+ return false;
+ }
+
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_capture` (
+ `id_paypal_capture` int(11) NOT NULL AUTO_INCREMENT,
+ `id_order` int(11) NOT NULL,
+ `capture_amount` float NOT NULL,
+ `result` text NOT NULL,
+ `date_add` datetime NOT NULL,
+ `date_upd` datetime NOT NULL,
+ PRIMARY KEY (`id_paypal_capture`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;')) {
+ return false;
+ }
+
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_braintree` (
+ `id_paypal_braintree` int(11) NOT NULL AUTO_INCREMENT,
+ `id_cart` int(11) NOT NULL,
+ `nonce_payment_token` varchar(255) NOT NULL,
+ `client_token` text NOT NULL,
+ `transaction` varchar(255) NULL,
+ `datas` varchar(255) NULL,
+ `id_order` int(11) NULL,
+ PRIMARY KEY (`id_paypal_braintree`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;')) {
+ return false;
+ }
+
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_plus_pui` (
+ `id_paypal_plus_pui` int(11) NOT NULL AUTO_INCREMENT,
+ `id_order` int(11) NOT NULL,
+ `pui_informations` text NOT NULL,
+ PRIMARY KEY (`id_paypal_plus_pui`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
+ ')) {
+ return false;
+ }
+ }
+
+ /**
+ * Set configuration table
+ */
+ public function updateConfiguration($paypal_version)
+ {
+ Configuration::updateValue('PAYPAL_SANDBOX', 0);
+ Configuration::updateValue('PAYPAL_HEADER', '');
+ Configuration::updateValue('PAYPAL_BUSINESS', 0);
+ Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', 'paypal@prestashop.com');
+ Configuration::updateValue('PAYPAL_API_USER', '');
+ Configuration::updateValue('PAYPAL_API_PASSWORD', '');
+ Configuration::updateValue('PAYPAL_API_SIGNATURE', '');
+ Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT', 0);
+ Configuration::updateValue('PAYPAL_CAPTURE', 0);
+ Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS);
+ Configuration::updateValue('PAYPAL_NEW', 1);
+ Configuration::updateValue('PAYPAL_DEBUG_MODE', 0);
+ Configuration::updateValue('PAYPAL_SHIPPING_COST', 20.00);
+ Configuration::updateValue('PAYPAL_VERSION', $paypal_version);
+ Configuration::updateValue('PAYPAL_COUNTRY_DEFAULT', (int) Configuration::get('PS_COUNTRY_DEFAULT'));
+ Configuration::updateValue('PAYPAL_USE_3D_SECURE', 0);
+ // PayPal v3 configuration
+ Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT', 0);
+ //$paypal = new Paypal();
+ //$ssl_verif = new TLSVerificator(true, $paypal);
+ //Configuration::updateValue('PAYPAL_VERSION_TLS_CHECKED', $ssl_verif->getVersion());
+
+ Configuration::updateValue('VZERO_ENABLED', 0);
+ Configuration::updateValue('PAYPAL_BRAINTREE_ENABLED', 0);
+ }
+
+ /**
+ * Delete PayPal configuration
+ */
+ public function deleteConfiguration()
+ {
+ Configuration::deleteByName('PAYPAL_SANDBOX');
+ Configuration::deleteByName('PAYPAL_HEADER');
+ Configuration::deleteByName('PAYPAL_BUSINESS');
+ Configuration::deleteByName('PAYPAL_API_USER');
+ Configuration::deleteByName('PAYPAL_API_PASSWORD');
+ Configuration::deleteByName('PAYPAL_API_SIGNATURE');
+ Configuration::deleteByName('PAYPAL_BUSINESS_ACCOUNT');
+ Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT');
+ Configuration::deleteByName('PAYPAL_PAYMENT_METHOD');
+ Configuration::deleteByName('PAYPAL_TEMPLATE');
+ Configuration::deleteByName('PAYPAL_CAPTURE');
+ Configuration::deleteByName('PAYPAL_DEBUG_MODE');
+ Configuration::deleteByName('PAYPAL_COUNTRY_DEFAULT');
+ Configuration::deleteByName('PAYPAL_VERSION');
+
+ /* USE PAYPAL LOGIN */
+ Configuration::deleteByName('PAYPAL_LOGIN');
+ Configuration::deleteByName('PAYPAL_LOGIN_CLIENT_ID');
+ Configuration::deleteByName('PAYPAL_LOGIN_SECRET');
+ Configuration::deleteByName('PAYPAL_LOGIN_TPL');
+ /* /USE PAYPAL LOGIN */
+
+ // PayPal v3 configuration
+ Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT');
+
+ Configuration::deleteByName('PAYPAL_BRAINTREE_ENABLED');
+
+ // Braintree access credentials
+ Configuration::deleteByName('PAYPAL_BRAINTREE_ACCESS_TOKEN');
+ Configuration::deleteByName('PAYPAL_BRAINTREE_EXPIRE_AT');
+ Configuration::deleteByName('PAYPAL_BRAINTREE_REFRESH_TOKEN');
+ Configuration::deleteByName('PAYPAL_BRAINTREE_MERCHANT_ID');
+ }
+
+ /**
+ * Create a new order state
+ */
+ public function createOrderState()
+ {
+ if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) {
+ $order_state = new OrderState();
+ $order_state->name = array();
+
+ foreach (Language::getLanguages() as $language) {
+ if (Tools::strtolower($language['iso_code']) == 'fr') {
+ $order_state->name[$language['id_lang']] = 'Autorisation acceptée par PayPal';
+ } else {
+ $order_state->name[$language['id_lang']] = 'Authorization accepted from PayPal';
+ }
+
+ }
+
+ $order_state->send_email = false;
+ $order_state->color = '#DDEEFF';
+ $order_state->hidden = false;
+ $order_state->delivery = false;
+ $order_state->logable = true;
+ $order_state->invoice = true;
+
+ if ($order_state->add()) {
+ $source = dirname(__FILE__).'/../../img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif';
+ $destination = dirname(__FILE__).'/../../img/os/'.(int) $order_state->id.'.gif';
+ copy($source, $destination);
+ }
+ Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int) $order_state->id);
+ }
+
+ // OS BRAINTREE
+
+ if (!Configuration::get('PAYPAL_BT_OS_AUTHORIZATION', false)) {
+ $order_state_auth = new OrderState();
+ $order_state_auth->name = array();
+
+
+ foreach (Language::getLanguages() as $language) {
+ if (Tools::strtolower($language['iso_code']) == 'fr') {
+ $order_state_auth->name[$language['id_lang']] = 'Autorisation acceptée par Braintree';
+ } else {
+ $order_state_auth->name[$language['id_lang']] = 'Authorization accepted from Braintree';
+ }
+
+ }
+ $order_state_auth->send_email = false;
+ $order_state_auth->color = '#4169E1';
+ $order_state_auth->hidden = false;
+ $order_state_auth->delivery = false;
+ $order_state_auth->logable = true;
+ $order_state_auth->invoice = true;
+ if ($order_state_auth->add()) {
+ $source = _PS_MODULE_DIR_.'paypal/views/img/logos/os_braintree.png';
+ $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state_auth->id.'.gif';
+ copy($source, $destination);
+ }
+ Configuration::updateValue('PAYPAL_BT_OS_AUTHORIZATION', (int) $order_state_auth->id);
+ }
+
+
+ if (!Configuration::get('PAYPAL_BRAINTREE_OS_AWAITING', false)) {
+ $order_state_wait = new OrderState();
+ $order_state_wait->name = array();
+
+
+ foreach (Language::getLanguages() as $language) {
+ if (Tools::strtolower($language['iso_code']) == 'fr') {
+ $order_state_wait->name[$language['id_lang']] = 'En attente de paiement Braintree';
+ } else {
+ $order_state_wait->name[$language['id_lang']] = 'Awaiting for Braintree payment';
+ }
+
+ }
+ $order_state_wait->send_email = false;
+ $order_state_wait->color = '#4169E1';
+ $order_state_wait->hidden = false;
+ $order_state_wait->delivery = false;
+ $order_state_wait->logable = true;
+ $order_state_wait->invoice = false;
+ if ($order_state_wait->add()) {
+ $source = _PS_MODULE_DIR_.'paypal/views/img/logos/os_braintree.png';
+ $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state_wait->id.'.gif';
+ copy($source, $destination);
+
+ }
+ Configuration::updateValue('PAYPAL_BRAINTREE_OS_AWAITING', (int) $order_state_wait->id);
+ }
+
+ }
+}
diff --git a/modules/paypal/paypal_login/PayPalLoginUser.php b/modules/paypal/paypal_login/PayPalLoginUser.php
new file mode 100644
index 000000000..d93c70807
--- /dev/null
+++ b/modules/paypal/paypal_login/PayPalLoginUser.php
@@ -0,0 +1,141 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ die(header('HTTP/1.0 404 Not Found'));
+}
+
+/**
+ * Description of totRules
+ *
+ * @author 202-ecommerce
+ */
+class PaypalLoginUser extends ObjectModel
+{
+
+ public $id_customer;
+ public $token_type;
+ public $expires_in;
+ public $refresh_token;
+ public $id_token;
+ public $access_token;
+ public $account_type;
+ public $user_id;
+ public $verified_account;
+ public $zoneinfo;
+ public $age_range;
+
+ protected $table = 'paypal_login_user';
+ protected $identifier = 'id_paypal_login_user';
+ protected $fieldsRequired = array(
+ 'id_customer',
+ 'token_type',
+ 'expires_in',
+ 'refresh_token',
+ 'id_token',
+ 'access_token',
+ 'user_id',
+ 'verified_account',
+ 'zoneinfo',
+ );
+
+ protected $fieldsValidate = array(
+ 'id_customer' => 'isInt',
+ 'token_type' => 'isString',
+ 'expires_in' => 'isString',
+ 'refresh_token' => 'isString',
+ 'id_token' => 'isString',
+ 'access_token' => 'isString',
+ 'account_type' => 'isString',
+ 'user_id' => 'isString',
+ 'verified_account' => 'isString',
+ 'zoneinfo' => 'isString',
+ 'age_range' => 'isString',
+
+ );
+
+ public function __construct($id = false, $id_lang = false)
+ {
+ parent::__construct($id, $id_lang);
+ }
+
+ public function getFields()
+ {
+ parent::validateFields();
+ $fields = array();
+ foreach (array_keys($this->fieldsValidate) as $field) {
+ $fields[$field] = $this->$field;
+ }
+
+ return $fields;
+ }
+
+ public static function getPaypalLoginUsers($id_paypal_login_user = false, $id_customer = false, $refresh_token = false)
+ {
+ $sql = "
+ SELECT `id_paypal_login_user`
+ FROM `"._DB_PREFIX_."paypal_login_user`
+ WHERE 1
+ ";
+
+ if ($id_paypal_login_user && Validate::isInt($id_paypal_login_user)) {
+ $sql .= " AND `id_paypal_login_user` = '".(int) $id_paypal_login_user."' ";
+ }
+
+ if ($id_customer && Validate::isInt($id_customer)) {
+ $sql .= " AND `id_customer` = '".(int) $id_customer."' ";
+ }
+
+ if ($refresh_token) {
+ $sql .= " AND `refresh_token` = '".pSQL($refresh_token)."' ";
+ }
+
+ $results = DB::getInstance()->executeS($sql);
+ $logins = array();
+
+ if ($results && count($results)) {
+ foreach ($results as $result) {
+ $logins[$result['id_paypal_login_user']] = new PaypalLoginUser((int) $result['id_paypal_login_user']);
+ }
+
+ }
+
+ return $logins;
+ }
+
+ public static function getByIdCustomer($id_customer)
+ {
+ $login = self::getPaypalLoginUsers(false, $id_customer);
+
+ if ($login && count($login)) {
+ $login = current($login);
+ } else {
+ $login = false;
+ }
+
+ return $login;
+ }
+}
diff --git a/modules/paypal/paypal_login/index.php b/modules/paypal/paypal_login/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/paypal_login/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/paypal_login/paypal_login.php b/modules/paypal/paypal_login/paypal_login.php
new file mode 100644
index 000000000..c497066dc
--- /dev/null
+++ b/modules/paypal/paypal_login/paypal_login.php
@@ -0,0 +1,255 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class PayPalLogin
+{
+ private $_logs = array();
+ private $enable_log = false;
+
+ private $paypal_connect = null;
+
+ public function __construct()
+ {
+ $this->paypal_connect = new PayPalConnect();
+ }
+
+ public function getIdentityAPIURL()
+ {
+ if (Configuration::get('PAYPAL_SANDBOX')) {
+ //return 'www.sandbox.paypal.com';
+ return 'api.sandbox.paypal.com';
+ } else {
+ return 'api.paypal.com';
+ }
+
+ }
+
+ public function getTokenServiceEndpoint()
+ {
+ if (Configuration::get('PAYPAL_SANDBOX')) {
+ // return '/webapps/auth/protocol/openidconnect/v1/tokenservice';
+ return '/v1/identity/openidconnect/tokenservice';
+ } else {
+ return '/v1/identity/openidconnect/tokenservice';
+ }
+
+ }
+
+ public function getUserInfoEndpoint()
+ {
+ return '/v1/identity/openidconnect/userinfo';
+ }
+
+ public static function getReturnLink()
+ {
+ // return 'http://requestb.in/1jlaizq1';
+ if (method_exists(Context::getContext()->shop, 'getBaseUrl')) {
+ return Context::getContext()->shop->getBaseUrl().'modules/paypal/paypal_login/paypal_login_token.php';
+ } else {
+ return 'http://'.Configuration::get('PS_SHOP_DOMAIN').'/modules/paypal/paypal_login/paypal_login_token.php';
+ }
+
+ }
+
+ public function getAuthorizationCode()
+ {
+ unset($this->_logs);
+
+ $context = Context::getContext();
+ $is_logged = (method_exists($context->customer, 'isLogged') ? $context->customer->isLogged() : $context->cookie->isLogged());
+
+ if ($is_logged) {
+ return $this->getRefreshToken();
+ }
+
+ $params = array(
+ 'grant_type' => 'authorization_code',
+ 'code' => Tools::getValue('code'),
+ 'redirect_url' => PayPalLogin::getReturnLink(),
+ );
+
+ $request = http_build_query($params, '', '&');
+ $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getTokenServiceEndpoint(), $request, false, false, true);
+
+ /*
+ if ($this->enable_log === true) {
+ $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+');
+ fwrite($handle, "Request => ".print_r($request, true)."\r\n");
+ fwrite($handle, "Result => ".print_r($result, true)."\r\n");
+ fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n"));
+ fclose($handle);
+ }*/
+
+ $result = Tools::jsonDecode($result);
+
+ if ($result) {
+
+ $login = new PayPalLoginUser();
+
+ $customer = $this->getUserInformations($result->access_token, $login);
+
+ if (!$customer) {
+ return false;
+ }
+
+ $temp = PaypalLoginUser::getByIdCustomer((int) $context->customer->id);
+
+ if ($temp) {
+ $login = $temp;
+ }
+
+ $login->id_customer = $customer->id;
+ $login->token_type = $result->token_type;
+ $login->expires_in = (string) (time() + (int) $result->expires_in);
+ $login->refresh_token = $result->refresh_token;
+ $login->id_token = $result->id_token;
+ $login->access_token = $result->access_token;
+
+ $login->save();
+
+ return $login;
+ }
+ }
+
+ public function getRefreshToken()
+ {
+ unset($this->_logs);
+ $login = PaypalLoginUser::getByIdCustomer((int) Context::getContext()->customer->id);
+
+ if (!is_object($login)) {
+ return false;
+ }
+
+ $params = array(
+ 'grant_type' => 'refresh_token',
+ 'refresh_token' => $login->refresh_token,
+ );
+
+ $request = http_build_query($params, '', '&');
+ $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getTokenServiceEndpoint(), $request, false, false, true);
+
+ /*
+ if ($this->enable_log === true) {
+ $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+');
+ fwrite($handle, "Request => ".print_r($request, true)."\r\n");
+ fwrite($handle, "Result => ".print_r($result, true)."\r\n");
+ fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n"));
+ fclose($handle);
+ }
+ */
+
+ $result = Tools::jsonDecode($result);
+
+ if ($result) {
+ $login->access_token = $result->access_token;
+ $login->expires_in = (string) (time() + $result->expires_in);
+ $login->save();
+ return $login;
+ }
+
+ return false;
+ }
+
+ private function getUserInformations($access_token, &$login)
+ {
+ unset($this->_logs);
+ $headers = array(
+ // 'Content-Type:application/json',
+ 'Authorization: Bearer '.$access_token,
+ );
+
+ $params = array(
+ 'schema' => 'openid',
+ );
+
+ $request = http_build_query($params, '', '&');
+ $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getUserInfoEndpoint(), $request, false, $headers, true);
+
+ /*
+ if ($this->enable_log === true) {
+ $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+');
+ fwrite($handle, "Request => ".print_r($request, true)."\r\n");
+ fwrite($handle, "Result => ".print_r($result, true)."\r\n");
+ fwrite($handle, "Headers => ".print_r($headers, true)."\r\n");
+ fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n"));
+ fclose($handle);
+ }
+ */
+
+ $result = Tools::jsonDecode($result);
+
+ if ($result) {
+ $customer = new Customer();
+ $customer = $customer->getByEmail($result->email);
+
+ if (!$customer) {
+ $customer = $this->setCustomer($result);
+ }
+
+ $login->account_type = $result->account_type;
+ $login->user_id = $result->user_id;
+ $login->verified_account = $result->verified_account;
+ $login->zoneinfo = $result->zoneinfo;
+ $login->age_range = $result->age_range;
+
+ return $customer;
+ }
+
+ return false;
+ }
+
+ private function setCustomer($result)
+ {
+ $customer = new Customer();
+ $customer->firstname = $result->given_name;
+ $customer->lastname = $result->family_name;
+ if (version_compare(_PS_VERSION_, '1.5.3.1', '>')) {
+ $customer->id_lang = Language::getIdByIso(strstr($result->language, '_', true));
+ }
+
+ $customer->birthday = $result->birthday;
+ $customer->email = $result->email;
+ $customer->passwd = Tools::encrypt(Tools::passwdGen());
+ $customer->save();
+
+ $result_address = $result->address;
+
+ $address = new Address();
+ $address->id_customer = $customer->id;
+ $address->id_country = Country::getByIso($result_address->country);
+ $address->alias = 'My address';
+ $address->lastname = $customer->lastname;
+ $address->firstname = $customer->firstname;
+ $address->address1 = $result_address->street_address;
+ $address->postcode = $result_address->postal_code;
+ $address->city = $result_address->locality;
+ $address->phone = $result->phone_number;
+
+ $address->save();
+
+ return $customer;
+ }
+}
diff --git a/modules/paypal/paypal_login/paypal_login_token.php b/modules/paypal/paypal_login/paypal_login_token.php
new file mode 100644
index 000000000..2ddbc949e
--- /dev/null
+++ b/modules/paypal/paypal_login/paypal_login_token.php
@@ -0,0 +1,59 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+header('Content-Type: text/html; charset=utf-8');
+include_once dirname(__FILE__).'/../../../config/config.inc.php';
+include_once _PS_ROOT_DIR_.'/init.php';
+
+
+include_once _PS_MODULE_DIR_.'paypal/paypal.php';
+include_once _PS_MODULE_DIR_.'paypal/paypal_login/paypal_login.php';
+include_once _PS_MODULE_DIR_.'paypal/paypal_login/PayPalLoginUser.php';
+
+$login = new PayPalLogin();
+
+$obj = $login->getAuthorizationCode();
+if ($obj) {
+ $context = Context::getContext();
+ $customer = new Customer((int) $obj->id_customer);
+ $context->cookie->id_customer = (int) ($customer->id);
+ $context->cookie->customer_lastname = $customer->lastname;
+ $context->cookie->customer_firstname = $customer->firstname;
+ $context->cookie->logged = 1;
+ $customer->logged = 1;
+ $context->cookie->is_guest = $customer->isGuest();
+ $context->cookie->passwd = $customer->passwd;
+ $context->cookie->email = $customer->email;
+ $context->customer = $customer;
+ $context->cookie->write();
+}
+
+?>
+
+
diff --git a/modules/paypal/paypal_logos.php b/modules/paypal/paypal_logos.php
new file mode 100644
index 000000000..470f48dc1
--- /dev/null
+++ b/modules/paypal/paypal_logos.php
@@ -0,0 +1,153 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+class PayPalLogos
+{
+ private $iso_code = null;
+
+ const LOCAL = 'Local';
+ const HORIZONTAL = 'Horizontal';
+ const VERTICAL = 'Vertical';
+
+ public function __construct($iso_code)
+ {
+ $this->iso_code = $iso_code;
+ }
+
+ public function getLogos()
+ {
+ $file = dirname(__FILE__).'/'._PAYPAL_LOGO_XML_;
+
+ if (!file_exists($file)) {
+ return false;
+ }
+
+ $xml = simplexml_load_file($file);
+ $logos = array();
+
+ if (isset($xml) && $xml != false) {
+ foreach ($xml->country as $item) {
+ $tmp_iso_code = (string) $item->attributes()->iso_code;
+ $logos[$tmp_iso_code] = (array) $item;
+ }
+
+ if (!isset($logos[$this->iso_code])) {
+ $result = $this->getLocalLogos($logos['default'], 'default');
+ } else {
+ $result = $this->getLocalLogos($logos[$this->iso_code], $this->iso_code);
+ }
+
+ $result['default'] = $this->getLocalLogos($logos['default'], 'default');
+
+ return $result;
+ }
+
+ return false;
+ }
+
+ public function getCardsLogo($vertical = false)
+ {
+ $logos = $this->getLogos();
+
+ $orientation = $vertical === true ? self::VERTICAL : self::HORIZONTAL;
+ $logo_ref = self::LOCAL.'PayPal'.$orientation.'SolutionPP';
+
+ if (array_key_exists($logo_ref, $logos)) {
+ return $logos[$logo_ref];
+ } elseif (($vertical !== false) && isset($logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP'])) {
+ return $logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP'];
+ }
+
+ if (isset($logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP'])) {
+ return _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP'];
+ }
+
+ return false;
+ }
+
+ public function getLocalLogos(array $values, $iso_code)
+ {
+ foreach ($values as $key => $value) {
+ if (!is_array($value)) {
+ // Search for image file name
+ preg_match('#.*/([\w._-]*)$#', $value, $logo);
+
+ if ((count($logo) == 2) && (strstr($key, 'Local') === false)) {
+ $destination = _PAYPAL_MODULE_DIRNAME_.'/views/img/logos/'.$iso_code.'_'.$logo[1];
+ $this->updatePictures($logo[0], $destination);
+
+ // Define the local path after picture have been downloaded
+ $values['Local'.$key] = _MODULE_DIR_.$destination;
+
+ // Load back office cards path
+ if (file_exists(dirname(__FILE__).'/views/img/bo-cards/'.Tools::strtoupper($iso_code).'_bo_cards.png')) {
+ $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/views/img/bo-cards/'.Tools::strtoupper($iso_code).'_bo_cards.png';
+ } else if (file_exists(dirname(__FILE__).'/views/img/bo-cards/default.png')) {
+ $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/views/img/bo-cards/default.png';
+ }
+
+ } else if (isset($values['Local'.$key])) {
+ // Use the local version
+ $values['Local'.$key] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$values['Local'.$key];
+ }
+
+ }
+ }
+
+ return $values;
+ }
+
+ private function updatePictures($source, $destination, $force = false)
+ {
+ $wrappers = stream_get_wrappers();
+ $https_wrapper = in_array('https', $wrappers) ? true : false;
+
+ // 604800 => One week timestamp
+ if (!file_exists(_PS_MODULE_DIR_.$destination) || ((time() - filemtime(_PS_MODULE_DIR_.$destination)) > 604800) || $force) {
+ $picture = Tools::file_get_contents($source);
+ if ((bool) $picture !== false) {
+ if ($handle = @fopen(_PS_MODULE_DIR_.$destination, 'w+')) {
+ $size = fwrite($handle, $picture);
+ if ($size > 0 || (file_exists(_MODULE_DIR_.$destination) && (@filesize(_MODULE_DIR_.$destination) > 0))) {
+ return _MODULE_DIR_.$destination;
+ }
+
+ }
+ } elseif (strstr($source, 'https')) {
+ return $this->updatePictures(str_replace('https', 'http', $source), $destination);
+ } else {
+ return false;
+ }
+
+ }
+
+ return _MODULE_DIR_.$destination;
+ }
+}
diff --git a/modules/paypal/paypal_orders.php b/modules/paypal/paypal_orders.php
new file mode 100644
index 000000000..6d16de26d
--- /dev/null
+++ b/modules/paypal/paypal_orders.php
@@ -0,0 +1,155 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+/*
+ * PayPal notification fields
+ */
+define('ID_INVOICE', 'invoice');
+define('ID_PAYER', 'payer_id');
+define('ID_TRANSACTION', 'txn_id');
+define('CURRENCY', 'mc_currency');
+define('PAYER_EMAIL', 'payer_email');
+define('PAYMENT_DATE', 'payment_date');
+define('TOTAL_PAID', 'mc_gross');
+define('SHIPPING', 'shipping');
+define('VERIFY_SIGN', 'verify_sign');
+
+class PayPalOrder
+{
+ /*
+ * Get PayPal order data
+ * - ID Order
+ * - ID Transaction
+ * - ID Invoice
+ * - Currency (ISO)
+ * - Total paid
+ * - Shipping
+ * - Capture (bool)
+ * - Payment date
+ * - Payment method (int)
+ * - Payment status
+ */
+
+ public static function getTransactionDetails($ppec = false, $payment_status = false)
+ {
+ if ($ppec && $payment_status) {
+ $transaction_id = pSQL($ppec->result['PAYMENTINFO_0_TRANSACTIONID']);
+ return array(
+ 'currency' => pSQL($ppec->result['PAYMENTINFO_0_CURRENCYCODE']),
+ 'id_invoice' => null,
+ 'id_transaction' => $transaction_id,
+ 'transaction_id' => $transaction_id,
+ 'total_paid' => (float) $ppec->result['PAYMENTINFO_0_AMT'],
+ 'shipping' => (float) $ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'],
+ 'payment_date' => pSQL($ppec->result['PAYMENTINFO_0_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)
+ {
+ return Db::getInstance()->getRow(
+ 'SELECT * FROM `'._DB_PREFIX_.'paypal_order`
+ WHERE `id_order` = '.(int) $id_order
+ );
+ }
+
+ public static function getIdOrderByTransactionId($id_transaction)
+ {
+ $sql = 'SELECT `id_order`
+ FROM `'._DB_PREFIX_.'paypal_order`
+ WHERE `id_transaction` = \''.pSQL($id_transaction).'\'';
+
+ $result = Db::getInstance()->getRow($sql);
+
+ if ($result != false) {
+ return (int) $result['id_order'];
+ }
+
+ return 0;
+ }
+
+ public static function saveOrder($id_order, $transaction)
+ {
+ $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`)
+ VALUES ('.(int) $id_order.', \''.pSQL($transaction['id_transaction']).'\', \''.pSQL($transaction['id_invoice']).'\',
+ \''.pSQL($transaction['currency']).'\',
+ \''.$total_paid.'\',
+ \''.(float) $transaction['shipping'].'\',
+ \''.(int) Configuration::get('PAYPAL_CAPTURE').'\',
+ \''.pSQL($transaction['payment_date']).'\',
+ \''.(int) Configuration::get('PAYPAL_PAYMENT_METHOD').'\',
+ \''.pSQL($transaction['payment_status']).'\')'
+ );
+ }
+
+ public static function updateOrder($id_order, $transaction)
+ {
+ $total_paid = (float) $transaction['total_paid'];
+
+ if (!isset($transaction['payment_status']) || !$transaction['payment_status']) {
+ $transaction['payment_status'] = 'NULL';
+ }
+
+ $sql = 'UPDATE `'._DB_PREFIX_.'paypal_order`
+ SET `payment_status` = \''.pSQL($transaction['payment_status']).'\'
+ WHERE `id_order` = \''.(int) $id_order.'\'
+ AND `id_transaction` = \''.pSQL($transaction['id_transaction']).'\'
+ AND `currency` = \''.pSQL($transaction['currency']).'\'';
+ if ((int) Configuration::get('PAYPAL_SANDBOX') != 1) {
+ $sql .= 'AND `total_paid` = \''.pSQL($transaction['total_paid']).'\'
+ AND `shipping` = \''.(float) $transaction['shipping'].'\';';
+ }
+
+ Db::getInstance()->Execute($sql);
+ }
+}
diff --git a/modules/paypal/paypal_plus/index.php b/modules/paypal/paypal_plus/index.php
new file mode 100644
index 000000000..187d3649c
--- /dev/null
+++ b/modules/paypal/paypal_plus/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/paypal_plus/submit.php b/modules/paypal/paypal_plus/submit.php
new file mode 100644
index 000000000..edd6e6cfe
--- /dev/null
+++ b/modules/paypal/paypal_plus/submit.php
@@ -0,0 +1,237 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @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 _PS_ROOT_DIR_.'/init.php';
+
+
+/*
+ * Init var
+ */
+
+if (version_compare(_PS_VERSION_, '1.5', '<')) {
+ include_once _PS_MODULE_DIR_.'paypal/backward_compatibility/backward.php';
+ $context = Context::getContext();
+ $ajax = Tools::getValue('ajax');
+ /*
+ * Pour la version 1.4
+ */
+ if ($ajax) {
+ displayAjax($context);
+ } else {
+ displayConfirm($context);
+ }
+} else {
+ $values = array(
+ 'id_cart' => (int) Tools::getValue('id_cart'),
+ 'id_module' => (int) Module::getInstanceByName('paypal')->id,
+ 'paymentId' => Tools::getValue('paymentId'),
+ 'token' => Tools::getValue('token'),
+ );
+ $values['key'] = Context::getContext()->customer->secure_key;
+ $link = Context::getContext()->link->getModuleLink('paypal', 'submitplus', $values);
+ Tools::redirect($link);
+ die();
+}
+
+function displayConfirm($context)
+{
+ include _PS_ROOT_DIR_.'/header.php';
+
+ $paypal = new PayPal();
+
+ $id_module = (int) Module::getInstanceByName('paypal')->id;
+ $id_cart = Tools::getValue('id_cart');
+ $paymentId = Tools::getValue('paymentId');
+ $token = Tools::getValue('token');
+
+ if (!empty($id_cart) && !empty($paymentId) && !empty($token)) {
+ $CallApiPaypalPlus = new CallApiPaypalPlus();
+ $payment = Tools::jsonDecode($CallApiPaypalPlus->lookUpPayment($paymentId));
+
+ if (isset($payment->state)) {
+ $context->smarty->assign('state', $payment->state);
+
+ $paypal->assignCartSummary();
+
+ $transaction = array(
+ 'id_transaction' => $payment->id,
+ 'payment_status' => $payment->state,
+ 'currency' => $payment->transactions[0]->amount->currency,
+ 'payment_date' => date("Y-m-d H:i:s"),
+ 'total_paid' => $payment->transactions[0]->amount->total,
+ 'id_invoice' => 0,
+ 'shipping' => 0,
+ );
+
+ switch ($payment->state) {
+ case 'created':
+ /* LookUp OK */
+ /* Affichage bouton confirmation */
+
+ $context->smarty->assign(array(
+ 'PayerID' => $payment->payer->payer_info->payer_id,
+ 'paymentId' => $paymentId,
+ 'id_cart' => $id_cart,
+ 'totalAmount' => Tools::displayPrice(Cart::getTotalCart($id_cart)),
+ 'linkSubmitPlus' => _MODULE_DIR_.'paypal/paypal_plus/submit.php',
+ ));
+ break;
+
+ case 'canceled':
+ /* LookUp cancel */
+ $paypal->validateOrder(
+ $id_cart,
+ getOrderStatus('order_canceled'),
+ $payment->transactions[0]->amount->total,
+ $payment->payer->payment_method,
+ null,
+ $transaction
+ );
+ break;
+
+ default:
+ /* Erreur de payment */
+ $paypal->validateOrder(
+ $id_cart,
+ getOrderStatus('payment_error'),
+ $payment->transactions[0]->amount->total,
+ $payment->payer->payment_method,
+ null,
+ $transaction
+ );
+
+ break;
+ }
+ } else {
+ $context->smarty->assign('state', 'failed');
+ }
+ } else {
+ $context->smarty->assign('state', 'failed');
+ }
+
+ echo $context->smarty->fetch(_PS_MODULE_DIR_.'paypal/views/templates/front/order-confirmation-plus.tpl');
+
+ include _PS_ROOT_DIR_.'/footer.php';
+
+ die();
+}
+
+function displayAjax($context)
+{
+ $id_cart = Tools::getValue('id_cart');
+ $payerID = Tools::getValue('payerID');
+ $paymentId = Tools::getValue('paymentId');
+ $submit = Tools::getValue('submit');
+ $paypal = new PayPal();
+ $return = array();
+
+ if (
+ (!empty($id_cart) && $context->cart->id == $id_cart) &&
+ !empty($payerID) &&
+ !empty($paymentId) &&
+ !empty($submit)
+ ) {
+ include_once _PS_MODULE_DIR_.'paypal/paypal.php';
+
+ $CallApiPaypalPlus = new CallApiPaypalPlus();
+ $payment = Tools::jsonDecode($CallApiPaypalPlus->executePayment($payerID, $paymentId));
+
+ if (isset($payment->state)) {
+ $transaction = array(
+ 'id_transaction' => $payment->transactions[0]->related_resources[0]->sale->id,
+ 'payment_status' => $payment->state,
+ 'total_paid' => $payment->transactions[0]->amount->total,
+ 'id_invoice' => 0,
+ 'shipping' => 0,
+ 'currency' => $payment->transactions[0]->amount->currency,
+ 'payment_date' => date("Y-m-d H:i:s"),
+ );
+
+ if ($submit == 'confirmPayment') {
+ if ($payment->state == 'approved') {
+ $paypal->validateOrder(
+ $id_cart,
+ getOrderStatus('payment'),
+ $payment->transactions[0]->amount->total,
+ $payment->payer->payment_method,
+ null,
+ $transaction
+ );
+ $return['success'][] = $paypal->l('Your payment has been taken into account');
+ } else {
+ $paypal->validateOrder(
+ $id_cart,
+ getOrderStatus('payment_error'),
+ $payment->transactions[0]->amount->total,
+ $payment->payer->payment_method,
+ null,
+ $transaction
+ );
+ $return['error'][] = $paypal->l('An error occured during the payment');
+ }
+
+ if (isset($payment->payment_instruction)) {
+ $order = Order::getOrderByCartId($id_cart);
+ $paypal_plus_pui = new PaypalPlusPui();
+ $paypal_plus_pui->id_order = $order->id;
+ $paypal_plus_pui->pui_informations = Tools::jsonEncode($payment->payment_instruction);
+ }
+ } elseif ($submit == 'confirmCancel') {
+ $paypal->validateOrder(
+ $id_cart,
+ getOrderStatus('order_canceled'),
+ $payment->transactions[0]->amount->total,
+ $payment->payer->payment_method,
+ null,
+ $transaction
+ );
+ $return['success'][] = $paypal->l('Your order has been canceled');
+ } else {
+ $return['error'][] = $paypal->l('An error occured during the payment');
+ }
+ } else {
+ $return['error'][] = $paypal->l('An error occured during the payment');
+ }
+ } else {
+ $return['error'][] = $paypal->l('An error occured during the payment');
+ }
+
+ echo Tools::jsonEncode($return);
+ die();
+}
+
+function getOrderStatus($template)
+{
+ /*
+ * payment
+ * payment_error
+ * order_canceled
+ * refund
+ */
+ $context = Context::getContext();
+ return Db::getInstance()->getValue('SELECT id_order_state FROM '._DB_PREFIX_.'order_state_lang WHERE template = "'.pSQL($template).'" AND id_lang = "'.(int) $context->cookie->id_lang.'"');
+}
diff --git a/modules/paypal/paypal_tools.php b/modules/paypal/paypal_tools.php
new file mode 100644
index 000000000..b32389a31
--- /dev/null
+++ b/modules/paypal/paypal_tools.php
@@ -0,0 +1,88 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @version Release: $Revision: 14390 $
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+if (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+class PayPalTools
+{
+ protected $name = null;
+
+ public function __construct($module_name)
+ {
+ $this->name = $module_name;
+ }
+
+ public function moveTopPayments($position)
+ {
+ if (version_compare(_PS_VERSION_, '1.5', '<')) {
+ $hook_payment = (int) Hook::get('payment');
+ } else {
+ $hook_payment = (int) Hook::getIdByName('payment');
+ }
+
+ $module_instance = Module::getInstanceByName($this->name);
+
+ if (version_compare(_PS_VERSION_, '1.5', '<')) {
+ $module_info = Hook::getModuleFromHook($hook_payment, $module_instance->id);
+ } else {
+ $module_info = Hook::getModulesFromHook($hook_payment, $module_instance->id);
+ }
+
+ if ((isset($module_info['position']) && (int) $module_info['position'] > (int) $position) ||
+ (isset($module_info['m.position']) && (int) $module_info['m.position'] > (int) $position)) {
+ return $module_instance->updatePosition($hook_payment, 0, (int) $position);
+ }
+
+ return $module_instance->updatePosition($hook_payment, 1, (int) $position);
+ }
+
+ public function moveRightColumn($position)
+ {
+ if (version_compare(_PS_VERSION_, '1.5', '<')) {
+ $hook_right = (int) Hook::get('rightColumn');
+ } else {
+ $hook_right = (int) Hook::getIdByName('rightColumn');
+ }
+
+ $module_instance = Module::getInstanceByName($this->name);
+
+ if (version_compare(_PS_VERSION_, '1.5', '<')) {
+ $module_info = Hook::getModuleFromHook($hook_right, $module_instance->id);
+ } else {
+ $module_info = Hook::getModulesFromHook($hook_right, $module_instance->id);
+ }
+
+ if ((isset($module_info['position']) && (int) $module_info['position'] > (int) $position) ||
+ (isset($module_info['m.position']) && (int) $module_info['m.position'] > (int) $position)) {
+ return $module_instance->updatePosition($hook_right, 0, (int) $position);
+ }
+
+ return $module_instance->updatePosition($hook_right, 1, (int) $position);
+ }
+}
diff --git a/modules/paypal/pl.php b/modules/paypal/pl.php
new file mode 100644
index 000000000..1cdae56c6
--- /dev/null
+++ b/modules/paypal/pl.php
@@ -0,0 +1,128 @@
+paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.';
+$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain 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'] = 'Annulation des produits :';
+$_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'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module';
+$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide';
+$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :';
+$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !';
+$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !';
+$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :';
+$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !';
+$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :';
+$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer 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>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.';
+$_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>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_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
+$_MODULE['<{paypal}prestashop>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
+$_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_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>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>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier';
+$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
+$_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>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent';
+$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande';
+$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction (TTC) :';
+$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est le :';
+$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction PayPal est :';
+$_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_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer par PayPal';
+$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un résumé de votre commande';
+$_MODULE['<{paypal}prestashop>order-summary_0c458988127eb2150776881e2ef3f0c4'] = 'Adresse de livraison';
+$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est';
+$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)';
+$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons les devises suivantes avec PayPal :';
+$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"';
+$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande';
+$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal';
+$_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>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/pt.php b/modules/paypal/pt.php
new file mode 100644
index 000000000..43bc52085
--- /dev/null
+++ b/modules/paypal/pt.php
@@ -0,0 +1,202 @@
+paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fazendo nova conexão com';
+$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Falha ao conectar com método CURL';
+$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Conexão com método CURL com sucesso';
+$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Enviando este params:';
+$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Envio com método CURL falhou! Erro:';
+$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envio com método CURL com sucesso';
+$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Conexão com método fsockopen falhou';
+$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Envio com método fsockopen falhou!';
+$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envio com método fsockopen com sucesso!';
+$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Resposta do Paypal';
+$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Carrinho mudou, por favor entre dados novamente.';
+$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.';
+$_MODULE['<{paypal}prestashop>back_office_e9f91995a69772872f7a386c6909403d'] = 'Conquiste mais clientes';
+$_MODULE['<{paypal}prestashop>back_office_bbf54c5f55856a290f0deae540368071'] = 'Mais de 100 milhões de contas ativas no Paypal mundialmente';
+$_MODULE['<{paypal}prestashop>back_office_ad78c46c5d6edc542ad2153e23518478'] = 'Acesse clientes internacionais';
+$_MODULE['<{paypal}prestashop>back_office_2b91c701cecf505dc5af4e35d7067f1f'] = '190 países, 25 moedas';
+$_MODULE['<{paypal}prestashop>back_office_3a73e92a81de06fba19ab722bd500675'] = 'Dê garantia aos seus clientes';
+$_MODULE['<{paypal}prestashop>back_office_d5f5f5c138165b223c4e6481752c7748'] = 'Compradores não precisam compartilhar informações privadas';
+$_MODULE['<{paypal}prestashop>back_office_421fe69f8b38a3c361835747e6215227'] = 'Aceite todos os principais métodos de pagamento';
+$_MODULE['<{paypal}prestashop>back_office_516710946f5fb35af6496ad0b7582980'] = 'Só leva alguns minutos para começar com o PayPal';
+$_MODULE['<{paypal}prestashop>back_office_56564e0a106b0e0e2dc57b5a105ed639'] = 'Seu país';
+$_MODULE['<{paypal}prestashop>back_office_eb399bcaca686f8609137153307eecf1'] = 'Mudar';
+$_MODULE['<{paypal}prestashop>back_office_a7bb58222222b064f0721e6e0fe4c486'] = 'Selecione seu país';
+$_MODULE['<{paypal}prestashop>back_office_93140d7ca5171ede9b8a94f07f0363ec'] = 'Já tem uma conta PayPal para empresa';
+$_MODULE['<{paypal}prestashop>back_office_73878c19cdc6ef2ab0d0fac6943cc958'] = 'Precisa de Ajuda?';
+$_MODULE['<{paypal}prestashop>back_office_240fdce652f09de611fc997971dea41e'] = 'Selecione sua solução';
+$_MODULE['<{paypal}prestashop>back_office_d59048f21fd887ad520398ce677be586'] = 'Saiba mais';
+$_MODULE['<{paypal}prestashop>back_office_cd5ee0ac6f3296c551e631268af2915b'] = 'Precisa do Paypal para processar todos seus pagamentos por cartão?';
+$_MODULE['<{paypal}prestashop>back_office_961f2247a2070bedff9f9cd8d64e2650'] = 'Escolher';
+$_MODULE['<{paypal}prestashop>back_office_d30abcb258277c6028d040b073276da1'] = 'Website Payments Standard';
+$_MODULE['<{paypal}prestashop>back_office_4d647b4406dba3d579ac2ef165c05196'] = 'Comece a aceitar pagamentos imediatamente.';
+$_MODULE['<{paypal}prestashop>back_office_e331bc26b25860e255aac1225fc5c639'] = 'Sem taxa de assinatura, somente uma pequena taxa de transação quando você recebe pagamento.';
+$_MODULE['<{paypal}prestashop>back_office_53f61475efdd0c433443262f0d7cdcbf'] = 'PayPal Plus';
+$_MODULE['<{paypal}prestashop>back_office_69d7974bb0bacddb986bbf8d734238c4'] = 'Precisa do Paypal além do seu processador de cartão de crédito atual?';
+$_MODULE['<{paypal}prestashop>back_office_2e3e721e530a957f81d5b5dcff0bf0e1'] = 'Checkout Express';
+$_MODULE['<{paypal}prestashop>back_office_cc84ef735c1a521fe731773a700a87ec'] = 'Aumente em 30% suas vendas on-line * com um simples processo de 3 cliques para a finalização da compra.';
+$_MODULE['<{paypal}prestashop>back_office_e8c466b9c179e229ae67f339a8e2476a'] = 'Registre-se para sua conta para empresa gratuíta do Paypal';
+$_MODULE['<{paypal}prestashop>back_office_d67850bd126f070221dcfd5fa6317043'] = 'Cadastre-se';
+$_MODULE['<{paypal}prestashop>back_office_5c57ba1861701e5a630dd5006acb30e2'] = 'Uma vez que sua conta for criada, volte nesta página para completar o passo 3.';
+$_MODULE['<{paypal}prestashop>back_office_ff7e05b87636d641663fb2f590d9f2bd'] = 'Importante: Por favor clique no botão SALVAR no pé da página quando o Paypal aprovar seu pedido de cadastro para este produto, ao contrário você não conseguirá processar nenhum pagamento por cartão. Este processo pode levar de 3 a 5 dias.';
+$_MODULE['<{paypal}prestashop>back_office_78ba94e61abed0cbb6349b37ec9ed59e'] = 'Se o seu pedido de cadastro para Website Payments Pro já foi aprovado pelo Paypal, por favor vá diretamente para o passo 3.';
+$_MODULE['<{paypal}prestashop>back_office_5b0e8271bd4b23a6bd7a7f49725ed926'] = 'Processe pagamentos na sua loja virtual';
+$_MODULE['<{paypal}prestashop>back_office_b4e69ef9df8f20b984309ee73f78953b'] = 'Forneça suas credenciais da API do Paypal para o PrestaShop';
+$_MODULE['<{paypal}prestashop>back_office_2ffe0ef69fd047d0884f98faa52c1bd3'] = 'Obtenha minhas credenciais da API do PayPal';
+$_MODULE['<{paypal}prestashop>back_office_36461ebc9ebcd269f3909fa49a4b0a57'] = 'Clique aqui e coloque no pop-up seu email e senha de login no Paypal, então copie e cole suas credenciais da API do PayPal nos campos abaixo.';
+$_MODULE['<{paypal}prestashop>back_office_266ba5df48aed68af0cce5f735035291'] = 'API usuário';
+$_MODULE['<{paypal}prestashop>back_office_37e31370e4ab230ff6fba12cc6390aff'] = 'API senha';
+$_MODULE['<{paypal}prestashop>back_office_195ca49498f0b30d3a8967eff22fa9b3'] = 'API assinatura';
+$_MODULE['<{paypal}prestashop>back_office_74cec07ee40362f7605816fdcfbf194d'] = 'Por favor verifique que você tenha copiado todos os caractéres.';
+$_MODULE['<{paypal}prestashop>back_office_90912596e1deb86b1f39bb30013e2f8b'] = 'Use personnalisation (uses your logo and your shop name on Paypal) :';
+$_MODULE['<{paypal}prestashop>back_office_67f0dc0ff3d7b1fa4bb975b8831f54a9'] = 'Indique o email que você usou quando você se cadastrou para uma conta para empresa do Paypa';
+$_MODULE['<{paypal}prestashop>back_office_671bb93f14482ae559c736818605f445'] = 'API e-mail da empresa';
+$_MODULE['<{paypal}prestashop>back_office_0e55f1779fe0d4169ab51bcb0ade306f'] = 'Para finalizar a configuração da sua conta Paypal, você precisa';
+$_MODULE['<{paypal}prestashop>back_office_258da42945130420ae78d4494d549e42'] = 'Confirmar seu endereço de email : veja o email enviado pelo Paypal quando você criou sua conta';
+$_MODULE['<{paypal}prestashop>back_office_f9a8989b19d6c0db2e1cdfe2d54827c2'] = 'Vincule sua conta do Paypal à uma conta bancária ou uma conta de cartão de crédito: Acesse sua conta PayPal e vá à “My business setup”';
+$_MODULE['<{paypal}prestashop>back_office_50f33d14f129e4548c1c270fd6725a78'] = 'Opções de Configuração';
+$_MODULE['<{paypal}prestashop>back_office_113269a2fc804aeae74a99e168309e8b'] = 'Escolha a solução que quer utilizar';
+$_MODULE['<{paypal}prestashop>back_office_a025e05161bb17cbab898f0e77b09a2b'] = 'Iframe';
+$_MODULE['<{paypal}prestashop>back_office_d63bbf35e72f644c8752d4f2304f89e8'] = 'Redireccionamento de página completa';
+$_MODULE['<{paypal}prestashop>back_office_c7c6643c2c48aabc724f019ea0ef26cc'] = 'Seleccione um template';
+$_MODULE['<{paypal}prestashop>back_office_684c41bec3eaa8b8bc929c829c602157'] = 'Atalho para Checkout Express';
+$_MODULE['<{paypal}prestashop>back_office_cebd5bbe0ffdecc270a8a324e5a277dd'] = 'Modo Live (recomendado)';
+$_MODULE['<{paypal}prestashop>back_office_4245499695408b974322be6f01b0d17a'] = 'Modo teste';
+$_MODULE['<{paypal}prestashop>back_office_0eae1e85287701bf8071e06bfb65b933'] = 'Escolha sua maneira de processar pagamentos (automaticamente vs.autorização manual).';
+$_MODULE['<{paypal}prestashop>back_office_339bb3a6443078c1fd5a88d0a0d97096'] = 'Vendas diretas (recomendado)';
+$_MODULE['<{paypal}prestashop>back_office_9a901d2379aac144a2693dc7bf5c8caf'] = 'Autorização/Captura manual (payment shipping)';
+$_MODULE['<{paypal}prestashop>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Salvar';
+$_MODULE['<{paypal}prestashop>back_office_13e8a61381ef71ee7f101ded231c9628'] = 'Por favor note que se você escolher ativar o modo teste';
+$_MODULE['<{paypal}prestashop>back_office_588a39011a111cf61f2230841807f04c'] = 'Você ainda não poderá aceitar pagamentos';
+$_MODULE['<{paypal}prestashop>back_office_97ce37634025467f01c4eec75c93eda6'] = 'Você vai precisar voltar para a página do módulo PayPal para poder completar o Passo 3 antes de colocar no ar';
+$_MODULE['<{paypal}prestashop>back_office_bfbf9731adfef44a1f1a5dc048f33a20'] = 'Você vai precisar criar uma conta no site sandbox do PayPal';
+$_MODULE['<{paypal}prestashop>back_office_d8fd35f628f2099aeaf3e5253e4acdba'] = 'saiba mais';
+$_MODULE['<{paypal}prestashop>back_office_0693f3a913aa574276ae343ccdb15a7d'] = 'Você vai precisar entender de programação';
+$_MODULE['<{paypal}prestashop>back_office_ff0d39d63c036426d6833917d512ef22'] = 'Você tem certeza que você quer ativar o modo teste?';
+$_MODULE['<{paypal}prestashop>back_office_980d7b730b063eabd43e8954e4e072ad'] = 'Parabéns !';
+$_MODULE['<{paypal}prestashop>back_office_bb945e9f42acb423adb3d7535d491444'] = 'Você pode começar agora a aceitar pagamentos com PayPal.';
+$_MODULE['<{paypal}prestashop>back_office_10479c32ebaae1b49b512189d88e9fdd'] = 'Você pode começar agora a testar as soluções do PayPal. Uma vez que você realizar seus testes, não esqueça de voltar para esta página e ativar o modo live para começar a aceitar pagamentos.';
+$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erro!';
+$_MODULE['<{paypal}prestashop>back_office_9dff3a2f8c5760586559e4f28223d7ee'] = 'Você precisa fornecer suas credenciais da API do Paypal no passo 3 para poder aceitar pagamentos.';
+$_MODULE['<{paypal}prestashop>back_office_261fa91388f4f40fe010e174aba10c36'] = 'Fonte1: Pesquisa Forrester conduzida em março de 2011';
+$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Captura Paypal';
+$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:';
+$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Fundos prontos para serem capturados antes do envio';
+$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Obter o dinheiro';
+$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Reembolso Paypal';
+$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:';
+$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Pagamento aceito';
+$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Quando você reembolsa um produto, um reembolso parcial é feito a menos que você selecione \"Generate a voucher\".';
+$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Você tem certeza?';
+$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Reembolso total da transação';
+$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validação Paypal';
+$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:';
+$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Captura Pendente - Sem meio de envio';
+$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pagamento Pendente - Sem meio de envio';
+$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Obtenha o status do pagamento';
+$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'O que é Paypal?';
+$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, uma confiável empresa líder em pagamentos on-line, permite que compradores e empresas enviem e recebam dinheiro online. PayPal tem mais de 100 milhões de contas de membros em 190 países e regiões. Ele é aceito por comerciantes em toda parte, dentro e fora do eBay.';
+$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'É seguro para usar?';
+$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal ajuda a proteger suas informações de cartão de crédito com líderes de mercado em segurança e sistemas de prevenção de fraude. Quando você usa o PayPal, suas informações financeiras nunca são compartilhadas com o comerciante.';
+$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Porque usar Paypal?';
+$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Faça compras ou envie dinheiro com o Paypal - é grátis!';
+$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Compre e pague de forma conveniente salvando suas informações com o Paypal';
+$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'O Paypal é aceito por milhões de empresas em todo o mundo e é o método preferido no eBay';
+$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Comece a usar o Paypal hoje!';
+$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra';
+$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal';
+$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar';
+$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmação do Pedido';
+$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total da transação (impostos incluídos) :';
+$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'A ID do seu pedido é:';
+$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'A ID da sua transação Paypal é:';
+$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Acompanhar meu pedido';
+$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Voltar para pedidos';
+$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra';
+$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal';
+$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido';
+$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pagamento Paypal';
+$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Você escolheu pagar com Paypal.';
+$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto resumo do seu pedido:';
+$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total do seu pedido é';
+$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(imposto incluído)';
+$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nós aceitamos as seguintes moedas para serem enviadas pelo Paypal:';
+$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme seu pedido clicando \'Eu confirmo meu pedido\'';
+$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Eu confirmo meu pedido';
+$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com Paypal';
+$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Seu pedido no';
+$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completo.';
+$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Você escolheu o método Paypal.';
+$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Seu pedido será enviado em breve.';
+$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para qualquer pergunta ou mais informações, por favor contate nosso';
+$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'serviço de atendimento ao cliente';
+$_MODULE['<{paypal}prestashop>paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal';
+$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Aceita pagamentos por cartão de crédito (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) com Paypal.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Você tem certeza que você quer deletar seus dados?';
+$_MODULE['<{paypal}prestashop>paypal_abstract_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Você deve definir suas credenciais do PayPal Integral, para que o tema de telefonia móvel funcione corretamente.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_bd6b3cca1e559117a964cdfab6a977cf'] = 'O tema de telefonia móvel somente funciona com o módulo de pagamento Paypal neste momento. Por favor, ative o módulo para permitir pagamentos.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_ea5eb3f904bf42377277255cbd0e2251'] = 'Para funcionar corretamente o módulo requer o módulo de compatibilidade com versões anteriores habilitado';
+$_MODULE['<{paypal}prestashop>paypal_abstract_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Para funcionar corretamente o módulo requer pelo menos o módulo de compatibilidade com versões anteriores v';
+$_MODULE['<{paypal}prestashop>paypal_abstract_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Para usar o módulo você precisa instalar o módulo de compatibilidade com versões anteriores.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_d739f6e2d6351c3a587d44190a8253af'] = 'Todos recursos do módulo API do Paypal estão incluídos no novo módulo Paypal. Para que não haja nenhum conflito, por favor, não use e remova o módulo PaypalAPI.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Fundos foram recuperados.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Sem sucesso na recuperação dos fundos solicitados. Por favor, veja mensagem de registro!';
+$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Validação bem sucedida. Por favor, veja mensagem de registro!';
+$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Reembolso foi efetuado.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Reembolso solicitado sem sucesso. Por favor, veja mensagem de registro!';
+$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Resultado de cancelamento de produtos:';
+$_MODULE['<{paypal}prestashop>paypal_abstract_90ab0cfd410722553c79e614207a789a'] = 'Alguns campos estão vazios.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Campos de credenciais não podem estar vazios';
+$_MODULE['<{paypal}prestashop>paypal_abstract_3f7145179c909f0e87a911a3171986b6'] = 'Campo para e-mail comercial não pode estar vazio';
+$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Mensagem de pagamento não é válida, por favor verifique seu módulo.';
+$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida';
+$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de operação de reembolso:';
+$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reembolso do Paypal efetuado com sucesso!';
+$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erro de transação!';
+$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de operação de captura:';
+$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Terminado o pedido com Paypal';
+$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Status de verificação:';
+$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Você está usando o e-mail padrão que vem com o Paypal, por favor coloque seu próprio e-mail.';
+$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema conectando com o servidor do Paypal.';
+$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Conexão usando cURL falhou';
+$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Falha na verificação (usando cURL). Retornou:';
+$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Falha na verificação (usando fsockopen). Retornou:';
+$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Sem transporte de comunicação disponível.';
+$_MODULE['<{paypal}prestashop>validation_2818bed1f235637049f4d46fd455dc1c'] = 'A chave Paypal \'mc_gross\' não foi especificada, não pode controlar a quantia paga.';
+$_MODULE['<{paypal}prestashop>validation_be59cbfbf305dc45cd0c3e9841b17ecf'] = 'A chave Paypal \'payment_status\' não foi especificada, não pode controlar a validade de pagamento';
+$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:';
+$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'A chave Paypal \'custom\' não foi especificada, não pode transmitir ao carrinho';
+$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'A chave Paypal \'txn_id\' não foi especificada, transação desconhecida';
+$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'A chave Paypal \'mc_currency\' não foi especificada, moeda desconhecida';
+$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrinho não foi encontrado';
+$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Pedido já foi feito';
+$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID de Transação Paypal:';
+$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'A transação do Paypal não pode ser VERIFICADA.';
+$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Conexão com método fsockopen com sucesso';
+$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida';
+$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Papel de presente';
+$_MODULE['<{paypal}prestashop>submit_1e97d97a923eaddd810e056c828e99ea'] = 'Erro no pagamento';
+$_MODULE['<{paypal}prestashop>submit_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Este produto não está mais em estoque com estes atributos mas está disponível com outros';
+$_MODULE['<{paypal}prestashop>submit_d141a42a5e72c871a3116414bb5c64c1'] = 'Não é possível criar novo carrinho';
+$_MODULE['<{paypal}prestashop>submit_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Ocorreu um erro:';
+$_MODULE['<{paypal}prestashop>submit_58f53d0306ffc9cc9820eab866e90efe'] = 'Erro durante a preparação do pagamento express checkout';
+$_MODULE['<{paypal}prestashop>submit_51da74120dd5e11817ef21e27d2599bc'] = 'Não foi possível criar cliente';
+$_MODULE['<{paypal}prestashop>submit_bcf08b34ab427cb871635151c6976eb0'] = 'Não foi possível criar endereço';
+$_MODULE['<{paypal}prestashop>submit_ca5cecfc8fd8e585ba1e684757168158'] = 'Não foi possível atualizar o carrinho existente';
+$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.';
+$_MODULE['<{paypal}prestashop>submit_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o mesmo que no PrestaShop.';
+$_MODULE['<{paypal}prestashop>submit_98825385aadb1d0dd0fd133ef8acd23d'] = 'Não é possível criar pedido';
+$_MODULE['<{paypal}prestashop>submit_085b78e060c3ef4cc37bd25abd06ff66'] = 'Carrinho mudou desde o último checkout express, por favor faça um novo pagamento no checkout Paypal';
+$_MODULE['<{paypal}prestashop>notifier_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o msmo que no PrestaShop.';
+$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Por favor consulte os registros:';
+$_MODULE['<{paypal}prestashop>express_checkout_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal';
+$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal';
+$_MODULE['<{paypal}prestashop>iframe_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Volte para o website do comerciante';
+$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal';
+$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague com sua conta Paypal, cartão de crédito (CB, Visa, Mastercard...), ou cartão de crédito privado';
+$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague com sua conta Paypal';
diff --git a/modules/paypal/sdk/index.php b/modules/paypal/sdk/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/sdk/paypalREST/index.php b/modules/paypal/sdk/paypalREST/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/sdk/paypalREST/vendor/index.php b/modules/paypal/sdk/paypalREST/vendor/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/vendor/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/sdk/paypalREST/vendor/paypal/index.php b/modules/paypal/sdk/paypalREST/vendor/paypal/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/vendor/paypal/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/index.php b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/auth.cache b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/auth.cache
new file mode 100644
index 000000000..9c7d766a9
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/auth.cache
@@ -0,0 +1 @@
+{"Abo09iM3mztHtrPo1-JHEnnfWFEQiOhoPax8a-nBkNuyS5ejD1CfU0W6o03dqnloKlKpiJK411KYytsu":{"clientId":"Abo09iM3mztHtrPo1-JHEnnfWFEQiOhoPax8a-nBkNuyS5ejD1CfU0W6o03dqnloKlKpiJK411KYytsu","accessTokenEncrypted":"NWExYzRmMzc2ZjQ4NDMuMlVDNXVEM1Z3VFE0V1RvOEU4elZYYjZvSTFCWGJ6akVFdE4rK2JUd3hRRHFKZDhZalB2REE5S1RSaUVkK0NZTUxlV2NwcVZFNGN3dE0reVF3ZjlFcmoyMFE5WHpoWHZJLzFDZDlrUEtFZVJkWEkxK0JaTnl4WlhETHpVWU5UTms0ZnB6c21Yek5CekVLeXRpbXhMcWFQZz09","tokenCreateTime":1511804727,"tokenExpiresIn":32341}}
\ No newline at end of file
diff --git a/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/index.php b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/sdk/paypalREST/vendor/paypal/rest-api-sdk-php/var/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/tr.php b/modules/paypal/tr.php
new file mode 100644
index 000000000..3cab860e4
--- /dev/null
+++ b/modules/paypal/tr.php
@@ -0,0 +1,69 @@
+back_office_e9f91995a69772872f7a386c6909403d'] = 'Müşteri tabanınızı genişletin';
+$_MODULE['<{paypal}prestashop>back_office_bbf54c5f55856a290f0deae540368071'] = 'PayPal ile başlıca kredi kartlarından ödeme alın ve PayPal\'ı tercih eden 100 milyondan fazla aktif kullanıcıya erişin';
+$_MODULE['<{paypal}prestashop>back_office_ad78c46c5d6edc542ad2153e23518478'] = 'Uluslararası pazarlara açılın';
+$_MODULE['<{paypal}prestashop>back_office_2b91c701cecf505dc5af4e35d7067f1f'] = 'PayPal 190 ülkede ve 25 para birimi ile kullanılıyor';
+$_MODULE['<{paypal}prestashop>back_office_3a73e92a81de06fba19ab722bd500675'] = 'Müşterilerinizi güvende hissettirin';
+$_MODULE['<{paypal}prestashop>back_office_421fe69f8b38a3c361835747e6215227'] = 'PayPal ile müşterileriniz kart bilgileri gibi hassas bilgileri paylaşmadan alışveriş yapabilirler';
+$_MODULE['<{paypal}prestashop>back_office_516710946f5fb35af6496ad0b7582980'] = 'ayPal ile satış yapmaya başlamak yalnızca birkaç dakikanızı alır';
+$_MODULE['<{paypal}prestashop>back_office_56564e0a106b0e0e2dc57b5a105ed639'] = 'your country';
+$_MODULE['<{paypal}prestashop>back_office_eb399bcaca686f8609137153307eecf1'] = 'Değiştir';
+$_MODULE['<{paypal}prestashop>back_office_a7bb58222222b064f0721e6e0fe4c486'] = 'Select your country';
+$_MODULE['<{paypal}prestashop>back_office_93140d7ca5171ede9b8a94f07f0363ec'] = 'Zaten PayPal Ticari hesap sahibi misiniz';
+$_MODULE['<{paypal}prestashop>back_office_73878c19cdc6ef2ab0d0fac6943cc958'] = 'Yardıma mı ihtiyacınız var ?';
+$_MODULE['<{paypal}prestashop>back_office_240fdce652f09de611fc997971dea41e'] = 'Bir ödeme çözümü seçin';
+$_MODULE['<{paypal}prestashop>back_office_d59048f21fd887ad520398ce677be586'] = 'Daha fazla bilgi alın';
+$_MODULE['<{paypal}prestashop>back_office_cd5ee0ac6f3296c551e631268af2915b'] = 'Tüm kart işlenmesini PayPal tarafından işlenmesini mi istiyorsunuz ?';
+$_MODULE['<{paypal}prestashop>back_office_961f2247a2070bedff9f9cd8d64e2650'] = 'choose';
+$_MODULE['<{paypal}prestashop>back_office_d30abcb258277c6028d040b073276da1'] = 'PayPal Website Payments Standard';
+$_MODULE['<{paypal}prestashop>back_office_4d647b4406dba3d579ac2ef165c05196'] = 'Hemen ödeme almaya başlayın. Hayır.';
+$_MODULE['<{paypal}prestashop>back_office_53f61475efdd0c433443262f0d7cdcbf'] = 'PayPal Plus';
+$_MODULE['<{paypal}prestashop>back_office_69d7974bb0bacddb986bbf8d734238c4'] = 'Varolan ödeme çözümünüze ek olarak PayPal\'ı mı eklemek istiyorsunuz?';
+$_MODULE['<{paypal}prestashop>back_office_2e3e721e530a957f81d5b5dcff0bf0e1'] = 'PayPal Express Checkout';
+$_MODULE['<{paypal}prestashop>back_office_cc84ef735c1a521fe731773a700a87ec'] = 'Satışlarınızı artırmanın güvenli yolu';
+$_MODULE['<{paypal}prestashop>back_office_e8c466b9c179e229ae67f339a8e2476a'] = 'PayPal Tícarí hesabı açın';
+$_MODULE['<{paypal}prestashop>back_office_d67850bd126f070221dcfd5fa6317043'] = 'HESAP AÇIN';
+$_MODULE['<{paypal}prestashop>back_office_5c57ba1861701e5a630dd5006acb30e2'] = 'Hesabınızı açtıktan sonra 3. adımı tamamlamak için aşağıdaki adrese gidin:';
+$_MODULE['<{paypal}prestashop>back_office_5b0e8271bd4b23a6bd7a7f49725ed926'] = 'ÖDEME ALABİLMEK İÇİN WEB MAĞAZANIZI ETKİNLEŞTİRİN';
+$_MODULE['<{paypal}prestashop>back_office_b4e69ef9df8f20b984309ee73f78953b'] = 'PayPal kimlik bilgilerinizi PrestaShop\'a gönderin:';
+$_MODULE['<{paypal}prestashop>back_office_2ffe0ef69fd047d0884f98faa52c1bd3'] = 'PAYPAL KİMLİK BİLGİLERİMİ GÖRMEK İSTİYORUM';
+$_MODULE['<{paypal}prestashop>back_office_36461ebc9ebcd269f3909fa49a4b0a57'] = 'Yukarıdaki düğmeyi tıkladıktan sonra açılan sayfada PayPal kullanıcı adınızı ve şifrenizi girin. PayPal kimlik bilgilerinizi kopyalayın ve aşağıdaki alanlara yapıştırın.';
+$_MODULE['<{paypal}prestashop>back_office_266ba5df48aed68af0cce5f735035291'] = 'API kullanıcı ismi';
+$_MODULE['<{paypal}prestashop>back_office_37e31370e4ab230ff6fba12cc6390aff'] = 'API şifresi';
+$_MODULE['<{paypal}prestashop>back_office_195ca49498f0b30d3a8967eff22fa9b3'] = 'API imzanız';
+$_MODULE['<{paypal}prestashop>back_office_74cec07ee40362f7605816fdcfbf194d'] = 'Lütfen doğru karakterleri girdiğinizden emin olun.';
+$_MODULE['<{paypal}prestashop>back_office_94ae34a9c107a078c63df4be1394e49d'] = 'PayPal kimlik bilgilerinizi PrestaShop\'a gönderin: <';
+$_MODULE['<{paypal}prestashop>back_office_90912596e1deb86b1f39bb30013e2f8b'] = 'Use personnalisation (uses your logo and your shop name on Paypal) :';
+$_MODULE['<{paypal}prestashop>back_office_67f0dc0ff3d7b1fa4bb975b8831f54a9'] = 'Indicate the email you used when you signed up for a PayPal Business account';
+$_MODULE['<{paypal}prestashop>back_office_671bb93f14482ae559c736818605f445'] = 'API business e-mail';
+$_MODULE['<{paypal}prestashop>back_office_0e55f1779fe0d4169ab51bcb0ade306f'] = 'PayPal hesabınızın kurulumunu tamamlamak için';
+$_MODULE['<{paypal}prestashop>back_office_258da42945130420ae78d4494d549e42'] = 'E-posta adresinizi onaylayın: PayPal\'dan size gönderilecek onay e-postasındaki adımları izleyin';
+$_MODULE['<{paypal}prestashop>back_office_f9a8989b19d6c0db2e1cdfe2d54827c2'] = 'PayPal hesabınıza kredi kartınızı ekleyin ve onaylayın: PayPal hesabınıza giriş yapın ve Hesap Araçlarım kutusundaki "Ticari Ayarlarım" bağlantısını tıklayın';
+$_MODULE['<{paypal}prestashop>back_office_50f33d14f129e4548c1c270fd6725a78'] = 'Hesap ayarı seçenekleriniz';
+$_MODULE['<{paypal}prestashop>back_office_113269a2fc804aeae74a99e168309e8b'] = 'Choose the solution you want to use';
+$_MODULE['<{paypal}prestashop>back_office_a025e05161bb17cbab898f0e77b09a2b'] = 'Iframe';
+$_MODULE['<{paypal}prestashop>back_office_d63bbf35e72f644c8752d4f2304f89e8'] = 'Full page redirect';
+$_MODULE['<{paypal}prestashop>back_office_c7c6643c2c48aabc724f019ea0ef26cc'] = 'Choose your template';
+$_MODULE['<{paypal}prestashop>back_office_684c41bec3eaa8b8bc929c829c602157'] = 'PayPal Express Checkout kullanın';
+$_MODULE['<{paypal}prestashop>back_office_76cfbdf3f35eb2368b8cbabfdd9f55db'] = 'Müşterilerinize 2 tıkla ödeme seçeneği sunun';
+$_MODULE['<{paypal}prestashop>back_office_cebd5bbe0ffdecc270a8a324e5a277dd'] = 'Canlı mod';
+$_MODULE['<{paypal}prestashop>back_office_4245499695408b974322be6f01b0d17a'] = 'Test modu';
+$_MODULE['<{paypal}prestashop>back_office_4dbcb38bbbff5d4a402f2575c57a35e6'] = 'Ödeme türü';
+$_MODULE['<{paypal}prestashop>back_office_339bb3a6443078c1fd5a88d0a0d97096'] = 'Direct sales (recommended)';
+$_MODULE['<{paypal}prestashop>back_office_9a901d2379aac144a2693dc7bf5c8caf'] = 'Authorization/Manual capture (payment shipping)';
+$_MODULE['<{paypal}prestashop>back_office_13e8a61381ef71ee7f101ded231c9628'] = 'Test modunu aktive etmek';
+$_MODULE['<{paypal}prestashop>back_office_588a39011a111cf61f2230841807f04c'] = 'Ödeme alamayacağınız';
+$_MODULE['<{paypal}prestashop>back_office_97ce37634025467f01c4eec75c93eda6'] = '3. adımı tamamlamak için PayPal modül sayfasına geri gelmeniz gerektiği';
+$_MODULE['<{paypal}prestashop>back_office_bfbf9731adfef44a1f1a5dc048f33a20'] = 'PayPal sandbox hesabı oluşturmanız (daha fazla bilgi alın)';
+$_MODULE['<{paypal}prestashop>back_office_d8fd35f628f2099aeaf3e5253e4acdba'] = 'Daha fazla bilgi alın';
+$_MODULE['<{paypal}prestashop>back_office_0693f3a913aa574276ae343ccdb15a7d'] = 'Programlama becerilerine sahip olduğunuz';
+$_MODULE['<{paypal}prestashop>back_office_ff0d39d63c036426d6833917d512ef22'] = 'anlamına gelir. Test modunu aktive etmek istediğinizden emin misiniz?';
+$_MODULE['<{paypal}prestashop>back_office_980d7b730b063eabd43e8954e4e072ad'] = 'Tebrikler !';
+$_MODULE['<{paypal}prestashop>back_office_bb945e9f42acb423adb3d7535d491444'] = 'Artık PayPal ile ödeme almaya başlayabilirsiniz.';
+$_MODULE['<{paypal}prestashop>back_office_10479c32ebaae1b49b512189d88e9fdd'] = 'Artık PayPal ödeme çözümlerini test edebilirsiniz. Daha sonra bu sayfaya gelip canlı modu aktive ederek ödeme almayı unutmayın.';
+$_MODULE['<{paypal}prestashop>back_office_9dff3a2f8c5760586559e4f28223d7ee'] = '3. adımda açıklanan PayPal kimlik bilgilerini tamamlamanız gerekmektedir. Aksi halde ödeme alamazsınız.';
diff --git a/modules/paypal/translations.xml b/modules/paypal/translations.xml
new file mode 100644
index 000000000..d98a1abff
--- /dev/null
+++ b/modules/paypal/translations.xml
@@ -0,0 +1,4008 @@
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ Getting started with PayPal only takes 5 minutes
+
+ Get more buyers 100 million-plus PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment method
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+
+ Use PayPal In Context Checkout
+ Make your client pay without leaving your website
+ Merchant ID
+
+ Translated in your language
+
+ Need help ?]]> Give us a call : xxxx
+ call
+
+
+ You already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, pay only when you get paid.
+
+
+ Website Payments Pro
+
+ A professional platform to accept payments through credit cards and PayPal account, covered by seller protection.]]>
+ Customized payments pages. Monthly subscription of 25€.
+
+ Click on the SAVE button only when PayPal has approved your subscription for this product. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%*.
+ *Source: Forrester research realized in march 2011
+
+ Apply or open your PayPal Business account
+
+ Enable your online shop to process payments
+ Give your PayPal Identification info, finish to set-up your account and start accepting payments
+ Communicate your PayPal identification info to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal identification info
+ After clicking on the "Get my PayPal identification info" button, enter your login and password in the pop up, copy your PayPal identification info from the pop up and paste them is the below fields.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check once more that you pasted all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Use express checkout shortcut
+ Offer your customers a 2-click payment option
+
+ Use Sand box
+ (recommanded)
+ Activate a test environment in your PayPal account (only if you are a developer).
+ Learn more
+ https://developer.paypal.com/
+ Live mode
+ Test mode
+
+ Activating the test mode implies that
+
+ You won’t be able to accept payment
+
You will need to come back to the PayPal module page in order to complete the Step 3 before going live.
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to complete the PayPal identification Information in step 3 otherwise you won’t be able to accept payment.
+
+ Congratulation !
+ You can now start accepting Payment with PayPal.
+ You can now start testing PayPal solutions. Don’t forget to comeback to this page and activate the live mode in order to start accepting payements.
+ Client ID
+ Secret
+ PayPal Blue
+ Neutral
+
+
+ Sign Up
+ Once your account is created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2
+
+
+ Subscribe
+
+ Click on the SAVE button only when PayPal has approved your subscription for this product,]]>
+ otherwise you won't be able to process payment. This process can take up to 3-5 days.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4
+
+
+ Sign Up
+ Once your account is created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3
+
+
+
+
+
+
+
+ Subscribe
+
+ Click on the SAVE button only when PayPal has approved your subscription for this product,]]>
+ otherwise you won’t be able to process payment. This process can take up to 3-5 days.]]>
+ ]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 1800-073-263
+
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Pro - Hosted Solution
+ A professional platform that enables you to accept debit card, credit card and PayPal payments.]]>Customised payment pages. Monthly subscription of 25$.
+ Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=48
+
+
+ Apply
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=49
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3]]>.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 0800 50970
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=42
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=43
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 400-680-6220
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=58
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=59
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Ja
+ Nein
+ Schnell, einfach, sicher
+ Mit Sicherheit
+ mehr Umsatz
+
+ PayPal in Ihrem Shop zu aktivieren dauert nur 5 Minuten
+
+ Mehr Kunden akquirieren 15 Millionen PayPal-Kunden in Deutschland
+
Mehr Sicherheit genießen Der PayPal-Verkäuferschutz sichert Sie im Fall der Fälle ab
+
Mehr Umsatz generieren Steigern Sie Ihren Umsatz um durchschnittlich 18,7%
+
Mehr Schutz schaffen Ihre Warenkorb-Informationen werden nicht weitergegeben
+ ]]>
+
+
+ Ihr Land
+ Ändern
+ Land auswählen
+
+ Übersetzt in Ihre Sprache
+
+ Haben Sie Fragen?]]> Rufen Sie uns an: 01805 23 32 05
+ call
+ (Maximal 14 Cent/Min. aus dem Festnetz. Für Anrufe aus Mobilfunknetzen fallen Gebühren von maximal 42 Cent/Min. an.)
+
+ Haben Sie bereits ein PayPal-Konto
+ Wählen Sie Ihre PayPal-Lösung aus
+ Mehr erfahren]]>
+
+ Möchten Sie PayPal in Ihrem Online-Shop anbieten ?
+ Need PayPal in addition to your existing card processor ?
+
+ Wählen Sie
+
+ PayPal Express
+
+ Sie profitieren von weniger Kaufabbrüchen und profitieren so von mehr Umsatz.
+
+
+ Website Payments Pro
+ Eine professionelle Plattform für eingehende Kreditkarten- und PayPal-Zahlungen, inklusive Verkäuferschutz.]]>Angepasste Zahlungsseiten. 25,00 EUR monatlich.
+ Klicken Sie erst dann auf "Speichern", nachdem PayPal dieses Produkt für Sie freigeschaltet hat. Das dauert in der Regel 3-5 Tage.
+
+ Website Paypal Plus
+ Tagline
+ Disclaimer
+ Client ID
+ Secret
+
+ Express Checkout
+ Steigern Sie Ihre Online-Umsätze um 30%*
+ * Quelle: Forrester-Studie vom März 2011
+
+ Eröffnen Sie ein PayPal-Geschäftskonto
+
+ So aktivieren Sie PayPal in Ihrem Online-Shop oder auf Ihrer Webseite
+ Einfach Ihre PayPal-Daten eingeben, Konto einrichten und sofort Zahlungen akzeptieren
+ Übermitteln Sie die Daten Ihrer API-Schnittstelle an PrestaShop
+ Geben Sie dieselbe E-Mail-Adresse an wie bei der Eröffnung Ihres PayPal-Geschäftskontos.
+ API Informationen abrufen
+ Nachdem Sie auf "API Informationen abrufen" geklickt haben, geben Sie bitte Ihren PayPal Login-Namen und das Passwort in das Pop-Up ein, kopieren Sie dann die Infos, um Sie in die unten stehenden Felder einzusetzen.
+ API-Name
+ API-Passwort
+ API-Signatur
+ API business e-mail
+ Bitte überprüfen Sie Ihre Angaben auf Vollständigkeit.
+
+ Schließen Sie den Anmeldeprozess für Ihr PayPal-Konto ab
+ Bestätigen Sie Ihre E-Mail-Adresse: PayPal hat Ihnen nach der Kontoeröffnung eine mail mit weiteren Informatonen gesendet.
+ Fügen Sie in Ihrem PayPal-Konto Ihr Bankkonto oder Ihre Kreditkarte hinzu. Loggen Sie sich in Ihren PayPal Account ein und klicken auf "Mein Geschäftskonto einrichten".
+
+ Weitere Einstellungen
+
+ Bitte wählen Sie, welche Lösung Sie nutzen möchten
+ iFrame
+ Vollständige Weiterleitung
+ Bitte wählen Sie Ihr Template
+
+
+ Nutzen Sie Express Checkout Shortcut
+ Per Klick gelangen Ihre Kunden ohne Umwege direkt zur PayPal-Zahlungsseite
+
+ Nutzen Sie die Sandbox
+ (empfohlen)
+ Damit können Sie den PayPal-Bezahlfluss in einer Test-Umgebung ausprobieren.
+ Mehr erfahren.
+ http://www.paypalobjects.com/de_DE/html/IntegrationCenter/ic_sandbox.html
+ Reale Umgebung (empfohlen)
+ Test-Umgebung
+
+ Wenn Sie die Test-Umgebung aktivieren
+
+ Können Sie keine Zahlungen empfangen.
+
Müssen Sie auf diese Seite zurückkehren, um Schritt 3 abzuschließen.
+
Sollten Sie einen Zugang zur PayPal-Sanbox einrichten. (Mehr erfahren)
+
Sollten Sie Programierkenntnisse mitbringen.
+ ]]>
+
+ Sind Sie sicher, die Test-Umgebung jetzt zu aktivieren ?
+
+ Zahlungsweise
+
+ Wählen Sie Ihren Weg der Zahlungsabwicklung (automatische oder manuelle Autorisierung).]]>
+ Der PayPal-Verkäuferschutz sichert Sie ab, wenn Ihre Käufer mit PayPal bezahlen. ]]>Und so funktioniert es]]>.
+
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Speichern
+
+ Sie können keine Zahlungen empfangen, wenn Sie nicht die notwendigen Informationen in Schritt 3 angeben.
+
+ Herzlichen Glückwunsch !
+ Nun ist PayPal aktiviert und Sie können Zahlungen empfangen.
+ Jetzt können Sie die PayPal-Lösungen ausprobieren. Vergessen Sie bitte nicht, hierher zurückzukommen, um die reale Umgebung zu aktivieren. Denn sonst können Sie keine Zahlungen empfangen.
+
+
+ JETZT ANMELDEN
+ Sobald Sie das Konto eröffnet haben, fahren Sie bitte mit Schritt 3 fort.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=14
+
+
+ Abonnieren
+ Klicken Sie erst dann auf "Speichern", nachdem PayPal dieses Produkt für Sie freigeschaltet hat.]]>
+ Andernfalls werden Sie keine Zahlungen verarbeiten können. Das dauert in der Regel 3-5 Tage.
+
+
+ Anmelden
+ Nachdem Sie Ihr Konto erstellt haben, schließen Sie auf dieser Seite Schritt 3 ab.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3
+
+
+
+
+
+
+
+ Abonnieren
+ Klicken Sie erst dann auf "Speichern", nachdem PayPal dieses Produkt für Sie freigeschaltet hat.]]>Andernfalls werden Sie keine Zahlungen verarbeiten können. Das dauert in der Regel 3-5 Tage.]]>]]>Falls PayPal für Sie Website Payments Pro bereits freigeschaltet hat, gehen Sie direkt zu
+
+
+
+
+
+
+
+
+
+
+ Sí
+ No
+ Pague con su tarjeta de débito, crédito o su cuenta PayPal
+
+
+ La forma rápida y segura de pagar en Internet
+ Aceptar pagos con PayPal sólo le llevará ]]>unos minutos]]>
+
+ Consiga más clientes Más de 100 millones de cuentas activas en el mundo
+
Acceda a clientes internacionales En 190 países y en 25 divisas
+
Facilite y mejore la experiencia de compra a sus clientes Sus clientes pagan en dos clicos
+
Pagos sin compartir los datos financieros. Acepte pagos con tarjeta y cuenta bancaria
+ ]]>
+
+
+ Su país
+ change
+ Select your country
+
+ ¿Necesita ayuda? Póngase en contacto con nosotros]]>
+ mail
+
+
+ ¿Ya tiene una cuenta PayPal Empresas?
+ Seleccione su solución
+ Más información]]>
+
+ ¿Necesita PayPal para procesar todos sus pagos con tarjeta?
+ ¿Desea aceptar PayPal como forma de pago adicional a su pasarela actual?
+
+ Elija
+
+ Pago estándar
+ Comience a aceptar pagos al instante. Sin comisiones de alta, mantenimiento o cancelación, la única tarifa que se paga es cuando se recibe un pago.
+
+ PayPal Pasarela Integral
+
+ Una pasarela todo en uno para aceptar pagos con tarjetas y con cuenta PayPal.]]>
+ Además de poder personalizar su flujo de pago, cuenta con un programa de protección*.]]>
+ Flujo de pago personalizado. Todo por una tarifa mensual de 15 eur.]]>
+ * Ver téminos y condiciones de Pasarela Integral de PayPal]]>
+
+ Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Pago exprés
+ Aumente sus ventas online en un 18%*
+ *Fuente: Estudio independiente realizado por Ipsos Public Affairs en julio de 2010, los vendedores online reportaron un incremento medio del 18% en sus ventas al añadir Pago exprés en su web.
+
+ Abra su cuenta PayPal Empresas
+
+ Active su tienda online para aceptar pagos con PayPal
+
+ Comunique su información de identificación de PayPal a PrestaShop
+ Indique el correo electrónico asociado a su cuenta PayPal Empresas
+ Obtener mis datos de Identificación de PayPal
+ Después de hacer clic en el botón "Obtener mis datos de identificación en PayPal", introduzca su nombre de usuario y contraseña en la ventana emergente, copie sus datos de identificación de la ventana emergente y péguelos en los campos correspondientes.
+ Nombre de usuario de API
+ Contraseña de API
+ Firma
+ Correo electrónico en PayPal
+ Asegúrese de incluir todos los caracteres, comprueba una vez más que ha pegado todos los caracteres.
+
+ Para finalizar configure su cuenta PayPal siguiendo estos pasos
+ Confirme su dirección de correo electrónico: compruebe el correo electrónico enviado por PayPal al crear su cuenta
+ Añada una tarjeta o cuenta bancaria a su cuenta PayPal: inicie sesión en su cuenta PayPal y vaya a "Verificar mi tarjeta"
+
+ Opciones de configuración
+
+ Seleccione la solución que desea usar
+ Iframe
+ Redirección de página completa
+ Seleccione una plantilla
+
+ Utilice Pago exprés (acceso rápido)
+ Ofrezca a sus clientes una opción de pago con tan solo 2 clics
+
+ Utilice el entorno de prueba Sandbox
+ (recomendado)
+ Active un entorno de prueba en su cuenta PayPal (solo si es programador).
+ Más Información
+ Modo real (recomendado)
+ Modo de prueba
+
+ La activación del modo de prueba implica que
+
+ No podrá aceptar pagos.
+
Tendrá que regresar a la página de PayPal para completar el paso 3 antes de estar en modo real.
+
Tendrá que crear una cuenta en el entorno Sandbox de PayPal (Más información)
+
Necesitará conocimientos de programación
+ ]]>
+
+ ¿Está seguro que desea activar el modo de prueba?
+
+ Método de pago
+ Elija su forma de procesar los pagos (autorización automática o manual).
+ Direct sales
+ Authorization/Manual capture (payment shipping)
+
+ Guardar
+
+ Tiene que completar los datos de Identificación de PayPal en el paso 3 para que pueda aceptar pagos.
+
+ Enhorabuena !
+ Ya puede aceptar pagos con PayPal.
+ Ya puede probar las soluciones de PayPal. No olvide volver a esta página para activar el modo real y poder aceptar pagos.
+
+
+ Abrir una cuenta
+ Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=10
+
+
+ Solicitar
+
+ Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12
+
+
+ Abrir una cuenta
+ Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=11
+
+
+
+ Solicitar
+
+ Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días]]>
+ Si PayPal ya ha aprobado su solicitud de Pasarela integral, vaya directamente ]]>al paso 3.]]>.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12
+
+
+
+
+
+ Oui
+ Non
+ Payez par carte ou par compte PayPal
+ Leader des
+ paiements en ligne
+ Plus simple, plus rapide et plus sûr pour vos clients.
+ Commencer avec PayPal ne prend que ]]>5 minutes]]>
+
+ Touchez plus de clients Plus de 100 millions de comptes actifs à travers le monde
+
Acceptez les paiements à l'international 190 pays, 25 devises
+
Rassurez vos clients Ils n'ont pas besoin de partager leurs informations confidentielles
+
Acceptez les principaux moyens de paiements Visa, Mastercard, Carte Bleue, Aurore, Cofinoga, 4 Etoiles, PayPal
+ ]]>
+
+
+ Traduis dans votre langue
+
+ Votre pays
+ changer
+ Select your country
+
+ Besoin d'aide ?]]> Appelez nous au 0800 942 850*
+ call
+ * Appel gratuit depuis un poste fixe, 7 jours /7 de 9h00 à 18h30.
+
+ Vous possédez déjà un compte PayPal Professionnel
+ Choisissez votre solution
+ En savoir plus]]>
+
+ Besoin de PayPal pour accepter tous les paiements par carte ?
+ Besoin d'ajouter le bouton PayPal en tant que moyen de paiement supplémentaire ?
+
+ Choisissez
+
+ PayPal Intégral
+
+ Acceptez immédiatement les principaux moyens de paiements du web. Pas de frais fixe ni d'engagement de durée. Payez seulement à la réception des paiements.
+
+
+ PayPal Intégral Evolution
+
+ Une plateforme de paiement complète, une protection des paiements en plus*.]]>
+ Ayez la possibilité de personnaliser votre page de paiement. Abonnement mensuel de 25€.
+ ]]>*Soumis à conditions, voir les ]]>conditions d'utilisation]]>
+
+ PayPal Integral Evolution est soumis à conditions et le traitement de votre inscription peut prendre 3 à 5 jours ouvrés. Merci de ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ PayPal Option +
+ Ajoutez PayPal Option + peut générer 20 à 30 % de ventes additionnelles*.
+ *Source: Étude Forrester réalisée en mars 2011
+
+ Souscrivez ou ouvrez un compte PayPal Professionnel
+
+ Configurez votre solution pour commencer à accepter les paiements
+
+ Communiquez vos informations d'identification PayPal à PrestaShop
+ Indiquez l'email que vous avez utilisé pour créer votre compte PayPal professionnel
+ Obtenir mes informations d'identification PayPal
+ Après avoir cliqué sur le bouton "Obtenir mes informations d'identification PayPal", entrez vos identifiant et mot de passe PayPal dans la fenêtre qui s'affichera, copier les informations fournies par PayPal et collez les dans les champs ci-dessous.
+ Identifiant API
+ Mot de passe API
+ Signature
+ E-mail compte PayPal professionnel
+ Merci de vérifier que vous avez bien collé l'ensemble des caractères, certain champs contiennent beaucoup de caractères.
+
+ Pour finir la configuration de votre compte PayPal
+ Confirmer votre adresse e-mail en suivant la procédure envoyée par PayPal lors de la création de votre compte
+ Lier votre compte PayPal à un compte bancaire ou à une carte bancaire. Connectez-vous à votre compte PayPal et rendez-vous dans la section "Premier pas"
+
+ Options de configuration PayPal
+
+ Choisissez votre solution
+ Iframe
+ Redirection complète de la page
+ Choisissez un template
+
+ Utilisez PayPal Express
+ Offrez à vos clients la possibilité de payer en 2 clics
+
+ Utilisez PayPal In Context Checkout
+ Faites payer votre client sans quitter votre site
+ ID du marchant
+
+ Utilisez la Sandbox
+ (recommandé)
+ Mettez en place un environnement de test dans votre compte PayPal (seulement si vous êtes un développeur).
+ Plus d'infos
+ Mode réel (recommandé)
+ Mode test
+
+ Activer le mode test implique que
+
+ Vous ne serez pas en mesure d'accepter les paiements immédiatement
+
Vous devrez créer un compte test sur le site PayPal sandbox. (plus d'infos)
+
Vous aurez besoin de compétences en développement
+
Vous devrez revenir à la page du module PayPal afin de compléter l'étape 3 avec les informations d'identification de votre compte test
+
Pour passer en mode réel, vous devrez revenir sur la page du module PayPal et indiquer vos informations d'identification PayPal à nouveau
+ ]]>
+
+ Êtes vous sûr de vouloir activer le mode test ?
+
+ Type de paiement
+ Choisissez votre manière de valider les paiements (Automatique vs. Autorisation manuelle).
+ Direct sales
+ Authorization/Manual capture (payment shipping)
+
+ Sauvegardez
+
+ Vous devrez compléter l'ensemble des informations d'identification PayPal durant l'étape 3 autrement vous ne serez pas en mesure d'accepter les paiements.
+
+ Bravo !
+ Vous pouvez maintenant commencer à accepter les paiements avec PayPal.
+ Vous pouvez maintenant commencer à tester les solutions PayPal. N'oubliez surtout pas de revenir sur cette page et d'activer le mode réel afin de commencer à accepter les paiements.
+
+
+ Ouvrez un compte
+ Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2
+
+
+ Souscrivez
+
+ PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]>
+ Veuillez ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4
+
+
+ Ouvrez un compte
+ Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3
+
+
+
+ Souscrivez
+
+ PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]>
+ Veuillez ne cliquer sur le bouton "Sauvez" en bas de la page qu'une fois votre inscription validée par PayPal sinon vous ne serez pas en mesure d'accepter les paiements.]]>
+ Si votre souscription à PayPal Intégral Evolution a déjà été validée par PayPal, merci d'aller directement à ]]>l'étape 3]]>.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call on 0844 338 0470
+ call
+
+
+ Already have a PayPal Business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Pro Hosted
+ A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20.
+ Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ PayPal Business account e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39
+
+
+ Apply
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 852-3550-8574
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Pro Hosted Solution
+ A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]>Monthly subscription of HKD$200. To sign-up, please contact a PayPal customer service representative.
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=61
+
+
+ Apply
+
+ "Contact a PayPal sales representative at +852 3550 8584 or email us via the following button]]>
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days"
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=62
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Visit www.Paypal.com]]>
+
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=23
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=24
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : +1 402 938-3740]]>(a US telephone number)
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=76
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=77
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Sì
+ No
+ Paga con la carta o con il tuo conto PayPal
+ Il metodo ideale
+ per farsi pagare online
+ Rapido, affidabile, innovativo
+ Inizia subito a vendere con PayPal. Bastano 5 minuti
+
+ Conquista nuovi clienti Oltre 110 milioni di conti PayPal attivi nel mondo
+
Espandi la tua base utenti anche all'estero 190 Paesi e 25 valute diverse
+
Offri più protezione ai tuoi clienti Chi compra non condivide i dati personali
+
Accetta le principali carte di credito e prepagate Visa, Mastecard, Amex, Aura, PayPal, etc.
+ ]]>
+
+
+ Il tuo Paese
+ change
+ Select your country
+
+ Hai bisogno di aiuto?]]> Chiamaci: 848 390 110
+ call
+ * Costo da rete fissa: 6,8 cent. di euro per il primo minuto e 1,6 cent. di euro per quelli successivi. Per conoscere il costo della chiamata da telefono cellulare, contatta il tuo gestore mobile. Per le chiamate internazionali, rivolgiti al numero: + 353 1436 9021 (possono essere applicate le tariffe internazionali).
+
+ Hai già un conto PayPal Business
+ Seleziona il prodotto che fa per te
+ Scopri di più]]>
+
+ Vuoi usare PayPal per elaborare tutti i tuoi i pagamenti online ?
+ Vuoi PayPal come metodo di pagamento aggiuntivo ?
+
+ Scegli
+
+ Pagamenti su sito web
+
+ Inizia subito a vendere online.]]>
+ Nessun costo iniziale né tariffe mensili. Paghi solo quando ricevi pagamenti.
+
+
+ PayPal Pro
+
+ Il POS Virtuale completo, protezione delle vendite inclusa.]]>
+ *Accetti le principali carte di credito o prepagate e personalizzi la pagina di pagamento.]]>
+ Abbonamento mensile: €29 EUR.
+ *Soggetto ai termini e alle limitazioni delle ]]>Condizioni d'Uso]]>.
+
+ Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro. Può richiedere 3-5 giorni.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Pagamento express
+ Puoi conquistare nuovi clienti in tutto il mondo e aumentare le vendite. Gli acquirenti pagano in 3 clic e tu vendi anche su cellulare.
+
+
+ Richiedi PayPal Pro o apri un conto PayPal Business
+
+ Accetta pagamenti online sul tuo sito
+
+ Clicca il pulsante di seguito per fornire le tue credenziali PayPal a PrestaShop
+
+ Richiedi le credenziali PayPal
+ Dopo aver cliccato il pulsante, inserisci nome utente e password nella finestra di pop up: da qui copia le credenziali PayPal ottenute e incollale nei campi di seguito.
+ Username API
+ Password API
+ Firma API
+ API business e-mail
+ Controlla di aver inserito correttamente tutti i caratteri.
+
+ Completa l'attivazione del tuo conto PayPal
+ Conferma il tuo indirizzo email: controlla l'email inviata da PayPal quando hai creato il conto
+ Collega il conto bancario o la carta di credito al tuo conto PayPal: accedi alla sezione “Informazioni generali" del tuo conto.
+
+ Opzioni di configurazione
+
+ Scegli la soluzione che vuoi utilizzare
+ iFrame
+ Reindirizzamento completo della pagina
+ Scegli il template
+
+ Scegli il pulsante di Pagamento express
+ I tuoi clienti pagano in soli 2 clic
+
+ Scegli Sand box
+ (consigliato)
+ Avrai a disposizione un ambiente di test sul tuo conto PayPal.
+ Scopri di più
+ Modalità Live (consigliato)
+ Modalità Test
+
+ Se attivi la modalità Test
+
+ Non potrai accettare pagamenti
+
Dovrai tornare alla pagina PayPal e completare il terzo passaggio prima di andare live.
+
Dovrai creare un conto sul sito Sandbox di PayPal. (Scopri di più)
+
Devi avere competenze informatiche
+ ]]>
+
+ Sei sicuro di voler attivare la modalità test ?
+
+ Tipo di pagamento
+ Scegli il tuo metodo per processare pagamenti: (automatico vs autorizzazione manuale).
+ Direct sales
+ Authorization/Manual capture (payment shipping)
+
+ Salva
+
+ Per ricevere i pagamenti online, devi completare il terzo passaggio.
+
+ Complimenti.
+ Ora puoi ricevere pagamenti con PayPal.
+ Ora puoi provare i prodotti PayPal. Ricorda di tornare su questa pagina e attivare la modalità live per iniziare ad accettare pagamenti.
+
+
+ Registrati
+ Quando avrai aperto il conto, torna su questa pagina e completa il terzo passaggio.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=6
+
+
+ Richiedilo
+
+ Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]>
+ altrimenti non potrai elaborare i pagamenti. Può richiedere 3-5 giorni.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8
+
+
+ Registrati
+ Quando avrai aperto il conto, torna in questa pagina e completa il terzo passaggio.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=7
+
+
+
+ Richiedilo
+
+ Importante! Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]>
+ altrimenti non potrai elaborare il pagamento. Può richiedere 3-5 giorni.]]>
+ ]]>
+ Se invece PayPal ha già approvato la tua richiesta per PayPal Pro, vai direttamente al ]]>terzo passaggio]]>.
+
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 03-6739-7360 or 0120-271-888
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Plus
+ A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages. Monthly subscription of JPY 3,000. To sign-up, please contact a PayPal customer service representative.
+ Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=55
+
+
+ Apply
+
+ "Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888]]>
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days"
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=82
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=56
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 60-3-77237155
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=70
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=71
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Ja
+ Nee
+ Betaal met uw creditcard of PayPal-account
+ Het
+ Nieuwe Betalen
+ Makkelijk, Veilig en Overal.
+ Het openen van een PayPal-rekening neemt maar enkele minuten in beslag
+
+ De ideale manier om te betalen en betaald te worden.
+
Miljoenen kopers kiezen PayPal vanwege de veilige en snelle koopervaring.
+
Verkopers zijn dol op PayPal, omdat ze daarmee hun omzet kunnen vergroten en betalingen beter kunnen beheren.
+ ]]>
+
+
+ Land
+ Wijzig
+ Selecteer uw land
+
+ Hulp nodig?]]> Neem contact op met een van onze adviseurs: 0900 265 8950
+ call
+
+
+ Heeft u al een zakelijke PayPal-rekening
+ Kies het product wat bij u past
+ Meer weten]]>
+
+ U wilt betalingen via creditcard en bankoverschrijving accepteren?
+ Wilt u PayPal als aanvulling op uw huidige betaalsysteem?
+
+ Kies
+
+ PayPal Standard Checkout
+ als u binnen enkele minuten met online verkopen wilt beginnen. ]]>
+ Geen vaste, opstart- of annuleringskosten: enkel een laag tarief voor het ontvangen van betalingen.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ u vergroot uw omzet en ontvangt uw betaling in slechts drie klikken (ook op mobiele apparaten).
+
+
+ Open nu uw zakelijke PayPal-rekening.
+
+ Configureer uw instellingen om betalingen te kunnen accepteren
+
+ Vul uw identificatiegegevens van PayPal in de PrestaShop omgeving
+ Indicate the email you used when you signed up for a PayPal Business account
+ Vraag mijn identificatiegegevens op bij PayPal
+ Klik op de knop "Vraag mijn identificatiegegevens op bij PayPal" en kopieer je gebruikersnaam en wachtwoord uit het informatieveld in de onderstaande velden.
+ API gebruikersnaam
+ API wachtwoord
+ Handtekening
+ API business e-mail
+ Kijk de gegevens die je net hebt gekopieerd goed na. Sommige velden bevatten namelijk veel karakters.
+
+ Om de configuratie van je PayPal account te finaliseren zijn onderstaande acties noodzakelijk
+ Volg de procedure die via PayPal verstuurd is tijdens het aanmaken van je account om je e-mail te bevestigen.
+ Koppel je PayPal account aan een bankrekening of bankkaart. Om dit te doen log je in in je PayPal account en ga je naar de sectie "eerste stappen".
+
+ PayPal configuratieopties
+
+ Kies de betaaloplossing die u wilt gebruiken
+ Iframe
+ Full page redirect
+ Kies uw sjabloon
+
+ Gebruik PayPal Express Checkout Shortcut
+ Geef je klanten de mogelijkheid om in twee stappen te betalen
+
+ Gebruik de Sandbox
+ (aanbevolen)
+ Stel een testomgeving in in je PayPal account (enkel voor ontwikkelaars)
+ Meer info
+ Productieomgeving (aanbevolen)
+ Testomgeving
+
+ Bij activeren van de test-modus
+
+ Bent u nog niet in staat om betalingen te accepteren.
+
Dient u, voor u live kunt gaan, de PayPal-identificatie gegevens in te vullen bij stap 3.
+
Heeft u een PayPal Sandbox account nodig (learn more).
+
Dient u kennis van programmeren of een programmeur beschikbaar te hebben.
+ ]]>
+
+ Weet u zeker dat de test wilt activeren ?
+
+ Payment type
+ Kies de manier waarop je betaling wordt verwerkt (automatisch of handmatige autorisatie).
+ Direct sales (aanbevolen)
+ Authorization/Manual capture (automatische of handmatige autorisatie)
+
+ Opslaan
+
+ Om betalingen te kunnen ontvangen, dient u de PayPal-identificatie gegevens in te vullen bij stap 3.
+
+ Gefeliciteerd !
+ U kunt nu betalingen met PayPal ontvangen!
+ U kunt nu beginnen met het testen van PayPal oplossingen. Indien u de live-modus wilt activeren, kunt u de instelling op deze pagina
+ wijzigen en direct beginnen met het accepteren van betalingen via PayPal.
+
+
+ Rekening openen
+ Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=17
+
+
+ Rekening openen
+
+
+
+
+ Rekening openen
+ Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=18
+
+
+ Rekening openen
+ Overslaan
+
+
+
+ Overslaan
+
+
+
+ Rekening openen
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : (888) 221-1161
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=52
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=53
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+ Tak
+ Nie
+ Pay with your card or your PayPal account
+ ŚWIATOWY LIDER
+ PŁATNOŚCI ONLINE
+ Łatwiejsze, szybsze i bezpieczniejsze płatności dla Twoich kupujących.
+ Wdrożenie płatności PayPal zajmie Ci tylko kilka minut
+
+ Dodatkowi klienci Na świecie jest już ponad 100 milionów aktywnych kont PayPal
+
Międzynarodowy zasięg PayPal jest dostępny w 190 krajach i 25 walutach
+
Bezpieczeństwo dla Twoich klientów Kupujący nie muszą ujawniać swoich danych finansowych
+
Lokalne metody płatności Ulubione, lokalne metody płatności są podane jak na tacy
+ ]]>
+
+
+ Twój kraj
+ Zmień
+ Select your country
+
+ Potrzebujesz pomocy ?]]> Zadzwoń do nas pod numer 801 386 686
+ call
+
+
+ Masz już firmowe konto PayPal
+ WYBIERZ ROZWIĄZANIE DOPASOWANE DO TWOICH POTRZEB
+ Dowiedz się więcej]]>
+
+ Chcesz akceptować płatności za pomocą systemu PayPal?
+ Chcesz akceptować PayPal jako dodatkową metodę płatności?
+
+ Wybierz
+
+ PayPal Standard
+
+ Akceptuj płatności PayPal już dziś. Możesz wykorzystać gotowe przyciski płatności PayPal lub samodzielnie dostosować rozwiązanie oparte na kodzie HTML.]]>
+ Bez opłat abonamentowych. Opłaty naliczane są tylko za odbiór płatności.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ PayPal Express
+
+ Dzięki prostocie procesu realizacji transakcji klienci częściej i regularniej kupują w Twoim sklepie, a Twoja sprzedaż wzrasta nawet o 30%*.]]>
+ Bez opłat abonamentowych. Opłaty naliczane są tylko za odbiór płatności.
+
+ *Źródło: badania firmy Forrester zrealizowane w marcu 2011
+
+ ZAŁÓŻ FIRMOWE KONTO PAYPAL
+
+ ODBIERAJ PŁATNOŚCI BEZPOŚREDNIO ZA POMOCĄ SWOJEGO SKLEPU INTERNETOWEGO
+
+ Przekaż dane uwierzytelniające API swojego konta PayPal do systemu PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ UZYSKAJ DANE UWIERZYTELNIAJĄCE SWOJEGO KONTA PAYPAL
+ Po kliknięciu przycisku Uzyskaj dane uwierzytelniające swojego konta PayPal wprowadź w małym oknie pojawiającym się na tle bieżącej strony adres e-mail i hasło swojego konta PayPal, skopiuj dane uwierzytelniające API swojego konta PayPal, a następnie wklej w polach poniżej.
+ Użytkownik API
+ Hasło API
+ Podpis API
+ API business e-mail
+ Upewnij się, że wszystkie znaki zostały przez Ciebie poprawnie skopiowane i wklejone.
+
+ Aby zakończyć konfigurację konta PayPal, musisz
+ Potwierdzić swój adres email: odszukaj wiadomość e-mail wysłaną przez system PayPal po założeniu konta PayPal.
+ Powiąż ze swoim kontem PayPal kartę kredytową lub rachunek bankowy: zaloguj się do swojego konta PayPal i kliknij łącze ]]>Powiąż kartę z kontem PayPal]]> i potwierdź ją lub łącze ]]>Powiąż rachunek bankowy z kontem PayPal]]> i potwierdź go.
+
+ Opcje konfiguracji
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Wybierz PayPal Express
+ pozwól swoim klientom płacić dwoma kliknięciami
+
+ Skorzystaj z platformy testowej Sandbox
+
+ skorzystaj ze środowiska testowego, aby wypróbować system PayPal.
+ Dowiedz się więcej
+ Tryb rzeczywisty
+ Tryb testowy
+
+ W środowisku testowym Sandbox
+
+ konieczne będzie stworzenie testowych kont PayPal dla sprzedawcy i kupującego (dowiedz sie więcej)
+
nie będzie można akceptować rzeczywistych płatności
+
Aby akceptować rzeczywiste płatności, przejdź do kroku numer 3 na tej stronie.
+ ]]>
+
+ Chcesz skorzystać ze środowiska testowego ?
+
+ Metoda płatności
+ Wybierz sposób dokonywania płatności (automatycznie vs. ręczna autoryzacja).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Zachowaj
+
+ Musisz uzupełnić dane uwierzytelniające swojego konta PayPal w kroku numer 3, aby móc akceptować rzeczywiste płatności.
+
+ Konfiguracja przebiegła pomyślnie !
+ Teraz możesz już akceptować płatności PayPal.
+ Teraz możesz już testować płatności PayPal. Pamiętaj, że musisz wrócić do tej strony, aby aktywować tryb rzeczywisty i akceptować płatności PayPal.
+
+
+ Załóż konto
+ Po założeniu konta, wróć do tej strony, aby dokończyć proces.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=32
+
+
+
+
+
+
+
+ Załóż konto
+ Po założeniu konta, wróć do tej strony, aby dokończyć proces.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=33
+
+
+
+
+
+
+
+
+
+
+
+
+ Pomiń ten krok
+
+
+
+
+
+
+ Sim
+ Não
+ Pague com o PayPal em 8x sem juros
+ Líder em
+ Pagamentos online
+ Fácil, seguro, rápido pagamento para seus clientes.
+ Só leva alguns minutos para começar com o PayPal
+
+ Conquiste mais clientes Mais de 100 milhões de contas ativas no Paypal mundialmente
+
Dê garantia aos seus clientes Compradores não precisam compartilhar informações privadas
+
Aceite todos os principais métodos de pagamento Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Seu país
+ Mudar
+ Selecione seu país
+
+ Precisa de Ajuda?]]> Entre em contato:08008921555]]>(Serviço de atendimento ao cliente)
+ Ligue
+
+
+ Já tem uma conta PayPal para empresa
+ Selecione sua solução
+ Saiba mais]]>
+
+ Precisa do Paypal para processar todos seus pagamentos por cartão?
+ Precisa do Paypal além do seu processador de cartão de crédito atual?
+
+ Escolher
+
+ Website Payments Standard
+
+ Comece a aceitar pagamentos imediatamente.]]>
+ Sem taxa de assinatura, somente uma pequena taxa de transação quando você recebe pagamento.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Checkout Express
+ Aumente em 30% suas vendas on-line * com um simples processo de 3 cliques para a finalização da compra.
+ *Fonte1: Pesquisa Forrester conduzida em março de 2011
+
+ Registre-se para sua conta para empresa gratuíta do Paypal
+
+ Processe pagamentos na sua loja virtual
+
+ Forneça suas credenciais da API do Paypal para o PrestaShop
+ Indique o email que você usou quando você se cadastrou para uma conta para empresa do Paypal
+ Obtenha minhas credenciais da API do PayPal
+ Clique aqui e coloque no pop-up seu email e senha de login no Paypal, então copie e cole suas credenciais da API do PayPal nos campos abaixo.
+ API usuário
+ API senha
+ API assinatura
+ API e-mail da empresa
+ Por favor verifique que você tenha copiado todos os caractéres.
+
+ Para finalizar a configuração da sua conta Paypal, você precisa
+ Confirmar seu endereço de email : veja o email enviado pelo Paypal quando você criou sua conta
+ Vincule sua conta do Paypal à uma conta bancária ou uma conta de cartão de crédito: Acesse sua conta PayPal e vá à “My business setup”
+
+ Opções de Configuração
+
+ Escolha a solução que quer utilizar
+ iFrame
+ Redireccionamento de página completa
+ Seleccione um template
+
+ Atalho para Checkout Express
+ Ofereça ao seu cliente uma experiência de 3 cliques para finalização da compra
+
+ Use uma Sandbox
+
+ Ative um ambiente teste em sua conta Paypal (somente para desenvolvedores).
+ Saiba mais
+ Modo Live (recomendado)
+ Modo teste
+
+ Por favor note que se você escolher ativar o modo teste
+
+ Você ainda não poderá aceitar pagamentos
+
Você vai precisar voltar para a página do módulo PayPal para poder completar o Passo 3 antes de colocar no ar
+
Você vai precisar criar uma conta no site sandbox do PayPal (saiba mais)
+
Você vai precisar entender de programação
+ ]]>
+
+ Você tem certeza que você quer ativar o modo teste?
+
+ Tipo de pagamento
+ Escolha sua maneira de processar pagamentos (automaticamente vs.autorização manual).
+ Vendas diretas (recomendado)
+ Autorização/Captura manual (payment shipping)
+
+ Salvar
+
+ Você precisa fornecer suas credenciais da API do Paypal no passo 3 para poder aceitar pagamentos.
+
+ Parabéns!
+ Você pode começar agora a aceitar pagamentos com PayPal.
+ Você pode começar agora a testar as soluções do PayPal. Uma vez que você realizar seus testes, não esqueça de voltar para esta página e ativar o modo live para começar a aceitar pagamentos.
+
+
+ Cadastre-se
+ Uma vez que você abriu sua conta PayPal, ou se você já tem uma, continue no passo 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79
+
+
+
+
+
+
+
+ Cadastre-se
+ Uma vez que sua conta for criada, volte nesta página para completar o passo 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80
+
+
+ Cadastre-se
+
+
+
+
+ Cadastre-se
+
+ Importante: Por favor clique no botão SALVAR no pé da página quando o Paypal aprovar seu pedido de cadastro para este produto, ao contrário você não conseguirá processar nenhum pagamento por cartão. Este processo pode levar de 3 a 5 dias.]]>
+ Se o seu pedido de cadastro para Website Payments Pro já foi aprovado pelo Paypal, por favor vá diretamente para o passo 3.
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call :+65 6510 4584]]>(a Singapore telephone number)
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Visit www.Paypal.com]]>
+
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=45
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=46
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 65-6510-4650
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=67
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=68
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : +65 6590-5502]]>(a Singapore telephone number)
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=73
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=74
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Evet
+ Hayır
+ Pay with your card or your PayPal account
+ ONLINE ÖDEME
+ ÇÖZÜMLERİNDE LİDER MARKA
+ Müşterileriniz için güvenli ve pratik ödeme yöntemi.
+ PayPal ile satış yapmaya başlamak yalnızca birkaç dakikanızı alır
+
+ Müşteri tabanınızı genişletin PayPal ile başlıca kredi kartlarından ödeme alın ve PayPal'ı tercih eden 100 milyondan fazla aktif kullanıcıya erişin
+
Uluslararası pazarlara açılın PayPal 190 ülkede ve 25 para birimi ile kullanılıyor
+
Müşterilerinizi güvende hissettirin
+
PayPal ile müşterileriniz kart bilgileri gibi hassas bilgileri paylaşmadan alışveriş yapabilirler
+ ]]>
+
+
+ Ülkeniz
+ Değiştir
+ Select your country
+
+ Yardıma mı ihtiyacınız var ?]]> Bize ulaşın : 444 77 01
+ call
+
+
+ Zaten PayPal Ticari hesap sahibi misiniz
+ Bir ödeme çözümü seçin
+ Daha fazla bilgi alın]]>
+
+ Tüm kart işlenmesini PayPal tarafından işlenmesini mi istiyorsunuz ?
+ Varolan ödeme çözümünüze ek olarak PayPal'ı mı eklemek istiyorsunuz?
+
+ Önerimiz
+
+ PayPal Website Payments Standard
+ Hemen ödeme almaya başlayın. Hayır.
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ PayPal Express Checkout
+ Satışlarınızı artırmanın güvenli yolu
+
+
+ PayPal Tícarí hesabı açın
+
+ ÖDEME ALABİLMEK İÇİN WEB MAĞAZANIZI ETKİNLEŞTİRİN
+
+ PayPal kimlik bilgilerinizi PrestaShop'a gönderin:
+ Indicate the email you used when you signed up for a PayPal Business account
+ PAYPAL KİMLİK BİLGİLERİMİ GÖRMEK İSTİYORUM
+ Yukarıdaki düğmeyi tıkladıktan sonra açılan sayfada PayPal kullanıcı adınızı ve şifrenizi girin. PayPal kimlik bilgilerinizi kopyalayın ve aşağıdaki alanlara yapıştırın.
+ API kullanıcı ismi
+ API şifresi
+ API imzanız
+ API business e-mail
+ Lütfen doğru karakterleri girdiğinizden emin olun.
+
+ PayPal hesabınızın kurulumunu tamamlamak için
+ E-posta adresinizi onaylayın: PayPal'dan size gönderilecek onay e-postasındaki adımları izleyin
+ PayPal hesabınıza kredi kartınızı ekleyin ve onaylayın: PayPal hesabınıza giriş yapın ve Hesap Araçlarım kutusundaki "Ticari Ayarlarım" bağlantısını tıklayın
+
+ Hesap ayarı seçenekleriniz
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ PayPal Express Checkout kullanın
+ Müşterilerinize 2 tıkla ödeme seçeneği sunun
+
+ Sandbox kullanın
+
+ PayPal hesabınızda bir test ortamı oluşturun (programlamcılar içindir)
+ Daha fazla bilgi alın
+ Canlı mod
+ Test modu
+
+ Test modunu aktive etmek
+
+ Ödeme alamayacağınız
+
3. adımı tamamlamak için PayPal modül sayfasına geri gelmeniz gerektiği
+ ]]>
+
+ anlamına gelir. Test modunu aktive etmek istediğinizden emin misiniz?
+
+ Ödeme türü
+ Ödemelerin nasıl işlenmesini istediğinizi seçin (otomatik olarak veya manuel yetkilendirme).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Kaydedin
+
+ 3. adımda açıklanan PayPal kimlik bilgilerini tamamlamanız gerekmektedir. Aksi halde ödeme alamazsınız.
+
+ Tebrikler !
+ Artık PayPal ile ödeme almaya başlayabilirsiniz.
+ Artık PayPal ödeme çözümlerini test edebilirsiniz. Daha sonra bu sayfaya gelip canlı modu aktive ederek ödeme almayı unutmayın.
+
+
+ HESAP AÇIN
+ Hesabınızı açtıktan sonra ödeme çözümünüzü eklemek için aşağıdaki adrese gidin
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=35
+
+
+
+
+
+
+
+ HESAP AÇIN
+ Hesabınızı açtıktan sonra 3. adımı tamamlamak için aşağıdaki adrese gidin:
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=36
+
+
+ HESAP AÇIN
+ Bu adımı atlayın
+
+
+
+
+
+
+
+
+
+ Bu adımı atlayın
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call : 02-8729-6625
+ call
+
+
+ Already have a PayPal business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+
+
+
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ API business e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=64
+
+
+
+
+
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=65
+
+
+ Sign Up
+
+
+
+
+ Apply
+
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3.
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call on 1-877-419-7765
+ call
+
+
+ Already have a PayPal Business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Pro Hosted
+ A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20.
+ Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ PayPal Business account e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84
+
+
+ Apply
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+ Pay with your card or your PayPal account
+ Leader in
+ online payments
+ Easy, secure, fast payments for your buyers.
+ It only takes a few minutes to get started with PayPal
+
+ Get more buyers Over 100 million active PayPal accounts worldwide
+
Access international buyers 190 countries, 25 currencies
+
Reassure your buyers Buyers don’t need to share their private data
+
Accept all major payment methods Visa, Mastercard, PayPal, etc.
+ ]]>
+
+
+ Your country
+ change
+ Select your country
+
+ Need help?]]> Give us a call on 1-877-419-7765
+ call
+
+
+ Already have a PayPal Business account
+ Select your solution
+ Learn more]]>
+
+ Need PayPal to process all your card payments ?
+ Need PayPal in addition to your existing card processor ?
+
+ Choose
+
+ Website Payments Standard
+
+ Start accepting payments immediately.]]>
+ No subscription fees, only a small transaction fee when you get paid.
+
+
+ Website Payments Pro Hosted
+ A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20.
+ Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.
+
+ PayPal Plus
+
+
+ Client ID
+ Secret
+ Use personnalisation (uses your logo and your shop name on Paypal) :
+
+ Express Checkout
+ Boost your online sales by 30%* with a simple 3-click checkout process.
+ *Source: Forrester research conducted in March 2011
+
+ Sign up for your free PayPal Business account
+
+ Process payments on your online shop
+
+ Provide your PayPal API credentials to PrestaShop
+ Indicate the email you used when you signed up for a PayPal Business account
+ Get my PayPal API credentials
+ Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below.
+ API username
+ API password
+ API signature
+ PayPal Business account e-mail
+ Please check that you have copied in all the characters.
+
+ To finalize setting up your PayPal account, you need to
+ Confirm your email address : check the email sent by PayPal when you created your account
+ Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”
+
+ Configuration options
+
+ Choose the solution you want to use
+ Iframe
+ Full page redirect
+ Choose your template
+
+ Express Checkout shortcut
+ Offer your customers a 3-click checkout experience
+
+ Use a Sandbox
+
+ Activate a test environment in your PayPal account (developer only).
+ Learn more
+ Live mode (recommended)
+ Test mode
+
+ Please note that if you choose to activate the test mode
+
+ You won’t be able to accept payments yet
+
You will need to come back to the PayPal module page in order to complete Step 3 before going live
+
You’ll need to create an account on the PayPal sandbox site (learn more)
+
You’ll need programming skills
+ ]]>
+
+ Are you sure you want to activate the test mode ?
+
+ Payment type
+ Choose your way of processing payments (automatically vs.manual authorization).
+ Direct sales (recommended)
+ Authorization/Manual capture (payment shipping)
+
+ Save
+
+ You need to provide your PayPal API credentials in step 3 in order to accept payments.
+
+ Congratulation !
+ You can now start accepting payments with PayPal.
+ You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments.
+
+
+ Sign Up
+ Once you've opened your PayPal account or if you have one already, then continue to step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84
+
+
+ Apply
+ Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86
+
+
+ Sign Up
+ Once your account has been created, come back to this page in order to complete step 3.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85
+
+
+ Sign Up
+
+
+
+
+ Apply
+ Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]>
+ If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>.
+ https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40
+
+
+
+
+
+
+
+
+
diff --git a/modules/paypal/translations/index.php b/modules/paypal/translations/index.php
new file mode 100644
index 000000000..187d3649c
--- /dev/null
+++ b/modules/paypal/translations/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/upgrade/index.php b/modules/paypal/upgrade/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/upgrade/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/upgrade/install-2.8.php b/modules/paypal/upgrade/install-2.8.php
new file mode 100644
index 000000000..799d43e10
--- /dev/null
+++ b/modules/paypal/upgrade/install-2.8.php
@@ -0,0 +1,129 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_2_8($object, $install = false)
+{
+ if (!Configuration::get('PAYPAL_NEW') && ($object->active || $install)) {
+ $result = true;
+
+ /* Check PayPal API */
+ if (file_exists(_PS_MODULE_DIR_.'paypalapi/paypalapi.php')) {
+ $confs = Configuration::getMultiple(array('PAYPAL_HEADER', 'PAYPAL_SANDBOX', 'PAYPAL_API_USER', 'PAYPAL_API_PASSWORD',
+ 'PAYPAL_API_SIGNATURE', 'PAYPAL_EXPRESS_CHECKOUT'));
+
+ include_once _PS_MODULE_DIR_.'paypalapi/paypalapi.php';
+ $paypalapi = new PayPalAPI();
+
+ if ($paypalapi->active) {
+ if (Configuration::get('PAYPAL_INTEGRAL') == 1) {
+ Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS);
+ } elseif (Configuration::get('PAYPAL_INTEGRAL') == 0) {
+ Configuration::updateValue('PAYPAL_PAYMENT_METHOD', ECS);
+ }
+
+ $paypalapi->uninstall();
+ Configuration::loadConfiguration();
+
+ foreach ($confs as $key => $value) {
+ Configuration::updateValue($key, $value);
+ }
+
+ }
+ }
+
+ /* Create Table */
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
+ `id_order` int(10) unsigned NOT null auto_increment,
+ `id_transaction` varchar(255) NOT null,
+ PRIMARY KEY (`id_order`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) {
+ $result = false;
+ }
+
+ if (!Db::getInstance()->Execute('
+ ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `payment_method` INT NOT null,
+ ADD `payment_status` VARCHAR(255) NOT null,
+ ADD `capture` INT NOT null')) {
+ $result = false;
+ }
+
+ /* Hook */
+ $object->registerHook('cancelProduct');
+ $object->registerHook('adminOrder');
+
+ /* Create OrderState */
+ if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) {
+ $order_state = new OrderState();
+ $order_state->name = array();
+
+ foreach (Language::getLanguages() as $language) {
+ if (Tools::strtolower($language['iso_code']) == 'fr') {
+ $order_state->name[$language['id_lang']] = 'Autorisation acceptée par PayPal';
+ } else {
+ $order_state->name[$language['id_lang']] = 'Authorization accepted from PayPal';
+ }
+
+ }
+
+ $order_state->send_email = false;
+ $order_state->color = '#DDEEFF';
+ $order_state->hidden = false;
+ $order_state->delivery = false;
+ $order_state->logable = true;
+ $order_state->invoice = true;
+
+ if ($order_state->add()) {
+ copy(_PS_ROOT_DIR_.'/img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif', _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif');
+ }
+
+ Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int) $order_state->id);
+ }
+ /* Delete unseless configuration */
+ Configuration::deleteByName('PAYPAL_INTEGRAL');
+
+ /* Add new Configurations */
+ if (!Configuration::get('PAYPAL_PAYMENT_METHOD')) {
+ Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS);
+ }
+
+ Configuration::updateValue('PAYPAL_CAPTURE', 0);
+ Configuration::updateValue('PAYPAL_TEMPLATE', 'A');
+
+ if ($result) {
+ Configuration::updateValue('PAYPAL_NEW', 1);
+ }
+
+ return $result;
+ }
+
+ $object->upgrade_detail['2.8'][] = 'PayPalAPI upgrade error !';
+ return false;
+}
diff --git a/modules/paypal/upgrade/install-3.0.php b/modules/paypal/upgrade/install-3.0.php
new file mode 100644
index 000000000..06e8773e5
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.0.php
@@ -0,0 +1,83 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_0($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ /* Update hooks */
+ $object->registerHook('payment');
+ $object->registerHook('paymentReturn');
+ $object->registerHook('shoppingCartExtra');
+ $object->registerHook('backBeforePayment');
+ $object->registerHook('cancelProduct');
+ $object->registerHook('productFooter');
+ $object->registerHook('header');
+ $object->registerHook('adminOrder');
+ $object->registerHook('backOfficeHeader');
+
+ Configuration::updateValue('PAYPAL_VERSION', $object->version);
+
+ $payment_method = (int) Configuration::get('PAYPAL_PAYMENT_METHOD');
+ $payment_methods = array(0 => WPS, 2 => HSS, 1 => ECS);
+
+ Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int) $payment_methods[$payment_method]);
+ Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', Configuration::get('PAYPAL_BUSINESS'));
+ Configuration::updateValue('PAYPAL_BUSINESS', 0);
+ }
+
+ if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_order\'')) > 0) {
+ $columns = array(array('name' => 'id_invoice', 'type' => 'varchar(255) DEFAULT NULL'),
+ array('name' => 'currency', 'type' => 'varchar(10) NOT NULL'),
+ array('name' => 'total_paid', 'type' => 'varchar(50) NOT NULL'),
+ array('name' => 'shipping', 'type' => 'varchar(50) NOT NULL'),
+ array('name' => 'payment_date', 'type' => 'varchar(50) NOT NULL'),
+ array('name' => 'capture', 'type' => 'int(2) NOT NULL'));
+
+ foreach ($columns as $column) {
+ if (!Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \''.pSQL($column['name']).'\'')) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `'.pSQL($column['name']).'` '.pSQL($column['type']));
+ }
+ }
+
+ }
+
+ if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_customer\'')) <= 0) {
+ Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` (
+ `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_customer` int(10) unsigned NOT NULL,
+ `paypal_email` varchar(255) NOT NULL,
+ PRIMARY KEY (`id_paypal_customer`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1');
+ }
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.10.1.php b/modules/paypal/upgrade/install-3.10.1.php
new file mode 100644
index 000000000..2acc00ffd
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.10.1.php
@@ -0,0 +1,42 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_10_1($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if (Configuration::get('PAYPAL_IN_CONTEXT_CHECKOUT_MERCHANT_ID') != false) {
+ Configuration::updateValue('PAYPAL_IN_CONTEXT_CHECKOUT_M_ID', Configuration::get('PAYPAL_IN_CONTEXT_CHECKOUT_MERCHANT_ID'));
+ Configuration::deleteByName('PAYPAL_IN_CONTEXT_CHECKOUT_MERCHANT_ID');
+ }
+
+ Configuration::updateValue('PAYPAL_VERSION', '3.10.1');
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.10.10.php b/modules/paypal/upgrade/install-3.10.10.php
new file mode 100644
index 000000000..4c58da6e2
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.10.10.php
@@ -0,0 +1,38 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_10_10($object, $install = false)
+{
+ if (file_exists(_PS_MODULE_DIR_.'paypal/api/Results.txt')) {
+ unlink(_PS_MODULE_DIR_.'paypal/api/Results.txt');
+ }
+ Configuration::updateValue('PAYPAL_VERSION', '3.10.10');
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.10.4.php b/modules/paypal/upgrade/install-3.10.4.php
new file mode 100644
index 000000000..d290cbc8c
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.10.4.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_10_4($object, $install = false)
+{
+ Configuration::updateValue('PAYPAL_VERSION', '3.10.4');
+ return Configuration::updateValue('PAYPAL_UPDATED_COUNTRIES_OK', true);
+}
diff --git a/modules/paypal/upgrade/install-3.11.2.php b/modules/paypal/upgrade/install-3.11.2.php
new file mode 100644
index 000000000..46641309d
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.11.2.php
@@ -0,0 +1,87 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_11_2($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ // OS BRAINTREE
+
+ $order_state_auth = new OrderState();
+ $order_state_auth->name = array();
+
+ $order_state_wait = new OrderState();
+ $order_state_wait->name = array();
+
+
+ foreach (Language::getLanguages() as $language) {
+ if (Tools::strtolower($language['iso_code']) == 'fr') {
+ $order_state_auth->name[$language['id_lang']] = 'Autorisation acceptée par Braintree';
+ $order_state_wait->name[$language['id_lang']] = 'En attente de paiement Braintree';
+ } else {
+ $order_state_auth->name[$language['id_lang']] = 'Authorization accepted from Braintree';
+ $order_state_wait->name[$language['id_lang']] = 'Awaiting for Braintree payment';
+ }
+
+ }
+
+ $order_state_auth->send_email = false;
+ $order_state_auth->color = '#DDEEFF';
+ $order_state_auth->hidden = false;
+ $order_state_auth->delivery = false;
+ $order_state_auth->logable = true;
+ $order_state_auth->invoice = true;
+
+ $order_state_wait->send_email = false;
+ $order_state_wait->color = '#4169E1';
+ $order_state_wait->hidden = false;
+ $order_state_wait->delivery = false;
+ $order_state_wait->logable = true;
+ $order_state_wait->invoice = false;
+
+ if ($order_state_auth->add()) {
+ $source = _PS_MODULE_DIR_.'paypal/views/img/logos/os_braintree.png';
+ $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state_auth->id.'.gif';
+ copy($source, $destination);
+ }
+ Configuration::updateValue('PAYPAL_BT_OS_AUTHORIZATION', (int) $order_state_auth->id);
+
+ if ($order_state_wait->add()) {
+
+ $source = _PS_MODULE_DIR_.'paypal/views/img/logos/os_braintree.png';
+ $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state_wait->id.'.gif';
+ copy($source, $destination);
+ }
+ Configuration::updateValue('PAYPAL_BRAINTREE_OS_AWAITING', (int) $order_state_wait->id);
+
+ }
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.11.php b/modules/paypal/upgrade/install-3.11.php
new file mode 100644
index 000000000..e1d11e4f2
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.11.php
@@ -0,0 +1,68 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_11($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_braintree` (
+ `id_paypal_braintree` int(11) NOT NULL AUTO_INCREMENT,
+ `id_cart` int(11) NOT NULL,
+ `nonce_payment_token` varchar(255) NOT NULL,
+ `client_token` text NOT NULL,
+ `transaction` varchar(255) NULL,
+ `datas` varchar(255) NULL,
+ `id_order` int(11) NULL,
+ PRIMARY KEY (`id_paypal_braintree`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;')) {
+ return false;
+ }
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_plus_pui` (
+ `id_paypal_plus_pui` int(11) NOT NULL AUTO_INCREMENT,
+ `id_order` int(11) NOT NULL,
+ `pui_informations` text NOT NULL,
+ PRIMARY KEY (`id_paypal_plus_pui`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;')) {
+ return false;
+ }
+
+ if (_PS_VERSION_ >= '1.5') {
+ $object->registerHook('actionOrderStatusPostUpdate');
+ $object->registerHook('displayOrderConfirmation');
+ }
+
+ Configuration::updateValue('PAYPAL_VERSION', '3.11.0');
+
+ }
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.7.php b/modules/paypal/upgrade/install-3.7.php
new file mode 100644
index 000000000..a3dc06f15
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.7.php
@@ -0,0 +1,59 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_7($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_login_user` (
+ `id_paypal_login_user` INT(11) AUTO_INCREMENT,
+ `id_customer` INT(11) NOT NULL,
+ `token_type` VARCHAR(255) NOT NULL,
+ `expires_in` VARCHAR(255) NOT NULL,
+ `refresh_token` VARCHAR(255) NOT NULL,
+ `id_token` VARCHAR(255) NOT NULL,
+ `access_token` VARCHAR(255) NOT NULL,
+ `account_type` VARCHAR(255) NOT NULL,
+ `user_id` VARCHAR(255) NOT NULL,
+ `verified_account` VARCHAR(255) NOT NULL,
+ `zoneinfo` VARCHAR(255) NOT NULL,
+ `age_range` VARCHAR(255) NOT NULL,
+ PRIMARY KEY (`id_paypal_login_user`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) {
+ return false;
+ }
+
+ Configuration::updateValue('PAYPAL_VERSION', '3.7.0');
+ }
+
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.8.3.php b/modules/paypal/upgrade/install-3.8.3.php
new file mode 100644
index 000000000..542b7bad9
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.8.3.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_8_3($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \'id_invoice\'') == false) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `id_invoice` varchar(255) DEFAULT NULL');
+ }
+
+ if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \'currency\'') == false) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `currency` varchar(10) DEFAULT NULL');
+ }
+
+ if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \'total_paid\'') == false) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `total_paid` varchar(50) DEFAULT NULL');
+ }
+
+ if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \'shipping\'') == false) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `shipping` varchar(50) DEFAULT NULL');
+ }
+
+ if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \'payment_date\'') == false) {
+ Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `payment_date` varchar(50) DEFAULT NULL');
+ }
+
+ Configuration::updateValue('PAYPAL_VERSION', '3.8.3');
+ }
+
+ return true;
+}
diff --git a/modules/paypal/upgrade/install-3.9.php b/modules/paypal/upgrade/install-3.9.php
new file mode 100644
index 000000000..5a26dc9a5
--- /dev/null
+++ b/modules/paypal/upgrade/install-3.9.php
@@ -0,0 +1,53 @@
+
+ * @copyright 2007-2018 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 (!defined('_PS_VERSION_')) {
+ exit;
+}
+
+function upgrade_module_3_9($object, $install = false)
+{
+ $paypal_version = Configuration::get('PAYPAL_VERSION');
+
+ if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) {
+ if (!Db::getInstance()->Execute('
+ CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_capture` (
+ `id_paypal_capture` int(11) NOT NULL AUTO_INCREMENT,
+ `id_order` int(11) NOT NULL,
+ `capture_amount` float NOT NULL,
+ `result` text NOT NULL,
+ `date_add` datetime NOT NULL,
+ `date_upd` datetime NOT NULL,
+ PRIMARY KEY (`id_paypal_capture`)
+ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;')) {
+ return false;
+ }
+
+ Configuration::updateValue('PAYPAL_VERSION', '3.9.0');
+ }
+
+ return true;
+}
diff --git a/modules/paypal/views/css/index.php b/modules/paypal/views/css/index.php
new file mode 100644
index 000000000..43c400b20
--- /dev/null
+++ b/modules/paypal/views/css/index.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2007-2018 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;
diff --git a/modules/paypal/views/css/paypal-cart-summary.css b/modules/paypal/views/css/paypal-cart-summary.css
new file mode 100644
index 000000000..ee25b5efe
--- /dev/null
+++ b/modules/paypal/views/css/paypal-cart-summary.css
@@ -0,0 +1,8 @@
+.paypal_total_amount
+{
+ margin-top:20px;
+}
+
+.paypal_logo {
+ margin-bottom: 5px;
+}
\ No newline at end of file
diff --git a/modules/paypal/views/css/paypal.css b/modules/paypal/views/css/paypal.css
new file mode 100644
index 000000000..ef3ce1c4c
--- /dev/null
+++ b/modules/paypal/views/css/paypal.css
@@ -0,0 +1,242 @@
+#paypal-column-block p{text-align:center}
+.paypal-bold{font-weight:700}
+.paypal-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}
+.paypal-disabled,.paypal-disabled *,.paypal-disabled * *,.paypal-disabled * * *{color:#888!important}
+.paypal-disabled .paypal-button,.paypal-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}
+.paypal-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,#paypal-test-mode-confirmation a{color:#036;text-decoration:underline}
+#paypal-wrapper h1,#paypal-wrapper h2,#paypal-wrapper h3,#paypal-wrapper h4,#paypal-wrapper h5,#paypal-wrapper h6,#paypal-country-form h1, #paypal-test-mode-confirmation h1,#paypal-country-form h2, #paypal-test-mode-confirmation h2,#paypal-country-form h3, #paypal-test-mode-confirmation h3,#paypal-country-form h4, #paypal-test-mode-confirmation h4,#paypal-country-form h5, #paypal-test-mode-confirmation h5,#paypal-country-form h6, #paypal-test-mode-confirmation h6{color:#036;font-family:Arial, Verdana, Helvetica, sans-serif;font-weight:400;text-transform:uppercase}
+#paypal-country-form h3, #paypal-test-mode-confirmation h3,#paypal-wrapper h3{font-size:1.4em;line-height:24px}
+#paypal-country-form h4, #paypal-test-mode-confirmation 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],#paypal-country-form button, #paypal-test-mode-confirmation 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}
+#paypal-country-form ul, #paypal-test-mode-confirmation ul{font-size:1.1em;padding-left:10px}
+#paypal-country-form button, #paypal-test-mode-confirmation button{line-height:20px}
+#paypal-test-mode-confirmation{margin:30px;text-align:left;width:500px}
+#paypal-country-form #buttons, paypal-test-mode-confirmation#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}
+#paypal-wrapper .merchant_id {
+ margin-top: 0px;
+}
+#paypal-wrapper .merchant_id label {
+ padding-left: 0px;
+}
+
+.inforeturn .alert {
+ padding: 15px;
+ margin-bottom: 18px;
+ border: 1px solid transparent;
+ border-radius: 0px; }
+ .inforeturn .alert h4 {
+ margin-top: 0;
+ color: inherit; }
+ .inforeturn .alert.alert-link {
+ font-weight: bold; }
+ .inforeturn .alert > p,
+ .inforeturn .alert > ul {
+ margin-bottom: 0; }
+ .inforeturn .alert > p + p {
+ margin-top: 5px; }
+
+.inforeturn .alert-dismissable {
+ padding-right: 35px; }
+ .inforeturn .alert-dismissable.close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit; }
+
+.inforeturn .alert-success {
+ background-color: #55c65e;
+ border-color: #48b151;
+ color: #fff; }
+ .inforeturn .alert-success hr {
+ border-top-color: #419f49; }
+ .inforeturn .alert-success.alert-link {
+ color: #e6e6e6; }
+
+.inforeturn .alert-info {
+ background-color: #5192f3;
+ border-color: #4b80c3;
+ color: #fff; }
+ .inforeturn .alert-info hr {
+ border-top-color: #3d73b7; }
+ .inforeturn .alert-info.alert-link {
+ color: #e6e6e6; }
+
+.inforeturn .alert-warning {
+ background-color: #fe9126;
+ border-color: #e4752b;
+ color: #fff; }
+ .inforeturn .alert-warning hr {
+ border-top-color: #da681c; }
+ .inforeturn .alert-warning.alert-link {
+ color: #e6e6e6; }
+
+.inforeturn .alert-danger {
+ background-color: #f3515c;
+ border-color: #d4323d;
+ color: #fff; }
+ .inforeturn .alert-danger hr {
+ border-top-color: #c32933; }
+ .inforeturn .alert-danger.alert-link {
+ color: #e6e6e6; }
+
+.braintree-row-payment {
+ padding:5px 5px 5px 10px;
+ border:solid 1px #d6d4d4;
+ border-radius: 4px;
+ margin:0 0 10px 0;
+}
+
+.braintree-row-payment .block_field{
+ width: 46%;
+ display: block;
+ margin-top: 10px;
+ margin-right:1%;
+ float: left;
+}
+
+.braintree-row-payment .block_field.half_block_field{
+ width:20%;
+ margin-right:1%;
+}
+
+
+.braintree-row-payment label{
+ float: left;
+ margin: 9px 20px 0 0;
+ display:block;
+ width: 200px;
+ /*text-align:right;*/
+}
+
+.braintree-row-payment .half_block_field .hosted_field {
+ width:100%;
+}
+
+.braintree-row-payment .hosted_field {
+ /*width: 250px;*/
+ height: 34px;
+ padding: 6px 12px 6px 12px;
+ border: 1px solid #cccccc;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px 0px inset;
+ box-shadow: rgba(0, 0, 0, 0.0745098) 0px 1px 1px 0px inset;
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ float:left;
+}
+
+.braintree-row-payment .braintree-hosted-fields-focused
+{
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.braintree-row-payment #braintree_submit{
+ margin-top: 20px;
+ color: #fff;
+ background-color: #337ab7;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid #2e6da4;
+ border-radius: 4px;
+ width: 250px;
+ clear: both;
+}
+.paypal_clear{
+ clear:both;
+}
+
+.braintree_logo{
+ vertical-align: bottom;
+}
+
+.braintree_title_bo{
+ color:#000;
+}
+
+.braintree_error{
+ background-color: #F11;
+ color: white;
+ padding: 5px;
+ opacity: 0.5;
+ border: solid 3px red;
+}
+
+#paypal-wrapper .bo_paypal_help{
+ border-radius:50%;
+ border: 2px solid #036;
+ width: 21px;
+ display: inline-block;
+ height: 21px;
+ font-size: 17px;
+ text-decoration: none;
+ text-align: center;
+}
+
+#paypal-wrapper .braintree_link{
+ text-decoration: none;
+}
+
+.paypal_title_pay_card{
+ font-size:17px;
+ color:#333;
+}
+
+#error_version_php {
+ margin-left : 23px;
+}
\ No newline at end of file
diff --git a/modules/paypal/views/css/paypal_1_4.css b/modules/paypal/views/css/paypal_1_4.css
new file mode 100644
index 000000000..61182ebdb
--- /dev/null
+++ b/modules/paypal/views/css/paypal_1_4.css
@@ -0,0 +1,6 @@
+#formConfirm input.button_large
+{
+
+display:inline-block;
+
+}
\ No newline at end of file
diff --git a/modules/paypal/views/css/paypal_1_4_paypal-cart-summary.css b/modules/paypal/views/css/paypal_1_4_paypal-cart-summary.css
new file mode 100644
index 000000000..2f1020f53
--- /dev/null
+++ b/modules/paypal/views/css/paypal_1_4_paypal-cart-summary.css
@@ -0,0 +1,31 @@
+.shipping_address{
+ width:35%;
+ float:left;
+}
+.billing_address{
+ width:35%;
+ float:left;
+}
+.clearfix
+{
+ clear:both;
+}
+.cart_container
+{
+ margin-top:30px;
+}
+
+.cart_container .title
+{
+ margin-bottom:20px;
+ display:block;
+}
+
+#cart_summary
+{
+ width:100%;
+}
+
+input.button_large[disabled="disabled"] {
+ opacity: 0.2;
+}
\ No newline at end of file
diff --git a/modules/paypal/views/css/paypal_1_5_paypal-cart-summary.css b/modules/paypal/views/css/paypal_1_5_paypal-cart-summary.css
new file mode 100644
index 000000000..4e9ac1823
--- /dev/null
+++ b/modules/paypal/views/css/paypal_1_5_paypal-cart-summary.css
@@ -0,0 +1,4 @@
+ #cart_summary, .cart_container
+{
+ width:100%;
+}
\ No newline at end of file
diff --git a/modules/paypal/views/img/bg-button.png b/modules/paypal/views/img/bg-button.png
new file mode 100644
index 000000000..e7b1a9a09
Binary files /dev/null and b/modules/paypal/views/img/bg-button.png differ
diff --git a/modules/paypal/views/img/bg-call-button.png b/modules/paypal/views/img/bg-call-button.png
new file mode 100644
index 000000000..e0455ae76
Binary files /dev/null and b/modules/paypal/views/img/bg-call-button.png differ
diff --git a/modules/paypal/views/img/blue_tick.png b/modules/paypal/views/img/blue_tick.png
new file mode 100644
index 000000000..9b27b4962
Binary files /dev/null and b/modules/paypal/views/img/blue_tick.png differ
diff --git a/modules/paypal/views/img/bo-cards/AU_bo_cards.png b/modules/paypal/views/img/bo-cards/AU_bo_cards.png
new file mode 100644
index 000000000..665df4c52
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/AU_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/CN_bo_cards.png b/modules/paypal/views/img/bo-cards/CN_bo_cards.png
new file mode 100644
index 000000000..be7071ff5
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/CN_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/DE_bo_cards.png b/modules/paypal/views/img/bo-cards/DE_bo_cards.png
new file mode 100644
index 000000000..18d0bbd57
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/DE_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/ES_bo_cards.png b/modules/paypal/views/img/bo-cards/ES_bo_cards.png
new file mode 100644
index 000000000..e1fe0c5e0
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/ES_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/FR_bo_cards.png b/modules/paypal/views/img/bo-cards/FR_bo_cards.png
new file mode 100644
index 000000000..088bdcb17
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/FR_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/GB_bo_cards.png b/modules/paypal/views/img/bo-cards/GB_bo_cards.png
new file mode 100644
index 000000000..52fb111bc
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/GB_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/HK_bo_cards.png b/modules/paypal/views/img/bo-cards/HK_bo_cards.png
new file mode 100644
index 000000000..2b72a3b08
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/HK_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/IT_bo_cards.png b/modules/paypal/views/img/bo-cards/IT_bo_cards.png
new file mode 100644
index 000000000..07d62529b
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/IT_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/MY_bo_cards.png b/modules/paypal/views/img/bo-cards/MY_bo_cards.png
new file mode 100644
index 000000000..63a9693f4
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/MY_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/NZ_bo_cards.png b/modules/paypal/views/img/bo-cards/NZ_bo_cards.png
new file mode 100644
index 000000000..0a820b0f3
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/NZ_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/PL_bo_cards.png b/modules/paypal/views/img/bo-cards/PL_bo_cards.png
new file mode 100644
index 000000000..c3d47f8f8
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/PL_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/PayPal_bo_cards.png b/modules/paypal/views/img/bo-cards/PayPal_bo_cards.png
new file mode 100644
index 000000000..b4e6392fb
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/PayPal_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/RA_bo_cards.png b/modules/paypal/views/img/bo-cards/RA_bo_cards.png
new file mode 100644
index 000000000..0eea77fa2
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/RA_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/RE_bo_cards.png b/modules/paypal/views/img/bo-cards/RE_bo_cards.png
new file mode 100644
index 000000000..0eea77fa2
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/RE_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/SG_bo_cards.png b/modules/paypal/views/img/bo-cards/SG_bo_cards.png
new file mode 100644
index 000000000..4713d9128
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/SG_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/TH_bo_cards.png b/modules/paypal/views/img/bo-cards/TH_bo_cards.png
new file mode 100644
index 000000000..483d63faa
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/TH_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/TR_bo_cards.png b/modules/paypal/views/img/bo-cards/TR_bo_cards.png
new file mode 100644
index 000000000..483d63faa
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/TR_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/TW_bo_cards.png b/modules/paypal/views/img/bo-cards/TW_bo_cards.png
new file mode 100644
index 000000000..483d63faa
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/TW_bo_cards.png differ
diff --git a/modules/paypal/views/img/bo-cards/default.png b/modules/paypal/views/img/bo-cards/default.png
new file mode 100644
index 000000000..405131a3f
Binary files /dev/null and b/modules/paypal/views/img/bo-cards/default.png differ
diff --git a/modules/paypal/views/img/bo-cards/index.php b/modules/paypal/views/img/bo-cards/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/img/bo-cards/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/img/braintree.png b/modules/paypal/views/img/braintree.png
new file mode 100644
index 000000000..a632eb94c
Binary files /dev/null and b/modules/paypal/views/img/braintree.png differ
diff --git a/modules/paypal/views/img/call.png b/modules/paypal/views/img/call.png
new file mode 100644
index 000000000..2f7e284ba
Binary files /dev/null and b/modules/paypal/views/img/call.png differ
diff --git a/modules/paypal/views/img/default_logos/AU_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/AU_vertical_solution_PP.png
new file mode 100644
index 000000000..6e932ef93
Binary files /dev/null and b/modules/paypal/views/img/default_logos/AU_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/BE_horizontal_solution_PP.png b/modules/paypal/views/img/default_logos/BE_horizontal_solution_PP.png
new file mode 100644
index 000000000..c5bbfaf3d
Binary files /dev/null and b/modules/paypal/views/img/default_logos/BE_horizontal_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/BE_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/BE_vertical_solution_PP.png
new file mode 100644
index 000000000..cb799f541
Binary files /dev/null and b/modules/paypal/views/img/default_logos/BE_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/DE_horizontal_solution_PP.gif b/modules/paypal/views/img/default_logos/DE_horizontal_solution_PP.gif
new file mode 100644
index 000000000..b4324141d
Binary files /dev/null and b/modules/paypal/views/img/default_logos/DE_horizontal_solution_PP.gif differ
diff --git a/modules/paypal/views/img/default_logos/DE_vertical_solution_PP.gif b/modules/paypal/views/img/default_logos/DE_vertical_solution_PP.gif
new file mode 100644
index 000000000..b4324141d
Binary files /dev/null and b/modules/paypal/views/img/default_logos/DE_vertical_solution_PP.gif differ
diff --git a/modules/paypal/views/img/default_logos/FR_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/FR_vertical_solution_PP.png
new file mode 100644
index 000000000..826baa201
Binary files /dev/null and b/modules/paypal/views/img/default_logos/FR_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/PL_horizontal_solution_PP.png b/modules/paypal/views/img/default_logos/PL_horizontal_solution_PP.png
new file mode 100644
index 000000000..9ab199cbb
Binary files /dev/null and b/modules/paypal/views/img/default_logos/PL_horizontal_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/PL_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/PL_vertical_solution_PP.png
new file mode 100644
index 000000000..dbdaf65e8
Binary files /dev/null and b/modules/paypal/views/img/default_logos/PL_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/RA_horizontal_solution_PP.png b/modules/paypal/views/img/default_logos/RA_horizontal_solution_PP.png
new file mode 100644
index 000000000..9ab199cbb
Binary files /dev/null and b/modules/paypal/views/img/default_logos/RA_horizontal_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/RA_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/RA_vertical_solution_PP.png
new file mode 100644
index 000000000..dbdaf65e8
Binary files /dev/null and b/modules/paypal/views/img/default_logos/RA_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/RE_horizontal_solution_PP.png b/modules/paypal/views/img/default_logos/RE_horizontal_solution_PP.png
new file mode 100644
index 000000000..9ab199cbb
Binary files /dev/null and b/modules/paypal/views/img/default_logos/RE_horizontal_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/RE_vertical_solution_PP.png b/modules/paypal/views/img/default_logos/RE_vertical_solution_PP.png
new file mode 100644
index 000000000..dbdaf65e8
Binary files /dev/null and b/modules/paypal/views/img/default_logos/RE_vertical_solution_PP.png differ
diff --git a/modules/paypal/views/img/default_logos/default_horizontal.png b/modules/paypal/views/img/default_logos/default_horizontal.png
new file mode 100644
index 000000000..8c57be0ed
Binary files /dev/null and b/modules/paypal/views/img/default_logos/default_horizontal.png differ
diff --git a/modules/paypal/views/img/default_logos/default_logo.gif b/modules/paypal/views/img/default_logos/default_logo.gif
new file mode 100644
index 000000000..2a5871650
Binary files /dev/null and b/modules/paypal/views/img/default_logos/default_logo.gif differ
diff --git a/modules/paypal/views/img/default_logos/default_vertical.png b/modules/paypal/views/img/default_logos/default_vertical.png
new file mode 100644
index 000000000..ee99c0308
Binary files /dev/null and b/modules/paypal/views/img/default_logos/default_vertical.png differ
diff --git a/modules/paypal/views/img/default_logos/index.php b/modules/paypal/views/img/default_logos/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/img/default_logos/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/img/index.php b/modules/paypal/views/img/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/img/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/img/logos/BRAINTREE.png b/modules/paypal/views/img/logos/BRAINTREE.png
new file mode 100644
index 000000000..d443a20b0
Binary files /dev/null and b/modules/paypal/views/img/logos/BRAINTREE.png differ
diff --git a/modules/paypal/views/img/logos/DE_de-btn-expresscheckout.gif b/modules/paypal/views/img/logos/DE_de-btn-expresscheckout.gif
new file mode 100644
index 000000000..9f615c131
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_de-btn-expresscheckout.gif differ
diff --git a/modules/paypal/views/img/logos/DE_de-pp-logo-100px.png b/modules/paypal/views/img/logos/DE_de-pp-logo-100px.png
new file mode 100644
index 000000000..3a6eb7fc9
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_de-pp-logo-100px.png differ
diff --git a/modules/paypal/views/img/logos/DE_de-pp-logo-150px.png b/modules/paypal/views/img/logos/DE_de-pp-logo-150px.png
new file mode 100644
index 000000000..898bf5892
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_de-pp-logo-150px.png differ
diff --git a/modules/paypal/views/img/logos/DE_de-pp-logo-200px.png b/modules/paypal/views/img/logos/DE_de-pp-logo-200px.png
new file mode 100644
index 000000000..ff9af3a4c
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_de-pp-logo-200px.png differ
diff --git a/modules/paypal/views/img/logos/DE_pp_cc_mark_111x69.jpg b/modules/paypal/views/img/logos/DE_pp_cc_mark_111x69.jpg
new file mode 100644
index 000000000..956bb454d
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_pp_cc_mark_111x69.jpg differ
diff --git a/modules/paypal/views/img/logos/DE_pp_cc_mark_37x23.jpg b/modules/paypal/views/img/logos/DE_pp_cc_mark_37x23.jpg
new file mode 100644
index 000000000..8feb35cd4
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_pp_cc_mark_37x23.jpg differ
diff --git a/modules/paypal/views/img/logos/DE_pp_cc_mark_74x46.jpg b/modules/paypal/views/img/logos/DE_pp_cc_mark_74x46.jpg
new file mode 100644
index 000000000..cfd90c1bf
Binary files /dev/null and b/modules/paypal/views/img/logos/DE_pp_cc_mark_74x46.jpg differ
diff --git a/modules/paypal/views/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg b/modules/paypal/views/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg
new file mode 100644
index 000000000..6c42d3f31
Binary files /dev/null and b/modules/paypal/views/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg differ
diff --git a/modules/paypal/views/img/logos/FR_pp_cc_mark_111x69.jpg b/modules/paypal/views/img/logos/FR_pp_cc_mark_111x69.jpg
new file mode 100644
index 000000000..956bb454d
Binary files /dev/null and b/modules/paypal/views/img/logos/FR_pp_cc_mark_111x69.jpg differ
diff --git a/modules/paypal/views/img/logos/FR_pp_cc_mark_37x23.jpg b/modules/paypal/views/img/logos/FR_pp_cc_mark_37x23.jpg
new file mode 100644
index 000000000..8feb35cd4
Binary files /dev/null and b/modules/paypal/views/img/logos/FR_pp_cc_mark_37x23.jpg differ
diff --git a/modules/paypal/views/img/logos/FR_pp_cc_mark_74x46.jpg b/modules/paypal/views/img/logos/FR_pp_cc_mark_74x46.jpg
new file mode 100644
index 000000000..cfd90c1bf
Binary files /dev/null and b/modules/paypal/views/img/logos/FR_pp_cc_mark_74x46.jpg differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_logo_100x45.gif b/modules/paypal/views/img/logos/US_PayPal_logo_100x45.gif
new file mode 100644
index 000000000..5f9ff8bc7
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_logo_100x45.gif differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_logo_150x65.gif b/modules/paypal/views/img/logos/US_PayPal_logo_150x65.gif
new file mode 100644
index 000000000..1e2a9546a
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_logo_150x65.gif differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_logo_80x35.gif b/modules/paypal/views/img/logos/US_PayPal_logo_80x35.gif
new file mode 100644
index 000000000..a94b479cf
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_logo_80x35.gif differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_mark_37x23.gif b/modules/paypal/views/img/logos/US_PayPal_mark_37x23.gif
new file mode 100644
index 000000000..25333b17c
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_mark_37x23.gif differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_mark_50x34.gif b/modules/paypal/views/img/logos/US_PayPal_mark_50x34.gif
new file mode 100644
index 000000000..9640eb0b5
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_mark_50x34.gif differ
diff --git a/modules/paypal/views/img/logos/US_PayPal_mark_60x38.gif b/modules/paypal/views/img/logos/US_PayPal_mark_60x38.gif
new file mode 100644
index 000000000..2a5871650
Binary files /dev/null and b/modules/paypal/views/img/logos/US_PayPal_mark_60x38.gif differ
diff --git a/modules/paypal/views/img/logos/US_horizontal_solution_PPeCheck.gif b/modules/paypal/views/img/logos/US_horizontal_solution_PPeCheck.gif
new file mode 100644
index 000000000..55a93b4d7
Binary files /dev/null and b/modules/paypal/views/img/logos/US_horizontal_solution_PPeCheck.gif differ
diff --git a/modules/paypal/views/img/logos/US_vertical_solution_PPeCheck.gif b/modules/paypal/views/img/logos/US_vertical_solution_PPeCheck.gif
new file mode 100644
index 000000000..eef2e61fa
Binary files /dev/null and b/modules/paypal/views/img/logos/US_vertical_solution_PPeCheck.gif differ
diff --git a/modules/paypal/views/img/logos/braintree_cards.png b/modules/paypal/views/img/logos/braintree_cards.png
new file mode 100644
index 000000000..7cd24fe1a
Binary files /dev/null and b/modules/paypal/views/img/logos/braintree_cards.png differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_logo_100x45.gif b/modules/paypal/views/img/logos/default_PayPal_logo_100x45.gif
new file mode 100644
index 000000000..5f9ff8bc7
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_logo_100x45.gif differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_logo_150x65.gif b/modules/paypal/views/img/logos/default_PayPal_logo_150x65.gif
new file mode 100644
index 000000000..1e2a9546a
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_logo_150x65.gif differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_logo_80x35.gif b/modules/paypal/views/img/logos/default_PayPal_logo_80x35.gif
new file mode 100644
index 000000000..a94b479cf
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_logo_80x35.gif differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_mark_37x23.gif b/modules/paypal/views/img/logos/default_PayPal_mark_37x23.gif
new file mode 100644
index 000000000..25333b17c
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_mark_37x23.gif differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_mark_50x34.gif b/modules/paypal/views/img/logos/default_PayPal_mark_50x34.gif
new file mode 100644
index 000000000..9640eb0b5
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_mark_50x34.gif differ
diff --git a/modules/paypal/views/img/logos/default_PayPal_mark_60x38.gif b/modules/paypal/views/img/logos/default_PayPal_mark_60x38.gif
new file mode 100644
index 000000000..2a5871650
Binary files /dev/null and b/modules/paypal/views/img/logos/default_PayPal_mark_60x38.gif differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png
new file mode 100644
index 000000000..103b8253a
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png
new file mode 100644
index 000000000..57d24de9b
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png
new file mode 100644
index 000000000..57d24de9b
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png
new file mode 100644
index 000000000..f64cf4be3
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png
new file mode 100644
index 000000000..194354675
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png
new file mode 100644
index 000000000..d8b73d0d2
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png
new file mode 100644
index 000000000..dc5633239
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png
new file mode 100644
index 000000000..4220f8466
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png
new file mode 100644
index 000000000..41f6ef53d
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png
new file mode 100644
index 000000000..d59b9c23f
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png
new file mode 100644
index 000000000..a57d817ba
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png
new file mode 100644
index 000000000..d10ff5e30
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png
new file mode 100644
index 000000000..d10ff5e30
Binary files /dev/null and b/modules/paypal/views/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png differ
diff --git a/modules/paypal/views/img/logos/express_checkout_mobile/index.php b/modules/paypal/views/img/logos/express_checkout_mobile/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/img/logos/express_checkout_mobile/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/img/logos/index.php b/modules/paypal/views/img/logos/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/img/logos/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/img/logos/os_braintree.png b/modules/paypal/views/img/logos/os_braintree.png
new file mode 100644
index 000000000..acc2b9135
Binary files /dev/null and b/modules/paypal/views/img/logos/os_braintree.png differ
diff --git a/modules/paypal/views/img/mail.png b/modules/paypal/views/img/mail.png
new file mode 100644
index 000000000..a61974159
Binary files /dev/null and b/modules/paypal/views/img/mail.png differ
diff --git a/modules/paypal/views/img/paypal.gif b/modules/paypal/views/img/paypal.gif
new file mode 100644
index 000000000..e480d4b0c
Binary files /dev/null and b/modules/paypal/views/img/paypal.gif differ
diff --git a/modules/paypal/views/img/paypal_login_blue.png b/modules/paypal/views/img/paypal_login_blue.png
new file mode 100644
index 000000000..dad378793
Binary files /dev/null and b/modules/paypal/views/img/paypal_login_blue.png differ
diff --git a/modules/paypal/views/img/paypal_login_grey.png b/modules/paypal/views/img/paypal_login_grey.png
new file mode 100644
index 000000000..a6973ec0c
Binary files /dev/null and b/modules/paypal/views/img/paypal_login_grey.png differ
diff --git a/modules/paypal/views/img/sprites.png b/modules/paypal/views/img/sprites.png
new file mode 100644
index 000000000..de5a4148b
Binary files /dev/null and b/modules/paypal/views/img/sprites.png differ
diff --git a/modules/paypal/views/img/template.png b/modules/paypal/views/img/template.png
new file mode 100644
index 000000000..7221d5bc3
Binary files /dev/null and b/modules/paypal/views/img/template.png differ
diff --git a/modules/paypal/views/index.php b/modules/paypal/views/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/js/back_office.js b/modules/paypal/views/js/back_office.js
new file mode 100644
index 000000000..68d138476
--- /dev/null
+++ b/modules/paypal/views/js/back_office.js
@@ -0,0 +1,447 @@
+/*
+ * 2007-2018 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-2018 PrestaShop SA
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+$(document).ready(function () {
+ var identificationButtonClicked = false;
+
+ var jquery_version = $.fn.jquery.split('.');
+
+ if(jquery_version[0]>=1 && jquery_version[1] >=7) {
+ $('#braintree_enabled').on('change', displayConfigurationBraintree );
+ } else {
+ $('#braintree_enabled').change( displayConfigurationBraintree );
+ }
+
+
+ function displayConfigurationBraintree()
+ {
+ if($('#braintree_enabled:checked').val())
+ {
+ $('#paypal_braintree').show();
+ }
+ else
+ {
+ $('#paypal_braintree').hide();
+ }
+ }
+
+ displayConfigurationBraintree();
+
+ /* Display correct block according to different choices. */
+ function displayConfiguration() {
+ identificationButtonClicked = false;
+ var paypal_business = $('input[name="business"]:checked').val();
+ var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val();
+ var integral_evolution_solution = $('input[name="integral_evolution_solution"]:checked').val();
+ var braintree = $('input[name="paypal_payment_pvz"]:checked').val();
+ $('#signup span.paypal-signup-content').hide();
+ $('#signup .paypal-signup-button').hide();
+
+ switch (paypal_business) {
+ case '0':
+ $('#signup').slideDown();
+ $('#account').removeClass('paypal-disabled');
+ $('#credentials').addClass('paypal-disabled');
+ $('input[type="submit"]').attr('disabled', 'disabled');
+
+ switch (paypal_payment_method) {
+ case PayPal_WPS:
+ $('.toolbox').slideUp();
+ $('#paypalplus-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#standard-credentials').slideDown();
+ $('#paypal-signup-button-u1').show();
+ $('#paypal-signup-content-u1').show();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideDown();
+ $('#in_context_checkout').slideDown();
+ break;
+ case PayPal_HSS:
+ $('#signup').slideDown();
+ $('#paypalplus-credentials').slideUp();
+ $('#paypal-signup-button-u2').show();
+ $('#paypal-signup-content-u2').show();
+ $('#standard-credentials').slideUp();
+ $('#account').removeClass('paypal-disabled');
+ $('#standard-credentials').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#integral-credentials').slideDown();
+ $('#integral_evolution_solution').slideDown();
+ $('label[for="paypal_payment_wpp"] .toolbox').slideDown();
+ $('#in_context_checkout').slideUp();
+ switch (integral_evolution_solution)
+ {
+ case "1": //Iframe
+ $('#integral_evolution_template').slideUp();
+ break;
+ case "0": //Redirection
+ $('#integral_evolution_template').slideDown();
+ break;
+ }
+ break;
+ case PayPal_ECS:
+ $('.toolbox').slideUp();
+ $('#paypalplus-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#standard-credentials').slideDown();
+ $('#paypal-signup-button-u3').show();
+ $('#paypal-signup-content-u3').show();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideDown();
+ $('#in_context_checkout').slideDown();
+ break;
+ case PayPal_PPP:
+ $('#standard-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#in_context_checkout').slideUp();
+ $('#paypal-signup-button-u1').hide();
+ $('#paypal-signup-content-u1').hide();
+ $('#paypalplus-credentials').slideDown();
+ break;
+ /*
+ case PayPal_PVZ:
+ $('#paypal-signup-button-u3').show();
+ $('#paypal-signup-content-u3').show();
+ $('#braintree').show();
+ $('#braintree-credentials').slideDown();
+ $('#paypal_3D_secure').slideDown();
+ break;
+ */
+ }
+ break;
+ case '1':
+ $('#configuration').slideDown();
+ $('#account').addClass('paypal-disabled');
+ $('#credentials').removeClass('paypal-disabled');
+ $('input[type="submit"]').removeAttr('disabled');
+
+ switch (paypal_payment_method) {
+ case PayPal_WPS:
+ $('#signup').slideUp();
+ $('#paypalplus-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#standard-credentials').slideDown();
+ $('#paypal-signup-button-u4').show();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideDown();
+ $('#in_context_checkout').slideDown();
+ break;
+ case PayPal_HSS:
+ $('#signup').slideDown();
+ $('#paypalplus-credentials').slideUp();
+ $('#paypal-signup-button-u5').show();
+ $('#paypal-signup-content-u5').show();
+ $('#account').removeClass('paypal-disabled');
+ $('#standard-credentials').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#integral-credentials').slideDown();
+ $('#integral_evolution_solution').slideDown();
+ $('label[for="paypal_payment_wpp"] .toolbox').slideDown();
+ $('#in_context_checkout').slideUp();
+ switch (integral_evolution_solution)
+ {
+ case "1": //Iframe
+ $('#integral_evolution_template').slideUp();
+ break;
+ case "0": //Redirection
+ $('#integral_evolution_template').slideDown();
+ break;
+ }
+ break;
+ case PayPal_ECS:
+ $('#signup').slideUp();
+ $('#paypalplus-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#standard-credentials').slideDown();
+ $('#paypal-signup-button-u6').show();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideDown();
+ $('#in_context_checkout').slideDown();
+ break;
+
+ case PayPal_PPP:
+ $('#standard-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#in_context_checkout').slideUp();
+ $('#paypal-signup-button-u1').hide();
+ $('#paypal-signup-content-u1').hide();
+ $('#paypalplus-credentials').slideDown();
+ break
+ /*
+ case PayPal_PVZ:
+ $('#signup').slideUp();
+ $('#paypalplus-credentials').slideUp();
+ $('#integral-credentials').slideUp();
+ $('#standard-credentials').slideUp();
+ $('#paypal-signup-button-u6').show();
+ $('#integral_evolution_solution').slideUp();
+ $('#express_checkout_shortcut').hide();
+ $('#in_context_checkout').slideUp();
+ $('#braintree').show();
+ $('#braintree-credentials').slideDown();
+ $('#paypal_3D_secure').slideDown();
+ break;
+ */
+ }
+ break;
+ }
+
+ displayCredentials();
+ return;
+ }
+
+ if ($('#paypal-wrapper').length != 0) {
+ $('.hide').hide();
+ displayConfiguration();
+ }
+
+ if ($('input[name="paypal_payment_method"]').length == 1) {
+ $('input[name="paypal_payment_method"]').attr('checked', 'checked');
+ }
+
+ function displayCredentials() {
+ var paypal_business = $('input[name="business"]:checked').val();
+ var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val();
+ if(paypal_payment_method == PayPal_PVZ)
+ {
+// c'est quoi cette fonction !!!
+ }
+ else if (paypal_payment_method != PayPal_HSS &&
+ (typeof ($('input[name="api_username"]').val()) != 'undefined') &&
+ ($('input[name="api_username"]').val().length > 0 ||
+ $('input[name="api_password"]').val().length > 0 ||
+ $('input[name="api_signature"]').val().length > 0)) {
+
+ if (paypal_payment_method == PayPal_PPP) {
+ $('#paypalplus-credentials').slideDown();
+ } else {
+ $('#paypalplus-credentials').slideUp();
+ $('#credentials').removeClass('paypal-disabled');
+ $('#configuration').slideDown();
+ $('input[type="submit"]').removeAttr('disabled');
+ $('#standard-credentials').slideDown();
+ $('#express_checkout_shortcut').slideDown();
+ $('#integral-credentials').slideUp();
+ }
+ }
+ else if (paypal_payment_method == PayPal_HSS &&
+ ($('input[name="api_business_account"]').val().length > 0)) {
+ $('#credentials').removeClass('paypal-disabled');
+ $('#configuration').slideDown();
+ $('input[type="submit"]').removeAttr('disabled');
+ $('#standard-credentials').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#integral-credentials').slideDown();
+ }
+ else if (paypal_business != 1) {
+ $('#configuration').slideUp();
+ }
+ }
+
+ if(jquery_version[0]>=1 && jquery_version[1] >=7) {
+ $('input[name="business"], input[name="paypal_payment_method"], input[name="integral_evolution_solution"]').on('change', displayConfiguration );
+ } else {
+ $('input[name="business"], input[name="paypal_payment_method"], input[name="integral_evolution_solution"]').change( displayConfiguration );
+ }
+
+ $('label, a').hover(
+ function () {
+ $(this).children('.toolbox').show();
+ }, function () {
+ var id = $(this).attr('for');
+ var input = $('input#' + id);
+
+ if ( (!input.is(':checked')) || (($(this).attr('id') == 'paypal-get-identification') &&
+ (identificationButtonClicked == false))) {
+ $(this).children('.toolbox').hide();
+ }
+ }
+ );
+
+ // Display configuration fields after click on "signup" button
+ function displaySignup() {
+ var paypal_business = $('input[name="business"]:checked').val();
+ var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val();
+
+ $('#credentials').removeClass('paypal-disabled');
+ if ($(this).attr('id') != 'paypal-signup-button-u3')
+ $('#account').addClass('paypal-disabled');
+
+ $('#configuration').slideDown();
+ if (paypal_payment_method == PayPal_HSS) {
+ $('#standard-credentials').slideUp();
+ $('#express_checkout_shortcut').slideUp();
+ $('#integral-credentials').slideDown();
+ } else {
+ $('#standard-credentials').slideDown();
+ $('#express_checkout_shortcut').slideDown();
+ $('#integral-credentials').slideUp();
+ }
+ $('input[type="submit"]').removeAttr('disabled');
+
+ if ($(this).is('#step3')) {
+ return false;
+ }
+ return true;
+ }
+
+ if(jquery_version[0]>=1 && jquery_version[1] >= 7) {
+ $('a.paypal-signup-button, a#step3').on('click', displaySignup);
+ } else {
+ $('a.paypal-signup-button, a#step3').click( displaySignup );
+ }
+
+
+ if ($("#paypal-wrapper").length > 0) {
+
+ // Check form before submission
+ function paypalSubmit(){
+ var paypal_business = $('input[name="business"]:checked').val();
+ var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val();
+
+ if (((paypal_payment_method == PayPal_WPS || paypal_payment_method == PayPal_ECS) &&
+ (($('input[name="api_username"]').val().length <= 0) ||
+ ($('input[name="api_password"]').val().length <= 0) ||
+ ($('input[name="api_signature"]').val().length <= 0))) ||
+ ((paypal_payment_method == PayPal_HSS &&
+ ($('input[name="api_business_account"]').val().length <= 0))) ||
+ (paypal_payment_method == PayPal_PPP &&
+ (($('input[name="client_id"]').val().length <= 0) ||
+ ($('input[name="secret"]').val().length <= 0)))) {
+ $.fancybox({'content': $('
+{else}
+
+
+{literal}
+
+{/literal}
+{/if}
diff --git a/modules/paypal/views/templates/admin/admin_order/index.php b/modules/paypal/views/templates/admin/admin_order/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/templates/admin/admin_order/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/templates/admin/admin_order/refund.tpl b/modules/paypal/views/templates/admin/admin_order/refund.tpl
new file mode 100644
index 000000000..f4b3b238c
--- /dev/null
+++ b/modules/paypal/views/templates/admin/admin_order/refund.tpl
@@ -0,0 +1,58 @@
+{*
+* 2007-2018 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-2018 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}
+
+
+
+{/if}
diff --git a/modules/paypal/views/templates/admin/admin_order/validation.tpl b/modules/paypal/views/templates/admin/admin_order/validation.tpl
new file mode 100644
index 000000000..32ebe73c5
--- /dev/null
+++ b/modules/paypal/views/templates/admin/admin_order/validation.tpl
@@ -0,0 +1,56 @@
+{*
+* 2007-2018 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-2018 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}
+
+
+{/if}
+
+
diff --git a/modules/paypal/views/templates/admin/back_office.tpl b/modules/paypal/views/templates/admin/back_office.tpl
new file mode 100644
index 000000000..e62c9f2ad
--- /dev/null
+++ b/modules/paypal/views/templates/admin/back_office.tpl
@@ -0,0 +1,500 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
{l s='Your country is not available for this module.' mod='paypal'}
+
+
+
+
+ {/if}
+
+
diff --git a/modules/paypal/views/templates/admin/button_braintree.tpl b/modules/paypal/views/templates/admin/button_braintree.tpl
new file mode 100644
index 000000000..156e6361e
--- /dev/null
+++ b/modules/paypal/views/templates/admin/button_braintree.tpl
@@ -0,0 +1,62 @@
+{*
+* 2007-2018 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-2018 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 $Braintree_Configured}
+
+{if $PayPal_sandbox_mode}
+ {l s='Your Braintree account is configured in sandbox mode. You can join the Braintree support on 08 05 54 27 14' mod='paypal'}
+{else}
+ {l s='Your Braintree account is configured in live mode. You can sell on Euro only. You can join the Braintree support on 08 05 54 27 14' mod='paypal'}
+{/if}
+
+
{l s='Activate 3D Secure?' mod='paypal'}
+
+
+{else}
+
+
+
+
+{/if}
\ No newline at end of file
diff --git a/modules/paypal/views/templates/admin/header.tpl b/modules/paypal/views/templates/admin/header.tpl
new file mode 100644
index 000000000..3d46e9992
--- /dev/null
+++ b/modules/paypal/views/templates/admin/header.tpl
@@ -0,0 +1,34 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
+
\ No newline at end of file
diff --git a/modules/paypal/views/templates/admin/index.php b/modules/paypal/views/templates/admin/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/templates/admin/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/templates/front/about.tpl b/modules/paypal/views/templates/front/about.tpl
new file mode 100644
index 000000000..4183d917c
--- /dev/null
+++ b/modules/paypal/views/templates/front/about.tpl
@@ -0,0 +1,41 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
{l s='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'}
\ No newline at end of file
diff --git a/modules/paypal/views/templates/front/error.tpl b/modules/paypal/views/templates/front/error.tpl
new file mode 100644
index 000000000..d87dc8c82
--- /dev/null
+++ b/modules/paypal/views/templates/front/error.tpl
@@ -0,0 +1,57 @@
+{*
+* 2007-2018 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-2018 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.5 && isset($use_mobile) && $use_mobile}
+ {include file="$tpl_dir./modules/paypal/views/templates/front/error.tpl"}
+{else}
+ {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe|escape:'htmlall':'UTF-8'} {l s='PayPal' mod='paypal'}{/capture}
+ {include file="$tpl_dir./breadcrumb.tpl"}
+
+
{$message|escape:'htmlall':'UTF-8'}
+ {if isset($logs) && $logs}
+
+
{l s='Please try to contact the merchant:' mod='paypal'}
+
+
+ {foreach from=$logs key=key item=log}
+
{$log|escape:'htmlall':'UTF-8'}
+ {/foreach}
+
+
+
+
+ {if isset($order)}
+
+ {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price|escape:'htmlall':'UTF-8'}
+ {l s='Your order ID is :' mod='paypal'} {$order.id_order|intval}
+
+
+ {/if}
+
+{/if}
diff --git a/modules/paypal/views/templates/front/index.php b/modules/paypal/views/templates/front/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/templates/front/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/templates/front/order-confirmation-mobile.tpl b/modules/paypal/views/templates/front/order-confirmation-mobile.tpl
new file mode 100644
index 000000000..9e38d7c25
--- /dev/null
+++ b/modules/paypal/views/templates/front/order-confirmation-mobile.tpl
@@ -0,0 +1,69 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
diff --git a/modules/paypal/views/templates/front/order-confirmation-plus-mobile.tpl b/modules/paypal/views/templates/front/order-confirmation-plus-mobile.tpl
new file mode 100644
index 000000000..1345c9e0b
--- /dev/null
+++ b/modules/paypal/views/templates/front/order-confirmation-plus-mobile.tpl
@@ -0,0 +1,130 @@
+{*
+* 2007-2018 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-2018 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.5 && isset($use_mobile) && $use_mobile}
+ {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation-plus.tpl"}
+{else}
+{capture name=path}{l s='Order confirmation' mod='paypal'}{/capture}
+{if $smarty.const._PS_VERSION_ < 1.6}
+ {include file="$tpl_dir./breadcrumb.tpl"}
+{/if}
+
{l s='An error occured during your payment' mod='paypal'}
+
+{elseif $state == 'canceled'}
+
{l s='Your order has been canceled' mod='paypal'}
+{/if}
+
+{/if}
diff --git a/modules/paypal/views/templates/front/order-confirmation-plus.tpl b/modules/paypal/views/templates/front/order-confirmation-plus.tpl
new file mode 100644
index 000000000..0edb01bf9
--- /dev/null
+++ b/modules/paypal/views/templates/front/order-confirmation-plus.tpl
@@ -0,0 +1,131 @@
+{*
+* 2007-2018 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-2018 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.5 && isset($use_mobile) && $use_mobile}
+ {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation-plus.tpl"}
+{else}
+{capture name=path}{l s='Order confirmation' mod='paypal'}{/capture}
+{if $smarty.const._PS_VERSION_ < 1.6}
+ {include file="$tpl_dir./breadcrumb.tpl"}
+{/if}
+
{l s='An error occured during your payment' mod='paypal'}
+
+{elseif $state == 'canceled'}
+
{l s='Your order has been canceled' mod='paypal'}
+{/if}
+
+{/if}
diff --git a/modules/paypal/views/templates/front/order-confirmation.tpl b/modules/paypal/views/templates/front/order-confirmation.tpl
new file mode 100644
index 000000000..e77daa7de
--- /dev/null
+++ b/modules/paypal/views/templates/front/order-confirmation.tpl
@@ -0,0 +1,81 @@
+{*
+* 2007-2018 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-2018 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.5 && isset($use_mobile) && $use_mobile}
+ {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation.tpl"}
+{else}
+ {capture name=path}{l s='Order confirmation' mod='paypal'}{/capture}
+ {if $smarty.const._PS_VERSION_ < 1.6}
+ {include file="$tpl_dir./breadcrumb.tpl"}
+ {/if}
+
{l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction|escape:'htmlall':'UTF-8'}
+ {/if}
+
+
+ {if $is_guest}
+
+ {if $smarty.const._PS_VERSION_ < 1.6}
+
+ {else}
+
+ {/if}
+
+ {l s='Follow my order' mod='paypal'}
+ {else}
+ {if $smarty.const._PS_VERSION_ < 1.6}
+
+ {else}
+
+ {/if}
+ {l s='Back to orders' mod='paypal'}
+ {/if}
+{/if}
diff --git a/modules/paypal/views/templates/front/order-summary.tpl b/modules/paypal/views/templates/front/order-summary.tpl
new file mode 100644
index 000000000..dea203b22
--- /dev/null
+++ b/modules/paypal/views/templates/front/order-summary.tpl
@@ -0,0 +1,48 @@
+{*
+* 2007-2018 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-2018 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.5 && isset($use_mobile) && $use_mobile}
+ {include file="$tpl_dir./modules/paypal/views/templates/front/order-summary.tpl"}
+{else}
+ {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe|escape:'htmlall':'UTF-8'} {l s='PayPal' mod='paypal'}{/capture}
+ {if $smarty.const._PS_VERSION_ < 1.6}
+ {include file="$tpl_dir./breadcrumb.tpl"}
+ {/if}
+
+
+{/if}
+
diff --git a/modules/paypal/views/templates/hook/braintree_confirm.tpl b/modules/paypal/views/templates/hook/braintree_confirm.tpl
new file mode 100644
index 000000000..4a27c02af
--- /dev/null
+++ b/modules/paypal/views/templates/hook/braintree_confirm.tpl
@@ -0,0 +1,38 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
{l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price|escape:'htmlall':'UTF-8'}
+
{l s='Your order ID is :' mod='paypal'}
+
+ {if isset($order.reference)}
+ {$order.reference|escape:'htmlall':'UTF-8'}
+ {else}
+ {$order.id|intval}
+ {/if}
+
+
+
{l s='Your transaction ID is :' mod='paypal'} {$transaction_id|escape:'htmlall':'UTF-8'}
+
+
\ No newline at end of file
diff --git a/modules/paypal/views/templates/hook/braintree_payment.tpl b/modules/paypal/views/templates/hook/braintree_payment.tpl
new file mode 100644
index 000000000..ee9cd6c59
--- /dev/null
+++ b/modules/paypal/views/templates/hook/braintree_payment.tpl
@@ -0,0 +1,258 @@
+ {*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+{*Displaying a button or the iframe*}
+
+
+
+
+ {if $error_msg != ''}
{$error_msg|escape:'htmlall':'UTF-8'}
{/if}
+
+
+
+
+
+
+
+
+
+ {if !$opc}
+
+
+
+
+ {/if}
+{literal}
+
+
+{/literal}
diff --git a/modules/paypal/views/templates/hook/braintree_return.tpl b/modules/paypal/views/templates/hook/braintree_return.tpl
new file mode 100644
index 000000000..599edfaaf
--- /dev/null
+++ b/modules/paypal/views/templates/hook/braintree_return.tpl
@@ -0,0 +1,34 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
\ No newline at end of file
diff --git a/modules/paypal/views/templates/hook/column.tpl b/modules/paypal/views/templates/hook/column.tpl
new file mode 100644
index 000000000..d3e32e043
--- /dev/null
+++ b/modules/paypal/views/templates/hook/column.tpl
@@ -0,0 +1,28 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
+
diff --git a/modules/paypal/views/templates/hook/confirmation.tpl b/modules/paypal/views/templates/hook/confirmation.tpl
new file mode 100644
index 000000000..38d9d3d27
--- /dev/null
+++ b/modules/paypal/views/templates/hook/confirmation.tpl
@@ -0,0 +1,32 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
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 000000000..b5fb7259a
--- /dev/null
+++ b/modules/paypal/views/templates/hook/express_checkout_payment.tpl
@@ -0,0 +1,96 @@
+{*
+* 2007-2018 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-2018 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}
+
+
+
+{/if}
+
+
+{if $use_paypal_in_context}
+
+{else}
+
+{/if}
+
\ No newline at end of file
diff --git a/modules/paypal/views/templates/hook/express_checkout_payment_eu.tpl b/modules/paypal/views/templates/hook/express_checkout_payment_eu.tpl
new file mode 100644
index 000000000..b87391cc4
--- /dev/null
+++ b/modules/paypal/views/templates/hook/express_checkout_payment_eu.tpl
@@ -0,0 +1,30 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
diff --git a/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl b/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl
new file mode 100644
index 000000000..8084408f0
--- /dev/null
+++ b/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl
@@ -0,0 +1,42 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
diff --git a/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl b/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl
new file mode 100644
index 000000000..791020721
--- /dev/null
+++ b/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl
@@ -0,0 +1,50 @@
+{*
+* 2007-2018 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-2018 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 $use_paypal_in_context}
+
+{else}
+
+{/if}
+
+
diff --git a/modules/paypal/views/templates/hook/index.php b/modules/paypal/views/templates/hook/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/templates/hook/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/views/templates/hook/integral_evolution_payment.tpl b/modules/paypal/views/templates/hook/integral_evolution_payment.tpl
new file mode 100644
index 000000000..129832a0d
--- /dev/null
+++ b/modules/paypal/views/templates/hook/integral_evolution_payment.tpl
@@ -0,0 +1,122 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+{*Displaying a button or the iframe*}
+{if $payment_hss_solution == $smarty.const.PAYPAL_HSS_REDIRECTION}
+ {if $smarty.const._PS_VERSION_ >= 1.6}
+
+
+ {else}
+
+
+ {/if}
+{/if}
+
+
+
+
+
+{if $payment_hss_solution == $smarty.const.PAYPAL_HSS_IFRAME}
+{literal}
+
+{/literal}
+{/if}
diff --git a/modules/paypal/views/templates/hook/integral_evolution_payment_eu.tpl b/modules/paypal/views/templates/hook/integral_evolution_payment_eu.tpl
new file mode 100644
index 000000000..7aaed41af
--- /dev/null
+++ b/modules/paypal/views/templates/hook/integral_evolution_payment_eu.tpl
@@ -0,0 +1,71 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
diff --git a/modules/paypal/views/templates/hook/paypal_cart_summary.tpl b/modules/paypal/views/templates/hook/paypal_cart_summary.tpl
new file mode 100644
index 000000000..f7cb8bf8a
--- /dev/null
+++ b/modules/paypal/views/templates/hook/paypal_cart_summary.tpl
@@ -0,0 +1,89 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
+ {l s='You have 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'}
+ {$total|escape:'htmlall':'UTF-8'} {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|escape:'htmlall':'UTF-8'}
+
+
+
+
+{if $useStyle14}
+
+{/if}
+
+{if $useStyle15}
+
+{/if}
\ No newline at end of file
diff --git a/modules/paypal/views/templates/hook/paypal_plus_payment.tpl b/modules/paypal/views/templates/hook/paypal_plus_payment.tpl
new file mode 100644
index 000000000..36c3fcc2a
--- /dev/null
+++ b/modules/paypal/views/templates/hook/paypal_plus_payment.tpl
@@ -0,0 +1,138 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+{*Displaying a button or the iframe*}
+
+
+
+
+{literal}
+
+{/literal}
+
diff --git a/modules/paypal/views/templates/hook/paypal_plus_payment_eu.tpl b/modules/paypal/views/templates/hook/paypal_plus_payment_eu.tpl
new file mode 100644
index 000000000..67360a1b2
--- /dev/null
+++ b/modules/paypal/views/templates/hook/paypal_plus_payment_eu.tpl
@@ -0,0 +1,55 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+{*Displaying a button or the iframe*}
+
+
+{literal}
+
+{/literal}
diff --git a/modules/paypal/views/templates/hook/paypal_plus_payment_eu_legal.tpl b/modules/paypal/views/templates/hook/paypal_plus_payment_eu_legal.tpl
new file mode 100644
index 000000000..0f1df9be9
--- /dev/null
+++ b/modules/paypal/views/templates/hook/paypal_plus_payment_eu_legal.tpl
@@ -0,0 +1,84 @@
+{*
+* 2007-2018 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-2018 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+{*Displaying a button or the iframe*}
+{if $advancedeucompliance_active}
+
+{/if}
+
+
+
+
+{literal}
+
+{/literal}
diff --git a/modules/paypal/views/templates/index.php b/modules/paypal/views/templates/index.php
new file mode 100644
index 000000000..5a686929c
--- /dev/null
+++ b/modules/paypal/views/templates/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2018 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/pscleaner/CHANGELOG.txt b/modules/pscleaner/CHANGELOG.txt
new file mode 100644
index 000000000..0d9fd05a5
--- /dev/null
+++ b/modules/pscleaner/CHANGELOG.txt
@@ -0,0 +1,3 @@
+____________________________________________________________________________________________________
+ChangeLog : QloApps Data Cleaner 1.0.0 | COMPATIBLE:: QloApps V1.x.x | Added in QloApps V1.3.2
+____________________________________________________________________________________________________
diff --git a/modules/pscleaner/Readme.md b/modules/pscleaner/Readme.md
new file mode 100644
index 000000000..97ae688d7
--- /dev/null
+++ b/modules/pscleaner/Readme.md
@@ -0,0 +1,3 @@
+**Qloapps Data Cleaner 1.0.0**
+
+- Added in QloApps 1.3.2
\ No newline at end of file
diff --git a/modules/pscleaner/classes/WkPsCleanerHelper.php b/modules/pscleaner/classes/WkPsCleanerHelper.php
new file mode 100644
index 000000000..6e7397437
--- /dev/null
+++ b/modules/pscleaner/classes/WkPsCleanerHelper.php
@@ -0,0 +1,72 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+class WkPsCleanerHelper extends ObjectModel
+{
+ public static function deleteFolderImages($folderPath)
+ {
+ if ($folderPath) {
+ foreach (scandir($folderPath) as $dir) {
+ if (preg_match('/^([0-9]*[a-z]*[A-Z]*)+(\-(.*))?\.(jpg|png|jpeg|gif)+$/', $dir)) {
+ unlink($folderPath.$dir);
+ }
+ }
+ }
+ }
+
+ public static function deleteModulesConfigurations()
+ {
+ // modules configuration keys
+ $moduleConfKeys = array(
+ "'HOTEL_INTERIOR_HEADING'",
+ "'HOTEL_INTERIOR_DESCRIPTION'",
+ "'HOTEL_AMENITIES_HEADING'",
+ "'HOTEL_AMENITIES_DESCRIPTION'",
+ "'HOTEL_ROOM_DISPLAY_HEADING'",
+ "'HOTEL_ROOM_DISPLAY_DESCRIPTION'",
+ "'HOTEL_TESIMONIAL_BLOCK_HEADING'",
+ "'HOTEL_TESIMONIAL_BLOCK_CONTENT'",
+ );
+
+ $moduleConfKeys = implode(",", $moduleConfKeys);
+ $dbInst = Db::getInstance();
+ if ($result = $dbInst->ExecuteS(
+ 'SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` IN ('.$moduleConfKeys.')'
+ )) {
+ $moduleConfIds = array();
+ foreach ($result as $confRow) {
+ $moduleConfIds[] = $confRow['id_configuration'];
+ }
+ $moduleConfIds = implode(",", $moduleConfIds);
+ // delete from canfiguration and configuration_lang bothe tables
+ $dltConfigLang = $dbInst->delete(
+ 'configuration_lang',
+ 'id_configuration IN ('.$moduleConfIds.')'
+ );
+ $dltConfig = $dbInst->delete(
+ 'configuration',
+ 'id_configuration IN ('.$moduleConfIds.')'
+ );
+
+ return ($dltConfigLang && $dltConfig);
+ }
+ return true;
+ }
+}
diff --git a/modules/pscleaner/classes/index.php b/modules/pscleaner/classes/index.php
new file mode 100644
index 000000000..534dc97aa
--- /dev/null
+++ b/modules/pscleaner/classes/index.php
@@ -0,0 +1,29 @@
+
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+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;
diff --git a/modules/pscleaner/index.php b/modules/pscleaner/index.php
new file mode 100644
index 000000000..2a40ec79e
--- /dev/null
+++ b/modules/pscleaner/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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;
diff --git a/modules/pscleaner/logo.gif b/modules/pscleaner/logo.gif
new file mode 100644
index 000000000..667cba308
Binary files /dev/null and b/modules/pscleaner/logo.gif differ
diff --git a/modules/pscleaner/logo.png b/modules/pscleaner/logo.png
new file mode 100644
index 000000000..0d3efb276
Binary files /dev/null and b/modules/pscleaner/logo.png differ
diff --git a/modules/pscleaner/pscleaner.php b/modules/pscleaner/pscleaner.php
new file mode 100644
index 000000000..59b4265a5
--- /dev/null
+++ b/modules/pscleaner/pscleaner.php
@@ -0,0 +1,834 @@
+
+ * @copyright 2007-2016 PrestaShop SA
+ * @version Release: $Revision: 7060 $
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+if (!defined('_CAN_LOAD_FILES_')) {
+ exit;
+}
+require_once dirname(__FILE__).'/classes/WkPsCleanerHelper.php';
+
+class PSCleaner extends Module
+{
+ public function __construct()
+ {
+ $this->name = 'pscleaner';
+ $this->tab = 'administration';
+ $this->version = '1.0.0';
+ $this->author = 'PrestaShop';
+ $this->need_instance = 0;
+ if (version_compare(_PS_VERSION_, '1.6.0.0 ', '>=')) {
+ $this->multishop_context = Shop::CONTEXT_ALL;
+ }
+
+ $this->bootstrap = true;
+ parent::__construct();
+
+ $this->displayName = $this->l('QloApps Data Cleaner');
+ $this->description = $this->l('Check and fix functional integrity constraints and remove default data');
+ $this->secure_key = Tools::encrypt($this->name);
+ }
+
+ protected function getMultiShopValues($key)
+ {
+ if (version_compare(_PS_VERSION_, '1.6.0.3', '>=') === true) {
+ return Configuration::getMultiShopValues($key);
+ } else {
+ $shops = Shop::getShops(false, null, true);
+ $id_lang = (int) $this->context->language->id;
+ $results = array();
+ array_push($results, Configuration::get($key));
+
+ foreach ($shops as $id_shop) {
+ array_push($results, Configuration::get($key, $id_lang, null, $id_shop));
+ }
+
+ return $results;
+ }
+ }
+
+ public function getContent()
+ {
+ $html = '
'.$this->l('Be really careful with this tool - There is no possible rollback!').'
';
+ if (Tools::isSubmit('submitCheckAndFix')) {
+ $logs = self::checkAndFix();
+ if (count($logs)) {
+ $conf = $this->l('The following queries successfuly fixed broken data:').'
\ No newline at end of file
diff --git a/modules/wkfooterexploreblock/views/templates/hook/hotelExternalNaviagtionMenu.tpl b/modules/wkfooterexploreblock/views/templates/hook/hotelExternalNaviagtionMenu.tpl
new file mode 100644
index 000000000..3ade2e550
--- /dev/null
+++ b/modules/wkfooterexploreblock/views/templates/hook/hotelExternalNaviagtionMenu.tpl
@@ -0,0 +1,26 @@
+{*
+* 2010-2018 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through this link for complete license : https://store.webkul.com/license.html
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2018 Webkul IN
+* @license https://store.webkul.com/license.html
+*}
+
+{if isset($explore_links) && $explore_links}
+ {foreach $explore_links as $exploreLink}
+