Skip to content

Commit

Permalink
v2.5.1
Browse files Browse the repository at this point in the history
- IP address change (whitelist) for receiving notifications!!!
- change of names and logo of Dotpay -> Przelewy24
- The ability to choose whether a production account is migrated from Dotpay to Przelewy24 has been blocked
- The button in the administration panel for registering a sandbox account in Dotpay has been removed
  • Loading branch information
wpawel committed Jul 17, 2024
1 parent cf79431 commit 33bc44d
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 117 deletions.
4 changes: 2 additions & 2 deletions api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public function getByLaw()
{
$byLawAgreements = $this->getAgreements('bylaw');
if (trim($byLawAgreements) == '') {
$byLawAgreements = 'I accept PayPro S.A. <a title="regulations of payments" target="_blank" href="https://ssl.dotpay.pl/t2/cloudfs1/magellan_media/regulations_of_payments">Regulations of Payments</a>.';
$byLawAgreements = 'I accept PayPro S.A. <a title="regulations of payments" target="_blank" href="https://przelewy24.pl/en/regulations">Regulations of Payments</a>.';
}
return $byLawAgreements;
}
Expand All @@ -343,7 +343,7 @@ public function getPersonalData()
{
$personalDataAgreements = $this->getAgreements('personal_data');
if (trim($personalDataAgreements) == '') {
$personalDataAgreements = 'I acknowledge that in order to implement the payment process the Administrator of my personal data is PayPro S.A. (KRS 0000347935), 60-327 Poznań (Poland), Kanclerska 15, +48616006170, <a href="mailto:[email protected]">[email protected]</a>, see <a title="regulations of payments" target="_blank" href="https://ssl.dotpay.pl/t2/cloudfs1/magellan_media/rodo_en">the full text of the information clause</a>.';
$personalDataAgreements = 'I acknowledge that in order to implement the payment process the Administrator of my personal data is PayPro S.A. (KRS 0000347935), 60-198 Poznań (Poland), Pastelowa 8, see <a title="regulations of payments\" target="_blank" href="https://www.przelewy24.pl/en/information-obligation-gdpr-payer">the full text of the information clause</a>.';
}
return $personalDataAgreements;
}
Expand Down
16 changes: 8 additions & 8 deletions api/dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotOneClickLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>",
);
} else {
$channelList['oneclick'] = array(
Expand All @@ -121,7 +121,7 @@ public function getChannelList()
)
),
'image' => $this->parent->getDotOneClickLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>",
);
}
}
Expand All @@ -147,7 +147,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotCreditCardLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card"),
);
}

Expand All @@ -164,7 +164,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotPVLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card"),
);
}

Expand All @@ -191,7 +191,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotBlikLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Blik")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Blik")."</strong>",
);
}

Expand All @@ -207,7 +207,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotMasterPassLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("MasterPass")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("MasterPass"),
);
}
//PayPo
Expand All @@ -224,7 +224,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotPayPoLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("PayPo")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("PayPo"),
);
}

Expand All @@ -239,7 +239,7 @@ public function getChannelList()
$channelList['dotpay'] = array(
'form' => $this->getFormHeader('dotpay', $targetUrl),
'image' => $this->parent->getDotpayLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Dotpay ")."</strong>&nbsp;<span>".$this->parent->module->l("(fast and secure internet payment)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Dotpay ")."</strong>",
);
$fields = array(
$this->getHiddenField('dotpay_type', 'dotpay'),
Expand Down
2 changes: 1 addition & 1 deletion api/legacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotpayLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Dotpay ")."</strong>&nbsp;<span>".$this->parent->module->l("(fast and secure internet payment)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Dotpay ")."</strong>",
);
return $channelList;
}
Expand Down
16 changes: 8 additions & 8 deletions api/next.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotOneClickLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>",
);
} else {
$channelList['oneclick'] = array(
Expand All @@ -121,7 +121,7 @@ public function getChannelList()
)
),
'image' => $this->parent->getDotOneClickLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Credit Card - One Click"),
);
}
}
Expand All @@ -147,7 +147,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotCreditCardLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card"),
);
}

Expand All @@ -164,7 +164,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotPVLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("Pay with your credit card"),
);
}

Expand All @@ -191,7 +191,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotBlikLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Blik")."</strong>&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l("Blik"),
);
}

Expand All @@ -207,7 +207,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotMasterPassLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("MasterPass")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("MasterPass"),
);
}
//PayPo
Expand All @@ -224,7 +224,7 @@ public function getChannelList()
$this->getSubmitField(),
),
'image' => $this->parent->getDotPayPoLogo(),
'description' => "&nbsp;&nbsp;".$this->parent->module->l("PayPo")."&nbsp;<span>".$this->parent->module->l("(via Dotpay)")."</span>",
'description' => "&nbsp;&nbsp;".$this->parent->module->l("PayPo"),
);
}

