Version Notes
- add direct debit with incurence
- remove bic in case of sepa direct debit
Download this release
Release Info
Developer | Heidelberger Payment GmbH |
Extension | HeidelpayCDEdition |
Version | 16.6.22 |
Comparing to | |
See all releases |
Code changes from version 16.2.9 to 16.6.22
- app/code/community/HeidelpayCD/Edition/Helper/Payment.php +1 -0
- app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction/Collection.php +11 -11
- app/code/community/HeidelpayCD/Edition/Model/Payment/Abstract.php +10 -0
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddd.php +48 -33
- app/code/community/HeidelpayCD/Edition/controllers/.IndexController.php.swp +0 -0
- app/code/community/HeidelpayCD/Edition/controllers/IndexController.php +3 -2
- app/code/community/HeidelpayCD/Edition/etc/config.xml +2 -1
- app/code/community/HeidelpayCD/Edition/etc/system.xml +10 -0
- app/design/frontend/base/default/template/hcd/form/debit.phtml +134 -49
- app/locale/de_DE/HeidelpayCD_Edition.csv +8 -1
- app/locale/en_US/HeidelpayCD_Edition.csv +6 -1
- js/hcd/heidelpaycd.js +2 -1
- package.xml +7 -7
app/code/community/HeidelpayCD/Edition/Helper/Payment.php
CHANGED
@@ -31,6 +31,7 @@ class HeidelpayCD_Edition_Helper_Payment extends Mage_Core_Helper_Abstract
|
|
31 |
$adapter = new Zend_Http_Client_Adapter_Curl();
|
32 |
$adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, true);
|
33 |
$adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, 2);
|
|
|
34 |
$client->setAdapter($adapter);
|
35 |
}
|
36 |
$response = $client->request('POST');
|
31 |
$adapter = new Zend_Http_Client_Adapter_Curl();
|
32 |
$adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, true);
|
33 |
$adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, 2);
|
34 |
+
$adapter->setCurlOption(CURLOPT_SSLVERSION, 6);
|
35 |
$client->setAdapter($adapter);
|
36 |
}
|
37 |
$response = $client->request('POST');
|
app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction/Collection.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class HeidelpayCD_Edition_Model_Mysql4_Transaction_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
-
{
|
5 |
-
public function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('hcd/transaction');
|
8 |
-
parent::_construct();
|
9 |
-
}
|
10 |
-
}
|
11 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class HeidelpayCD_Edition_Model_Mysql4_Transaction_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('hcd/transaction');
|
8 |
+
parent::_construct();
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
app/code/community/HeidelpayCD/Edition/Model/Payment/Abstract.php
CHANGED
@@ -681,5 +681,15 @@ class HeidelpayCD_Edition_Model_Payment_Abstract extends Mage_Payment_Model_Meth
|
|
681 |
|
682 |
return false;
|
683 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
}
|
685 |
|
681 |
|
682 |
return false;
|
683 |
}
|
684 |
+
|
685 |
+
public function validateDateOfBirth($day, $mount, $year) {
|
686 |
+
if( strtotime("$year/$mount/$day") < (time() - (18 * 60 * 60 * 24 * 365))) {
|
687 |
+
return true;
|
688 |
+
} else {
|
689 |
+
return false;
|
690 |
+
}
|
691 |
+
|
692 |
+
|
693 |
+
}
|
694 |
}
|
695 |
|
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddd.php
CHANGED
@@ -11,21 +11,67 @@ class HeidelpayCD_Edition_Model_Payment_Hcddd extends HeidelpayCD_Edition_Model_
|
|
11 |
return $this->_formBlockType;
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
public function validate(){
|
15 |
parent::validate();
|
16 |
$payment = array();
|
17 |
$params = array();
|
18 |
$payment = Mage::app()->getRequest()->getPOST('payment');
|
19 |
|
|
|
|
|
20 |
if(isset($payment['method']) and $payment['method'] == $this->_code) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
if(empty($payment[$this->_code.'_holder']))
|
23 |
Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
|
24 |
if(empty($payment[$this->_code.'_iban']))
|
25 |
Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
|
26 |
if(empty($payment[$this->_code.'_bic'])){
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
}
|
30 |
}
|
31 |
|
@@ -71,35 +117,4 @@ class HeidelpayCD_Edition_Model_Payment_Hcddd extends HeidelpayCD_Edition_Model_
|
|
71 |
|
72 |
}
|
73 |
|
74 |
-
/*
|
75 |
-
public function getUser($order) {
|
76 |
-
$account = array();
|
77 |
-
$params = array();
|
78 |
-
$params = parent::getUser($order);
|
79 |
-
|
80 |
-
|
81 |
-
$usersession = $this->getCheckout();
|
82 |
-
|
83 |
-
$account = $usersession->getHcddata();
|
84 |
-
|
85 |
-
$params['ACCOUNT.HOLDER'] = $account['hgwdd_holder'];
|
86 |
-
|
87 |
-
if (is_int($account['hgwdd_iban'])) {
|
88 |
-
$params['ACCOUNT.NUMBER'] = $account['hgwdd_iban'];
|
89 |
-
} else {
|
90 |
-
$params['ACCOUNT.IBAN'] = $account['hgwdd_iban'];
|
91 |
-
};
|
92 |
-
|
93 |
-
if (is_int($account['hgwdd_bic'])) {
|
94 |
-
$params['ACCOUNT.BANK'] = $account['hgwdd_iban'];
|
95 |
-
} else {
|
96 |
-
$params['ACCOUNT.BIC'] = $account['hgwdd_iban'];
|
97 |
-
};
|
98 |
-
|
99 |
-
parent::log('Account data : '. print_r($account,1), 'DEBUG');
|
100 |
-
|
101 |
-
return $params ;
|
102 |
-
|
103 |
-
}
|
104 |
-
*/
|
105 |
}
|
11 |
return $this->_formBlockType;
|
12 |
}
|
13 |
|
14 |
+
public function isAvailable($quote = null) {
|
15 |
+
|
16 |
+
$path = "payment/" . $this->_code . "/";
|
17 |
+
$storeId = Mage::app ()->getStore ()->getId ();
|
18 |
+
$insurence = Mage::getStoreConfig ( $path . 'insurence', $storeId );
|
19 |
+
|
20 |
+
// in case if insurence billing and shipping adress
|
21 |
+
if ($insurence > 0) {
|
22 |
+
|
23 |
+
$billing = $this->getQuote ()->getBillingAddress ();
|
24 |
+
$shipping = $this->getQuote ()->getShippingAddress ();
|
25 |
+
|
26 |
+
if (($billing->getFirstname () != $shipping->getFirstname ()) or ($billing->getLastname () != $shipping->getLastname ()) or ($billing->getStreet () != $shipping->getStreet ()) or ($billing->getPostcode () != $shipping->getPostcode ()) or ($billing->getCity () != $shipping->getCity ()) or ($billing->getCountry () != $shipping->getCountry ())) {
|
27 |
+
$this->log('direct debit with insurence not allowed with diffrend adresses');
|
28 |
+
return false;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
return parent::isAvailable ( $quote );
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
public function validate(){
|
36 |
parent::validate();
|
37 |
$payment = array();
|
38 |
$params = array();
|
39 |
$payment = Mage::app()->getRequest()->getPOST('payment');
|
40 |
|
41 |
+
//Mage::throwException(print_r($payment,1));
|
42 |
+
|
43 |
if(isset($payment['method']) and $payment['method'] == $this->_code) {
|
44 |
+
|
45 |
+
if (array_key_exists($this->_code.'_salut', $payment)) {
|
46 |
+
$params['NAME.SALUTATION'] = (preg_match('/[A-z]{2}/', $payment[$this->_code.'_salut'])) ? $payment[$this->_code.'_salut'] : '';
|
47 |
+
}
|
48 |
+
|
49 |
+
if (array_key_exists($this->_code.'_dobday', $payment) &&
|
50 |
+
array_key_exists($this->_code.'_dobmonth', $payment) &&
|
51 |
+
array_key_exists($this->_code.'_dobyear', $payment)
|
52 |
+
) {
|
53 |
+
|
54 |
+
$day = (int)$payment[$this->_code.'_dobday'];
|
55 |
+
$mounth = (int)$payment[$this->_code.'_dobmonth'];
|
56 |
+
$year = (int)$payment[$this->_code.'_dobyear'];
|
57 |
+
|
58 |
+
if($this->validateDateOfBirth( $day, $mounth, $year)) {
|
59 |
+
$params['NAME.BIRTHDATE'] = $year.'-'.sprintf("%02d",$mounth).'-'.sprintf("%02d",$day) ;
|
60 |
+
} else {
|
61 |
+
Mage::throwException($this->_getHelper()->__('The minimum age is 18 years for this payment methode.'));
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
65 |
|
66 |
if(empty($payment[$this->_code.'_holder']))
|
67 |
Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
|
68 |
if(empty($payment[$this->_code.'_iban']))
|
69 |
Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
|
70 |
if(empty($payment[$this->_code.'_bic'])){
|
71 |
+
|
72 |
+
if(!preg_match('/^[A-Za-z]{2}/', $payment[$this->_code.'_iban'])){
|
73 |
+
|
74 |
+
Mage::throwException($this->_getHelper()->__('Please specify a bank code'));
|
75 |
}
|
76 |
}
|
77 |
|
117 |
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
app/code/community/HeidelpayCD/Edition/controllers/.IndexController.php.swp
ADDED
Binary file
|
app/code/community/HeidelpayCD/Edition/controllers/IndexController.php
CHANGED
@@ -300,7 +300,7 @@ class HeidelpayCD_Edition_IndexController extends Mage_Core_Controller_Front_Act
|
|
300 |
|
301 |
}
|
302 |
|
303 |
-
|
304 |
// if order status is cancel redirect to cancel page
|
305 |
if ($order->getStatus() == $payment->getStatusError()) {
|
306 |
$this->_redirect('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
|
@@ -312,7 +312,7 @@ class HeidelpayCD_Edition_IndexController extends Mage_Core_Controller_Front_Act
|
|
312 |
$this->_redirect('hcd/index/success', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true,'no_mail' => true));
|
313 |
return;
|
314 |
}
|
315 |
-
|
316 |
|
317 |
|
318 |
$data = $payment->getHeidelpayUrl(false , $BasketId, $RefId);
|
@@ -339,6 +339,7 @@ class HeidelpayCD_Edition_IndexController extends Mage_Core_Controller_Front_Act
|
|
339 |
|
340 |
if ( $payment->activRedirct() === true ) {
|
341 |
$this->_redirectUrl($data['FRONTEND_REDIRECT_URL']);
|
|
|
342 |
}
|
343 |
$this->loadLayout();
|
344 |
$this->log('RedirectUrl ' .$data['FRONTEND_PAYMENT_FRAME_URL'] );
|
300 |
|
301 |
}
|
302 |
|
303 |
+
|
304 |
// if order status is cancel redirect to cancel page
|
305 |
if ($order->getStatus() == $payment->getStatusError()) {
|
306 |
$this->_redirect('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
|
312 |
$this->_redirect('hcd/index/success', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true,'no_mail' => true));
|
313 |
return;
|
314 |
}
|
315 |
+
|
316 |
|
317 |
|
318 |
$data = $payment->getHeidelpayUrl(false , $BasketId, $RefId);
|
339 |
|
340 |
if ( $payment->activRedirct() === true ) {
|
341 |
$this->_redirectUrl($data['FRONTEND_REDIRECT_URL']);
|
342 |
+
return;
|
343 |
}
|
344 |
$this->loadLayout();
|
345 |
$this->log('RedirectUrl ' .$data['FRONTEND_PAYMENT_FRAME_URL'] );
|
app/code/community/HeidelpayCD/Edition/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HeidelpayCD_Edition>
|
5 |
-
<version>16.
|
6 |
</HeidelpayCD_Edition>
|
7 |
</modules>
|
8 |
<global>
|
@@ -215,6 +215,7 @@
|
|
215 |
<active>0</active>
|
216 |
<channel>31HA07BC8142C5A171749A60D979B6E4</channel>
|
217 |
<bookingmode>DB</bookingmode>
|
|
|
218 |
<invioce>1</invioce>
|
219 |
<capture_on_delivery>0</capture_on_delivery>
|
220 |
<model>hcd/payment_hcddd</model>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HeidelpayCD_Edition>
|
5 |
+
<version>16.6.22</version>
|
6 |
</HeidelpayCD_Edition>
|
7 |
</modules>
|
8 |
<global>
|
215 |
<active>0</active>
|
216 |
<channel>31HA07BC8142C5A171749A60D979B6E4</channel>
|
217 |
<bookingmode>DB</bookingmode>
|
218 |
+
<insurence>0</insurence>
|
219 |
<invioce>1</invioce>
|
220 |
<capture_on_delivery>0</capture_on_delivery>
|
221 |
<model>hcd/payment_hcddd</model>
|
app/code/community/HeidelpayCD/Edition/etc/system.xml
CHANGED
@@ -391,6 +391,16 @@
|
|
391 |
<show_in_website>1</show_in_website>
|
392 |
<show_in_store>1</show_in_store>
|
393 |
</recognition>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
<invioce translate="label">
|
395 |
<label>Automatically invoiced</label>
|
396 |
<frontend_type>select</frontend_type>
|
391 |
<show_in_website>1</show_in_website>
|
392 |
<show_in_store>1</show_in_store>
|
393 |
</recognition>
|
394 |
+
<insurence translate="label">
|
395 |
+
<label>Insurence provider</label>
|
396 |
+
<frontend_type>select</frontend_type>
|
397 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
398 |
+
<comment>direct debit with insurence requires an extra contract. For more information, please contact your key account manager.</comment>
|
399 |
+
<sort_order>65</sort_order>
|
400 |
+
<show_in_default>1</show_in_default>
|
401 |
+
<show_in_website>1</show_in_website>
|
402 |
+
<show_in_store>1</show_in_store>
|
403 |
+
</insurence>
|
404 |
<invioce translate="label">
|
405 |
<label>Automatically invoiced</label>
|
406 |
<frontend_type>select</frontend_type>
|
app/design/frontend/base/default/template/hcd/form/debit.phtml
CHANGED
@@ -1,55 +1,140 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<div class="input-box">
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<?php echo $this->__('Desc'.$_code);?>
|
53 |
</div>
|
54 |
-
|
55 |
</div>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$_code = $this->getMethodCode ();
|
4 |
+
|
5 |
+
$path = "payment/" . $_code . "/";
|
6 |
+
$storeId = Mage::app ()->getStore ()->getId ();
|
7 |
+
$recognation = Mage::getStoreConfig ( $path . 'recognition', $storeId );
|
8 |
+
$insurence = Mage::getStoreConfig ( $path . 'insurence', $storeId );
|
9 |
+
/*
|
10 |
+
* Look for customer recognation
|
11 |
+
*/
|
12 |
+
|
13 |
+
$hash = $this->getMethod ()->getShippingHash ();
|
14 |
+
$userData = array ();
|
15 |
+
|
16 |
+
$cId = $this->getMethod ()->getCustomerId ();
|
17 |
+
|
18 |
+
if ($recognation == 1 and $cId != 0) { // only if shipping address is unchanged
|
19 |
+
$hash = $this->getMethod ()->getShippingHash ();
|
20 |
+
$userData = $this->getMethod ()->getCustomerData ();
|
21 |
+
if (array_key_exists ( 'payment_data', $userData )) {
|
22 |
+
if ($userData ['payment_data'] ['SHIPPPING_HASH'] != $hash)
|
23 |
+
$userData = array ();
|
24 |
+
}
|
25 |
+
} elseif ($recognation == 2 and $cId != 0) // allways
|
26 |
+
$userData = $this->getMethod ()->getCustomerData ();
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
?>
|
31 |
+
<div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
|
32 |
+
<?php
|
33 |
+
// direct debit with insurence
|
34 |
+
if ($insurence > 0) {?>
|
35 |
+
<div class="input-box">
|
36 |
+
<label for="<?php echo $_code ?>_salut"
|
37 |
+
class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Salutation') ?></label>
|
38 |
|
39 |
+
<select title="<?php echo $this->__('Salutation') ?>"
|
40 |
+
name="payment[<?php echo $_code ?>_salut]" style="width: 50px">
|
41 |
+
<?php
|
42 |
+
$salutation = 'mr' ;
|
43 |
+
if (array_key_exists('NAME.SALUTATION', $userData ['payment_data']))
|
44 |
+
$salutation = $userData ['payment_data']['NAME.SALUTATION'] ; ?>
|
45 |
+
<option value="mr" ><?php echo $this->__('mr') ?></option>
|
46 |
+
<option value="ms" <?php if ($salutation == 'ms' ) echo 'selected="selected"'; ?>><?php echo $this->__('ms') ?></option>
|
47 |
+
</select>
|
48 |
+
</div>
|
49 |
+
<?php };
|
50 |
+
// END direct debit with insurence ?>
|
51 |
<div class="input-box">
|
52 |
+
<label for="<?php echo $_code ?>_holder"
|
53 |
+
class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Owner') ?></label>
|
54 |
+
|
55 |
+
<input type="text" title="<?php echo $this->__('Owner:') ?>"
|
56 |
+
class="input-text required-entry" id="<?php echo $_code ?>_holder"
|
57 |
+
name="payment[<?php echo $_code ?>_holder]"
|
58 |
+
value="<?php echo $this->htmlEscape((isset( $userData['payment_data']['ACCOUNT.HOLDER'])) ? $userData['payment_data']['ACCOUNT.HOLDER'] :$this->getMethod()->getCustomerName()) ?>" />
|
59 |
+
</div>
|
60 |
+
|
61 |
+
<?php
|
62 |
+
// direct debit with insurence
|
63 |
+
if ($insurence > 0) {
|
64 |
+
$dobyear = $dobmounth = $dobday = 0;
|
65 |
+
if (array_key_exists('NAME.BIRTHDATE', $userData ['payment_data']))
|
66 |
+
list($dobyear, $dobmounth, $dobday) = preg_split('/-/', $userData ['payment_data']['NAME.BIRTHDATE']) ;
|
67 |
+
|
68 |
+
?>
|
69 |
+
<div class="input-box">
|
70 |
+
<label for="<?php echo $_code ?>_dob" class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Date of birth') ?></label>
|
71 |
+
<select title="<?php echo $this->__('DOBDay') ?>"
|
72 |
+
name="payment[<?php echo $_code ?>_dobday]" style="width: 50px">
|
73 |
+
<?php
|
74 |
+
$i = 0;
|
75 |
+
for($i = 1; $i <= 31; $i ++) {
|
76 |
+
$v = sprintf("%02d",$i);
|
77 |
+
$selected = ($dobday === $v) ? 'selected="selected"' : '';
|
78 |
+
echo '<option value="'.$v.'" '.$selected.'>'.$v.'</option>';
|
79 |
+
}
|
80 |
+
?>
|
81 |
+
</select>
|
82 |
+
<select title="<?php echo $this->__('DOBMonth') ?>"
|
83 |
+
name="payment[<?php echo $_code ?>_dobmonth]" style="width: 50px">
|
84 |
+
<?php
|
85 |
+
$i = 0;
|
86 |
+
for($i = 1; $i <= 12; $i ++) {
|
87 |
+
$v = sprintf("%02d",$i);
|
88 |
+
$selected = ($dobmounth == $v) ? 'selected="selected"' : '';
|
89 |
+
echo '<option value="'.$v.'" '.$selected.'>'.$v.'</option>';
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
</select>
|
93 |
+
<select title="<?php echo $this->__('DOBYear') ?>" name="payment[<?php echo $_code ?>_dobyear]" style="width: 75px">
|
94 |
+
<?php
|
95 |
+
$i = 0;
|
96 |
+
for($i = 17; $i <= 80; $i ++) {
|
97 |
+
$year = date ( 'Y', strtotime ( "last day of -$i year" ) );
|
98 |
+
$selected = ($dobyear === $year) ? 'selected="selected"' : '';
|
99 |
+
echo '<option value="'.$year.'" '.$selected.'>'.$year.'</option>';
|
100 |
+
}
|
101 |
+
?>
|
102 |
+
</select>
|
103 |
+
</div>
|
104 |
+
<?php };
|
105 |
+
// End direct debit with insurence ?>
|
106 |
+
<?php
|
107 |
+
if (isset ( $userData ['payment_data'] ['ACCOUNT.IBAN'] )) {
|
108 |
+
if (preg_match ( '/^(D|d)(E|e)/', $userData ['payment_data'] ['ACCOUNT.IBAN'] )) {
|
109 |
+
$display = 'style="display: none;"';
|
110 |
+
} else {
|
111 |
+
$display = '';
|
112 |
+
}
|
113 |
+
}
|
114 |
+
?>
|
115 |
+
<div class="input-box">
|
116 |
+
<label for="<?php echo $_code ?>_iban"
|
117 |
+
class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Account number or iban') ?></label>
|
118 |
+
|
119 |
+
<input onkeyup="Heidelpay.checkIban.getInstance().check(this);"
|
120 |
+
type="text" title="<?php echo $this->__('Account number or iban') ?>"
|
121 |
+
class="input-text required-entry validate-alphanum"
|
122 |
+
id="<?php echo $_code ?>_iban"
|
123 |
+
name="payment[<?php echo $_code ?>_iban]"
|
124 |
+
value="<?php if (isset($userData['payment_data']['ACCOUNT.IBAN'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.IBAN']) ; if (isset($userData['payment_data']['ACCOUNT.NUMBER'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.NUMBER']) ; ?>"
|
125 |
+
size="25">
|
126 |
+
</div>
|
127 |
+
<div class="input-box" <?php print $display; ?>>
|
128 |
+
<label for="<?php echo $_code ?>_bic"
|
129 |
+
class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Bank code or bic') ?></label>
|
130 |
+
<input type="text" title="<?php echo $this->__('Bank code or bic:') ?>"
|
131 |
+
class="input-text required-entry validate-alphanum"
|
132 |
+
id="<?php echo $_code ?>_bic" name="payment[<?php echo $_code ?>_bic]"
|
133 |
+
value="<?php if (isset($userData['payment_data']['ACCOUNT.BIC'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.BIC']) ; if (isset($userData['payment_data']['ACCOUNT.BANK'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.BANK']) ; ?>"
|
134 |
+
size="25" />
|
135 |
+
</div>
|
136 |
+
<div class="hcd-payment-desc">
|
137 |
<?php echo $this->__('Desc'.$_code);?>
|
138 |
</div>
|
139 |
+
|
140 |
</div>
|
app/locale/de_DE/HeidelpayCD_Edition.csv
CHANGED
@@ -147,13 +147,20 @@
|
|
147 |
<strong>{IDENTIFICATION_SHORTID}</strong>"
|
148 |
|
149 |
"Bank code or bic","Bankleitzahl oder Bic"
|
150 |
-
"Account number or iban","
|
151 |
"IBAN & BIC","IBAN & BIC"
|
152 |
|
153 |
"Account information","Kontoinformationen"
|
154 |
"Account no. & Bank no.","Kontonummer & Bankleitzahl"
|
155 |
"IBAN & BIC","IBAN & BIC"
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
"Canceled by user","Bezahlprozess vom Benutzer abgebrochen."
|
158 |
"Redirect to MasterPass ...","Weiterleitung zu MasterPass ..."
|
159 |
"This Transaction could not be capture online.","Diese Transaction kann nicht online erfasst werden."
|
147 |
<strong>{IDENTIFICATION_SHORTID}</strong>"
|
148 |
|
149 |
"Bank code or bic","Bankleitzahl oder Bic"
|
150 |
+
"Account number or iban","Kontonr. oder Iban"
|
151 |
"IBAN & BIC","IBAN & BIC"
|
152 |
|
153 |
"Account information","Kontoinformationen"
|
154 |
"Account no. & Bank no.","Kontonummer & Bankleitzahl"
|
155 |
"IBAN & BIC","IBAN & BIC"
|
156 |
|
157 |
+
"Insurence provider","Versicherer"
|
158 |
+
"direct debit with insurence requires an extra contract. For more information, please contact your key account manager.","Für Lastschrift mit Versicherung benötigen Sie einen extra Vertrag. Bitte kontakieren Sie Ihren Key Account Ansprechpartner."
|
159 |
+
"Salutation","Anrede"
|
160 |
+
"ms","Frau"
|
161 |
+
"mr","Herr"
|
162 |
+
"Date of birth","Geburtsdatum"
|
163 |
+
|
164 |
"Canceled by user","Bezahlprozess vom Benutzer abgebrochen."
|
165 |
"Redirect to MasterPass ...","Weiterleitung zu MasterPass ..."
|
166 |
"This Transaction could not be capture online.","Diese Transaction kann nicht online erfasst werden."
|
app/locale/en_US/HeidelpayCD_Edition.csv
CHANGED
@@ -151,7 +151,12 @@
|
|
151 |
und NICHTS ANDERES an."
|
152 |
"HP_LEGALNOTE_BILLSAFE","Bitte überweisen Sie den ausstehenden Betrag {DAYS} Tage nach dem Sie über den Versand informiert wurden."
|
153 |
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
"Bank code or bic","Bank code or bic"
|
157 |
"Account number or iban","Account number or iban"
|
151 |
und NICHTS ANDERES an."
|
152 |
"HP_LEGALNOTE_BILLSAFE","Bitte überweisen Sie den ausstehenden Betrag {DAYS} Tage nach dem Sie über den Versand informiert wurden."
|
153 |
|
154 |
+
"Insurence provider","Insurence provider"
|
155 |
+
"direct debit with insurence requires an extra contract. For more information, please contact your key account manager.","direct debit with insurence requires an extra contract. For more information, please contact your key account manager."
|
156 |
+
"Salutation","Salutation"
|
157 |
+
"ms","Ms"
|
158 |
+
"mr","Mr"
|
159 |
+
"Date of birth","Date of birth"
|
160 |
|
161 |
"Bank code or bic","Bank code or bic"
|
162 |
"Account number or iban","Account number or iban"
|
js/hcd/heidelpaycd.js
CHANGED
@@ -103,7 +103,8 @@ Heidelpay.checkIban = Class.create({
|
|
103 |
var bic_id = prefix[0] + '_bic';
|
104 |
|
105 |
if($(bic_id) != undefined){
|
106 |
-
|
|
|
107 |
$(bic_id).up().hide();
|
108 |
$(bic_id).disable();
|
109 |
}else{
|
103 |
var bic_id = prefix[0] + '_bic';
|
104 |
|
105 |
if($(bic_id) != undefined){
|
106 |
+
|
107 |
+
if(value.match(/^[A-Za-z]{2}/)){
|
108 |
$(bic_id).up().hide();
|
109 |
$(bic_id).disable();
|
110 |
}else{
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HeidelpayCDEdition</name>
|
4 |
-
<version>16.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -39,13 +39,13 @@ Telefon: +49 (0) 6221 / 65 170-20<br />
|
|
39 |
E-Mail: sales@heidelpay.de<br />
|
40 |
Internet: www.heidelpay.de<br />
|
41 |
</description>
|
42 |
-
<notes>-
|
43 |
-
-
|
44 |
-
|
45 |
<authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
|
46 |
-
<date>2016-
|
47 |
-
<time>
|
48 |
-
<contents><target name="magecommunity"><dir name="HeidelpayCD"><dir name="Edition"><dir name="Block"><file name="Abstract.php" hash="e589f421bf86a643921b11d75fcbb8fb"/><file name="Button.php" hash="64dfc3786020559d2c8e2377d5c8281f"/><dir name="Form"><file name="Creditcard.php" hash="eca2833e42df4e57485afb8aeb0d6a0f"/><file name="Debit.php" hash="fb2ecd8695d813e34e4ab6b6501d359e"/><file name="Desconly.php" hash="912dd8ab02ccc24b7121d6f05255c15d"/><file name="Eps.php" hash="8698a923d04580654cacecfff64268c8"/><file name="Giropay.php" hash="aba0b69429706944ae1ac4466ab9ce3b"/><file name="Ideal.php" hash="a31bd92c30af0718e6f4347f14eba963"/><file name="Masterpass.php" hash="7fb40e7effa042586ae5ac057f12e1a9"/><file name="Postfinance.php" hash="b3a91389b3fb235eb113a919161d2476"/></dir><file name="Index.php" hash="e13d55a3c5aa1ed0ab680ae378131eee"/><dir name="Info"><file name="Debit.php" hash="888f8a1c1aaaf6974131970969caa5f2"/><file name="Invoice.php" hash="067560318d472eae2af3669ed05a7220"/><file name="Masterpass.php" hash="562c524745e0b89ea600435e38e6ce09"/></dir><dir name="Onepage"><file name="Billing.php" hash="fa35f5b8eda774a881999ebcc53ac52a"/><file name="Progress.php" hash="a717a71fd538c8fc5aa2b90de717e9ca"/><file name="Shipping.php" hash="99151e8d86b19160b633a91f0939aad6"/></dir><file name="Onepage.php" hash="51630e0804b42fead2cda80e013d5dbf"/><file name="Success.php" hash="97b586c0d2c5b16c53608b3e41f35b79"/></dir><dir name="Helper"><file name="Data.php" hash="f48ce588d187b2b890a48b8b044830c8"/><file name="Payment.php" hash="
|
49 |
<compatible/>
|
50 |
<dependencies><required><php><min>5.0.0</min><max>5.9.99</max></php></required></dependencies>
|
51 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HeidelpayCDEdition</name>
|
4 |
+
<version>16.6.22</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
39 |
E-Mail: sales@heidelpay.de<br />
|
40 |
Internet: www.heidelpay.de<br />
|
41 |
</description>
|
42 |
+
<notes>- add direct debit with incurence
|
43 |
+
- remove bic in case of sepa direct debit
|
44 |
+
</notes>
|
45 |
<authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
|
46 |
+
<date>2016-06-22</date>
|
47 |
+
<time>07:39:05</time>
|
48 |
+
<contents><target name="magecommunity"><dir name="HeidelpayCD"><dir name="Edition"><dir name="Block"><file name="Abstract.php" hash="e589f421bf86a643921b11d75fcbb8fb"/><file name="Button.php" hash="64dfc3786020559d2c8e2377d5c8281f"/><dir name="Form"><file name="Creditcard.php" hash="eca2833e42df4e57485afb8aeb0d6a0f"/><file name="Debit.php" hash="fb2ecd8695d813e34e4ab6b6501d359e"/><file name="Desconly.php" hash="912dd8ab02ccc24b7121d6f05255c15d"/><file name="Eps.php" hash="8698a923d04580654cacecfff64268c8"/><file name="Giropay.php" hash="aba0b69429706944ae1ac4466ab9ce3b"/><file name="Ideal.php" hash="a31bd92c30af0718e6f4347f14eba963"/><file name="Masterpass.php" hash="7fb40e7effa042586ae5ac057f12e1a9"/><file name="Postfinance.php" hash="b3a91389b3fb235eb113a919161d2476"/></dir><file name="Index.php" hash="e13d55a3c5aa1ed0ab680ae378131eee"/><dir name="Info"><file name="Debit.php" hash="888f8a1c1aaaf6974131970969caa5f2"/><file name="Invoice.php" hash="067560318d472eae2af3669ed05a7220"/><file name="Masterpass.php" hash="562c524745e0b89ea600435e38e6ce09"/></dir><dir name="Onepage"><file name="Billing.php" hash="fa35f5b8eda774a881999ebcc53ac52a"/><file name="Progress.php" hash="a717a71fd538c8fc5aa2b90de717e9ca"/><file name="Shipping.php" hash="99151e8d86b19160b633a91f0939aad6"/></dir><file name="Onepage.php" hash="51630e0804b42fead2cda80e013d5dbf"/><file name="Success.php" hash="97b586c0d2c5b16c53608b3e41f35b79"/></dir><dir name="Helper"><file name="Data.php" hash="f48ce588d187b2b890a48b8b044830c8"/><file name="Payment.php" hash="3e108eaa29df85448deb945453a27907"/></dir><dir name="Model"><file name="Customer.php" hash="4e65287a3d6a171444614ed580635147"/><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="9fa63b33278570af246ca8cb1cfc706e"/></dir><file name="Customer.php" hash="952d0c21f063e34b0c767968c85184d7"/><dir name="Transaction"><file name="Collection.php" hash="0b4038e511cc4d5024cafdaee9ec84e4"/></dir><file name="Transaction.php" hash="d3c544e838b9b8f39efaad4caa5d83c2"/></dir><file name="Observer.php" hash="477274c1102b35e4f73aec430e0099a9"/><dir name="Order"><dir name="Pdf"><file name="Invoice.php" hash="f8222c1be3bfa9d20d52c33cfccf9a67"/></dir></dir><dir name="Payment"><file name="Abstract.php" hash="db067886c1f94732495c9dca63b48bed"/><file name="Hcdbs.php" hash="90639d3a5099fb432750655de7d5a51a"/><file name="Hcdcc.php" hash="7ef1159ce558a399c9e12f6eebd3885f"/><file name="Hcddc.php" hash="6db05d99cd374e873866522a07a82b6a"/><file name="Hcddd.php" hash="d2f7c2709255455ded038e3e6d6d857d"/><file name="Hcdeps.php" hash="6caef61817c39c62176d0213ae309e56"/><file name="Hcdgp.php" hash="3fb1d66a07d70d744de2539758ab5197"/><file name="Hcdide.php" hash="260bbb90e918f884045a459ad346af30"/><file name="Hcdiv.php" hash="f74c4423e3694fa28bf8bc93809b9e84"/><file name="Hcdmk.php" hash="c5c618e46541ba6f23f338a2b6fbe6c5"/><file name="Hcdmpa.php" hash="5b82deca77df55c01d8198c8ed079280"/><file name="Hcdpal.php" hash="eab547d1d8f3d56203b66a6e165bb767"/><file name="Hcdpf.php" hash="c06b78f4e07001b8e838b88037ee0e63"/><file name="Hcdpp.php" hash="0dda37098aceb80ed6f0e774550ac2c9"/><file name="Hcdsu.php" hash="41b884aff43ada409a9d16e7a0f29b97"/><file name="Hcdyt.php" hash="3b378f1f52419788cc8b6aaa7fefde1b"/></dir><dir name="Resource"><file name="Encryption.php" hash="edbc116ce3c9dc815a658beb4ac7705a"/><file name="Setup.php" hash="74d6669d6d2273dd241a5064c85c1e78"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Bookingmode.php" hash="a83d2adbb54a69c0afd7ef87857672ee"/><file name="Recognition.php" hash="bec39a1786cca41140c590b86b864850"/><file name="Returnurl.php" hash="626518f91f8b0632211ac85fb658fdd7"/></dir></dir></dir><file name="Transaction.php" hash="7f29642f5699664c3b702410d0445853"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="82492b85dab9bbc31e8ff61f75b49264"/><file name="IndexController.php" hash="109a9009a41aa9ea28ef17012dc2a5b8"/><file name=".IndexController.php.swp" hash="088d8992d2e232fa2a13e17f3c785c96"/></dir><dir name="etc"><file name="config.xml" hash="4060a102f790180f5f2405e868fc7a6a"/><file name="system.xml" hash="4e6f0c20887da35b50622be1917920be"/></dir><dir name="sql"><dir name="hcd_setup"><file name="install-15.1.30.php" hash="855a7ef4800bdc2369d8146306365e64"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hcd.xml" hash="3145bd1d4a3dc99dae5b379bb81513fa"/></dir><dir name="template"><dir name="hcd"><dir name="Info"><file name="debit.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><file name="masterpass.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><dir name="pdf"><file name="invoice.phtml" hash="2202fbc5d3f77c9056b362dd96d78f4b"/></dir></dir><file name="button.phtml" hash="66ff2e82c4db439d3c616c455e8654f8"/><dir name="form"><file name="creditcard.phtml" hash="ee6297fd90757f2d5bbabf9cac866b72"/><file name="debit.phtml" hash="cb56ab2d8a54a37cbc63c25c82fdcc88"/><file name="desconly.phtml" hash="0df2f305be1337de2db69ecb93ce48b7"/><file name="eps.phtml" hash="23895dad6e135ca58473a181bf2f7388"/><file name="giropay.phtml" hash="ebcb9379429b3d47263ee97243688f3c"/><file name="ideal.phtml" hash="23895dad6e135ca58473a181bf2f7388"/><file name="masterpass.phtml" hash="d86140758d30b72389b0bc19677911ef"/><file name="postfinance.phtml" hash="0db7c2d0404efa2feb98748204bf72d4"/></dir><file name="index.phtml" hash="d76db58b6fba89c113144b5e5065539a"/><dir name="mail"><file name="hcd_payment_info.phtml" hash="1ec6d33fbb5bc8391a8295be1ffa5b38"/></dir><dir name="onepage"><file name="billing.phtml" hash="14b57c38161e6749fbc37813337c2379"/><dir name="payment"><file name="methods.phtml" hash="0e2f9e12e7dfc1070404af7dfdd7b024"/></dir><file name="payment.phtml" hash="6d452186f51dc088c5007c16ddd1cf08"/><dir name="progress"><file name="payment.phtml" hash="440f57443141d1280cf18c798cc8af10"/><file name="shipping.phtml" hash="c659abf65a13a4f1fadcec6221afd1a1"/></dir><file name="progress.phtml" hash="9527eb86ec29030f4b111455d3122388"/><file name="shipping_method.phtml" hash="79f1cc31d10a35df619b15db481e9543"/></dir><file name="onepage.phtml" hash="df4e2760e3804f7a2ff51d4b4cf74538"/><file name="success.phtml" hash="9cac258cb96b057b3de00ab971bf7855"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="hcd"><dir name="Info"><file name="masterpass.phtml" hash="4d8eed392d77abb15418562f25de9611"/><dir name="pdf"><file name="invoice.phtml" hash="c87bc83feeac048800f923a9bff2ca8d"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HeidelpayCD_Edition.xml" hash="277ef825780ed2df1f5de2cf949f842b"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="HeidelpayCD_Edition.csv" hash="3ad3d7cd0d0f4fea0f2c77cb6ba9fe8e"/></dir><dir name="en_US"><file name="HeidelpayCD_Edition.csv" hash="224ef9894000367bc92c088fa21e0a41"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="loading.gif" hash="29868a3a7094b078733caba6b192b080"/><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/><file name="masterpass_240_66.jpg" hash="7ad0078b8a27914aceb590c4100f3aa8"/></dir></dir><dir name="css"><file name="heidelpaycd.css" hash="4ec8028660fab013077cd8119396455a"/><file name="hcdcc_payment_frame.css" hash=""/><file name="hcddc_payment_frame.css" hash=""/></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="hcd"><file name="heidelpaycd.js" hash="9c3d7b865452ba0ecceb0f2f89e9172f"/><file name="heidelpaypci3.js" hash="52a3a134e9645b59a03580966f591b61"/><file name="opcheckout.js" hash="0b23200ff0fcb85f9ebbbd74fca04064"/></dir></dir></target></contents>
|
49 |
<compatible/>
|
50 |
<dependencies><required><php><min>5.0.0</min><max>5.9.99</max></php></required></dependencies>
|
51 |
</package>
|