Paymill_Paymill - Version 3.6.3

Version Notes

* improve javascript
* fix problem when a token error occurs
* online offline refund compatibility added

Download this release

Release Info

Developer PayIntelligent
Extension Paymill_Paymill
Version 3.6.3
Comparing to
See all releases


Code changes from version 3.6.0 to 3.6.3

app/code/community/Paymill/Paymill/Helper/FastCheckoutHelper.php CHANGED
@@ -77,7 +77,7 @@ class Paymill_Paymill_Helper_FastCheckoutHelper extends Mage_Core_Helper_Abstrac
77
 
78
  public function getPaymentData($code)
79
  {
80
- $payment = null;
81
  if ($this->hasData($code)) {
82
  $payments = new Services_Paymill_Payments(
83
  Mage::helper('paymill/optionHelper')->getPrivateKey(),
@@ -87,7 +87,7 @@ class Paymill_Paymill_Helper_FastCheckoutHelper extends Mage_Core_Helper_Abstrac
87
  $payment = $payments->getOne($this->getPaymentId($code));
88
 
89
  if (!array_key_exists('last4', $payment) && !array_key_exists('code', $payment)) {
90
- $payment = null;
91
  }
92
  }
93
 
77
 
78
  public function getPaymentData($code)
79
  {
80
+ $payment = array();
81
  if ($this->hasData($code)) {
82
  $payments = new Services_Paymill_Payments(
83
  Mage::helper('paymill/optionHelper')->getPrivateKey(),
87
  $payment = $payments->getOne($this->getPaymentId($code));
88
 
89
  if (!array_key_exists('last4', $payment) && !array_key_exists('code', $payment)) {
90
+ $payment = array();
91
  }
92
  }
93
 
app/code/community/Paymill/Paymill/Model/Method/MethodModelAbstract.php CHANGED
@@ -20,14 +20,6 @@
20
  */
21
  abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Payment_Model_Method_Abstract
22
  {
23
-
24
- /**
25
- * Is method a gateaway
26
- *
27
- * @var boolean
28
- */
29
- protected $_isGateway = false;
30
-
31
  /**
32
  * Can use the Authorize method
33
  *
@@ -55,27 +47,28 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
55
  * @var boolean
56
  */
57
  protected $_canCapture = true;
58
-
59
  /**
60
- * Can this method use for checkout
61
  *
62
  * @var boolean
63
  */
64
- protected $_canUseCheckout = true;
65
 
66
  /**
67
- * Can this method use for multishipping
68
  *
69
  * @var boolean
70
  */
71
- protected $_canUseForMultishipping = false;
72
 
73
  /**
74
- * Is a initalize needed
75
  *
76
  * @var boolean
77
  */
78
- protected $_isInitializeNeeded = false;
 
79
 
80
  /**
81
  * Payment Title
@@ -309,4 +302,24 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
309
  return $methods[$this->_code];
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
20
  */
21
  abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Payment_Model_Method_Abstract
22
  {
 
 
 
 
 
 
 
 
23
  /**
24
  * Can use the Authorize method
25
  *
47
  * @var boolean
48
  */
49
  protected $_canCapture = true;
50
+
51
  /**
52
+ * Can use the partial capture method
53
  *
54
  * @var boolean
55
  */
56
+ protected $_canCapturePartial = false;
57
 
58
  /**
59
+ * Can this method use for checkout
60
  *
61
  * @var boolean
62
  */
63
+ protected $_canUseCheckout = true;
64
 
65
  /**
66
+ * Can this method use for multishipping
67
  *
68
  * @var boolean
69
  */
70
+ protected $_canUseForMultishipping = false;
71
+
72
 
73
  /**
74
  * Payment Title
302
  return $methods[$this->_code];
303
  }
304
 
305
+ public function refund(\Varien_Object $payment, $amount)
306
+ {
307
+ parent::refund($payment, $amount);
308
+ $order = $payment->getOrder();
309
+ if ($order->getPayment()->getMethod() === 'paymill_creditcard' || $order->getPayment()->getMethod() === 'paymill_directdebit') {
310
+ $amount = (int) ((string) ($amount * 100));
311
+ Mage::helper('paymill/loggingHelper')->log("Trying to Refund.", var_export($order->getIncrementId(), true), $amount);
312
+
313
+ if (!Mage::helper('paymill/refundHelper')->createRefund($order, $amount)) {
314
+ Mage::throwException('Refund failed.');
315
+ }
316
+ }
317
+ return $this;
318
+ }
319
+
320
+ public function processInvoice($invoice, $payment)
321
+ {
322
+ parent::processInvoice($invoice, $payment);
323
+ $invoice->setTransactionId(Mage::helper('paymill/transactionHelper')->getTransactionId($payment->getOrder()));
324
+ }
325
  }
app/code/community/Paymill/Paymill/Model/Method/MethodModelCreditcard.php CHANGED
@@ -20,7 +20,6 @@
20
  */
21
  class Paymill_Paymill_Model_Method_MethodModelCreditcard extends Paymill_Paymill_Model_Method_MethodModelAbstract
22
  {
23
-
24
  /**
25
  * Magento method code
26
  *
@@ -49,6 +48,7 @@ class Paymill_Paymill_Model_Method_MethodModelCreditcard extends Paymill_Paymill
49
  */
50
  public function capture(Varien_Object $payment, $amount)
51
  {
 
52
  //Initalizing variables and helpers
53
  $transactionHelper = Mage::helper("paymill/transactionHelper");
54
  $order = $payment->getOrder();
20
  */
21
  class Paymill_Paymill_Model_Method_MethodModelCreditcard extends Paymill_Paymill_Model_Method_MethodModelAbstract
22
  {
 
23
  /**
24
  * Magento method code
25
  *
48
  */
49
  public function capture(Varien_Object $payment, $amount)
50
  {
51
+ parent::capture($payment, $amount);
52
  //Initalizing variables and helpers
53
  $transactionHelper = Mage::helper("paymill/transactionHelper");
54
  $order = $payment->getOrder();
app/code/community/Paymill/Paymill/Model/Observer.php CHANGED
@@ -43,6 +43,8 @@ class Paymill_Paymill_Model_Observer
43
  ->addObject($invoice->getOrder())
44
  ->save();
45
 
 
 
46
  $invoice->pay()->save();
47
 
48
  $invoice->sendEmail(Mage::getStoreConfig('payment/paymill_creditcard/send_invoice_mail', Mage::app()->getStore()->getStoreId()), '');
@@ -54,24 +56,5 @@ class Paymill_Paymill_Model_Observer
54
  }
55
  }
56
  }
57
-
58
- /**
59
- * Registered for the sales_order_creditmemo_refund event
60
- * Creates a refund based on the created creditmemo
61
- * @param Varien_Event_Observer $observer
62
- */
63
- public function refundCreditmemo(Varien_Event_Observer $observer)
64
- {
65
- $creditmemo = $observer->getEvent()->getCreditmemo();
66
- $order = $creditmemo->getOrder();
67
- if ($order->getPayment()->getMethod() === 'paymill_creditcard' || $order->getPayment()->getMethod() === 'paymill_directdebit') {
68
- $amount = (int) ((string) ($creditmemo->getGrandTotal() * 100));
69
- Mage::helper('paymill/loggingHelper')->log("Trying to Refund.", var_export($order->getIncrementId(), true), $amount);
70
- if (!Mage::helper('paymill/refundHelper')->createRefund($order, $amount)) {
71
- Mage::throwException('Refund failed.');
72
- }
73
- }
74
- }
75
-
76
  }
77
 
43
  ->addObject($invoice->getOrder())
44
  ->save();
45
 
46
+ $invoice->setTransactionId(Mage::helper('paymill/transactionHelper')->getTransactionId($order));
47
+
48
  $invoice->pay()->save();
49
 
50
  $invoice->sendEmail(Mage::getStoreConfig('payment/paymill_creditcard/send_invoice_mail', Mage::app()->getStore()->getStoreId()), '');
56
  }
57
  }
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
app/code/community/Paymill/Paymill/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Paymill_Paymill>
5
- <version>3.6.0</version>
6
  </Paymill_Paymill>
7
  </modules>
8
 
@@ -135,17 +135,6 @@
135
  </paymill>
136
  </updates>
137
  </layout>
138
- <events>
139
- <sales_order_creditmemo_refund>
140
- <observers>
141
- <paymill_paymill_model_observer>
142
- <type>model</type>
143
- <class>Paymill_Paymill_Model_Observer</class>
144
- <method>refundCreditmemo</method>
145
- </paymill_paymill_model_observer>
146
- </observers>
147
- </sales_order_creditmemo_refund>
148
- </events>
149
 
150
  <global_search>
151
  <paymill_search>
2
  <config>
3
  <modules>
4
  <Paymill_Paymill>
5
+ <version>3.6.2</version>
6
  </Paymill_Paymill>
7
  </modules>
8
 
135
  </paymill>
136
  </updates>
137
  </layout>
 
 
 
 
 
 
 
 
 
 
 
138
 
139
  <global_search>
140
  <paymill_search>
app/code/community/Paymill/Paymill/etc/system.xml CHANGED
@@ -11,7 +11,7 @@
11
  <sort_order>700</sort_order>
12
  <fields>
13
  <version>
14
- <label>v3.6.0</label>
15
  <sort_order>1</sort_order>
16
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
17
  <frontend_type>label</frontend_type>
@@ -77,7 +77,7 @@
77
  <sort_order>800</sort_order>
78
  <fields>
79
  <version>
80
- <label>v3.6.0</label>
81
  <sort_order>100</sort_order>
82
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
83
  <frontend_type>label</frontend_type>
@@ -152,6 +152,14 @@
152
  <preAuth_active>0</preAuth_active>
153
  </depends>
154
  </send_invoice_mail>
 
 
 
 
 
 
 
 
155
  <sort_order translate="label">
156
  <label>paymill_opt_Sort</label>
157
  <frontend_type>text</frontend_type>
@@ -171,7 +179,7 @@
171
  <sort_order>800</sort_order>
172
  <fields>
173
  <version>
174
- <label>v3.6.0</label>
175
  <sort_order>100</sort_order>
176
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
177
  <frontend_type>label</frontend_type>
@@ -229,11 +237,19 @@
229
  <label>paymill_activate_sepa</label>
230
  <frontend_type>select</frontend_type>
231
  <source_model>adminhtml/system_config_source_yesno</source_model>
232
- <sort_order>355</sort_order>
233
  <show_in_default>1</show_in_default>
234
  <show_in_website>1</show_in_website>
235
  <show_in_store>1</show_in_store>
236
  </sepa>
 
 
 
 
 
 
 
 
237
  <sort_order translate="label">
238
  <label>paymill_opt_Sort</label>
239
  <frontend_type>text</frontend_type>
11
  <sort_order>700</sort_order>
12
  <fields>
13
  <version>
14
+ <label>v3.6.3</label>
15
  <sort_order>1</sort_order>
16
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
17
  <frontend_type>label</frontend_type>
77
  <sort_order>800</sort_order>
78
  <fields>
79
  <version>
80
+ <label>v3.6.3</label>
81
  <sort_order>100</sort_order>
82
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
83
  <frontend_type>label</frontend_type>
152
  <preAuth_active>0</preAuth_active>
153
  </depends>
154
  </send_invoice_mail>
155
+ <checkout_desc translate="label">
156
+ <label>paymill_checkout_desc</label>
157
+ <sort_order>380</sort_order>
158
+ <frontend_type>textarea</frontend_type>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </checkout_desc>
163
  <sort_order translate="label">
164
  <label>paymill_opt_Sort</label>
165
  <frontend_type>text</frontend_type>
179
  <sort_order>800</sort_order>
180
  <fields>
181
  <version>
182
+ <label>v3.6.3</label>
183
  <sort_order>100</sort_order>
184
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
185
  <frontend_type>label</frontend_type>
237
  <label>paymill_activate_sepa</label>
238
  <frontend_type>select</frontend_type>
239
  <source_model>adminhtml/system_config_source_yesno</source_model>
240
+ <sort_order>365</sort_order>
241
  <show_in_default>1</show_in_default>
242
  <show_in_website>1</show_in_website>
243
  <show_in_store>1</show_in_store>
244
  </sepa>
245
+ <checkout_desc translate="label">
246
+ <label>paymill_checkout_desc</label>
247
+ <sort_order>370</sort_order>
248
+ <frontend_type>textarea</frontend_type>
249
+ <show_in_default>1</show_in_default>
250
+ <show_in_website>1</show_in_website>
251
+ <show_in_store>1</show_in_store>
252
+ </checkout_desc>
253
  <sort_order translate="label">
254
  <label>paymill_opt_Sort</label>
255
  <frontend_type>text</frontend_type>
app/design/frontend/base/default/template/paymill/payment/form/creditcard.phtml CHANGED
@@ -1,5 +1,4 @@
1
  <?php $_code = $this->getMethodCode(); ?>
2
- <div id="paymill-layer"></div>
3
  <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
4
  <li>
5
  <label for="<?php echo $_code ?>_holdername" class="required"><em>*</em><?php echo $this->__("paymill_Holder") ?></label>
@@ -42,6 +41,7 @@
42
  <input class="paymill-payment-token-cc paymill-validate-cc-token" name="payment[paymill-payment-token-cc]" id="payment[paymill-payment-token-cc]" type="hidden" />
43
  <input class="paymill_3ds_cancel" type="hidden" value="<?php echo $this->__("paymill_3ds_cancel"); ?>"/>
44
  <input class="paymill-payment-token-url-cc" type="hidden" value="<?php echo $this->getUrl('paymill/token/total', array('_secure'=>true)); ?>"/>
 
45
  <input class="paymill-payment-currency-cc" type="hidden" value="<?php echo Mage::helper('paymill/paymentHelper')->getCurrency(); ?>"/>
46
  <input class="paymill-option-debug-cc" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->isInDebugMode(); ?>"/>
47
  <input class="paymill-info-public_key-cc" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->getPublicKey(); ?>"/>
@@ -73,10 +73,18 @@
73
  <input class="PAYMILL_field_invalid_country-cc" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_country"); ?>"/>
74
  <input class="PAYMILL_field_invalid_bank_data-cc" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_bank_data"); ?>"/>
75
  </li>
 
 
 
 
 
76
  </ul>
77
 
78
  <script type="text/javascript">
79
  //<![CDATA[
80
- addPaymillEvents();
 
 
 
81
  //]]>
82
  </script>
1
  <?php $_code = $this->getMethodCode(); ?>
 
2
  <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
  <li>
4
  <label for="<?php echo $_code ?>_holdername" class="required"><em>*</em><?php echo $this->__("paymill_Holder") ?></label>
41
  <input class="paymill-payment-token-cc paymill-validate-cc-token" name="payment[paymill-payment-token-cc]" id="payment[paymill-payment-token-cc]" type="hidden" />
42
  <input class="paymill_3ds_cancel" type="hidden" value="<?php echo $this->__("paymill_3ds_cancel"); ?>"/>
43
  <input class="paymill-payment-token-url-cc" type="hidden" value="<?php echo $this->getUrl('paymill/token/total', array('_secure'=>true)); ?>"/>
44
+ <input class="paymill-payment-token-log-cc" type="hidden" value="<?php echo $this->getUrl('paymill/token/log', array('_secure'=>true)); ?>"/>
45
  <input class="paymill-payment-currency-cc" type="hidden" value="<?php echo Mage::helper('paymill/paymentHelper')->getCurrency(); ?>"/>
46
  <input class="paymill-option-debug-cc" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->isInDebugMode(); ?>"/>
47
  <input class="paymill-info-public_key-cc" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->getPublicKey(); ?>"/>
73
  <input class="PAYMILL_field_invalid_country-cc" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_country"); ?>"/>
74
  <input class="PAYMILL_field_invalid_bank_data-cc" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_bank_data"); ?>"/>
75
  </li>
76
+ <?php if (!is_null(Mage::getStoreConfig('payment/paymill_creditcard/checkout_desc', Mage::app()->getStore()->getStoreId()))): ?>
77
+ <li>
78
+ <?php echo Mage::getStoreConfig('payment/paymill_creditcard/checkout_desc', Mage::app()->getStore()->getStoreId()); ?>
79
+ </li>
80
+ <?php endif; ?>
81
  </ul>
82
 
83
  <script type="text/javascript">
84
  //<![CDATA[
85
+ paymillCc = new Paymill();
86
+ paymillCc.setPaymillCode('<?php echo $_code; ?>');
87
+ paymillCc.setCodes();
88
+ paymillCc.addPaymillEvents();
89
  //]]>
90
  </script>
app/design/frontend/base/default/template/paymill/payment/form/directdebit.phtml CHANGED
@@ -42,6 +42,7 @@
42
  <input class="paymill-info-public_key-elv" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->getPublicKey(); ?>" />
43
  <input class="paymill-info-fastCheckout-elv" type="hidden" value="<?php echo $this->isNormalCheckout($_code); ?>" />
44
  <input class="paymill-info-sepa-elv" type="hidden" value="<?php echo $this->isSepa(); ?>" />
 
45
  <input class="paymill-payment-error-number-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_number_elv"); ?>" />
46
  <input class="paymill-payment-error-holder-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_holder_elv"); ?>" />
47
  <input class="paymill-payment-error-bankcode" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_bankcode"); ?>" />
@@ -68,9 +69,17 @@
68
  <input class="PAYMILL_field_invalid_country-elv" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_country"); ?>"/>
69
  <input class="PAYMILL_field_invalid_bank_data-elv" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_bank_data"); ?>"/>
70
  </li>
 
 
 
 
 
71
  </ul>
72
  <script type="text/javascript">
73
  //<![CDATA[
74
- addPaymillEvents();
 
 
 
75
  //]]>
76
  </script>
42
  <input class="paymill-info-public_key-elv" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->getPublicKey(); ?>" />
43
  <input class="paymill-info-fastCheckout-elv" type="hidden" value="<?php echo $this->isNormalCheckout($_code); ?>" />
44
  <input class="paymill-info-sepa-elv" type="hidden" value="<?php echo $this->isSepa(); ?>" />
45
+ <input class="paymill-payment-token-log-elv" type="hidden" value="<?php echo $this->getUrl('paymill/token/log', array('_secure'=>true)); ?>"/>
46
  <input class="paymill-payment-error-number-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_number_elv"); ?>" />
47
  <input class="paymill-payment-error-holder-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_holder_elv"); ?>" />
