Skip to content

Commit a55ce7e

Browse files
Merge pull request #1 from PrestaShop/master
Merge with PrestaShop/pigmbhpaymill
2 parents 07aedf9 + a386c14 commit a55ce7e

25 files changed

+651
-459
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.2.0 - 2015-07-21
2+
* add ssl support for the payment form page
3+
* Integration of PayFrame to enable use of SAQ A for easier PCI DSS 3.0 compliance
4+
* transaction description initially set
5+
16
## 2.1.0 - 2014-10-01
27
* added compatibility for EU-Legal(https://github.com/EU-Legal/modules)
38
* added refund within shop-administration

components/configurationHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function loadConfiguration()
4444
'PIGMBH_PAYMILL_FASTCHECKOUT',
4545
'PIGMBH_PAYMILL_ACCEPTED_BRANDS',
4646
'PIGMBH_PAYMILL_CAPTURE',
47+
'PIGMBH_PAYMILL_MODE',
48+
'PIGMBH_PAYMILL_PCI',
4749
)
4850
);
4951

@@ -56,6 +58,7 @@ public function loadConfiguration()
5658
$config_model->setCreditcard(isset($config['PIGMBH_PAYMILL_CREDITCARD']) ? $config['PIGMBH_PAYMILL_CREDITCARD'] : false);
5759
$config_model->setFastcheckout(isset($config['PIGMBH_PAYMILL_FASTCHECKOUT']) ? $config['PIGMBH_PAYMILL_FASTCHECKOUT'] : false);
5860
$config_model->setCapture(isset($config['PIGMBH_PAYMILL_CAPTURE']) ? $config['PIGMBH_PAYMILL_CAPTURE'] : false);
61+
$config_model->setPci(isset($config['PIGMBH_PAYMILL_PCI']) ? $config['PIGMBH_PAYMILL_PCI'] : 0);
5962
$accepted_brands = false;
6063
if (isset($config['PIGMBH_PAYMILL_ACCEPTED_BRANDS']))
6164
$accepted_brands = Tools::jsonDecode($config['PIGMBH_PAYMILL_ACCEPTED_BRANDS'], true);
@@ -79,6 +82,7 @@ public function updateConfiguration(ConfigurationModel $model)
7982
Configuration::updateValue('PIGMBH_PAYMILL_FASTCHECKOUT', $model->getFastcheckout());
8083
Configuration::updateValue('PIGMBH_PAYMILL_CAPTURE', $model->getCapture());
8184
Configuration::updateValue('PIGMBH_PAYMILL_ACCEPTED_BRANDS', Tools::jsonEncode($model->getAccpetedCreditCards()));
85+
Configuration::updateValue('PIGMBH_PAYMILL_PCI', $model->getPci());
8286
}
8387

8488
/**
@@ -112,6 +116,7 @@ public function setDefaultConfiguration()
112116
)
113117
)
114118
);
119+
Configuration::updateValue('PIGMBH_PAYMILL_PCI', 0);
115120

116121
return true; //needs to return true for installation
117122
}

components/models/configurationModel.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@ class ConfigurationModel {
7171
*/
7272
private $capture;
7373

74+
/**
75+
* @var string
76+
*/
77+
private $pci;
78+
79+
/**
80+
* @return string
81+
*/
82+
public function getPci()
83+
{
84+
return $this->pci;
85+
}
86+
87+
/**
88+
* @param string $pci
89+
*/
90+
public function setPci($pci)
91+
{
92+
$this->pci = $pci;
93+
}
94+
7495
/**
7596
* @return string
7697
*/

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>pigmbhpaymill</name>
44
<displayName><![CDATA[PAYMILL]]></displayName>
5-
<version><![CDATA[2.1.6]]></version>
5+
<version><![CDATA[2.2.1]]></version>
66
<description><![CDATA[PAYMILL credit card payments &amp;amp; direct debit]]></description>
77
<author><![CDATA[PayIntelligent GmbH]]></author>
88
<tab><![CDATA[payments_gateways]]></tab>

controllers/front/payment.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function initContent()
4242
$valid_payments[] = 'creditcard';
4343
if (!in_array(Tools::getValue('payment'), $valid_payments))
4444
Tools::redirectLink($this->context->link->getPageLink('order', true, null, array('step'=>'1')));
45-
45+
4646
$db_data = $this->getPaymillUserData();
4747