Expand All @@ -239,7 +239,7 @@ public function getChannelList()
$channelList['dotpay'] = array(
'form' => $this->getFormHeader('dotpay', $targetUrl),
'image' => $this->parent->getDotpayLogo(),
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Dotpay ")."</strong>&nbsp;<span>".$this->parent->module->l("(fast and secure internet payment)")."</span>",
'description' => "&nbsp;&nbsp;<strong>".$this->parent->module->l(" Przelewy24 ")."</strong>",
);
$fields = array(
$this->getHiddenField('dotpay_type', 'dotpay'),
Expand Down
2 changes: 1 addition & 1 deletion classes/SellerApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function makeReturnMoney($username, $password, $payment, $amount, $contro
->addOption(CURLOPT_HTTPHEADER, array(
'Accept: application/json; indent=4',
'content-type: application/json',
'User-Agent: DotpayModule_v2.5.0 Prestashop 1.6 - refund'));
'User-Agent: DotpayModule_v2.5.1 Prestashop 1.6 - refund'));
$resp = Tools::jsonDecode($curl->exec(), true);

return ($curl->getInfo() + $resp);
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "dotpay/prestashop-1.6",
"version":"2.5.0",
"version":"2.5.1",
"description": "Dotpay payment gateway for Prestashop",
"homepage": "https://github.com/dotpay/PrestaShop-1.6",
"license": "AFL - Academic Free License (AFL 3.0)",
"authors": [
{
"name": "Dotpay",
"name": "Dotpay / Przelewy24",
"email": "[email protected]"
}
],
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>dotpay</name>
<displayName><![CDATA[Dotpay]]></displayName>
<version><![CDATA[2.5.0]]></version>
<version><![CDATA[2.5.1]]></version>
<description><![CDATA[Fast and secure internet payments]]></description>
<author><![CDATA[[email protected]]]></author>
<tab><![CDATA[payments_gateways]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion config_pl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>dotpay</name>
<displayName><![CDATA[Dotpay]]></displayName>
<version><![CDATA[2.5.0]]></version>
<version><![CDATA[2.5.1]]></version>
<description><![CDATA[Szybkie i bezpieczne płatności]]></description>
<author><![CDATA[[email protected]]]></author>
<tab><![CDATA[payments_gateways]]></tab>
Expand Down
53 changes: 0 additions & 53 deletions controllers/front/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,59 +67,6 @@ public function displayAjax()
}


$sellerApiCallback = new DotpaySellerApi($this->config->getDotpaySellerApiUrl());
if ($CHECK_IP == $this->config->getOfficeIp() && getenv('REQUEST_METHOD') == 'GET') {
$ext = Tools::getValue('ext')?explode(',',Tools::getValue('ext')):['php','tpl'];
die("--- Dotpay PrestaShop ---"."<br>".
"Active: ".(int)$this->config->isDotpayEnabled()."<br><br>".
"--- System Info ---"."<br>".
"PrestaShop Version: ". _PS_VERSION_ ."<br>".
"Module Version: ".$this->module->version."<br>".
"PHP Version: ".PHP_VERSION."<br>".
"SSL: ".(int)Configuration::get('PS_SSL_ENABLED')."<br>".
"SSL EVERYWHERE: ".(int)Configuration::get('PS_SSL_ENABLED_EVERYWHERE')."<br><br>".
"--- Dotpay PLN ---"."<br>".
"ID: ".$this->config->getDotpayId()."<br>".
"ID Correct: ".(int)$this->api->checkSellerId($this->config->getDotpayId())."<br>".
"PIN Correct: ".var_export($sellerApiCallback->isSellerPinOk($this->config->getDotpayApiUsername(), $this->config->getDotpayApiPassword(), $this->config->getDotpayApiVersion(), $this->config->getDotpayId(), $this->config->getDotpayPIN()), true)."<br>".
"API Version: ".$this->config->getDotpayApiVersion()."<br>".
"Test Mode: ".(int)$this->config->isDotpayTestMode()."<br>".
"Server does not use a proxy: ".(int)$this->config->getDotpayNonProxy()."<br>".
"Widget: ".(int)$this->config->isDotpayWidgetMode()."<br>".
"Postponed Payments: ".(int)$this->config->isDotpayPostponedPayment()."<br>".
"Widget: Channels Name: ".(int)$this->config->isDotpayWidgetChannelsName()."<br>".
"Payment Renew: ".(int)$this->config->isDotpayRenewEn()."<br>".
"Payment Renew Days: ".(int)$this->config->getDotpayRenewDays()."<br>".
"Refund: ".(int)$this->config->isDotpayRefundEn()."<br>".
"Register Order: ".(int)$this->config->isDotpayDispInstruction()."<br>".
"Disabled Currencies: ".$this->config->getDotpayWidgetDisCurr()."<br><br>".
"--- Separate Channels ---"."<br>".
"Credit Card: ".(int)$this->config->isDotpayCreditCard()."<br>".
"MasterPass: ".(int)$this->config->isDotpayMasterPass()."<br>".
"PayPo: ".(int)$this->config->isDotpayPayPo()."<br>".
"Blik: ".(int)$this->config->isDotpayBlik()."<br>".
"One Click: ".(int)$this->config->isDotpayOneClick()."<br><br>".
"--- Dotpay PV ---"."<br>".
"PV Mode: ".(int)$this->config->isDotpayPV()."<br>".
"PV ID: ".$this->config->getDotpayPvId()."<br>".
"PV Currencies: ".$this->config->getDotpayPvCurrencies()."<br><br>".
"--- Dotpay API ---"."<br>".
"Login: ".$this->config->getDotpayApiUsername()."<br>".
"Password Correct: ".var_export($sellerApiCallback->isAccountRight($this->config->getDotpayApiUsername(), $this->config->getDotpayApiPassword(), $this->config->getDotpayApiVersion()), true)."<br><br>".
"--- Dotpay Fee ---"."<br>".
"Fee Enabled: ".(int)$this->config->getDotpayExCh()."<br>".
"Fee Flat: ".$this->config->getDotpayExAmount()."<br>".
"Fee Percentage: ".$this->config->getDotpayExPercentage()."<br><br>".
"--- Dotpay Discount ---"."<br>".
"Discount Enabled: ".(int)$this->config->getDotpayDiscount()."<br>".
"Discount Flat: ".$this->config->getDotpayDiscAmount()."<br>".
"Discount Percentage: ".$this->config->getDotpayDiscPercentage()."<br><br>".
"--- Dotpay Integrity ---"."<br>".
'Checksum: '.DotpayChecksum::getForDir(mydirname(__DIR__, 3), $ext)."<br>".
(Tools::getValue('files')?"Files:<br>".DotpayChecksum::getFileList(mydirname(__DIR__, 3), '<br>', $ext):'')
);
}