48
  <input class="paymill-payment-error-bankcode" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_bankcode"); ?>" />
69
  <input class="PAYMILL_field_invalid_country-elv" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_country"); ?>"/>
70
  <input class="PAYMILL_field_invalid_bank_data-elv" type="hidden" value="<?php echo $this->__("PAYMILL_field_invalid_bank_data"); ?>"/>
71
  </li>
72
+ <?php if (!is_null(Mage::getStoreConfig('payment/paymill_directdebit/checkout_desc', Mage::app()->getStore()->getStoreId()))): ?>
73
+ <li>
74
+ <?php echo Mage::getStoreConfig('payment/paymill_directdebit/checkout_desc', Mage::app()->getStore()->getStoreId()); ?>
75
+ </li>
76
+ <?php endif; ?>
77
  </ul>
78
  <script type="text/javascript">
79
  //<![CDATA[
80
+ paymillElv = new Paymill();
81
+ paymillElv.setPaymillCode('<?php echo $_code; ?>');
82
+ paymillElv.setCodes();
83
+ paymillElv.addPaymillEvents();
84
  //]]>
85
  </script>
app/locale/de_DE/Paymill_Paymill.csv CHANGED
@@ -59,6 +59,7 @@
59
  "paymill_error_text_invalid_cvc", "Ungültige CVC"
60
  "paymill_3ds_cancel", "Abbrechen"
61
  "paymill_cvc_tooltip", "Hinter dem CVV-Code bzw. CVC verbirgt sich ein Sicherheitsmerkmal von Kreditkarten, üblicherweise handelt es sich dabei um eine drei- bis vierstelligen Nummer. Der CVV-Code befindet sich auf VISA-Kreditkarten. Der gleiche Code ist auch auf MasterCard-Kreditkarten zu finden, hier allerdings unter dem Namen CVC. Die Abkürzung CVC steht dabei für Card Validation Code. Bei VISA wird der Code als Card Verification Value-Code bezeichnet. Ähnlich wie bei Mastercard und VISA gibt es auch bei Diners Club, Discover und JCB eine dreistellige Nummer, die meist auf der Rückseite der Karte zu finden ist. Bei Maestro-Karten gibt es mit und ohne dreistelligen CVV. Wird eine Maestro-Karte ohne CVV verwendet kann einfach 000 eingetragen werden. American Express verwendet die CID (Card Identification Number). Dabei handelt es sich um eine vierstellige Nummer, die meist auf der Vorderseite der Karte, rechts oberhalb der Kartennummer zu finden ist."
 