4848
$this->updatePaymillClient($db_data);
@@ -78,7 +78,8 @@ public function initContent()
7878
'customer' => $this->context->customer->firstname.' '.$this->context->customer->lastname,
7979
'prefilledFormData' => $this->updatePaymillPayment($db_data),
8080
'acceptedBrands' => Configuration::get('PIGMBH_PAYMILL_ACCEPTED_BRANDS'),
81-
'acceptedBrandsDecoded' => $brands
81+
'acceptedBrandsDecoded' => $brands,
82+
'iframe_active' => (int)Configuration::get('PIGMBH_PAYMILL_PCI') == 0 // SAQ A -> iframe
8283
);
8384

8485
$this->context->smarty->assign($data);

controllers/front/validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private function processPayment()
188188
$this->payment_processor->setCurrency(Tools::strtolower($this->iso_currency));
189189
$this->payment_processor->setName($this->context->customer->lastname.', '.$this->context->customer->firstname);
190190
$this->payment_processor->setEmail($this->context->customer->email);
191-
$this->payment_processor->setDescription('');
191+
$this->payment_processor->setDescription((string)time());
192192
$this->payment_processor->setLogger($this);
193193
$this->payment_processor->setSource(Configuration::get('PIGMBH_PAYMILL_VERSION').'_prestashop_core_'._PS_VERSION_);
194194

css/paymill_styles.css

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,56 @@
1+
#paymill-modul h4{
2+
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
3+
font-size: 14px;
4+
line-height: 15.4px;
5+
font-weight: 700;
6+
}
7+
8+
#paymill_getstarted {
9+
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
10+
font-size: 16px;
11+
line-height: 24px;
12+
font-weight: 400;
13+
}
14+
15+
#paymill_getstarted .btn-primary {
16+
color: #fff;
17+
background-color: #f05000;
18+
border-color: #f05000;
19+
-webkit-box-shadow: 0 1px 0 #be4000;
20+
box-shadow: 0 1px 0 #be4000;
21+
-webkit-transition: color .2s linear, background .2s linear, border .2s linear;
22+
-o-transition: color .2s linear, background .2s linear, border .2s linear;
23+
transition: color .2s linear, background .2s linear, border .2s linear;
24+
}
25+
26+
#paymill_getstarted .btn-primary:focus,
27+
#paymill_getstarted .btn-primary:hover,
28+
#paymill_getstarted .btn-primary:active {
29+
border-color: #bd3f00;
30+
background-color: #bd3f00;
31+
}
32+
133
div.row p.payment_module a.creditcard {
2-
background: url('../img/icon-hook.png') 15px 15px no-repeat #fbfbfb; }
34+
background: url('../img/icon-hook.png') 15px 15px no-repeat #fbfbfb; }
335
div.row p.payment_module a.elv {
4-
background: url('../img/icon-hook.png') 15px 15px no-repeat #fbfbfb; }
36+
background: url('../img/icon-hook.png') 15px 15px no-repeat #fbfbfb; }
537
div.row p.payment_module a.creditcard:after, p.payment_module a.elv:after {
6-
display: block;
7-
content: "\f054";
8-
position: absolute;
9-
right: 15px;
10-
margin-top: -11px;
11-
top: 50%;
12-
font-family: "FontAwesome";
13-
font-size: 25px;
14-
height: 22px;
15-
width: 14px;
16-
color: #777777; }
38+
display: block;
39+
content: "\f054";
40+
position: absolute;
41+
right: 15px;
42+
margin-top: -11px;
43+
top: 50%;
44+
font-family: "FontAwesome";
45+
font-size: 25px;
46+
height: 22px;
47+
width: 14px;
48+
color: #777777; }
1749
div.row p.payment_module a:hover {
18-
background-color: #f6f6f6; }
50+
background-color: #f6f6f6; }
1951
div.row p.payment_module a span {
20-
font-weight: bold;
21-
color: #777777; }
52+
font-weight: bold;
53+
color: #777777; }
2254

2355
.paymill-tooltip {
2456
margin-left: 3px;
@@ -161,4 +193,4 @@ div.row p.payment_module a span {
161193
#paymill_adminpage fieldset{
162194
margin-top: 5px;
163195
margin-bottom: 5px;
164-
}
196+
}

img/logo.png

3.85 KB
Loading

img/payment.png

17.1 KB
Loading

img/pm_pci_240x96-PCI.png

8.71 KB
Loading

0 commit comments

Comments
 (0)