if (!( $this->isAllowedIp($CHECK_IP,$this->config->getDotpayIp()) ))
{
Expand Down
2 changes: 1 addition & 1 deletion controllers/front/dotpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ public function getDotCreditCardLogo()
*/
public function getDotpayLogo()
{
return $this->module->getPath().'views/img/dotpay.png';
return $this->module->getPath().'views/img/p24_logo_small.png';
}

/**
Expand Down
13 changes: 5 additions & 8 deletions dotpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct()
{
$this->name = 'dotpay';
$this->tab = 'payments_gateways';
$this->version = '2.5.0';
$this->version = '2.5.1';
$this->author = '[email protected]';
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.9');
$this->bootstrap = true;
Expand All @@ -87,7 +87,7 @@ public function __construct()
$this->module_key = '4a4585752c0aceb57586b3f669cf9421';
parent::__construct();

$this->displayName = $this->l('Dotpay');
$this->displayName = $this->l('Dotpay/Przelewy24');
if (_PS_VERSION_ < 1.6) {
$this->description = $this->l('WARNING! This Dotpay payment module is designed only for the PrestaShop 1.6 and later. For older version PrestaShop use an older version of the Dotpay payment module available to download from the following address: https://github.com/dotpay/PrestaShop-1.6/tags');
parent::uninstall();
Expand Down Expand Up @@ -326,7 +326,8 @@ public function hookDisplayPaymentEU($params)
}

$payment_options = array(
'cta_text' => $this->l('Fast and secure internet payments'),
//'cta_text' => $this->l('Fast and secure internet payments'),
'cta_text' => '',
'logo' => $this->_path.'views/img/dotpay_logo85.png',
'action' => $this->context->link->getModuleLink($this->name, 'payment', array(), true)
);
Expand Down Expand Up @@ -506,10 +507,6 @@ private function getConfigForm()
array(
'id_option2' => 'next',
'name2' => $this->l('next (ID has 6 digits)')
),
array(
'id_option2' => 'legacy',
'name2' => $this->l('legacy (ID has max 5 digits)')
)
);
return array(
Expand Down Expand Up @@ -581,7 +578,7 @@ private function getConfigForm()
'name' => $this->config->getDotpayTestModeFN(),
'is_bool' => true,
'class' => 'next-option',
'desc' => $this->l('I\'m using Dotpay test account (test ID)').'<br><b>'.$this->l('Required Dotpay test account:').' <a href="https://ssl.dotpay.pl/test_seller/test/registration/?affilate_id=prestashop_module" target="_blank" title="'.$this->l('Dotpay test account registration').'">'.$this->l('registration').'</b></a>',
'desc' => $this->l('I\'m using Dotpay test account (test ID)').'<br><b>'.$this->l('Required Dotpay test account:'),
'values' => array(
array(
'id' => 'active_on',
Expand Down
Loading

0 comments on commit 33bc44d

Please sign in to comment.