62
  "General undefined response.", "Genereller Fehler, bitte wenden Sie sich an den Support"
63
  "Still waiting on something.", "Wir warten noch immer auf etwas."
64
  "General success response.", "General success response."
59
  "paymill_error_text_invalid_cvc", "Ungültige CVC"
60
  "paymill_3ds_cancel", "Abbrechen"
61
  "paymill_cvc_tooltip", "Hinter dem CVV-Code bzw. CVC verbirgt sich ein Sicherheitsmerkmal von Kreditkarten, üblicherweise handelt es sich dabei um eine drei- bis vierstelligen Nummer. Der CVV-Code befindet sich auf VISA-Kreditkarten. Der gleiche Code ist auch auf MasterCard-Kreditkarten zu finden, hier allerdings unter dem Namen CVC. Die Abkürzung CVC steht dabei für Card Validation Code. Bei VISA wird der Code als Card Verification Value-Code bezeichnet. Ähnlich wie bei Mastercard und VISA gibt es auch bei Diners Club, Discover und JCB eine dreistellige Nummer, die meist auf der Rückseite der Karte zu finden ist. Bei Maestro-Karten gibt es mit und ohne dreistelligen CVV. Wird eine Maestro-Karte ohne CVV verwendet kann einfach 000 eingetragen werden. American Express verwendet die CID (Card Identification Number). Dabei handelt es sich um eine vierstellige Nummer, die meist auf der Vorderseite der Karte, rechts oberhalb der Kartennummer zu finden ist."
62
+ "paymill_checkout_desc", "Beschreibender Text"
63
  "General undefined response.", "Genereller Fehler, bitte wenden Sie sich an den Support"
64
  "Still waiting on something.", "Wir warten noch immer auf etwas."
65
  "General success response.", "General success response."
app/locale/en_GB/Paymill_Paymill.csv CHANGED
@@ -59,6 +59,7 @@
59
  "paymill_error_text_invalid_cvc", "Invalid cvc"
60
  "paymill_3ds_cancel", "cancel"
61
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
 
62
  "General undefined response.", "General undefined response."
63
  "Still waiting on something.", "Still waiting on something."
64
  "General success response.", "General success response."
59
  "paymill_error_text_invalid_cvc", "Invalid cvc"
60
  "paymill_3ds_cancel", "cancel"
61
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
62
+ "paymill_checkout_desc", "Descriptive Text"
63
  "General undefined response.", "General undefined response."
64
  "Still waiting on something.", "Still waiting on something."
65
  "General success response.", "General success response."
app/locale/en_US/Paymill_Paymill.csv CHANGED
@@ -58,6 +58,7 @@
58
  "paymill_slogan_elv","Direct debit payments powered by "
59
  "paymill_error_text_invalid_cvc", "Invalid cvc"
60
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
 
61
  "General undefined response.", "General undefined response."
62
  "Still waiting on something.", "Still waiting on something."
63
  "General success response.", "General success response."
58
  "paymill_slogan_elv","Direct debit payments powered by "
59
  "paymill_error_text_invalid_cvc", "Invalid cvc"
60
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
61
+ "paymill_checkout_desc", "Descriptive Text"
62
  "General undefined response.", "General undefined response."
63
  "Still waiting on something.", "Still waiting on something."
64
  "General success response.", "General success response."
app/locale/es_ES/Paymill_Paymill.csv CHANGED
@@ -58,6 +58,7 @@
58
  "paymill_slogan_elv","Pagos con Débito directo por "
59
  "paymill_error_text_invalid_cvc", "cvc incorrecto"
60
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
 
61
  "General undefined response.", "General undefined response."
62
  "Still waiting on something.", "Still waiting on something."
63
  "General success response.", "General success response."
58
  "paymill_slogan_elv","Pagos con Débito directo por "
59
  "paymill_error_text_invalid_cvc", "cvc incorrecto"
60
  "paymill_cvc_tooltip", "What is a CVV/CVC number? Prospective credit cards will have a 3 to 4-digit number, usually on the back of the card. It ascertains that the payment is carried out by the credit card holder and the card account is legitimate. On Visa the CVV (Card Verification Value) appears after and to the right of your card number. Same goes for Mastercard’s CVC (Card Verfication Code), which also appears after and to the right of your card number, and has 3-digits. Diners Club, Discover, and JCB credit and debit cards have a three-digit card security code which also appears after and to the right of your card number. The American Express CID (Card Identification Number) is a 4-digit number printed on the front of your card. It appears above and to the right of your card number. On Maestro the CVV appears after and to the right of your number. If you don’t have a CVV for your Maestro card you can use 000."
61
+ "paymill_checkout_desc", "Descriptive Text"
62
  "General undefined response.", "General undefined response."
63
  "Still waiting on something.", "Still waiting on something."
64
  "General success response.", "General success response."
js/paymill/paymentForm.js CHANGED
@@ -1,16 +1,24 @@
1
- //Backend Options
2
  var PAYMILL_PUBLIC_KEY = null;
3
 
4
- //State Descriptors
5
- var PAYMILL_PAYMENT_NAME = "Preparing Payment";
6
- var PAYMILL_IMAGE_PATH = null;
 
 
 
7
 
8
- //Errortexts
9
- var PAYMILL_ERROR_STRING = "";
 
 
10
 
11
- var eventFlag = false;
 
 
 
 
12
 
