diff --git a/src/lemonwaymkt/controllers/front/moneyout.php b/src/lemonwaymkt/controllers/front/moneyout.php index e4f02d5..9a1c238 100644 --- a/src/lemonwaymkt/controllers/front/moneyout.php +++ b/src/lemonwaymkt/controllers/front/moneyout.php @@ -140,10 +140,10 @@ public function postProcess() "wallet" => $this->moneyout->id_lw_wallet, "amountTot" => $this->moneyout->amount_to_pay, 'amountCom' => number_format((float)Configuration::get('LEMONWAY_COMMISSION_AMOUNT'), 2, '.', ''), - "message" => urlencode(Configuration::get('PS_SHOP_NAME')) . " - " . sprintf($this->module->l("Moneyout of %s %s initiated by %s"), + "message" => Configuration::get('PS_SHOP_NAME') . " - " . sprintf($this->module->l("Moneyout of %s %s initiated by %s"), $this->moneyout->amount_to_pay, $this->context->currency->sign, - urlencode($shop_name) + $shop_name ), "ibanId" => $this->moneyout->id_lw_iban, "autCommission" => Configuration::get('LEMONWAY_IS_AUTO_COMMISSION'), diff --git a/src/lemonwaymkt/controllers/front/wallet.php b/src/lemonwaymkt/controllers/front/wallet.php index 2f232c0..11311a5 100644 --- a/src/lemonwaymkt/controllers/front/wallet.php +++ b/src/lemonwaymkt/controllers/front/wallet.php @@ -1,10 +1,10 @@ getByCustomerId($this->context->customer->id)) - { + if ($walletExist = $wallet->getByCustomerId($this->context->customer->id)) { $wallet = $walletExist; $this->context->smarty->assign('wallet',$wallet); $has_wallet = true; } - - if(Tools::isSubmit('createWalletSubmit') && !$has_wallet){ + if (Tools::isSubmit('createWalletSubmit') && !$has_wallet) { $customer = $this->context->customer; $mkt_customer_obj = new MarketplaceCustomer(); $mkt_customer = $mkt_customer_obj->findMarketPlaceCustomer($customer->id); - if(!$mkt_customer ||( is_array($mkt_customer) && !$mkt_customer['is_seller'])) - { + if (!$mkt_customer ||( is_array($mkt_customer) && !$mkt_customer['is_seller'])) { $this->errors[] = $this->module->l('You are not a vendor or your account is not active!'); - } - else - { - try { - + } else { + try { $wallet = $this->module->registerWallet($customer,$mkt_customer['marketplace_seller_id']); - if($wallet) - { + if ($wallet) { $this->context->smarty->assign('wallet',$wallet); $has_wallet = true; } - - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } - } - - } - elseif (Tools::isSubmit('uploadDocSubmit') && $has_wallet){ - + } elseif (Tools::isSubmit('uploadDocSubmit') && $has_wallet) { $file = Tools::fileAttachment(); - if(!$file) - { + if(!$file) { $m = $this->module; $uploadErrors = array( 0 => $m->l('There is no error, the file uploaded with success'), @@ -79,17 +63,10 @@ public function postProcess() ); $errorId = (int)$_FILES['fileUpload']['error']; $this->errors[] = $uploadErrors[$errorId]; - } - else{ - - if(!Tools::isSubmit('file_type')) - { + } else { + if (!Tools::isSubmit('file_type')) { $this->errors[] = $this->module->l('You must to choose a file type!'); - - } - else{ - - + } else { $params = array( 'wallet'=>$wallet->id_lw_wallet, 'fileName'=>$file['name'], diff --git a/src/lemonwaymkt/lemonwaymkt.php b/src/lemonwaymkt/lemonwaymkt.php index 318fc4d..b741302 100644 --- a/src/lemonwaymkt/lemonwaymkt.php +++ b/src/lemonwaymkt/lemonwaymkt.php @@ -17,7 +17,7 @@ public function __construct() { $this->name = 'lemonwaymkt'; $this->tab = 'payments_gateways'; - $this->version = '1.1.1'; + $this->version = '1.1.2'; $this->author = 'SIRATECK'; $this->need_instance = 0; $this->dependencies = array('lemonway','marketplace'); @@ -32,7 +32,7 @@ public function __construct() parent::__construct(); $this->displayName = $this->l('Lemonway Marketplace'); - $this->description = $this->l('It\' adaptive Lemonway payment for marketplace module from Webkul'); + $this->description = $this->l('It\'s adaptive Lemonway payment for marketplace module from Webkul'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall my module? You will be loose your datas !'); @@ -579,7 +579,7 @@ public function hookActionValidateOrder($params) "debitWallet" => $w_transac->debit_wallet, "creditWallet" => $w_transac->credit_wallet, "amount" => number_format((float)$w_transac->amount_to_pay, 2, '.', ''), - "message" => urlencode(Configuration::get('PS_SHOP_NAME')) . " - " . sprintf($this->l('Send payment for order %s'), $id_order) + "message" => Configuration::get('PS_SHOP_NAME') . " - " . sprintf($this->l('Send payment for order %s'), $id_order) ); diff --git a/src/lemonwaymkt/translations/en.php b/src/lemonwaymkt/translations/en.php index 0490ee8..8e1ee25 100644 --- a/src/lemonwaymkt/translations/en.php +++ b/src/lemonwaymkt/translations/en.php @@ -3,7 +3,7 @@ global $_MODULE; $_MODULE = array(); $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_4f14c0acb8298b5aaa86383d9903138f'] = 'Lemonway Marketplace'; -$_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_b2c91cdb21c3b5d450314b52aa569168'] = 'It\' adaptive Lemonway payment for marketplace module from Webkul'; +$_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_a6658ad62a4d1bd48bcc88456eab065b'] = 'It\'s adaptive Lemonway payment for marketplace module from Webkul'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_88d15f5a603d28b02127831b1dc1b1ff'] = 'Are you sure you want to uninstall my module? You will be loose your datas !'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_92d4773a9f32fc3333cb8238471cf763'] = 'You have to enable the cURL extension on your server to install this module'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_dd494653c5f48808325fca382527bc96'] = 'MARKETPLACE CONFIGURATION'; diff --git a/src/lemonwaymkt/translations/fr.php b/src/lemonwaymkt/translations/fr.php index 0bde2b3..fed56e6 100644 --- a/src/lemonwaymkt/translations/fr.php +++ b/src/lemonwaymkt/translations/fr.php @@ -3,7 +3,7 @@ global $_MODULE; $_MODULE = array(); $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_4f14c0acb8298b5aaa86383d9903138f'] = 'Lemonway Marketplace'; -$_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_b2c91cdb21c3b5d450314b52aa569168'] = 'Ce module adapte le paiement inter-wallet pour le module Marketplace webkul'; +$_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_a6658ad62a4d1bd48bcc88456eab065b'] = 'Ce module adapte le paiement inter-wallet pour le module Marketplace Webkul'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_88d15f5a603d28b02127831b1dc1b1ff'] = 'Etes vous sûr de vouloir désinstaller le module.'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_92d4773a9f32fc3333cb8238471cf763'] = 'Vous devez activer l\'extension PHP cURL pour utiliser le module'; $_MODULE['<{lemonwaymkt}prestashop>lemonwaymkt_dd494653c5f48808325fca382527bc96'] = 'Configuration Marketplace';