13
- function getPaymillCode()
14
  {
15
  var methods = {
16
  paymill_creditcard: "cc",
@@ -28,18 +36,20 @@ function getPaymillCode()
28
  * prints debug messages in the log if debug mode is active
29
  * @param {String} message
30
  */
31
- function debug(message)
32
  {
33
- debug_state = pmQuery('.paymill-option-debug-' + getPaymillCode()).val();
34
- if (debug_state === 1) {
35
  var displayName = "";
36
- if (PAYMILL_PAYMENT_NAME === 'paymill_creditcard') {
37
  displayName = 'Credit Card';
38
  }
39
- if (PAYMILL_PAYMENT_NAME === 'paymill_directdebit') {
 
40
  displayName = 'Direct Debit';
41
  }
42
- if (PAYMILL_PAYMENT_NAME === 'Preparing Payment') {
 
43
  displayName = 'Preparing Payment';
44
  }
45
 
@@ -47,64 +57,73 @@ function debug(message)
47
  }
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Event Handler for the display of the card icons
52
  */
53
- function paymillShowCardIcon()
54
  {
55
- var brand = paymill.cardType(pmQuery('#paymill_creditcard_number').val());
56
  brand = brand.toLowerCase();
57
- pmQuery("#paymill_creditcard_number")[0].className = pmQuery("#paymill_creditcard_number")[0].className.replace(/paymill-card-number-.*/g, '');
58
  if (brand !== 'unknown') {
59
  if (brand === 'american express') {
60
  brand = 'amex';
61
  }
62
 
63
- pmQuery('#paymill_creditcard_number').addClass("paymill-card-number-" + brand);
64
  }
65
  }
66
 
67
- /**
68
- * Handles the response of the paymill bridge. saves the token in a formfield.
69
- * @param {Boolean} error
70
- * @param {response object} result
71
- */
72
- function paymillResponseHandler(error, result)
73
- {
74
- if (error) {
75
- // Appending error
76
- var nv = {};
77
- nv['paymill-validate-' + getPaymillCode() + '-token'] = new Validator(
78
- 'paymill-validate-' + getPaymillCode() + '-token',
79
- getValueIfExist('.paymill-payment-error-' + getPaymillCode() + '-token') + error.message,
80
- function(v) {
81
- return false;
82
- },
83
- ''
84
- );
85
-
86
- Object.extend(Validation.methods, nv);
87
-
88
- logError(error);
89
-
90
- debug(error.apierror);
91
- debug(error.message);
92
- debug("Paymill Response Handler triggered: Error.");
93
- } else {
94
- // Appending Token to form
95
- debug("Saving Token in Form: " + result.token);
96
- pmQuery('.paymill-payment-token-' + getPaymillCode()).val(result.token);
97
- }
98
-
99
- pmQuery('#paymill-layer').removeClass("paymill-layer");
100
- }
101
-
102
- function getValueIfExist(selector)
103
  {
104
  if ($$(selector)[0]) {
105
  return $$(selector)[0].value;
106
  }
107
-
108
  return '';
109
  }
110
 
@@ -112,115 +131,114 @@ function getValueIfExist(selector)
112
  *
113
  * @returns {Boolean}
114
  */
115
- function paymillSubmitForm()
116
  {
117
- PAYMILL_PUBLIC_KEY = pmQuery('.paymill-info-public_key-' + getPaymillCode()).val();
118
- PAYMILL_PAYMENT_NAME = pmQuery("input[name='payment[method]']:checked").val();
119
-
120
- switch (PAYMILL_PAYMENT_NAME) {
121
- case "paymill_creditcard":
122
  paymill.config('3ds_cancel_label', pmQuery('.paymill_3ds_cancel').val());
123
  if (pmQuery('.paymill-info-fastCheckout-cc').val() === 'false') {
124
- var valid = (paymill.validateCvc(pmQuery('#paymill_creditcard_cvc').val()) || paymill.cardType(pmQuery('#paymill_creditcard_number').val()).toLowerCase() === 'maestro')
125
- && paymill.validateHolder(pmQuery('#paymill_creditcard_holdername').val())
126
- && paymill.validateExpiry(pmQuery('#paymill_creditcard_expiry_month').val(), pmQuery('#paymill_creditcard_expiry_year').val())
127
- && paymill.validateCardNumber(pmQuery('#paymill_creditcard_number').val());
128
 
129
  if (!valid) {
130
  return false;
131
  }
132
-
133
- pmQuery('#paymill-layer').addClass("paymill-layer");
134
 
135
  var cvc = '000';
136
 
137
- if (pmQuery('#paymill_creditcard_cvc').val() !== '') {
138
- cvc = pmQuery('#paymill_creditcard_cvc').val();
139
  }
140
-
141
- debug("Generating Token");
142
  paymill.createToken({
143
- amount_int: parseInt(getTokenAmount()),
144
- currency: pmQuery('.paymill-payment-currency-' + getPaymillCode()).val(), // ISO 4217 e.g. "EUR"
145
- number: pmQuery('#paymill_creditcard_number').val(),
146
- exp_month: pmQuery('#paymill_creditcard_expiry_month').val(),
147
- exp_year: pmQuery('#paymill_creditcard_expiry_year').val(),
148
  cvc: cvc,
149
- cardholder: pmQuery('#paymill_creditcard_holdername').val()
150
  }, paymillResponseHandler);
151
  }
152
  break;
153
- case "paymill_directdebit":
154
  if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'false') {
155
  if (pmQuery('.paymill-info-sepa-elv').val() === 'false') {
156
- var valid = pmQuery('#paymill_directdebit_holdername').val() !== ''
157
- && paymill.validateAccountNumber(pmQuery('#paymill_directdebit_account').val())
158
- && paymill.validateBankCode(pmQuery('#paymill_directdebit_bankcode').val());
159
 
160
  if (!valid) {
161
  return false;
162
  }
163
 
164
- debug("Generating Token");
165
  paymill.createToken({
166
- number: pmQuery('#paymill_directdebit_account').val(),
167
- bank: pmQuery('#paymill_directdebit_bankcode').val(),
168
- accountholder: pmQuery('#paymill_directdebit_holdername').val()
169
  }, paymillResponseHandler);
170
  } else {
171
- var valid = pmQuery('#paymill_directdebit_holdername').val() !== ''
172
- && pmQuery('#paymill_directdebit_iban').val() !== ''
173
- && pmQuery('#paymill_directdebit_bic').val() !== '';
174
 
175
  if (!valid) {
176
  return false;
177
  }
178
 
179
- debug("Generating Token");
180
  paymill.createToken({
181
- iban: pmQuery('#paymill_directdebit_iban').val(),
182
- bic: pmQuery('#paymill_directdebit_bic').val(),
183
- accountholder: pmQuery('#paymill_directdebit_holdername').val()
184
  }, paymillResponseHandler);
185
  }
186
  }
187
-
188
  break;
189
  }
190
 
191
  return false;
192
  }
193
 
194
- function logError(data)
195
  {
 
196
  pmQuery.ajax({
197
  async: false,
198
  type: "POST",
199
- url: pmQuery('.paymill-payment-token-url-' + getPaymillCode()).val() + 'log',
200
  data: {error: data},
201
  }).done(function(msg) {
202
- debug('Logging done.');
203
  }).fail(function(jqXHR, textStatus) {
204
- debug('Logging failed.');
205
  });
206
  }
207
 
208
- function getTokenAmount()
209
- {
 
210
  var returnVal = null;
211
  pmQuery.ajax({
212
  async: false,
213
  type: "POST",
214
- url: pmQuery('.paymill-payment-token-url-cc').val() + "total",
215
  }).done(function(msg) {
216
  returnVal = msg;
217
  }).fail(function(jqXHR, textStatus) {
218
  // Appending error
219
  var nv = {};
220
-
221
- nv['paymill-validate-' + getPaymillCode() + '-token'] = new Validator(
222
- 'paymill-validate-' + getPaymillCode() + '-token',
223
- getValueIfExist('.paymill-payment-error-' + getPaymillCode() + '-token') + " Amount not accessable. Reason: " + textStatus,
224
  function(v) {
225
  return v !== '';
226
  },
@@ -229,11 +247,11 @@ function getTokenAmount()
229
 
230
  Object.extend(Validation.methods, nv);
231
  });
232
-
233
  return returnVal;
234
  }
235
 
236
- function unsetElvValidationRules()
237
  {
238
  var nvElv = {
239
  'paymill-validate-dd-holdername': new Validator(
@@ -246,7 +264,7 @@ function unsetElvValidationRules()
246
  ),
247
  'paymill-validate-dd-iban': new Validator(
248
  'paymill-validate-dd-iban',
249
- getValueIfExist('.paymill-payment-error-iban-elv'),
250
  function(v) {
251
  return true;
252
  },
@@ -254,7 +272,7 @@ function unsetElvValidationRules()
254
  ),
255
  'paymill-validate-dd-bic': new Validator(
256
  'paymill-validate-dd-bic',
257
- getValueIfExist('.paymill-payment-error-bic-elv'),
258
  function(v) {
259
  return true;
260
  },
@@ -281,7 +299,7 @@ function unsetElvValidationRules()
281
  Object.extend(Validation.methods, nvElv);
282
  }
283
 
284
- function unsetCcValidationRules()
285
  {
286
  var nvCc = {
287
  'paymill-validate-cc-number': new Validator(
@@ -329,12 +347,12 @@ function unsetCcValidationRules()
329
  Object.extend(Validation.methods, nvCc);
330
  }
331
 
332
- function setElvValidationRules()
333
  {
334
  var nvElv = {
335
  'paymill-validate-dd-holdername': new Validator(
336
  'paymill-validate-dd-holdername',
337
- getValueIfExist('.paymill-payment-error-holder-elv'),
338
  function(v) {
339
  return !(v === '');
340
  },
@@ -342,7 +360,7 @@ function setElvValidationRules()
342
  ),
343
  'paymill-validate-dd-iban': new Validator(
344
  'paymill-validate-dd-iban',
345
- getValueIfExist('.paymill-payment-error-iban-elv'),
346
  function(v) {
347
  return !(v === '');
348
  },
@@ -350,7 +368,7 @@ function setElvValidationRules()
350
  ),
351
  'paymill-validate-dd-bic': new Validator(
352
  'paymill-validate-dd-bic',
353
- getValueIfExist('.paymill-payment-error-bic-elv'),
354
  function(v) {
355
  return !(v === '');
356
  },
@@ -358,7 +376,7 @@ function setElvValidationRules()
358
  ),
359
  'paymill-validate-dd-account': new Validator(
360
  'paymill-validate-dd-account',
361
- getValueIfExist('.paymill-payment-error-number-elv'),
362
  function(v) {
363
  return paymill.validateAccountNumber(v);
364
  },
@@ -366,7 +384,7 @@ function setElvValidationRules()
366
  ),
367
  'paymill-validate-dd-bankcode': new Validator(
368
  'paymill-validate-dd-bankcode',
369
- getValueIfExist('.paymill-payment-error-bankcode'),
370
  function(v) {
371
  return paymill.validateBankCode(v);
372
  },
@@ -377,12 +395,13 @@ function setElvValidationRules()
377
  Object.extend(Validation.methods, nvElv);
378
  }
379
 
380
- function setCcValidationRules()
381
  {
 
382
  var nvCc = {
383
  'paymill-validate-cc-number': new Validator(
384
  'paymill-validate-cc-number',
385
- getValueIfExist('.paymill-payment-error-number'),
386
  function(v) {
387
  return paymill.validateCardNumber(v);
388
  },
@@ -390,23 +409,24 @@ function setCcValidationRules()
390
  ),
391
  'paymill-validate-cc-expdate-month': new Validator(
392
  'paymill-validate-cc-expdate-month',
393
- getValueIfExist('.paymill-payment-error-expdate'),
394
  function(v) {
395
- return paymill.validateExpiry(pmQuery('#paymill_creditcard_expiry_month').val(), pmQuery('#paymill_creditcard_expiry_year').val());
 
396
  },
397
  ''
398
  ),
399
  'paymill-validate-cc-expdate-year': new Validator(
400
  'paymill-validate-cc-expdate-year',
401
- getValueIfExist('.paymill-payment-error-expdate'),
402
  function(v) {
403
- return paymill.validateExpiry(pmQuery('#paymill_creditcard_expiry_month').val(), pmQuery('#paymill_creditcard_expiry_year').val());
404
  },
405
  ''
406
  ),
407
  'paymill-validate-cc-holder': new Validator(
408
  'paymill-validate-cc-holder',
409
- getValueIfExist('.paymill-payment-error-holder'),
410
  function(v) {
411
  return (paymill.validateHolder(v));
412
  },
@@ -414,9 +434,9 @@ function setCcValidationRules()
414
  ),
415
  'paymill-validate-cc-cvc': new Validator(
416
  'paymill-validate-cc-cvc',
417
- getValueIfExist('.paymill-payment-error-cvc'),
418
  function(v) {
419
- if (paymill.cardType(pmQuery('#paymill_creditcard_number').val()).toLowerCase() === 'maestro') {
420
  return true;
421
  }
422
 
@@ -429,111 +449,188 @@ function setCcValidationRules()
429
  Object.extend(Validation.methods, nvCc);
430
  }
431
 
432
- function addPaymillEvents()
433
  {
434
- setElvValidationRules();
435
-
436
- setCcValidationRules();
437
 
 
 
 
 
438
  if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'true') {
439
- unsetElvValidationRules();
440
  }
441
-
442
  if (pmQuery('.paymill-info-fastCheckout-cc').val() === 'true') {
443
- unsetCcValidationRules();
444
  }
445
-
446
- pmQuery('#paymill_directdebit_iban').keyup(function() {
447
- var iban = pmQuery('#paymill_directdebit_iban').val();
448
- if (!iban.match(/^DE/)) {
449
- var newVal = "DE";
450
- if (iban.match(/^.{2}(.*)/)) {
451
- newVal += iban.match(/^.{2}(.*)/)[1];
452
- }
453
- pmQuery('#paymill_directdebit_iban').val(newVal);
454
  }
 
 
 
455
  });
456
-
457
- pmQuery('#paymill_directdebit_iban').trigger('keyup');
458
-
459
- if (!eventFlag) {
460
 
461
- pmQuery('#paymill_directdebit_holdername').live('input', function() {
462
- setElvValidationRules();
 
 
 
 
463
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
464
  });
465
 
466
- pmQuery('#paymill_directdebit_account').live('input', function() {
467
- setElvValidationRules();
468
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
469
  });
470
 
471
- pmQuery('#paymill_directdebit_bankcode').live('input', function() {
472
- setElvValidationRules();
 
 
 
 
 
 
 
 
 
 
473
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
474
  });
475
 
476
- pmQuery('#paymill_creditcard_holdername').live('input', function() {
477
- setCcValidationRules();
478
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
479
  });
480
 
481
- pmQuery('#paymill_creditcard_cvc').live('input', function() {
482
- setCcValidationRules();
483
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
484
  });
485
 
486
- pmQuery('#paymill_creditcard_number').live('input', function() {
487
- setCcValidationRules();
488
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
489
  });
490
 
491
- pmQuery('#paymill_creditcard_expiry_month').live('change', function() {
492
- setCcValidationRules();
493
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
494
  });
495
 
496
- pmQuery('#paymill_creditcard_expiry_year').live('change', function() {
497
- setCcValidationRules();
498
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
499
  });
500
 
501
- pmQuery('#paymill_creditcard_number').live('input', function() {
502
- paymillShowCardIcon();
503
  });
504
 
505
- pmQuery('#paymill_creditcard_cvc').live('input', function() {
506
- paymillSubmitForm();
507
  });
508
 
509
- pmQuery('#paymill_creditcard_expiry_month').live('change', function() {
510
- paymillSubmitForm();
511
  });
512
 
513
- pmQuery('#paymill_creditcard_expiry_year').live('change', function() {
514
- paymillSubmitForm();
515
  });
516
 
517
- pmQuery('#paymill_creditcard_number').live('input', function() {
518
- paymillSubmitForm();
519
  });
520
-
521
- pmQuery('#paymill_creditcard_holdername').live('input', function() {
522
- paymillSubmitForm();
523
  });
524
 
525
- pmQuery('#paymill_directdebit_holdername').live('input', function() {
526
- paymillSubmitForm();
527
  });
528
-
529
- pmQuery('#paymill_directdebit_account').live('input', function() {
530
- paymillSubmitForm();
531
  });
532
-
533
- pmQuery('#paymill_directdebit_bankcode').live('input', function() {
534
- paymillSubmitForm();
 
 
 
 
 
 
 
 
535
  });
536
 
537
- eventFlag = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  }
539
  }
 
1
  var PAYMILL_PUBLIC_KEY = null;
2
 
3
+ function Paymill()
4
+ {
5
+ this.paymillSelectedPaymentName = "Preparing Payment";
6
+ this.eventFlag = false;
7
+
8
+ }
9
 
10
+ Paymill.prototype.setPaymillCode = function(code)
11
+ {
12
+ this.paymillCode = code;
13
+ }
14
 
15
+ Paymill.prototype.setCodes = function()
16
+ {
17
+ this.paymillCc = 'paymill_creditcard';
18
+ this.paymillElv = 'paymill_directdebit';
19
+ }
20
 
21
+ Paymill.prototype.getPaymillCode = function()
22
  {
23
  var methods = {
24
  paymill_creditcard: "cc",
36
  * prints debug messages in the log if debug mode is active
37
  * @param {String} message
38
  */
39
+ Paymill.prototype.debug = function(message)
40
  {
41
+ debugState = pmQuery('.paymill-option-debug-' + this.getPaymillCode()).val();
42
+ if (debugState === "1") {
43
  var displayName = "";
44
+ if (this.paymillSelectedPaymentName === this.paymillCc) {
45
  displayName = 'Credit Card';
46
  }
47
+
48
+ if (this.paymillSelectedPaymentName === this.paymillElv) {
49
  displayName = 'Direct Debit';
50
  }
51
+
52
+ if (this.paymillSelectedPaymentName === 'Preparing Payment') {
53
  displayName = 'Preparing Payment';
54
  }
55
 
57
  }
58
  }
59
 
60
+ Paymill.prototype.detectCreditcardBranding = function(creditcardNumber)
61
+ {
62
+ var brand = 'unknown';
63
+ if (creditcardNumber.match(/^\d{6}/)) {
64
+ switch (true) {
65
+ case /^(415006|497|407497|513)/.test(creditcardNumber):
66
+ brand = "carte-bleue";
67
+ break;
68
+ case /^(45399[78]|432913|5255)/.test(creditcardNumber):
69
+ brand = "carta-si";
70
+ break;
71
+ case /^(4571|5019)/.test(creditcardNumber):
72
+ brand = "dankort";
73
+ break;
74
+ case /^(62|88)/.test(creditcardNumber):
75
+ brand = "unionpay";
76
+ break;
77
+ case /^6(011|5)/.test(creditcardNumber):
78
+ brand = "discover";
79
+ break;
80
+ case /^3(0[0-5]|[68])/.test(creditcardNumber):
81
+ brand = "diners";
82
+ break;
83
+ case /^(5018|5020|5038|5893|6304|6759|6761|6762|6763|0604|6390)/.test(creditcardNumber):
84
+ brand = "maestro";
85
+ break;
86
+ case /^(2131|1800|35)/.test(creditcardNumber):
87
+ brand = "jcb";
88
+ break;
89
+ case /^(3[47])/.test(creditcardNumber):
90
+ brand = "amex";
91
+ break;
92
+ case /^(5[1-5])/.test(creditcardNumber):
93
+ brand = "mastercard";
94
+ break;
95
+ case /^(4)/.test(creditcardNumber):
96
+ brand = "visa";
97
+ break;
98
+ }
99
+ }
100
+
101
+ return brand;
102
+ }
103
+
104
  /**
105
  * Event Handler for the display of the card icons
106
  */
107
+ Paymill.prototype.paymillShowCardIcon = function()
108
  {
109
+ var brand = this.detectCreditcardBranding(pmQuery('#' + this.paymillCode + '_number').val());
110
  brand = brand.toLowerCase();
111
+ pmQuery('#' + this.paymillCode + '_number')[0].className = pmQuery('#' + this.paymillCode + '_number')[0].className.replace(/paymill-card-number-.*/g, '');
112
  if (brand !== 'unknown') {
113
  if (brand === 'american express') {
114
  brand = 'amex';
115
  }
116
 
117
+ pmQuery('#' + this.paymillCode + '_number').addClass("paymill-card-number-" + brand);
118
  }
119
  }
120
 
121
+ Paymill.prototype.getValueIfExist = function(selector)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  {
123
  if ($$(selector)[0]) {
124
  return $$(selector)[0].value;
125
  }
126
+
127
  return '';
128
  }
129
 
131
  *
132
  * @returns {Boolean}
133
  */
134
+ Paymill.prototype.paymillSubmitForm = function()
135
  {
136
+ PAYMILL_PUBLIC_KEY = pmQuery('.paymill-info-public_key-' + this.getPaymillCode()).val();
137
+ this.paymillSelectedPaymentName = pmQuery("input[name='payment[method]']:checked").val();
138
+ switch (this.paymillSelectedPaymentName) {
139
+ case this.paymillCc:
 
140
  paymill.config('3ds_cancel_label', pmQuery('.paymill_3ds_cancel').val());
141
  if (pmQuery('.paymill-info-fastCheckout-cc').val() === 'false') {
142
+ var valid = (paymill.validateCvc(pmQuery('#' + this.paymillSelectedPaymentName + '_cvc').val()) || paymill.cardType(pmQuery('#' + this.paymillSelectedPaymentName + '_number').val()).toLowerCase() === 'maestro')
143
+ && paymill.validateHolder(pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val())
144
+ && paymill.validateExpiry(pmQuery('#' + this.paymillSelectedPaymentName + '_expiry_month').val(), pmQuery('#' + this.paymillSelectedPaymentName + '_expiry_year').val())
145
+ && paymill.validateCardNumber(pmQuery('#' + this.paymillSelectedPaymentName + '_number').val());
146
 
147
  if (!valid) {
148
  return false;
149
  }
 
 
150
 
151
  var cvc = '000';
152
 
153
+ if (pmQuery('#' + this.paymillSelectedPaymentName + '_cvc').val() !== '') {
154
+ cvc = pmQuery('#' + this.paymillSelectedPaymentName + '_cvc').val();
155
  }
156
+
157
+ this.debug("Generating Token");
158
  paymill.createToken({
159
+ amount_int: parseInt(this.getTokenAmount()),
160
+ currency: pmQuery('.paymill-payment-currency-' + this.getPaymillCode()).val(), // ISO 4217 e.g. "EUR"
161
+ number: pmQuery('#' + this.paymillSelectedPaymentName + '_number').val(),
162
+ exp_month: pmQuery('#' + this.paymillSelectedPaymentName + '_expiry_month').val(),
163
+ exp_year: pmQuery('#' + this.paymillSelectedPaymentName + '_expiry_year').val(),
164
  cvc: cvc,
165
+ cardholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
166
  }, paymillResponseHandler);
167
  }
168
  break;
169
+ case this.paymillElv:
170
  if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'false') {
171
  if (pmQuery('.paymill-info-sepa-elv').val() === 'false') {
172
+ var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
173
+ && paymill.validateAccountNumber(pmQuery('#' + this.paymillSelectedPaymentName + '_account').val())
174
+ && paymill.validateBankCode(pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode').val());
175
 
176
  if (!valid) {
177
  return false;
178
  }
179
 
180
+ this.debug("Generating Token");
181
  paymill.createToken({
182
+ number: pmQuery('#' + this.paymillSelectedPaymentName + '_account').val(),
183
+ bank: pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode').val(),
184
+ accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
185
  }, paymillResponseHandler);
186
  } else {
187
+ var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
188
+ && pmQuery('#' + this.paymillSelectedPaymentName + '_iban').val() !== ''
189
+ && pmQuery('#' + this.paymillSelectedPaymentName + '_bic').val() !== '';
190
 
191
  if (!valid) {
192
  return false;
193
  }
194
 
195
+ this.debug("Generating Token");
196
  paymill.createToken({
197
+ iban: pmQuery('#' + this.paymillSelectedPaymentName + '_iban').val(),
198
+ bic: pmQuery('#' + this.paymillSelectedPaymentName + '_bic').val(),
199
+ accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
200
  }, paymillResponseHandler);
201
  }
202
  }
203
+
204
  break;
205
  }
206
 
207
  return false;
208
  }
209
 
210
+ Paymill.prototype.logError = function(data)
211
  {
212
+ var that = this;
213
  pmQuery.ajax({
214
  async: false,
215
  type: "POST",
216
+ url: pmQuery('.paymill-payment-token-log-' + this.getPaymillCode()).val(),
217
  data: {error: data},
218
  }).done(function(msg) {
219
+ that.debug('Logging done.');
220
  }).fail(function(jqXHR, textStatus) {
221
+ that.debug('Logging failed.');
222
  });
223
  }
224
 
225
+ Paymill.prototype.getTokenAmount = function()
226
+ {
227
+ var that = this;
228
  var returnVal = null;
229
  pmQuery.ajax({
230
  async: false,
231
  type: "POST",
232
+ url: pmQuery('.paymill-payment-token-url-cc').val(),
233
  }).done(function(msg) {
234
  returnVal = msg;
235
  }).fail(function(jqXHR, textStatus) {
236
  // Appending error
237
  var nv = {};
238
+
239
+ nv['paymill-validate-' + that.getPaymillCode() + '-token'] = new Validator(
240
+ 'paymill-validate-' + that.getPaymillCode() + '-token',
241
+ that.getValueIfExist('.paymill-payment-error-' + that.getPaymillCode() + '-token') + " Amount not accessable. Reason: " + textStatus,
242
  function(v) {
243
  return v !== '';
244
  },
247
 
248
  Object.extend(Validation.methods, nv);
249
  });
250
+
251
  return returnVal;
252
  }
253
 
254
+ Paymill.prototype.unsetElvValidationRules = function()
255
  {
256
  var nvElv = {
257
  'paymill-validate-dd-holdername': new Validator(
264
  ),
265
  'paymill-validate-dd-iban': new Validator(
266
  'paymill-validate-dd-iban',
267
+ '',
268
  function(v) {
269
  return true;
270
  },
272
  ),
273
  'paymill-validate-dd-bic': new Validator(
274
  'paymill-validate-dd-bic',
275
+ '',
276
  function(v) {
277
  return true;
278
  },
299
  Object.extend(Validation.methods, nvElv);
300
  }
301
 
302
+ Paymill.prototype.unsetCcValidationRules = function()
303
  {
304
  var nvCc = {
305
  'paymill-validate-cc-number': new Validator(
347
  Object.extend(Validation.methods, nvCc);
348
  }
349
 
350
+ Paymill.prototype.setElvValidationRules = function()
351
  {
352
  var nvElv = {
353
  'paymill-validate-dd-holdername': new Validator(
354
  'paymill-validate-dd-holdername',
355
+ this.getValueIfExist('.paymill-payment-error-holder-elv'),
356
  function(v) {
357
  return !(v === '');
358
  },
360
  ),
361
  'paymill-validate-dd-iban': new Validator(
362
  'paymill-validate-dd-iban',
363
+ this.getValueIfExist('.paymill-payment-error-iban-elv'),
364
  function(v) {
365
  return !(v === '');
366
  },
368
  ),
369
  'paymill-validate-dd-bic': new Validator(
370
  'paymill-validate-dd-bic',
371
+ this.getValueIfExist('.paymill-payment-error-bic-elv'),
372
  function(v) {
373
  return !(v === '');
374
  },
376
  ),
377
  'paymill-validate-dd-account': new Validator(
378
  'paymill-validate-dd-account',
379
+ this.getValueIfExist('.paymill-payment-error-number-elv'),
380
  function(v) {
381
  return paymill.validateAccountNumber(v);
382
  },
384
  ),
385
  'paymill-validate-dd-bankcode': new Validator(
386
  'paymill-validate-dd-bankcode',
387
+ this.getValueIfExist('.paymill-payment-error-bankcode'),
388
  function(v) {
389
  return paymill.validateBankCode(v);
390
  },
395
  Object.extend(Validation.methods, nvElv);
396
  }
397
 
398
+ Paymill.prototype.setCcValidationRules = function()
399
  {
400
+ var that = this;
401
  var nvCc = {
402
  'paymill-validate-cc-number': new Validator(
403
  'paymill-validate-cc-number',
404
+ this.getValueIfExist('.paymill-payment-error-number'),
405
  function(v) {
406
  return paymill.validateCardNumber(v);
407
  },
409
  ),
410
  'paymill-validate-cc-expdate-month': new Validator(
411
  'paymill-validate-cc-expdate-month',
412
+ this.getValueIfExist('.paymill-payment-error-expdate'),
413
  function(v) {
414
+
415
+ return paymill.validateExpiry(v, pmQuery('.paymill-validate-cc-expdate-year').val());
416
  },
417
  ''
418
  ),
419
  'paymill-validate-cc-expdate-year': new Validator(
420
  'paymill-validate-cc-expdate-year',
421
+ this.getValueIfExist('.paymill-payment-error-expdate'),
422
  function(v) {
423
+ return paymill.validateExpiry(pmQuery('.paymill-validate-cc-expdate-month').val(), v);
424
  },
425
  ''
426
  ),
427
  'paymill-validate-cc-holder': new Validator(
428
  'paymill-validate-cc-holder',
429
+ this.getValueIfExist('.paymill-payment-error-holder'),
430
  function(v) {
431
  return (paymill.validateHolder(v));
432
  },
434
  ),
435
  'paymill-validate-cc-cvc': new Validator(
436
  'paymill-validate-cc-cvc',
437
+ this.getValueIfExist('.paymill-payment-error-cvc'),
438
  function(v) {
439
+ if (paymill.cardType(pmQuery('#' + that.paymillCode + '_number').val()).toLowerCase() === 'maestro') {
440
  return true;
441
  }
442
 
449
  Object.extend(Validation.methods, nvCc);
450
  }
451
 
452
+ Paymill.prototype.addPaymillEvents = function()
453
  {
454
+ var that = this;
 
 
455
 
456
+ this.setElvValidationRules();
457
+
458
+ this.setCcValidationRules();
459
+
460
  if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'true') {
461
+ that.unsetElvValidationRules();
462
  }
463
+
464
  if (pmQuery('.paymill-info-fastCheckout-cc').val() === 'true') {
465
+ that.unsetCcValidationRules();
466
  }
467
+
468
+ pmQuery('#' + this.paymillCode + '_iban').keyup(function() {
469
+ var iban = pmQuery('#' + that.paymillCode + '_iban').val();
470
+ if (!iban.match(/^DE/)) {
471
+ var newVal = "DE";
472
+ if (iban.match(/^.{2}(.*)/)) {
473
+ newVal += iban.match(/^.{2}(.*)/)[1];
 
 
474
  }
475
+
476
+ pmQuery('#' + that.paymillCode + '_iban').val(newVal);
477
+ }
478
  });
 
 
 
 
479
 
480
+ pmQuery('#' + this.paymillCode + '_iban').trigger('keyup');
481
+
482
+ if (!this.eventFlag) {
483
+
484
+ pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
485
+ that.setElvValidationRules();
486
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
487
  });
488
 
489
+ pmQuery('#' + this.paymillCode + '_account').live('input', function() {
490
+ that.setElvValidationRules();
491
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
492
  });
493
 
494
+ pmQuery('#' + this.paymillCode + '_bankcode').live('input', function() {
495
+ that.setElvValidationRules();
496
+ pmQuery('.paymill-info-fastCheckout-elv').val('false');
497
+ });
498
+
499
+ pmQuery('#' + this.paymillCode + '_iban').live('input', function() {
500
+ that.setElvValidationRules();
501
+ pmQuery('.paymill-info-fastCheckout-elv').val('false');
502
+ });
503
+
504
+ pmQuery('#' + this.paymillCode + '_bic').live('input', function() {
505
+ that.setElvValidationRules();
506
  pmQuery('.paymill-info-fastCheckout-elv').val('false');
507
  });
508
 
509
+ pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
510
+ that.setCcValidationRules();
511
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
512
  });
513
 
514
+ pmQuery('#' + this.paymillCode + '_cvc').live('input', function() {
515
+ that.setCcValidationRules();
516
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
517
  });
518
 
519
+ pmQuery('#' + this.paymillCode + '_number').live('input', function() {
520
+ that.setCcValidationRules();
521
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
522
  });
523
 
524
+ pmQuery('#' + this.paymillCode + '_expiry_month').live('change', function() {
525
+ that.setCcValidationRules();
526
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
527
  });
528
 
529
+ pmQuery('#' + this.paymillCode + '_expiry_year').live('change', function() {
530
+ that.setCcValidationRules();
531
  pmQuery('.paymill-info-fastCheckout-cc').val('false');
532
  });
533
 
534
+ pmQuery('#' + this.paymillCode + '_number').live('input', function() {
535
+ that.paymillShowCardIcon();
536
  });
537
 
538
+ pmQuery('#' + this.paymillCode + '_cvc').live('input', function() {
539
+ that.paymillSubmitForm();
540
  });
541
 
542
+ pmQuery('#' + this.paymillCode + '_expiry_month').live('change', function() {
543
+ that.paymillSubmitForm();
544
  });
545
 
546
+ pmQuery('#' + this.paymillCode + '_expiry_year').live('change', function() {
547
+ that.paymillSubmitForm();
548
  });
549
 
550
+ pmQuery('#' + this.paymillCode + '_number').live('input', function() {
551
+ that.paymillSubmitForm();
552
  });
553
+
554
+ pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
555
+ that.paymillSubmitForm();
556
  });
557
 
558
+ pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
559
+ that.paymillSubmitForm();
560
  });
561
+
562
+ pmQuery('#' + this.paymillCode + '_account').live('input', function() {
563
+ that.paymillSubmitForm();
564
  });
565
+
566
+ pmQuery('#' + this.paymillCode + '_bankcode').live('input', function() {
567
+ that.paymillSubmitForm();
568
+ });
569
+
570
+ pmQuery('#' + this.paymillCode + '_iban').live('input', function() {
571
+ that.paymillSubmitForm();
572
+ });
573
+
574
+ pmQuery('#' + this.paymillCode + '_bic').live('input', function() {
575
+ that.paymillSubmitForm();
576
  });
577
 
578
+ this.eventFlag = true;
579
+ }
580
+ }
581
+
582
+ /**
583
+ * Handles the response of the paymill bridge. saves the token in a formfield.
584
+ * @param {Boolean} error
585
+ * @param {response object} result
586
+ */
587
+ paymillResponseHandler = function(error, result)
588
+ {
589
+ var nv = {};
590
+ paymillObj = new Paymill();
591
+ paymillObj.setCodes();
592
+ if (error) {
593
+
594
+ var message = 'unknown_error';
595
+ var key = error.apierror;
596
+ if(paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode()) !== ''){
597
+ message = paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode());
598
+ }
599
+
600
+ if (message === 'unknown_error' && error.message !== undefined) {
601
+ message = error.message;
602
+ }
603
+
604
+ // Appending error
605
+ nv['paymill-validate-' + paymillObj.getPaymillCode() + '-token'] = new Validator(
606
+ 'paymill-validate-' + paymillObj.getPaymillCode() + '-token',
607
+ paymillObj.getValueIfExist('.paymill-payment-error-' + paymillObj.getPaymillCode() + '-token') + message,
608
+ function(v) {
609
+ return false;
610
+ },
611
+ ''
612
+ );
613
+
614
+ Object.extend(Validation.methods, nv);
615
+
616
+ paymillObj.logError(error);
617
+
618
+ paymillObj.debug(error.apierror);
619
+ paymillObj.debug(error.message);
620
+ paymillObj.debug("Paymill Response Handler triggered: Error.");
621
+ } else {
622
+ nv['paymill-validate-' + paymillObj.getPaymillCode() + '-token'] = new Validator(
623
+ 'paymill-validate-' + paymillObj.getPaymillCode() + '-token',
624
+ '',
625
+ function(v) {
626
+ return true;
627
+ },
628
+ ''
629
+ );
630
+
631
+ Object.extend(Validation.methods, nv);
632
+ // Appending Token to form
633
+ paymillObj.debug("Saving Token in Form: " + result.token);
634
+ pmQuery('.paymill-payment-token-' + paymillObj.getPaymillCode()).val(result.token);
635
  }
636
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Paymill_Paymill</name>
4
- <version>3.6.0</version>
5
  <stability>stable</stability>
6
  <license>Open Software License</license>
7
  <channel>community</channel>
@@ -13,11 +13,13 @@ The Paymill Magento extension provides a credit card form and a direct debit for
13
  &lt;br /&gt;&lt;br /&gt;&#xD;
14
  IMPORTANT: Only use the latest version.&#xD;
15
  </description>
16
- <notes> * add elv sepa</notes>
 
 
17
  <authors><author><name>PayIntelligent</name><user>Paymill</user><email>community@paymill.de</email></author></authors>
18
- <date>2014-01-21</date>
19
- <time>15:16:50</time>
20
- <contents><target name="magecommunity"><dir name="Paymill"><dir><dir name="Paymill"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="7d74f94403297eeb551272ad5c94513f"/><dir name="View"><file name="Plane.php" hash="179e10aea0213d2caed595ae9111b993"/><file name="Tabs.php" hash="d16d9748921a34067242eaf92d6f299e"/></dir><file name="View.php" hash="af850dd16c3e7505a69a6cb3ca3fbc27"/></dir><file name="Log.php" hash="02930fb46a2a4569176ceb29c45037e8"/></dir><dir name="Payment"><dir name="Form"><file name="PaymentFormAbstract.php" hash="b42edc338110bd2f81fcf85169d3d82c"/><file name="PaymentFormCreditcard.php" hash="5351fa41246fb107bd3e62fdd274f715"/><file name="PaymentFormDirectdebit.php" hash="8498937e6ead26ce37b34d16005a917f"/></dir><dir name="Info"><file name="PaymentFormCreditcard.php" hash="9d11216e743fa204bea678276f5a16b3"/><file name="PaymentFormDirectdebit.php" hash="2143f473d531511aa2f6ae1051b0e7f9"/></dir></dir></dir><dir name="Helper"><file name="CustomerHelper.php" hash="6c3229dc3943ce4506ed23c0f246df24"/><file name="Data.php" hash="8e55041f6bb52f1e142b86dfa486b85e"/><file name="FastCheckoutHelper.php" hash="57372d9ec58c027dbd15771ab703da30"/><file name="LoggingHelper.php" hash="53ea7f4d5c3af8de149a06dbe37ac061"/><file name="OptionHelper.php" hash="cbf3daa334bce07b7eb62a5a43dd18dc"/><file name="PaymentHelper.php" hash="1a90794eeb572a02c55ee0d596445ace"/><file name="RefundHelper.php" hash="b936d48e6f9022acb0370ec755cf5850"/><file name="TransactionHelper.php" hash="efdb288bcc7cd9c8f7a26513ba769c72"/></dir><dir name="Model"><file name="Fastcheckout.php" hash="e3b585d2f3265300f08fa44a4e9ccd7b"/><dir name="Log"><file name="Search.php" hash="4338b3876e745405bfcc5a32cfe42527"/></dir><file name="Log.php" hash="0662d814e53bd2eeb6f5c906c16ad971"/><dir name="Method"><file name="MethodModelAbstract.php" hash="bc52df6e5aa480a9e0905840f67cbf0a"/><file name="MethodModelCreditcard.php" hash="97ca6c75e372fcddddbbe3fd2c2354a0"/><file name="MethodModelDirectdebit.php" hash="bc7bc9b40760ca488e48a257dccc768d"/></dir><dir name="Mysql4"><dir name="Fastcheckout"><file name="Collection.php" hash="14d4aa413ec952fd2452f08ab2a208f6"/></dir><file name="Fastcheckout.php" hash="9b19c307417862938442ddd6789f2b43"/><dir name="Log"><file name="Collection.php" hash="cf4d8fec68a4cc44b2e47bf69e014cf3"/></dir><file name="Log.php" hash="bdf0bf498c1214955e20e72185e5320f"/></dir><file name="Observer.php" hash="6e4e4af379f59644b6de76ccd4732093"/><file name="TransactionData.php" hash="4b2c8b136a04333ed3d03a54ddf5d20b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LogController.php" hash="fe634fc07d161f160ae060600561a0b1"/></dir><file name="TokenController.php" hash="8b606f0728fd556a6180ebeb042dbf13"/></dir><dir name="etc"><file name="adminhtml.xml" hash="402c36431d690ffa9b7eae074cadfb4e"/><file name="config.xml" hash="679552ababafaebb755ba1c26cb55357"/><file name="system.xml" hash="cfe1e376e4d827370227dc916e7e9726"/></dir><dir name="sql"><dir name="paymill_setup"><file name="mysql4-install-3.0.0.php" hash="37e5e1850e143315779e30bd1b45f277"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="paymill"><dir><dir name="log"><file name="view.phtml" hash="2d4df28de6e1cb4701963db3d0c0545c"/></dir><dir name="payment"><dir name="info"><file name="creditcard.phtml" hash="1c604ec666d9a3028a04c0d9a4257e4a"/><file name="creditcard_pdf.phtml" hash="68febe619bb9918b785dcbb0593c4ebe"/><file name="directdebit.phtml" hash="1c604ec666d9a3028a04c0d9a4257e4a"/><file name="directdebit_pdf.phtml" hash="5a2e5c36d4f4702e5f9be4b5affe3421"/></dir></dir></dir></dir></dir><dir name="layout"><file name="paymill.xml" hash="fcc95f6e7c375fee779178a0f9f1a1d8"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="paymill"><dir><dir name="payment"><dir name="form"><file name="creditcard.phtml" hash="46dfd8dc8ff1862e9be384cb45f0b07e"/><file name="directdebit.phtml" hash="f519ac284b8f05ed5f1f1f49c222668e"/></dir><dir name="info"><file name="creditcard.phtml" hash="42f875eb1b6e3e6151ddf152ef0bf13a"/><file name="directdebit.phtml" hash="42f875eb1b6e3e6151ddf152ef0bf13a"/></dir></dir></dir></dir></dir><dir name="layout"><file name="paymill.xml" hash="f0f6e4a11f165da63c2a45c4033c6f3a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymill_Paymill.xml" hash="d36d3af5f5752dcf87517272ddb9af53"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Paymill_Paymill.csv" hash="e0cca4173e7a270cf19fade5a8868c9b"/></dir><dir name="en_GB"><file name="Paymill_Paymill.csv" hash="86063af1e4d1f4317a6fa5bba8808dbd"/></dir><dir name="en_US"><file name="Paymill_Paymill.csv" hash="55a132aa6b66311ea9b87c6a8c61a65e"/></dir><dir name="es_ES"><file name="Paymill_Paymill.csv" hash="4c3333ed77b72446e9aa6a38e9545097"/></dir></target><target name="mage"><dir name="js"><dir name="paymill"><file name="paymentForm.js" hash="60dce80f4abc425a7cd21867879e1be5"/></dir></dir></target><target name="magelib"><dir name="Services"><dir><dir name="Paymill"><dir name="Apiclient"><file name="Curl.php" hash="b1e7fb6eacb5a5cb41dc91247774db45"/><file name="Interface.php" hash="349309458455e550c562fb17cf23f4a6"/><file name="paymill.crt" hash="51e14b4c734e450402ea2cf73f2aee0f"/></dir><file name="Base.php" hash="141fa330c6894ff15faf413be19bf209"/><file name="Clients.php" hash="c8eb5fe8780f2da7b5eb173a5be43c7f"/><file name="Exception.php" hash="9beffb75d92c0de3c1c7ea5b33930fff"/><file name="LoggingInterface.php" hash="46ebeede1da14b761c54a18aff6c3b79"/><file name="Offers.php" hash="e2dcf9c9a54d9aba16e1caf02b438098"/><file name="PaymentProcessor.php" hash="5532a7043b185cd64ced0167c42ea763"/><file name="Payments.php" hash="d2a6d0679701d100c9e876f88215455c"/><file name="Preauthorizations.php" hash="597f7228584f32ee42d8916ae098b454"/><file name="Refunds.php" hash="e909af53108426a9e178417db850675f"/><file name="Subscriptions.php" hash="b72a31c4041029e08df1d7e85aa7391b"/><file name="Transactions.php" hash="a4c9d4d2243af38f2109e89ee4943888"/><file name="Webhooks.php" hash="5fd2e6baf7bb0dc3ad8edb1eab41fb91"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="paymill"><file name="logo.css" hash="b7678ffcb3e1e902e23217885991a0f5"/></dir></dir><dir name="images"><dir name="paymill"><file name="ajax-loader.gif" hash="07c56b266e277696ee3d9e3ffd627450"/><file name="icon_32x20_amex.png" hash="42c5fb43b4b603804b50da9761927d40"/><file name="icon_32x20_dinersclub.png" hash="0a7a8fc8f679ccf05d91298c9968629c"/><file name="icon_32x20_discover.png" hash="4fe8ef419087bed97cddbdeb251b847c"/><file name="icon_32x20_jcb.png" hash="774a040f938c5566fa3fddfa840d4743"/><file name="icon_32x20_maestro.png" hash="a6ffd22c9bbedb603449e2aa6136dbd1"/><file name="icon_32x20_mastercard.png" hash="09aef6dcbc50038605b7c0e5a38eb76e"/><file name="icon_32x20_unionpay.png" hash="6c9d16d6c65c0da5ff11e8ae13b01d15"/><file name="icon_32x20_visa.png" hash="e6d54e5c0120202eb5757bcfe499d73b"/><file name="icon_paymill.png" hash="303983a288b45cc7ddc5b88ad2eedd51"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Paymill_Paymill</name>
4
+ <version>3.6.3</version>
5
  <stability>stable</stability>
6
  <license>Open Software License</license>
7
  <channel>community</channel>
13
  &lt;br /&gt;&lt;br /&gt;&#xD;
14
  IMPORTANT: Only use the latest version.&#xD;
15
  </description>
16
+ <notes> * improve javascript&#xD;
17
+ * fix problem when a token error occurs&#xD;
18
+ * online offline refund compatibility added</notes>
19
  <authors><author><name>PayIntelligent</name><user>Paymill</user><email>community@paymill.de</email></author></authors>
20
+ <date>2014-01-31</date>
21
+ <time>12:33:18</time>
22
+ <contents><target name="magecommunity"><dir name="Paymill"><dir><dir name="Paymill"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="7d74f94403297eeb551272ad5c94513f"/><dir name="View"><file name="Plane.php" hash="179e10aea0213d2caed595ae9111b993"/><file name="Tabs.php" hash="d16d9748921a34067242eaf92d6f299e"/></dir><file name="View.php" hash="af850dd16c3e7505a69a6cb3ca3fbc27"/></dir><file name="Log.php" hash="02930fb46a2a4569176ceb29c45037e8"/></dir><dir name="Payment"><dir name="Form"><file name="PaymentFormAbstract.php" hash="b42edc338110bd2f81fcf85169d3d82c"/><file name="PaymentFormCreditcard.php" hash="5351fa41246fb107bd3e62fdd274f715"/><file name="PaymentFormDirectdebit.php" hash="8498937e6ead26ce37b34d16005a917f"/></dir><dir name="Info"><file name="PaymentFormCreditcard.php" hash="9d11216e743fa204bea678276f5a16b3"/><file name="PaymentFormDirectdebit.php" hash="2143f473d531511aa2f6ae1051b0e7f9"/></dir></dir></dir><dir name="Helper"><file name="CustomerHelper.php" hash="6c3229dc3943ce4506ed23c0f246df24"/><file name="Data.php" hash="8e55041f6bb52f1e142b86dfa486b85e"/><file name="FastCheckoutHelper.php" hash="2f1556faba2752afa0172463d9c799a7"/><file name="LoggingHelper.php" hash="53ea7f4d5c3af8de149a06dbe37ac061"/><file name="OptionHelper.php" hash="cbf3daa334bce07b7eb62a5a43dd18dc"/><file name="PaymentHelper.php" hash="1a90794eeb572a02c55ee0d596445ace"/><file name="RefundHelper.php" hash="b936d48e6f9022acb0370ec755cf5850"/><file name="TransactionHelper.php" hash="efdb288bcc7cd9c8f7a26513ba769c72"/></dir><dir name="Model"><file name="Fastcheckout.php" hash="e3b585d2f3265300f08fa44a4e9ccd7b"/><dir name="Log"><file name="Search.php" hash="4338b3876e745405bfcc5a32cfe42527"/></dir><file name="Log.php" hash="0662d814e53bd2eeb6f5c906c16ad971"/><dir name="Method"><file name="MethodModelAbstract.php" hash="31d17aa7e9a3985bbda12a03e2c6660b"/><file name="MethodModelCreditcard.php" hash="b9732130e949f346cf3a4e63614f812e"/><file name="MethodModelDirectdebit.php" hash="bc7bc9b40760ca488e48a257dccc768d"/></dir><dir name="Mysql4"><dir name="Fastcheckout"><file name="Collection.php" hash="14d4aa413ec952fd2452f08ab2a208f6"/></dir><file name="Fastcheckout.php" hash="9b19c307417862938442ddd6789f2b43"/><dir name="Log"><file name="Collection.php" hash="cf4d8fec68a4cc44b2e47bf69e014cf3"/></dir><file name="Log.php" hash="bdf0bf498c1214955e20e72185e5320f"/></dir><file name="Observer.php" hash="2c28ba431d7292e542e803bdc473803b"/><file name="TransactionData.php" hash="4b2c8b136a04333ed3d03a54ddf5d20b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LogController.php" hash="fe634fc07d161f160ae060600561a0b1"/></dir><file name="TokenController.php" hash="8b606f0728fd556a6180ebeb042dbf13"/></dir><dir name="etc"><file name="adminhtml.xml" hash="402c36431d690ffa9b7eae074cadfb4e"/><file name="config.xml" hash="621db45b89465ed19d47636f36db1b1e"/><file name="system.xml" hash="9c773a2b184e5eedeb1660a705515302"/></dir><dir name="sql"><dir name="paymill_setup"><file name="mysql4-install-3.0.0.php" hash="37e5e1850e143315779e30bd1b45f277"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="paymill"><dir><dir name="log"><file name="view.phtml" hash="2d4df28de6e1cb4701963db3d0c0545c"/></dir><dir name="payment"><dir name="info"><file name="creditcard.phtml" hash="1c604ec666d9a3028a04c0d9a4257e4a"/><file name="creditcard_pdf.phtml" hash="68febe619bb9918b785dcbb0593c4ebe"/><file name="directdebit.phtml" hash="1c604ec666d9a3028a04c0d9a4257e4a"/><file name="directdebit_pdf.phtml" hash="5a2e5c36d4f4702e5f9be4b5affe3421"/></dir></dir></dir></dir></dir><dir name="layout"><file name="paymill.xml" hash="fcc95f6e7c375fee779178a0f9f1a1d8"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="paymill"><dir><dir name="payment"><dir name="form"><file name="creditcard.phtml" hash="a001eed05872558c878c2ef9dff50285"/><file name="directdebit.phtml" hash="108212daf86dd078cf770106c575eb63"/></dir><dir name="info"><file name="creditcard.phtml" hash="42f875eb1b6e3e6151ddf152ef0bf13a"/><file name="directdebit.phtml" hash="42f875eb1b6e3e6151ddf152ef0bf13a"/></dir></dir></dir></dir></dir><dir name="layout"><file name="paymill.xml" hash="f0f6e4a11f165da63c2a45c4033c6f3a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymill_Paymill.xml" hash="d36d3af5f5752dcf87517272ddb9af53"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Paymill_Paymill.csv" hash="feca7ce45756f25b1d1022d37cf9f730"/></dir><dir name="en_GB"><file name="Paymill_Paymill.csv" hash="275eac7cbdff80f0975281c8be7607f0"/></dir><dir name="en_US"><file name="Paymill_Paymill.csv" hash="9894b443e469b1d0af4f58c4e723b4f0"/></dir><dir name="es_ES"><file name="Paymill_Paymill.csv" hash="6dd76017112dc190ebee3beac2f2b8f0"/></dir></target><target name="mage"><dir name="js"><dir name="paymill"><file name="paymentForm.js" hash="c47a43657fe32b4e11ebb1464eaa2c90"/></dir></dir></target><target name="magelib"><dir name="Services"><dir><dir name="Paymill"><dir name="Apiclient"><file name="Curl.php" hash="b1e7fb6eacb5a5cb41dc91247774db45"/><file name="Interface.php" hash="349309458455e550c562fb17cf23f4a6"/><file name="paymill.crt" hash="51e14b4c734e450402ea2cf73f2aee0f"/></dir><file name="Base.php" hash="141fa330c6894ff15faf413be19bf209"/><file name="Clients.php" hash="c8eb5fe8780f2da7b5eb173a5be43c7f"/><file name="Exception.php" hash="9beffb75d92c0de3c1c7ea5b33930fff"/><file name="LoggingInterface.php" hash="46ebeede1da14b761c54a18aff6c3b79"/><file name="Offers.php" hash="e2dcf9c9a54d9aba16e1caf02b438098"/><file name="PaymentProcessor.php" hash="5532a7043b185cd64ced0167c42ea763"/><file name="Payments.php" hash="d2a6d0679701d100c9e876f88215455c"/><file name="Preauthorizations.php" hash="597f7228584f32ee42d8916ae098b454"/><file name="Refunds.php" hash="e909af53108426a9e178417db850675f"/><file name="Subscriptions.php" hash="b72a31c4041029e08df1d7e85aa7391b"/><file name="Transactions.php" hash="a4c9d4d2243af38f2109e89ee4943888"/><file name="Webhooks.php" hash="5fd2e6baf7bb0dc3ad8edb1eab41fb91"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="paymill"><file name="logo.css" hash="936683ad4bc4587be00c9e5f54cc37c3"/></dir></dir><dir name="images"><dir name="paymill"><file name="ajax-loader.gif" hash="07c56b266e277696ee3d9e3ffd627450"/><file name="icon_32x20_amex.png" hash="42c5fb43b4b603804b50da9761927d40"/><file name="icon_32x20_carta-si.png" hash="236ea747b59067b1d25cdc317e52aae5"/><file name="icon_32x20_carte-bleue.png" hash="187f19af694d83bd745c278845c3b3cd"/><file name="icon_32x20_dinersclub.png" hash="0a7a8fc8f679ccf05d91298c9968629c"/><file name="icon_32x20_discover.png" hash="4fe8ef419087bed97cddbdeb251b847c"/><file name="icon_32x20_jcb.png" hash="774a040f938c5566fa3fddfa840d4743"/><file name="icon_32x20_maestro.png" hash="a6ffd22c9bbedb603449e2aa6136dbd1"/><file name="icon_32x20_mastercard.png" hash="09aef6dcbc50038605b7c0e5a38eb76e"/><file name="icon_32x20_unionpay.png" hash="6c9d16d6c65c0da5ff11e8ae13b01d15"/><file name="icon_32x20_visa.png" hash="e6d54e5c0120202eb5757bcfe499d73b"/><file name="icon_paymill.png" hash="303983a288b45cc7ddc5b88ad2eedd51"/></dir></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>
skin/frontend/base/default/css/paymill/logo.css CHANGED
@@ -75,6 +75,20 @@
75
  background-position: right center !important;
76
  }
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  .tooltip
79
  {
80
  margin-left: 3px;
75
  background-position: right center !important;
76
  }
77
 
78
+ .paymill-card-number-carte-bleue
79
+ {
80
+ background-image: url('../../images/paymill/icon_32x20_carte-bleue.png') !important;
81
+ background-repeat: no-repeat !important;
82
+ background-position: right center !important;
83
+ }
84
+
85
+ .paymill-card-number-carta-si
86
+ {
87
+ background-image: url('../../images/paymill/icon_32x20_carte-bleue.png') !important;
88
+ background-repeat: no-repeat !important;
89
+ background-position: right center !important;
90
+ }
91
+
92
  .tooltip
93
  {
94
  margin-left: 3px;
skin/frontend/base/default/images/paymill/icon_32x20_carta-si.png ADDED
Binary file
skin/frontend/base/default/images/paymill/icon_32x20_carte-bleue.png ADDED
Binary file