Version Notes
* changed CVC field design to Magento CVC design with "What is this" Link and Popup
* added credit card logos, which can be selected to be shown in the checkout
* changed ELV/SEPA to one form
* added Prenotification for SEPA
* updated PHP Wrapper
Download this release
Release Info
| Developer | PayIntelligent |
| Extension | Paymill_Paymill |
| Version | 3.6.6 |
| Comparing to | |
| See all releases | |
Code changes from version 3.6.4 to 3.6.6
- app/code/community/Paymill/Paymill/Block/Payment/Form/PaymentFormCreditcard.php +41 -2
- app/code/community/Paymill/Paymill/Block/Payment/Form/PaymentFormDirectdebit.php +12 -3
- app/code/community/Paymill/Paymill/Block/Payment/Info/PaymentFormDirectdebit.php +1 -0
- app/code/community/Paymill/Paymill/Helper/CustomerHelper.php +4 -0
- app/code/community/Paymill/Paymill/Helper/FastCheckoutHelper.php +6 -0
- app/code/community/Paymill/Paymill/Helper/OptionHelper.php +8 -0
- app/code/community/Paymill/Paymill/Helper/PaymentHelper.php +4 -1
- app/code/community/Paymill/Paymill/Helper/TransactionHelper.php +17 -0
- app/code/community/Paymill/Paymill/Model/Log/Search.php +18 -0
- app/code/community/Paymill/Paymill/Model/Method/MethodModelAbstract.php +39 -2
- app/code/community/Paymill/Paymill/Model/Source/Creditcard/Creditcards.php +59 -0
- app/code/community/Paymill/Paymill/Model/TransactionData.php +9 -0
- app/code/community/Paymill/Paymill/etc/config.xml +16 -15
- app/code/community/Paymill/Paymill/etc/system.xml +23 -14
- app/code/community/Paymill/Paymillcc/Block/Form/Paymill.php +57 -0
- app/code/community/Paymill/Paymillcc/Block/Info/Paymill.php +34 -0
- app/code/community/Paymill/Paymillcc/Helper/Data.php +6 -0
- app/code/community/Paymill/Paymillcc/LibraryVersion.php +13 -0
- app/code/community/Paymill/Paymillcc/Model/Customerdata.php +60 -0
- app/code/community/Paymill/Paymillcc/Model/Mysql4/Customerdata.php +31 -0
- app/code/community/Paymill/Paymillcc/Model/Mysql4/Customerdata/Collection.php +31 -0
- app/code/community/Paymill/Paymillcc/Model/PaymentAbstract.php +131 -0
- app/code/community/Paymill/Paymillcc/Model/PaymentMethod.php +300 -0
- app/code/community/Paymill/Paymillcc/etc/config.xml +95 -0
- app/code/community/Paymill/Paymillcc/etc/system.xml +150 -0
- app/code/community/Paymill/Paymillcc/sql/paymillcc_setup/mysql4-install-2.1.2.php +15 -0
- app/code/community/Paymill/Paymillcc/sql/paymillcc_setup/mysql4-upgrade-2.1.1-2.1.2.php +15 -0
- app/code/community/Paymill/Paymillelv/Block/Form/Paymill.php +49 -0
- app/code/community/Paymill/Paymillelv/Block/Info/Paymill.php +34 -0
- app/code/community/Paymill/Paymillelv/Helper/Data.php +6 -0
- app/code/community/Paymill/Paymillelv/Model/Customerdata.php +60 -0
- app/code/community/Paymill/Paymillelv/Model/Mysql4/Customerdata.php +31 -0
- app/code/community/Paymill/Paymillelv/Model/Mysql4/Customerdata/Collection.php +31 -0
- app/code/community/Paymill/Paymillelv/Model/PaymentAbstract.php +131 -0
- app/code/community/Paymill/Paymillelv/Model/PaymentMethod.php +278 -0
- app/code/community/Paymill/Paymillelv/etc/config.xml +93 -0
- app/code/community/Paymill/Paymillelv/etc/system.xml +141 -0
- app/code/community/Paymill/Paymillelv/sql/paymillelv_setup/mysql4-install-2.1.2.php +15 -0
- app/code/community/Paymill/Paymillelv/sql/paymillelv_setup/mysql4-upgrade-2.1.1-2.1.2.php +15 -0
- app/design/frontend/base/default/layout/paymill.xml +8 -1
- app/design/frontend/base/default/template/paymill/form/paymill.phtml +299 -0
- app/design/frontend/base/default/template/paymill/form/paymill_elv.phtml +184 -0
- app/design/frontend/base/default/template/paymill/payment/form/creditcard.phtml +10 -2
- app/design/frontend/base/default/template/paymill/payment/form/directdebit.phtml +7 -20
- app/design/frontend/base/default/template/paymill/payment/info/directdebit.phtml +7 -0
- app/locale/de_DE/Paymill_Paymill.csv +128 -121
- app/locale/en_GB/Paymill_Paymill.csv +128 -121
- app/locale/en_US/Paymill_Paymill.csv +128 -121
- app/locale/es_ES/Paymill_Paymill.csv +128 -121
- js/paymill/BrandDetection.js +100 -0
- js/paymill/Iban.js +206 -0
- js/paymill/paymentForm.js +118 -153
- lib/Services/Paymill/Apiclient/Curl.php +2 -4
- lib/Services/Paymill/PaymentProcessor.php +153 -37
- lib/Services/Paymill/Transactions.php +1 -14
- package.xml +10 -6
- skin/frontend/base/default/css/paymill/logo.css +22 -8
- skin/frontend/base/default/images/paymill/{icon_32x20_unionpay.png → icon_32x20_china-unionpay.png} +0 -0
- skin/frontend/base/default/images/paymill/icon_32x20_dankort.png +0 -0
- skin/frontend/base/default/images/paymill/{icon_32x20_dinersclub.png → icon_32x20_diners-club.png} +0 -0
app/code/community/Paymill/Paymill/Block/Payment/Form/PaymentFormCreditcard.php
CHANGED
|
@@ -21,12 +21,29 @@
|
|
| 21 |
class Paymill_Paymill_Block_Payment_Form_PaymentFormCreditcard extends Paymill_Paymill_Block_Payment_Form_PaymentFormAbstract
|
| 22 |
{
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
/**
|
| 25 |
* Construct
|
| 26 |
*/
|
| 27 |
protected function _construct()
|
| 28 |
{
|
| 29 |
parent::_construct();
|
|
|
|
|
|
|
|
|
|
| 30 |
$this->setTemplate('paymill/payment/form/creditcard.phtml');
|
| 31 |
}
|
| 32 |
|
|
@@ -72,7 +89,29 @@ class Paymill_Paymill_Block_Payment_Form_PaymentFormCreditcard extends Paymill_P
|
|
| 72 |
|
| 73 |
return $data;
|
| 74 |
}
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 21 |
class Paymill_Paymill_Block_Payment_Form_PaymentFormCreditcard extends Paymill_Paymill_Block_Payment_Form_PaymentFormAbstract
|
| 22 |
{
|
| 23 |
|
| 24 |
+
/**
|
| 25 |
+
* This var is used for the Branddetection, if empty all will be shown, else only the selected ones
|
| 26 |
+
*
|
| 27 |
+
* @var string
|
| 28 |
+
*/
|
| 29 |
+
private $creditCardLogosBrand = '';
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* This var is used to show the logos in the checkout, if empty none will be shown
|
| 33 |
+
*
|
| 34 |
+
* @var string
|
| 35 |
+
*/
|
| 36 |
+
private $creditCardLogosDisplay = '';
|
| 37 |
+
|
| 38 |
/**
|
| 39 |
* Construct
|
| 40 |
*/
|
| 41 |
protected function _construct()
|
| 42 |
{
|
| 43 |
parent::_construct();
|
| 44 |
+
|
| 45 |
+
$this->setPaymillCcLogos();
|
| 46 |
+
|
| 47 |
$this->setTemplate('paymill/payment/form/creditcard.phtml');
|
| 48 |
}
|
| 49 |
|
| 89 |
|
| 90 |
return $data;
|
| 91 |
}
|
|
|
|
|
|
|
| 92 |
|
| 93 |
+
private function setPaymillCcLogos() {
|
| 94 |
+
$cards = explode(',', Mage::getStoreConfig('payment/paymill_creditcard/specificcreditcard'));
|
| 95 |
+
$this->creditCardLogosDisplay = '';
|
| 96 |
+
$this->creditCardLogosBrand = 'var paymillCcBrands = new Array();';
|
| 97 |
+
foreach($cards as $card) {
|
| 98 |
+
$this->creditCardLogosDisplay .= sprintf(
|
| 99 |
+
'<img src="%s" alt="%s"/>',
|
| 100 |
+
$this->getSkinUrl('images/paymill/icon_32x20_' . $card . '.png'),
|
| 101 |
+
$card
|
| 102 |
+
);
|
| 103 |
+
$this->creditCardLogosBrand .= sprintf(
|
| 104 |
+
'paymillCcBrands.push("%s");',
|
| 105 |
+
$card
|
| 106 |
+
);
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
public function getCreditCardLogosBrand() {
|
| 111 |
+
return $this->creditCardLogosBrand;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
public function getCreditCardLogosDisplay() {
|
| 115 |
+
return $this->creditCardLogosDisplay;
|
| 116 |
+
}
|
| 117 |
}
|
app/code/community/Paymill/Paymill/Block/Payment/Form/PaymentFormDirectdebit.php
CHANGED
|
@@ -29,9 +29,18 @@ class Paymill_Paymill_Block_Payment_Form_PaymentFormDirectdebit extends Paymill_
|
|
| 29 |
parent::_construct();
|
| 30 |
$this->setTemplate('paymill/payment/form/directdebit.phtml');
|
| 31 |
}
|
| 32 |
-
|
| 33 |
-
public function
|
| 34 |
{
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
}
|
| 29 |
parent::_construct();
|
| 30 |
$this->setTemplate('paymill/payment/form/directdebit.phtml');
|
| 31 |
}
|
| 32 |
+
|
| 33 |
+
public function getPaymentEntryElv($code)
|
| 34 |
{
|
| 35 |
+
$data = $this->getPaymentData($code);
|
| 36 |
+
$fastCheckoutData = array(null,null);
|
| 37 |
+
if(isset($data['iban'])) {
|
| 38 |
+
$fastCheckoutData[0] = $data['iban'];
|
| 39 |
+
$fastCheckoutData[1] = $data['bic'];
|
| 40 |
+
} elseif(isset($data['account'])) {
|
| 41 |
+
$fastCheckoutData[0] = $data['account'];
|
| 42 |
+
$fastCheckoutData[1] = $data['code'];
|
| 43 |
+
}
|
| 44 |
+
return $fastCheckoutData;
|
| 45 |
}
|
| 46 |
}
|
app/code/community/Paymill/Paymill/Block/Payment/Info/PaymentFormDirectdebit.php
CHANGED
|
@@ -55,6 +55,7 @@ class Paymill_Paymill_Block_Payment_Info_PaymentFormDirectdebit extends Mage_Pay
|
|
| 55 |
|
| 56 |
$data = array();
|
| 57 |
$data['paymillTransactionId'] = $this->getInfo()->getAdditionalInformation('paymillTransactionId');
|
|
|
|
| 58 |
$data['imgUrl'] = Mage::helper('paymill')->getImagePath() . "icon_paymill.png";
|
| 59 |
|
| 60 |
return $transport->setData(array_merge($data, $transport->getData()));
|
| 55 |
|
| 56 |
$data = array();
|
| 57 |
$data['paymillTransactionId'] = $this->getInfo()->getAdditionalInformation('paymillTransactionId');
|
| 58 |
+
$data['paymillPrenotificationDate'] = $this->getInfo()->getAdditionalInformation('paymillPrenotificationDate');
|
| 59 |
$data['imgUrl'] = Mage::helper('paymill')->getImagePath() . "icon_paymill.png";
|
| 60 |
|
| 61 |
return $transport->setData(array_merge($data, $transport->getData()));
|
app/code/community/Paymill/Paymill/Helper/CustomerHelper.php
CHANGED
|
@@ -54,6 +54,10 @@ class Paymill_Paymill_Helper_CustomerHelper extends Mage_Core_Helper_Abstract
|
|
| 54 |
return $email;
|
| 55 |
}
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
public function getClientData()
|
| 58 |
{
|
| 59 |
$clients = new Services_Paymill_Clients(
|
| 54 |
return $email;
|
| 55 |
}
|
| 56 |
|
| 57 |
+
/**
|
| 58 |
+
* Return paymill client data
|
| 59 |
+
* @return array
|
| 60 |
+
*/
|
| 61 |
public function getClientData()
|
| 62 |
{
|
| 63 |
$clients = new Services_Paymill_Clients(
|
app/code/community/Paymill/Paymill/Helper/FastCheckoutHelper.php
CHANGED
|
@@ -75,6 +75,12 @@ class Paymill_Paymill_Helper_FastCheckoutHelper extends Mage_Core_Helper_Abstrac
|
|
| 75 |
return false;
|
| 76 |
}
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
public function getPaymentData($code)
|
| 79 |
{
|
| 80 |
$payment = array();
|
| 75 |
return false;
|
| 76 |
}
|
| 77 |
|
| 78 |
+
/**
|
| 79 |
+
* Return payment data if available
|
| 80 |
+
*
|
| 81 |
+
* @param string $code
|
| 82 |
+
* @return array
|
| 83 |
+
*/
|
| 84 |
public function getPaymentData($code)
|
| 85 |
{
|
| 86 |
$payment = array();
|
app/code/community/Paymill/Paymill/Helper/OptionHelper.php
CHANGED
|
@@ -114,4 +114,12 @@ class Paymill_Paymill_Helper_OptionHelper extends Mage_Core_Helper_Abstract
|
|
| 114 |
return $this->_getBackendOption("paymill_creditcard", "preAuth_active");
|
| 115 |
}
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
| 114 |
return $this->_getBackendOption("paymill_creditcard", "preAuth_active");
|
| 115 |
}
|
| 116 |
|
| 117 |
+
/**
|
| 118 |
+
* Returns the value of the "prenotification" config from the Backend as a string
|
| 119 |
+
* @return string
|
| 120 |
+
*/
|
| 121 |
+
public function getPrenotificationDays()
|
| 122 |
+
{
|
| 123 |
+
return $this->_getBackendOption("paymill_directdebit", "prenotification");
|
| 124 |
+
}
|
| 125 |
}
|
app/code/community/Paymill/Paymill/Helper/PaymentHelper.php
CHANGED
|
@@ -26,6 +26,10 @@
|
|
| 26 |
class Paymill_Paymill_Helper_PaymentHelper extends Mage_Core_Helper_Abstract
|
| 27 |
{
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
protected $_responseCodes = array(
|
| 30 |
'10001' => 'General undefined response.',
|
| 31 |
'10002' => 'Still waiting on something.',
|
|
@@ -166,7 +170,6 @@ class Paymill_Paymill_Helper_PaymentHelper extends Mage_Core_Helper_Abstract
|
|
| 166 |
* Returns an instance of the paymentProcessor class.
|
| 167 |
* @param String $paymentCode name of the payment
|
| 168 |
* @param String $token Token generated by the Javascript
|
| 169 |
-
* @param Integer $authorizedAmount Amount used for the Token generation
|
| 170 |
* @return Services_Paymill_PaymentProcessor
|
| 171 |
*/
|
| 172 |
public function createPaymentProcessor($paymentCode, $token)
|
| 26 |
class Paymill_Paymill_Helper_PaymentHelper extends Mage_Core_Helper_Abstract
|
| 27 |
{
|
| 28 |
|
| 29 |
+
/**
|
| 30 |
+
* Error code mapping
|
| 31 |
+
* @var array
|
| 32 |
+
*/
|
| 33 |
protected $_responseCodes = array(
|
| 34 |
'10001' => 'General undefined response.',
|
| 35 |
'10002' => 'Still waiting on something.',
|
| 170 |
* Returns an instance of the paymentProcessor class.
|
| 171 |
* @param String $paymentCode name of the payment
|
| 172 |
* @param String $token Token generated by the Javascript
|
|
|
|
| 173 |
* @return Services_Paymill_PaymentProcessor
|
| 174 |
*/
|
| 175 |
public function createPaymentProcessor($paymentCode, $token)
|
app/code/community/Paymill/Paymill/Helper/TransactionHelper.php
CHANGED
|
@@ -48,6 +48,8 @@ class Paymill_Paymill_Helper_TransactionHelper extends Mage_Core_Helper_Abstract
|
|
| 48 |
{
|
| 49 |
$object->setAdditionalInformation('paymillTransactionId', $transactionModel->getTransactionId());
|
| 50 |
$object->setAdditionalInformation('paymillPreAuthFlag', $transactionModel->isPreAuthorization());
|
|
|
|
|
|
|
| 51 |
Mage::helper('paymill/loggingHelper')->log("Saved Transaction Data.", "Order " . $object->getIncrementId() .
|
| 52 |
$object->getReservedOrderId(), var_export($object->getAdditionalInformation(), true));
|
| 53 |
|
|
@@ -94,4 +96,19 @@ class Paymill_Paymill_Helper_TransactionHelper extends Mage_Core_Helper_Abstract
|
|
| 94 |
return $transactionModel;
|
| 95 |
}
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 48 |
{
|
| 49 |
$object->setAdditionalInformation('paymillTransactionId', $transactionModel->getTransactionId());
|
| 50 |
$object->setAdditionalInformation('paymillPreAuthFlag', $transactionModel->isPreAuthorization());
|
| 51 |
+
$object->setAdditionalInformation('paymillPrenotificationDate', $this->getPrenotificationDate($object->getOrder()));
|
| 52 |
+
|
| 53 |
Mage::helper('paymill/loggingHelper')->log("Saved Transaction Data.", "Order " . $object->getIncrementId() .
|
| 54 |
$object->getReservedOrderId(), var_export($object->getAdditionalInformation(), true));
|
| 55 |
|
| 96 |
return $transactionModel;
|
| 97 |
}
|
| 98 |
|
| 99 |
+
/**
|
| 100 |
+
* Calculates Date with the setted Prenotification Days and formats it
|
| 101 |
+
* @param Mage_Sales_Model_Order $order
|
| 102 |
+
* @return string
|
| 103 |
+
*/
|
| 104 |
+
private function getPrenotificationDate(Mage_Sales_Model_Order $order)
|
| 105 |
+
{
|
| 106 |
+
$dateTime = new DateTime($order->getCreatedAt());
|
| 107 |
+
$dateTime->modify('+' . Mage::helper('paymill/optionHelper')->getPrenotificationDays() . ' day');
|
| 108 |
+
$date = Mage::app()->getLocale()->storeDate($order->getStore(), Varien_Date::toTimestamp($dateTime->format('Y-m-d H:i:s')), true);
|
| 109 |
+
$date = Mage::helper('core')->formatDate($date, 'short', false);
|
| 110 |
+
|
| 111 |
+
return $date;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
}
|
app/code/community/Paymill/Paymill/Model/Log/Search.php
CHANGED
|
@@ -1,4 +1,22 @@
|
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
class Paymill_Paymill_Model_Log_Search extends Varien_Object
|
| 4 |
{
|
| 1 |
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category Paymill
|
| 16 |
+
* @package Paymill_Paymill
|
| 17 |
+
* @copyright Copyright (c) 2013 PAYMILL GmbH (https://paymill.com/en-gb/)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
|
| 21 |
class Paymill_Paymill_Model_Log_Search extends Varien_Object
|
| 22 |
{
|
app/code/community/Paymill/Paymill/Model/Method/MethodModelAbstract.php
CHANGED
|
@@ -84,10 +84,25 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 84 |
*/
|
| 85 |
protected $_code = 'paymill_abstract';
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
protected $_errorCode;
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
protected $_preAuthFlag;
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
protected $_canUseInternal = false;
|
| 92 |
|
| 93 |
/**
|
|
@@ -240,7 +255,7 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 240 |
|
| 241 |
$this->_existingClientHandling($clientId);
|
| 242 |
|
| 243 |
-
|
| 244 |
//Save Transaction Data
|
| 245 |
$transactionHelper = Mage::helper("paymill/transactionHelper");
|
| 246 |
|
|
@@ -270,6 +285,11 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 270 |
return false;
|
| 271 |
}
|
| 272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 273 |
private function _existingClientHandling($clientId)
|
| 274 |
{
|
| 275 |
if (!empty($clientId)) {
|
|
@@ -292,6 +312,10 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 292 |
}
|
| 293 |
}
|
| 294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
protected function _getShortCode()
|
| 296 |
{
|
| 297 |
$methods = array(
|
|
@@ -302,7 +326,14 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 302 |
return $methods[$this->_code];
|
| 303 |
}
|
| 304 |
|
| 305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
{
|
| 307 |
parent::refund($payment, $amount);
|
| 308 |
$order = $payment->getOrder();
|
|
@@ -317,6 +348,12 @@ abstract class Paymill_Paymill_Model_Method_MethodModelAbstract extends Mage_Pay
|
|
| 317 |
return $this;
|
| 318 |
}
|
| 319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
public function processInvoice($invoice, $payment)
|
| 321 |
{
|
| 322 |
parent::processInvoice($invoice, $payment);
|
| 84 |
*/
|
| 85 |
protected $_code = 'paymill_abstract';
|
| 86 |
|
| 87 |
+
/**
|
| 88 |
+
* Paymill error code
|
| 89 |
+
*
|
| 90 |
+
* @var string
|
| 91 |
+
*/
|
| 92 |
protected $_errorCode;
|
| 93 |
|
| 94 |
+
/**
|
| 95 |
+
* Is pre-auth
|
| 96 |
+
*
|
| 97 |
+
* @var boolean
|
| 98 |
+
*/
|
| 99 |
protected $_preAuthFlag;
|
| 100 |
|
| 101 |
+
/**
|
| 102 |
+
* Can use for internal payments
|
| 103 |
+
*
|
| 104 |
+
* @var boolean
|
| 105 |
+
*/
|
| 106 |
protected $_canUseInternal = false;
|
| 107 |
|
| 108 |
/**
|
| 255 |
|
| 256 |
$this->_existingClientHandling($clientId);
|
| 257 |
|
| 258 |
+
if ($success) {
|
| 259 |
//Save Transaction Data
|
| 260 |
$transactionHelper = Mage::helper("paymill/transactionHelper");
|
| 261 |
|
| 285 |
return false;
|
| 286 |
}
|
| 287 |
|
| 288 |
+
/**
|
| 289 |
+
* Handle paymill client update if exist
|
| 290 |
+
*
|
| 291 |
+
* @param string $clientId
|
| 292 |
+
*/
|
| 293 |
private function _existingClientHandling($clientId)
|
| 294 |
{
|
| 295 |
if (!empty($clientId)) {
|
| 312 |
}
|
| 313 |
}
|
| 314 |
|
| 315 |
+
/**
|
| 316 |
+
* Return paymill short code
|
| 317 |
+
* @return string
|
| 318 |
+
*/
|
| 319 |
protected function _getShortCode()
|
| 320 |
{
|
| 321 |
$methods = array(
|
| 326 |
return $methods[$this->_code];
|
| 327 |
}
|
| 328 |
|
| 329 |
+
/**
|
| 330 |
+
* Handle online refunds and trigger the refund at paymill side
|
| 331 |
+
*
|
| 332 |
+
* @param Varien_Object $payment
|
| 333 |
+
* @param float $amount
|
| 334 |
+
* @return Paymill_Paymill_Model_Method_MethodModelAbstract
|
| 335 |
+
*/
|
| 336 |
+
public function refund(Varien_Object $payment, $amount)
|
| 337 |
{
|
| 338 |
parent::refund($payment, $amount);
|
| 339 |
$order = $payment->getOrder();
|
| 348 |
return $this;
|
| 349 |
}
|
| 350 |
|
| 351 |
+
/**
|
| 352 |
+
* Set invoice transaction id
|
| 353 |
+
*
|
| 354 |
+
* @param Mage_Sales_Model_Order_Invoice $invoice
|
| 355 |
+
* @param type $payment
|
| 356 |
+
*/
|
| 357 |
public function processInvoice($invoice, $payment)
|
| 358 |
{
|
| 359 |
parent::processInvoice($invoice, $payment);
|
app/code/community/Paymill/Paymill/Model/Source/Creditcard/Creditcards.php
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Paymill_Paymill_Model_Source_Creditcard_Creditcards
|
| 3 |
+
{
|
| 4 |
+
/**
|
| 5 |
+
* Define which Creditcard Logos are shown for payment
|
| 6 |
+
*
|
| 7 |
+
* @return array
|
| 8 |
+
*/
|
| 9 |
+
public function toOptionArray()
|
| 10 |
+
{
|
| 11 |
+
$creditcards = array(
|
| 12 |
+
array(
|
| 13 |
+
'label' => Mage::helper('core')->__('Visa'),
|
| 14 |
+
'value' => 'visa'
|
| 15 |
+
),
|
| 16 |
+
array(
|
| 17 |
+
'label' => Mage::helper('core')->__('MasterCard'),
|
| 18 |
+
'value' => 'mastercard'
|
| 19 |
+
),
|
| 20 |
+
array(
|
| 21 |
+
'label' => Mage::helper('core')->__('American Express'),
|
| 22 |
+
'value' => 'amex'
|
| 23 |
+
),
|
| 24 |
+
array(
|
| 25 |
+
'label' => Mage::helper('core')->__('CartaSi'),
|
| 26 |
+
'value' => 'carta-si'
|
| 27 |
+
),
|
| 28 |
+
array(
|
| 29 |
+
'label' => Mage::helper('core')->__('Carte Bleue'),
|
| 30 |
+
'value' => 'carte-bleue'
|
| 31 |
+
),
|
| 32 |
+
array(
|
| 33 |
+
'label' => Mage::helper('core')->__('Diners Club'),
|
| 34 |
+
'value' => 'diners-club'
|
| 35 |
+
),
|
| 36 |
+
array(
|
| 37 |
+
'label' => Mage::helper('core')->__('JCB'),
|
| 38 |
+
'value' => 'jcb'
|
| 39 |
+
),
|
| 40 |
+
array(
|
| 41 |
+
'label' => Mage::helper('core')->__('Maestro'),
|
| 42 |
+
'value' => 'maestro'
|
| 43 |
+
),
|
| 44 |
+
array(
|
| 45 |
+
'label' => Mage::helper('core')->__('China UnionPay'),
|
| 46 |
+
'value' => 'china-unionpay'
|
| 47 |
+
),
|
| 48 |
+
array(
|
| 49 |
+
'label' => Mage::helper('core')->__('Discover Card'),
|
| 50 |
+
'value' => 'discover'
|
| 51 |
+
),
|
| 52 |
+
array(
|
| 53 |
+
'label' => Mage::helper('core')->__('Dankort'),
|
| 54 |
+
'value' => 'dankort'
|
| 55 |
+
)
|
| 56 |
+
);
|
| 57 |
+
return $creditcards;
|
| 58 |
+
}
|
| 59 |
+
}
|
app/code/community/Paymill/Paymill/Model/TransactionData.php
CHANGED
|
@@ -21,7 +21,16 @@
|
|
| 21 |
class Paymill_Paymill_Model_TransactionData
|
| 22 |
{
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
private $_preAuthorizationFlag = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
private $_transactionId = null;
|
| 26 |
|
| 27 |
/**
|
| 21 |
class Paymill_Paymill_Model_TransactionData
|
| 22 |
{
|
| 23 |
|
| 24 |
+
/**
|
| 25 |
+
* Is pre-auth
|
| 26 |
+
* @var boolean
|
| 27 |
+
*/
|
| 28 |
private $_preAuthorizationFlag = null;
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Paymill transaction id
|
| 32 |
+
* @var string
|
| 33 |
+
*/
|
| 34 |
private $_transactionId = null;
|
| 35 |
|
| 36 |
/**
|
app/code/community/Paymill/Paymill/etc/config.xml
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Paymill_Paymill>
|
| 5 |
-
<version>3.6.
|
| 6 |
</Paymill_Paymill>
|
| 7 |
</modules>
|
| 8 |
-
|
| 9 |
-
|
| 10 |
<global>
|
| 11 |
<blocks>
|
| 12 |
<paymill>
|
|
@@ -31,7 +31,7 @@
|
|
| 31 |
</entities>
|
| 32 |
</paymill_mysql4>
|
| 33 |
</models>
|
| 34 |
-
|
| 35 |
<helpers>
|
| 36 |
<paymill>
|
| 37 |
<class>Paymill_Paymill_Helper</class>
|
|
@@ -47,20 +47,20 @@
|
|
| 47 |
<use>core_setup</use>
|
| 48 |
</connection>
|
| 49 |
</paymill_setup>
|
| 50 |
-
|
| 51 |
<paymill_write>
|
| 52 |
<connection>
|
| 53 |
<use>core_write</use>
|
| 54 |
</connection>
|
| 55 |
</paymill_write>
|
| 56 |
-
|
| 57 |
<paymill_read>
|
| 58 |
<connection>
|
| 59 |
<use>core_read</use>
|
| 60 |
</connection>
|
| 61 |
</paymill_read>
|
| 62 |
</resources>
|
| 63 |
-
|
| 64 |
<events>
|
| 65 |
<sales_order_place_after>
|
| 66 |
<observers>
|
|
@@ -73,8 +73,8 @@
|
|
| 73 |
</sales_order_place_after>
|
| 74 |
</events>
|
| 75 |
</global>
|
| 76 |
-
|
| 77 |
-
|
| 78 |
<!-- declare default configuration values for this module -->
|
| 79 |
<default>
|
| 80 |
<!-- 'payment' configuration section (tab) -->
|
|
@@ -87,9 +87,10 @@
|
|
| 87 |
<title>paymill_credit_card</title>
|
| 88 |
<payment_action>authorize</payment_action>
|
| 89 |
</paymill_creditcard>
|
| 90 |
-
|
| 91 |
<paymill_directdebit>
|
| 92 |
<active>0</active>
|
|
|
|
| 93 |
<currency>EUR,USD</currency>
|
| 94 |
<model>paymill/method_methodModelDirectdebit</model>
|
| 95 |
<order_status>pending</order_status>
|
|
@@ -98,7 +99,7 @@
|
|
| 98 |
</paymill_directdebit>
|
| 99 |
</payment>
|
| 100 |
</default>
|
| 101 |
-
|
| 102 |
<frontend>
|
| 103 |
<layout>
|
| 104 |
<updates>
|
|
@@ -117,7 +118,7 @@
|
|
| 117 |
</modules>
|
| 118 |
</translate>
|
| 119 |
</frontend>
|
| 120 |
-
|
| 121 |
<adminhtml>
|
| 122 |
<translate>
|
| 123 |
<modules>
|
|
@@ -135,7 +136,7 @@
|
|
| 135 |
</paymill>
|
| 136 |
</updates>
|
| 137 |
</layout>
|
| 138 |
-
|
| 139 |
<global_search>
|
| 140 |
<paymill_search>
|
| 141 |
<class>paymill/log_search</class>
|
|
@@ -143,7 +144,7 @@
|
|
| 143 |
</paymill_search>
|
| 144 |
</global_search>
|
| 145 |
</adminhtml>
|
| 146 |
-
|
| 147 |
<admin>
|
| 148 |
<routers>
|
| 149 |
<paymill>
|
|
@@ -155,5 +156,5 @@
|
|
| 155 |
</paymill>
|
| 156 |
</routers>
|
| 157 |
</admin>
|
| 158 |
-
|
| 159 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Paymill_Paymill>
|
| 5 |
+
<version>3.6.6</version>
|
| 6 |
</Paymill_Paymill>
|
| 7 |
</modules>
|
| 8 |
+
|
| 9 |
+
|
| 10 |
<global>
|
| 11 |
<blocks>
|
| 12 |
<paymill>
|
| 31 |
</entities>
|
| 32 |
</paymill_mysql4>
|
| 33 |
</models>
|
| 34 |
+
|
| 35 |
<helpers>
|
| 36 |
<paymill>
|
| 37 |
<class>Paymill_Paymill_Helper</class>
|
| 47 |
<use>core_setup</use>
|
| 48 |
</connection>
|
| 49 |
</paymill_setup>
|
| 50 |
+
|
| 51 |
<paymill_write>
|
| 52 |
<connection>
|
| 53 |
<use>core_write</use>
|
| 54 |
</connection>
|
| 55 |
</paymill_write>
|
| 56 |
+
|
| 57 |
<paymill_read>
|
| 58 |
<connection>
|
| 59 |
<use>core_read</use>
|
| 60 |
</connection>
|
| 61 |
</paymill_read>
|
| 62 |
</resources>
|
| 63 |
+
|
| 64 |
<events>
|
| 65 |
<sales_order_place_after>
|
| 66 |
<observers>
|
| 73 |
</sales_order_place_after>
|
| 74 |
</events>
|
| 75 |
</global>
|
| 76 |
+
|
| 77 |
+
|
| 78 |
<!-- declare default configuration values for this module -->
|
| 79 |
<default>
|
| 80 |
<!-- 'payment' configuration section (tab) -->
|
| 87 |
<title>paymill_credit_card</title>
|
| 88 |
<payment_action>authorize</payment_action>
|
| 89 |
</paymill_creditcard>
|
| 90 |
+
|
| 91 |
<paymill_directdebit>
|
| 92 |
<active>0</active>
|
| 93 |
+
<prenotification>7</prenotification>
|
| 94 |
<currency>EUR,USD</currency>
|
| 95 |
<model>paymill/method_methodModelDirectdebit</model>
|
| 96 |
<order_status>pending</order_status>
|
| 99 |
</paymill_directdebit>
|
| 100 |
</payment>
|
| 101 |
</default>
|
| 102 |
+
|
| 103 |
<frontend>
|
| 104 |
<layout>
|
| 105 |
<updates>
|
| 118 |
</modules>
|
| 119 |
</translate>
|
| 120 |
</frontend>
|
| 121 |
+
|
| 122 |
<adminhtml>
|
| 123 |
<translate>
|
| 124 |
<modules>
|
| 136 |
</paymill>
|
| 137 |
</updates>
|
| 138 |
</layout>
|
| 139 |
+
|
| 140 |
<global_search>
|
| 141 |
<paymill_search>
|
| 142 |
<class>paymill/log_search</class>
|
| 144 |
</paymill_search>
|
| 145 |
</global_search>
|
| 146 |
</adminhtml>
|
| 147 |
+
|
| 148 |
<admin>
|
| 149 |
<routers>
|
| 150 |
<paymill>
|
| 156 |
</paymill>
|
| 157 |
</routers>
|
| 158 |
</admin>
|
| 159 |
+
|
| 160 |
</config>
|
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.
|
| 15 |
<sort_order>1</sort_order>
|
| 16 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 17 |
<frontend_type>label</frontend_type>
|
|
@@ -68,7 +68,7 @@
|
|
| 68 |
</logging_active>
|
| 69 |
</fields>
|
| 70 |
</paymill>
|
| 71 |
-
|
| 72 |
<paymill_creditcard module="paymill" translate="label">
|
| 73 |
<label>paymill_credit_card_label</label>
|
| 74 |
<show_in_default>1</show_in_default>
|
|
@@ -77,7 +77,7 @@
|
|
| 77 |
<sort_order>800</sort_order>
|
| 78 |
<fields>
|
| 79 |
<version>
|
| 80 |
-
<label>v3.6.
|
| 81 |
<sort_order>100</sort_order>
|
| 82 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 83 |
<frontend_type>label</frontend_type>
|
|
@@ -94,6 +94,15 @@
|
|
| 94 |
<show_in_website>1</show_in_website>
|
| 95 |
<show_in_store>1</show_in_store>
|
| 96 |
</active>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
<allowspecific translate="label">
|
| 98 |
<label>Payment from Applicable Countries</label>
|
| 99 |
<sort_order>220</sort_order>
|
|
@@ -170,7 +179,7 @@
|
|
| 170 |
</sort_order>
|
| 171 |
</fields>
|
| 172 |
</paymill_creditcard>
|
| 173 |
-
|
| 174 |
<paymill_directdebit module="paymill" translate="label">
|
| 175 |
<label>paymill_direct_debit_label</label>
|
| 176 |
<show_in_default>1</show_in_default>
|
|
@@ -179,7 +188,7 @@
|
|
| 179 |
<sort_order>800</sort_order>
|
| 180 |
<fields>
|
| 181 |
<version>
|
| 182 |
-
<label>v3.6.
|
| 183 |
<sort_order>100</sort_order>
|
| 184 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 185 |
<frontend_type>label</frontend_type>
|
|
@@ -196,6 +205,15 @@
|
|
| 196 |
<show_in_website>1</show_in_website>
|
| 197 |
<show_in_store>1</show_in_store>
|
| 198 |
</active>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
<allowspecific translate="label">
|
| 200 |
<label>Payment from Applicable Countries</label>
|
| 201 |
<sort_order>220</sort_order>
|
|
@@ -233,15 +251,6 @@
|
|
| 233 |
<show_in_website>1</show_in_website>
|
| 234 |
<show_in_store>1</show_in_store>
|
| 235 |
</order_status>
|
| 236 |
-
<sepa translate="label">
|
| 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>
|
| 11 |
<sort_order>700</sort_order>
|
| 12 |
<fields>
|
| 13 |
<version>
|
| 14 |
+
<label>v3.6.6</label>
|
| 15 |
<sort_order>1</sort_order>
|
| 16 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 17 |
<frontend_type>label</frontend_type>
|
| 68 |
</logging_active>
|
| 69 |
</fields>
|
| 70 |
</paymill>
|
| 71 |
+
|
| 72 |
<paymill_creditcard module="paymill" translate="label">
|
| 73 |
<label>paymill_credit_card_label</label>
|
| 74 |
<show_in_default>1</show_in_default>
|
| 77 |
<sort_order>800</sort_order>
|
| 78 |
<fields>
|
| 79 |
<version>
|
| 80 |
+
<label>v3.6.6</label>
|
| 81 |
<sort_order>100</sort_order>
|
| 82 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 83 |
<frontend_type>label</frontend_type>
|
| 94 |
<show_in_website>1</show_in_website>
|
| 95 |
<show_in_store>1</show_in_store>
|
| 96 |
</active>
|
| 97 |
+
<specificcreditcard translate="label">
|
| 98 |
+
<label>paymill_accepted_creditcards</label>
|
| 99 |
+
<frontend_type>multiselect</frontend_type>
|
| 100 |
+
<sort_order>210</sort_order>
|
| 101 |
+
<source_model>paymill/source_creditcard_creditcards</source_model>
|
| 102 |
+
<show_in_default>1</show_in_default>
|
| 103 |
+
<show_in_website>1</show_in_website>
|
| 104 |
+
<show_in_store>1</show_in_store>
|
| 105 |
+
</specificcreditcard>
|
| 106 |
<allowspecific translate="label">
|
| 107 |
<label>Payment from Applicable Countries</label>
|
| 108 |
<sort_order>220</sort_order>
|
| 179 |
</sort_order>
|
| 180 |
</fields>
|
| 181 |
</paymill_creditcard>
|
| 182 |
+
|
| 183 |
<paymill_directdebit module="paymill" translate="label">
|
| 184 |
<label>paymill_direct_debit_label</label>
|
| 185 |
<show_in_default>1</show_in_default>
|
| 188 |
<sort_order>800</sort_order>
|
| 189 |
<fields>
|
| 190 |
<version>
|
| 191 |
+
<label>v3.6.6</label>
|
| 192 |
<sort_order>100</sort_order>
|
| 193 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 194 |
<frontend_type>label</frontend_type>
|
| 205 |
<show_in_website>1</show_in_website>
|
| 206 |
<show_in_store>1</show_in_store>
|
| 207 |
</active>
|
| 208 |
+
<prenotification translate="label">
|
| 209 |
+
<label>paymill_prenotification</label>
|
| 210 |
+
<sort_order>210</sort_order>
|
| 211 |
+
<frontend_type>text</frontend_type>
|
| 212 |
+
<show_in_default>1</show_in_default>
|
| 213 |
+
<show_in_website>1</show_in_website>
|
| 214 |
+
<show_in_store>1</show_in_store>
|
| 215 |
+
<validate>validate-digits validate-not-negative-number</validate>
|
| 216 |
+
</prenotification>
|
| 217 |
<allowspecific translate="label">
|
| 218 |
<label>Payment from Applicable Countries</label>
|
| 219 |
<sort_order>220</sort_order>
|
| 251 |
<show_in_website>1</show_in_website>
|
| 252 |
<show_in_store>1</show_in_store>
|
| 253 |
</order_status>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
<checkout_desc translate="label">
|
| 255 |
<label>paymill_checkout_desc</label>
|
| 256 |
<sort_order>370</sort_order>
|
app/code/community/Paymill/Paymillcc/Block/Form/Paymill.php
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Paymill_Paymillcc_Block_Form_Paymill extends Mage_Payment_Block_Form
|
| 4 |
+
{
|
| 5 |
+
public $paymillBridgeEndpoint;
|
| 6 |
+
public $paymillPublicApiKey;
|
| 7 |
+
public $paymillDebugMode = "false";
|
| 8 |
+
|
| 9 |
+
protected function _construct()
|
| 10 |
+
{
|
| 11 |
+
|
| 12 |
+
// read some configuration data
|
| 13 |
+
$this->paymillPublicApiKey = Mage::getStoreConfig(
|
| 14 |
+
'payment/paymillcc/paymill_public_api_key',
|
| 15 |
+
Mage::app()->getStore()
|
| 16 |
+
);
|
| 17 |
+
|
| 18 |
+
$this->paymillBridgeEndpoint = Mage::getStoreConfig(
|
| 19 |
+
'payment/paymillcc/paymill_bridge_endpoint',
|
| 20 |
+
Mage::app()->getStore()
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
+
$this->paymillDebugMode = Mage::getStoreConfig(
|
| 24 |
+
'payment/paymillcc/paymill_debug_mode',
|
| 25 |
+
Mage::app()->getStore()
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
$this->showPaymillLabel = Mage::getStoreConfig(
|
| 29 |
+
'payment/paymillcc/paymill_show_credits',
|
| 30 |
+
Mage::app()->getStore()
|
| 31 |
+
);
|
| 32 |
+
|
| 33 |
+
$this->paymillLibVersion = Mage::getStoreConfig(
|
| 34 |
+
'payment/paymillcc/paymill_lib_version',
|
| 35 |
+
Mage::app()->getStore()
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
$this->paymillApiEndpoint = Mage::getStoreConfig(
|
| 39 |
+
'payment/paymillcc/paymill_api_endpoint',
|
| 40 |
+
Mage::app()->getStore()
|
| 41 |
+
);
|
| 42 |
+
|
| 43 |
+
$this->paymillPaymentAmount = Mage::getSingleton('core/session')->getPaymillPaymentAmount();
|
| 44 |
+
$this->paymillPaymentCurrency = Mage::getSingleton('core/session')->getPaymillPaymentCurrency();
|
| 45 |
+
|
| 46 |
+
if ($this->paymillDebugMode == "") {
|
| 47 |
+
$this->paymillDebugMode = "false";
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
parent::_construct();
|
| 51 |
+
|
| 52 |
+
// load paymill form
|
| 53 |
+
$this->setTemplate('paymill/form/paymill.phtml');
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
?>
|
app/code/community/Paymill/Paymillcc/Block/Info/Paymill.php
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Paymill_Paymillcc_Block_Info_Paymill extends Mage_Payment_Block_Info_Cc
|
| 4 |
+
{
|
| 5 |
+
/**
|
| 6 |
+
* Prepare credit card related payment info
|
| 7 |
+
*
|
| 8 |
+
* @param Varien_Object|array $transport
|
| 9 |
+
* @return Varien_Object
|
| 10 |
+
*/
|
| 11 |
+
protected function _prepareSpecificInformation($transport = null)
|
| 12 |
+
{
|
| 13 |
+
$transport = parent::_prepareSpecificInformation($transport);
|
| 14 |
+
$additionalInformation = array();
|
| 15 |
+
if(Mage::app()->getStore()->isAdmin()) {
|
| 16 |
+
$order = Mage::registry('current_order');
|
| 17 |
+
if(!$order && Mage::registry('current_shipment')) {
|
| 18 |
+
$order = Mage::registry('current_shipment')->getOrder();
|
| 19 |
+
}
|
| 20 |
+
elseif (!$order && Mage::registry('current_invoice')) {
|
| 21 |
+
$order = Mage::registry('current_invoice')->getOrder();
|
| 22 |
+
} elseif (!$order && Mage::registry('current_creditmemo')) {
|
| 23 |
+
$order = Mage::registry('current_creditmemo')->getOrder();
|
| 24 |
+
}
|
| 25 |
+
if($order) {
|
| 26 |
+
$additionalInformation = array(
|
| 27 |
+
'Transaction ID' => ' ' . $order->getPayment()->getAdditionalInformation('paymill_transaction_id')
|
| 28 |
+
);
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
return $transport->setData($additionalInformation);
|
| 33 |
+
}
|
| 34 |
+
}
|
app/code/community/Paymill/Paymillcc/Helper/Data.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Paymill_Paymillcc_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
+
{
|
| 4 |
+
|
| 5 |
+
}
|
| 6 |
+
?>
|
app/code/community/Paymill/Paymillcc/LibraryVersion.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Paymill_Paymillcc_LibraryVersion
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
public function toOptionArray()
|
| 7 |
+
{
|
| 8 |
+
return array(
|
| 9 |
+
array('value' => 'v2', 'label' => 'V2')
|
| 10 |
+
);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
}
|
app/code/community/Paymill/Paymillcc/Model/Customerdata.php
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillcc_Model_Customerdata extends Mage_Core_Model_Abstract
|
| 22 |
+
{
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Construct
|
| 26 |
+
*/
|
| 27 |
+
function _construct()
|
| 28 |
+
{
|
| 29 |
+
parent::_construct();
|
| 30 |
+
$this->_init('paymillcc/customerdata');
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public function setEntry($customerId, $data)
|
| 34 |
+
{
|
| 35 |
+
//$this->setId(null);
|
| 36 |
+
$this->setUserId($customerId);
|
| 37 |
+
$this->setUserData($data);
|
| 38 |
+
$this->save();
|
| 39 |
+
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public function loadByUserId($customerId)
|
| 43 |
+
{
|
| 44 |
+
return $this->loadByAttribute('user_id', $customerId);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
public function loadByAttribute($attribute, $value, $additionalAttributes = '*')
|
| 48 |
+
{
|
| 49 |
+
$collection = $this->getResourceCollection()
|
| 50 |
+
->addFieldToSelect($additionalAttributes)
|
| 51 |
+
->addFieldToFilter($attribute, $value);
|
| 52 |
+
|
| 53 |
+
foreach ($collection as $object) {
|
| 54 |
+
return $object;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
return null;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
}
|
app/code/community/Paymill/Paymillcc/Model/Mysql4/Customerdata.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillcc_Model_Mysql4_Customerdata extends Mage_Core_Model_Mysql4_Abstract
|
| 22 |
+
{
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Construct
|
| 26 |
+
*/
|
| 27 |
+
function _construct()
|
| 28 |
+
{
|
| 29 |
+
$this->_init('paymillcc/customerdata', 'id');
|
| 30 |
+
}
|
| 31 |
+
}
|
app/code/community/Paymill/Paymillcc/Model/Mysql4/Customerdata/Collection.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillcc_Model_Mysql4_Customerdata_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
| 22 |
+
{
|
| 23 |
+
/**
|
| 24 |
+
* Construct
|
| 25 |
+
*/
|
| 26 |
+
public function _construct()
|
| 27 |
+
{
|
| 28 |
+
parent::_construct();
|
| 29 |
+
$this->_init('paymillcc/customerdata');
|
| 30 |
+
}
|
| 31 |
+
}
|
app/code/community/Paymill/Paymillcc/Model/PaymentAbstract.php
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
abstract class Paymill_Paymillcc_Model_PaymentAbstract extends Mage_Payment_Model_Method_Cc
|
| 4 |
+
{
|
| 5 |
+
/**
|
| 6 |
+
* Processes the payment against the paymill API
|
| 7 |
+
* @param $params array The settings array
|
| 8 |
+
* @return boolean
|
| 9 |
+
*/
|
| 10 |
+
protected function _processPayment($params)
|
| 11 |
+
{
|
| 12 |
+
|
| 13 |
+
// setup the logger
|
| 14 |
+
$logger = $params['loggerCallback'];
|
| 15 |
+
|
| 16 |
+
// setup client params
|
| 17 |
+
$clientParams = array(
|
| 18 |
+
'email' => $params['email'],
|
| 19 |
+
'description' => $params['name']
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
// setup credit card params
|
| 23 |
+
$paymentParams = array(
|
| 24 |
+
'token' => $params['token']
|
| 25 |
+
);
|
| 26 |
+
|
| 27 |
+
// setup transaction params
|
| 28 |
+
$transactionParams = array(
|
| 29 |
+
'amount' => $params['amount'],
|
| 30 |
+
'currency' => $params['currency'],
|
| 31 |
+
'description' => $params['description']
|
| 32 |
+
);
|
| 33 |
+
|
| 34 |
+
require_once $params['libBase'] . 'Services/Paymill/Transactions.php';
|
| 35 |
+
require_once $params['libBase'] . 'Services/Paymill/Clients.php';
|
| 36 |
+
require_once $params['libBase'] . 'Services/Paymill/Payments.php';
|
| 37 |
+
|
| 38 |
+
$clientsObject = new Services_Paymill_Clients(
|
| 39 |
+
$params['privateKey'], $params['apiUrl']
|
| 40 |
+
);
|
| 41 |
+
$transactionsObject = new Services_Paymill_Transactions(
|
| 42 |
+
$params['privateKey'], $params['apiUrl']
|
| 43 |
+
);
|
| 44 |
+
$paymentsObject = new Services_Paymill_Payments(
|
| 45 |
+
$params['privateKey'], $params['apiUrl']
|
| 46 |
+
);
|
| 47 |
+
|
| 48 |
+
// perform conection to the Paymill API and trigger the payment
|
| 49 |
+
try {
|
| 50 |
+
if (!array_key_exists('client_id', $params)) {
|
| 51 |
+
$client = $clientsObject->create($clientParams);
|
| 52 |
+
if (!isset($client['id'])) {
|
| 53 |
+
call_user_func_array($logger, array("No client created" . var_export($client, true)));
|
| 54 |
+
return false;
|
| 55 |
+
} else {
|
| 56 |
+
call_user_func_array($logger, array("Client created: " . $client['id']));
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
// create card
|
| 60 |
+
$paymentParams['client'] = $client['id'];
|
| 61 |
+
} else {
|
| 62 |
+
$paymentParams['client'] = $params['client_id'];
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
$payment = $paymentsObject->create($paymentParams);
|
| 66 |
+
if (!array_key_exists('client_id', $params)) {
|
| 67 |
+
if (!isset($payment['id'])) {
|
| 68 |
+
call_user_func_array($logger, array("No payment (credit card) created: " . var_export($payment, true) . " with params " . var_export($paymentParams, true)));
|
| 69 |
+
return false;
|
| 70 |
+
} else {
|
| 71 |
+
call_user_func_array($logger, array("Payment (credit card) created: " . $payment['id']));
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
// create transaction
|
| 75 |
+
//$transactionParams['client'] = $client['id'];
|
| 76 |
+
$transactionParams['payment'] = $payment['id'];
|
| 77 |
+
} else {
|
| 78 |
+
$transactionParams['payment'] = $params['payment_id'];
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
$transaction = $transactionsObject->create($transactionParams);
|
| 82 |
+
|
| 83 |
+
if(isset($transaction['data']['response_code'])){
|
| 84 |
+
call_user_func_array($logger, array("An Error occured: " . var_export($transaction, true)));
|
| 85 |
+
return false;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
if (!isset($transaction['id'])) {
|
| 89 |
+
call_user_func_array($logger, array("No transaction created" . var_export($transaction, true)));
|
| 90 |
+
return false;
|
| 91 |
+
} else {
|
| 92 |
+
$this->_setPaymillClientToken($client['id']);
|
| 93 |
+
$this->_setPaymillPaymentToken($payment['id']);
|
| 94 |
+
$this->_setPaymillTransactionId($transaction['id']);
|
| 95 |
+
call_user_func_array($logger, array("Transaction created: " . $transaction['id']));
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// check result
|
| 99 |
+
if (is_array($transaction) && array_key_exists('status', $transaction)) {
|
| 100 |
+
if ($transaction['status'] == "closed") {
|
| 101 |
+
// transaction was successfully issued
|
| 102 |
+
return true;
|
| 103 |
+
} elseif ($transaction['status'] == "open") {
|
| 104 |
+
// transaction was issued but status is open for any reason
|
| 105 |
+
call_user_func_array($logger, array("Status is open."));
|
| 106 |
+
return false;
|
| 107 |
+
} else {
|
| 108 |
+
// another error occured
|
| 109 |
+
call_user_func_array($logger, array("Unknown error." . var_export($transaction, true)));
|
| 110 |
+
return false;
|
| 111 |
+
}
|
| 112 |
+
} else {
|
| 113 |
+
// another error occured
|
| 114 |
+
call_user_func_array($logger, array("Transaction could not be issued."));
|
| 115 |
+
return false;
|
| 116 |
+
}
|
| 117 |
+
} catch (Services_Paymill_Exception $ex) {
|
| 118 |
+
// paymill wrapper threw an exception
|
| 119 |
+
call_user_func_array($logger, array("Exception thrown from paymill wrapper: " . $ex->getMessage()));
|
| 120 |
+
return false;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
return true;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
protected abstract function _setPaymillClientToken($id);
|
| 127 |
+
|
| 128 |
+
protected abstract function _setPaymillPaymentToken($id);
|
| 129 |
+
|
| 130 |
+
protected abstract function _setPaymillTransactionId($id);
|
| 131 |
+
}
|
app/code/community/Paymill/Paymillcc/Model/PaymentMethod.php
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
// require this here due to a Magento bug
|
| 4 |
+
require_once 'lib/Zend/Log.php';
|
| 5 |
+
require_once 'lib/Zend/Log/Formatter/Simple.php';
|
| 6 |
+
require_once 'lib/Zend/Log/Writer/Stream.php';
|
| 7 |
+
|
| 8 |
+
class Paymill_Paymillcc_Model_PaymentMethod extends Paymill_Paymillcc_Model_PaymentAbstract
|
| 9 |
+
{
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* unique internal payment method identifier
|
| 13 |
+
*
|
| 14 |
+
* @var string [a-z0-9_]
|
| 15 |
+
*/
|
| 16 |
+
protected $_code = 'paymillcc';
|
| 17 |
+
protected $_formBlockType = 'paymillcc/form_paymill';
|
| 18 |
+
protected $_infoBlockType = 'paymillcc/info_paymill';
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* Is this payment method a gateway (online auth/charge) ?
|
| 22 |
+
*/
|
| 23 |
+
protected $_isGateway = false;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Can authorize online?
|
| 27 |
+
*/
|
| 28 |
+
protected $_canAuthorize = true;
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Can capture funds online?
|
| 32 |
+
*/
|
| 33 |
+
protected $_canCapture = false;
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Can capture partial amounts online?
|
| 37 |
+
*/
|
| 38 |
+
protected $_canCapturePartial = false;
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* Can refund online?
|
| 42 |
+
*/
|
| 43 |
+
protected $_canRefund = false;
|
| 44 |
+
|
| 45 |
+
/**
|
| 46 |
+
* Can void transactions online?
|
| 47 |
+
*/
|
| 48 |
+
protected $_canVoid = true;
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* Can use this payment method in administration panel?
|
| 52 |
+
*/
|
| 53 |
+
protected $_canUseInternal = false;
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* Can show this payment method as an option on checkout payment page?
|
| 57 |
+
*/
|
| 58 |
+
protected $_canUseCheckout = true;
|
| 59 |
+
|
| 60 |
+
/**
|
| 61 |
+
* Is this payment method suitable for multi-shipping checkout?
|
| 62 |
+
*/
|
| 63 |
+
protected $_canUseForMultishipping = true;
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Can save credit card information for future processing?
|
| 67 |
+
*/
|
| 68 |
+
protected $_canSaveCc = false;
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
*/
|
| 72 |
+
public function assignData($data)
|
| 73 |
+
{
|
| 74 |
+
|
| 75 |
+
if (!($data instanceof Varien_Object)) {
|
| 76 |
+
$data = new Varien_Object($data);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
$info = $this->getInfoInstance();
|
| 80 |
+
|
| 81 |
+
// read the paymill_transaction_token from the credit
|
| 82 |
+
// card form and store it for later use
|
| 83 |
+
$info->setAdditionalInformation(
|
| 84 |
+
"paymill_transaction_token", $data->paymill_transaction_token
|
| 85 |
+
);
|
| 86 |
+
|
| 87 |
+
return $this;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
/**
|
| 91 |
+
* Serverside validations.
|
| 92 |
+
*/
|
| 93 |
+
public function validate()
|
| 94 |
+
{
|
| 95 |
+
$info = $this->getInfoInstance();
|
| 96 |
+
$token = $info->getAdditionalInformation("paymill_transaction_token");
|
| 97 |
+
if (!$token && is_null(Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))) {
|
| 98 |
+
self::logAction("No transaction code was received in PaymentMethod (Paymill_Paymillcc_Model_PaymentMethod::validate)");
|
| 99 |
+
Mage::throwException(
|
| 100 |
+
Mage::helper('paymillelv')->__("Error while performing your payment. The payment was not processed.")
|
| 101 |
+
);
|
| 102 |
+
}
|
| 103 |
+
return $this;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* This method is triggered after order is placed.
|
| 108 |
+
*
|
| 109 |
+
* @return boolean Returns true if the payment was successfully processed
|
| 110 |
+
*/
|
| 111 |
+
public function authorize(Varien_Object $payment, $amount)
|
| 112 |
+
{
|
| 113 |
+
$info = $this->getInfoInstance();
|
| 114 |
+
// retrieve the transaction_token and save it for later processing
|
| 115 |
+
$token = $info->getAdditionalInformation("paymill_transaction_token");
|
| 116 |
+
|
| 117 |
+
// process the payment
|
| 118 |
+
$result = $this->processPayment($payment, $amount, $token);
|
| 119 |
+
if ($result == false) {
|
| 120 |
+
$payment->setStatus('ERROR')->setIsTransactionClosed(1)->save();
|
| 121 |
+
throw new Exception(
|
| 122 |
+
Mage::helper('paymillcc')->__("Payment was not successfully processed. See log.")
|
| 123 |
+
);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getStoreConfig('payment/paymillcc/recurring', Mage::app()->getStore())) {
|
| 127 |
+
if (is_null(Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))) {
|
| 128 |
+
Mage::getSingleton("paymillcc/customerdata")->setEntry(
|
| 129 |
+
Mage::getSingleton('customer/session')->getCustomer()->getId(),
|
| 130 |
+
Mage::getSingleton('core/session')->getPaymillCcClientToken() . '|' . Mage::getSingleton('core/session')->getPaymillCcPaymentToken()
|
| 131 |
+
);
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
$transactionId = Mage::getSingleton('core/session')->getPaymillTransactionId();
|
| 136 |
+
$info->setAdditionalInformation('paymill_transaction_id', $transactionId);
|
| 137 |
+
$payment->setStatus('APPROVED')
|
| 138 |
+
->setTransactionId($transactionId)
|
| 139 |
+
->setIsTransactionClosed(1)
|
| 140 |
+
->save();
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
return $this;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
/**
|
| 147 |
+
* This method triggers the payment.
|
| 148 |
+
* It is triggered when the invoice is created.
|
| 149 |
+
* @return void
|
| 150 |
+
*/
|
| 151 |
+
public function capture(Varien_Object $payment, $amount)
|
| 152 |
+
{
|
| 153 |
+
return $this;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
/**
|
| 157 |
+
* Specify currency support
|
| 158 |
+
*/
|
| 159 |
+
public function canUseForCurrency($currency)
|
| 160 |
+
{
|
| 161 |
+
$currency = Mage::getSingleton('checkout/session')->getQuote()->getQuoteCurrencyCode();
|
| 162 |
+
Mage::getSingleton('core/session')->setPaymillPaymentCurrency($currency);
|
| 163 |
+
$acceptedCurrencies = Mage::getStoreConfig(
|
| 164 |
+
'payment/paymillcc/paymill_accepted_currencies', Mage::app()->getStore()
|
| 165 |
+
);
|
| 166 |
+
|
| 167 |
+
$acceptedCurrenciesExploded = explode(',', trim(strtolower($acceptedCurrencies)));
|
| 168 |
+
|
| 169 |
+
if (!in_array(strtolower($currency), $acceptedCurrenciesExploded)) {
|
| 170 |
+
return false;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
return true;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
/**
|
| 177 |
+
* Specify minimum order amount from config
|
| 178 |
+
* @return boolean Returns true if the payment method is available for the current context
|
| 179 |
+
*/
|
| 180 |
+
public function isAvailable($quote = null)
|
| 181 |
+
{
|
| 182 |
+
if (is_object($quote)) {
|
| 183 |
+
$amount = number_format($quote->getBaseGrandTotal(), 2, '.', '');
|
| 184 |
+
|
| 185 |
+
Mage::getSingleton('core/session')->setPaymillPaymentAmount($amount);
|
| 186 |
+
|
| 187 |
+
// is active
|
| 188 |
+
$paymillActive = Mage::getStoreConfig(
|
| 189 |
+
'payment/paymillcc/active', Mage::app()->getStore()
|
| 190 |
+
);
|
| 191 |
+
|
| 192 |
+
if (!$paymillActive) {
|
| 193 |
+
return false;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
// get minimum order amount
|
| 197 |
+
$paymillMinimumOrderAmount = Mage::getStoreConfig(
|
| 198 |
+
'payment/paymillcc/paymill_minimum_order_amount', Mage::app()->getStore()
|
| 199 |
+
);
|
| 200 |
+
|
| 201 |
+
if ($quote && $quote->getBaseGrandTotal() <= 0.5) {
|
| 202 |
+
return false;
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
if ($quote && $quote->getBaseGrandTotal() <= $paymillMinimumOrderAmount) {
|
| 206 |
+
return false;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
return true;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
return false;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
/**
|
| 216 |
+
* The payment capturing method
|
| 217 |
+
* @param Varien_Object $payment The payment object
|
| 218 |
+
* @param $amount The amount to be captures
|
| 219 |
+
* @return boolean $result Returns true if the payment was successfully processed
|
| 220 |
+
*/
|
| 221 |
+
public function processPayment(Varien_Object $payment, $amount, $token)
|
| 222 |
+
{
|
| 223 |
+
// get some relevant objects
|
| 224 |
+
$order = $payment->getOrder();
|
| 225 |
+
$billing = $order->getBillingAddress();
|
| 226 |
+
|
| 227 |
+
// check the library version
|
| 228 |
+
$paymillLibraryVersion = Mage::getStoreConfig(
|
| 229 |
+
'payment/paymillcc/paymill_lib_version', Mage::app()->getStore()
|
| 230 |
+
);
|
| 231 |
+
|
| 232 |
+
// keep this for further versions
|
| 233 |
+
if ($paymillLibraryVersion == "v2") {
|
| 234 |
+
$libBase = 'lib/paymill/v2/lib/';
|
| 235 |
+
$libVersion = 'v2';
|
| 236 |
+
} else {
|
| 237 |
+
$libBase = 'lib/paymill/v2/lib/';
|
| 238 |
+
$libVersion = 'v2';
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
$data = array(
|
| 242 |
+
'libVersion' => $libVersion,
|
| 243 |
+
'token' => $token,
|
| 244 |
+
'amount' => round($amount * 100),
|
| 245 |
+
'currency' => strtoupper($payment->getOrder()->getOrderCurrency()->getCode()),
|
| 246 |
+
'name' => $billing->getName(),
|
| 247 |
+
'email' => $order->getCustomerEmail(),
|
| 248 |
+
'description' => 'Order from: '
|
| 249 |
+
. Mage::getStoreConfig('general/store_information/name', Mage::app()->getStore())
|
| 250 |
+
. ' ' . sprintf('#%s, %s', $order->getIncrementId(), $order->getCustomerEmail()),
|
| 251 |
+
'libBase' => $libBase,
|
| 252 |
+
'privateKey' => Mage::getStoreConfig(
|
| 253 |
+
'payment/paymillcc/paymill_private_api_key', Mage::app()->getStore()
|
| 254 |
+
),
|
| 255 |
+
'apiUrl' => Mage::getStoreConfig(
|
| 256 |
+
'payment/paymillcc/paymill_api_endpoint', Mage::app()->getStore()
|
| 257 |
+
),
|
| 258 |
+
'loggerCallback' => array('Paymill_Paymillcc_Model_PaymentMethod', 'logAction')
|
| 259 |
+
);
|
| 260 |
+
|
| 261 |
+
$paymillUser = Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId());
|
| 262 |
+
if (!is_null($paymillUser)){
|
| 263 |
+
$token = explode('|', $paymillUser->getUserData());
|
| 264 |
+
$data['client_id'] = $token[0];
|
| 265 |
+
$data['payment_id'] = $token[1];
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// process the payment
|
| 269 |
+
$result = $this->_processPayment($data);
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
return $result;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
protected function _setPaymillClientToken($id)
|
| 277 |
+
{
|
| 278 |
+
Mage::getSingleton('core/session')->setPaymillCcClientToken($id);
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
protected function _setPaymillPaymentToken($id)
|
| 282 |
+
{
|
| 283 |
+
Mage::getSingleton('core/session')->setPaymillCcPaymentToken($id);
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
protected function _setPaymillTransactionId($id)
|
| 287 |
+
{
|
| 288 |
+
Mage::getSingleton('core/session')->setPaymillTransactionId($id);
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
/**
|
| 292 |
+
* Logs an event
|
| 293 |
+
* @param $message The message to be logged
|
| 294 |
+
*/
|
| 295 |
+
public static function logAction($message)
|
| 296 |
+
{
|
| 297 |
+
Mage::log($message);
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
}
|
app/code/community/Paymill/Paymillcc/etc/config.xml
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Paymill_Paymillcc>
|
| 5 |
+
<version>2.1.4</version>
|
| 6 |
+
</Paymill_Paymillcc>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<blocks>
|
| 10 |
+
<paymillcc>
|
| 11 |
+
<class>Paymill_Paymillcc_Block</class>
|
| 12 |
+
</paymillcc>
|
| 13 |
+
</blocks>
|
| 14 |
+
<models>
|
| 15 |
+
<paymillcc>
|
| 16 |
+
<class>Paymill_Paymillcc_Model</class>
|
| 17 |
+
<resourceModel>paymillcc_mysql4</resourceModel>
|
| 18 |
+
</paymillcc>
|
| 19 |
+
|
| 20 |
+
<paymillcc_mysql4>
|
| 21 |
+
<class>Paymill_Paymillcc_Model_Mysql4</class>
|
| 22 |
+
<entities>
|
| 23 |
+
<customerdata>
|
| 24 |
+
<table>paymill_cc_additional_customer_data</table>
|
| 25 |
+
</customerdata>
|
| 26 |
+
</entities>
|
| 27 |
+
</paymillcc_mysql4>
|
| 28 |
+
</models>
|
| 29 |
+
<resources>
|
| 30 |
+
<paymillcc_setup>
|
| 31 |
+
<setup>
|
| 32 |
+
<module>Paymill_Paymillcc</module>
|
| 33 |
+
</setup>
|
| 34 |
+
<connection>
|
| 35 |
+
<use>core_setup</use>
|
| 36 |
+
</connection>
|
| 37 |
+
</paymillcc_setup>
|
| 38 |
+
<paymillcc_write>
|
| 39 |
+
<connection>
|
| 40 |
+
<use>core_write</use>
|
| 41 |
+
</connection>
|
| 42 |
+
</paymillcc_write>
|
| 43 |
+
<paymillcc_read>
|
| 44 |
+
<connection>
|
| 45 |
+
<use>core_read</use>
|
| 46 |
+
</connection>
|
| 47 |
+
</paymillcc_read>
|
| 48 |
+
</resources>
|
| 49 |
+
<helpers>
|
| 50 |
+
<paymillcc>
|
| 51 |
+
<class>Paymill_Paymillcc_Helper</class>
|
| 52 |
+
</paymillcc>
|
| 53 |
+
</helpers>
|
| 54 |
+
</global>
|
| 55 |
+
<frontend>
|
| 56 |
+
<translate>
|
| 57 |
+
<modules>
|
| 58 |
+
<Paymill_Paymillcc>
|
| 59 |
+
<files>
|
| 60 |
+
<default>Paymill_Paymillcc.csv</default>
|
| 61 |
+
</files>
|
| 62 |
+
</Paymill_Paymillcc>
|
| 63 |
+
</modules>
|
| 64 |
+
</translate>
|
| 65 |
+
</frontend>
|
| 66 |
+
<adminhtml>
|
| 67 |
+
<translate>
|
| 68 |
+
<modules>
|
| 69 |
+
<Paymill_Paymillcc>
|
| 70 |
+
<files>
|
| 71 |
+
<default>Paymill_Paymillcc.csv</default>
|
| 72 |
+
</files>
|
| 73 |
+
</Paymill_Paymillcc>
|
| 74 |
+
</modules>
|
| 75 |
+
</translate>
|
| 76 |
+
</adminhtml>
|
| 77 |
+
<default>
|
| 78 |
+
<payment>
|
| 79 |
+
<paymillcc>
|
| 80 |
+
<active>0</active>
|
| 81 |
+
<model>paymillcc/paymentMethod</model>
|
| 82 |
+
<order_status>pending</order_status>
|
| 83 |
+
<title>Kreditkartenzahlung</title>
|
| 84 |
+
<cctypes>VI,MC</cctypes>
|
| 85 |
+
<payment_action>authorize</payment_action>
|
| 86 |
+
<allowspecific>0</allowspecific>
|
| 87 |
+
<paymill_bridge_endpoint>https://bridge.paymill.com/</paymill_bridge_endpoint>
|
| 88 |
+
<paymill_api_endpoint>https://api.paymill.com/v2/</paymill_api_endpoint>
|
| 89 |
+
<paymill_show_credits>1</paymill_show_credits>
|
| 90 |
+
<paymill_accepted_currencies>EUR</paymill_accepted_currencies>
|
| 91 |
+
<paymill_lib_version>v2</paymill_lib_version>
|
| 92 |
+
</paymillcc>
|
| 93 |
+
</payment>
|
| 94 |
+
</default>
|
| 95 |
+
</config>
|
app/code/community/Paymill/Paymillcc/etc/system.xml
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<sections>
|
| 4 |
+
<!-- payment tab -->
|
| 5 |
+
<payment>
|
| 6 |
+
<groups>
|
| 7 |
+
<!-- newmodule fieldset -->
|
| 8 |
+
<paymillcc translate="label" module="paymillcc">
|
| 9 |
+
<!-- will have title 'New Module' -->
|
| 10 |
+
<label>Paymill Kreditkartenzahlung</label>
|
| 11 |
+
<!-- position between other payment methods -->
|
| 12 |
+
<sort_order>1</sort_order>
|
| 13 |
+
<!-- do not show this configuration options in store scope -->
|
| 14 |
+
<show_in_default>1</show_in_default>
|
| 15 |
+
<show_in_website>1</show_in_website>
|
| 16 |
+
<show_in_store>1</show_in_store>
|
| 17 |
+
<comment><![CDATA[<a href="https://www.paymill.de/" target="_blank">Click here to get a Paymill account</a>]]></comment>
|
| 18 |
+
<fields>
|
| 19 |
+
<!-- is this payment method active for the website? -->
|
| 20 |
+
<active translate="label">
|
| 21 |
+
<!-- label for the field -->
|
| 22 |
+
<label>Enabled</label>
|
| 23 |
+
<!-- input type for configuration value -->
|
| 24 |
+
<frontend_type>select</frontend_type>
|
| 25 |
+
<!-- model to take the option values from -->
|
| 26 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 27 |
+
<!-- field position -->
|
| 28 |
+
<sort_order>1</sort_order>
|
| 29 |
+
<!-- do not show this field in store scope -->
|
| 30 |
+
<show_in_default>1</show_in_default>
|
| 31 |
+
<show_in_website>1</show_in_website>
|
| 32 |
+
<show_in_store>1</show_in_store>
|
| 33 |
+
</active>
|
| 34 |
+
<recurring translate="label">
|
| 35 |
+
<label>Recurring Payment</label>
|
| 36 |
+
<frontend_type>select</frontend_type>
|
| 37 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 38 |
+
<sort_order>2</sort_order>
|
| 39 |
+
<show_in_default>1</show_in_default>
|
| 40 |
+
<show_in_website>1</show_in_website>
|
| 41 |
+
<show_in_store>1</show_in_store>
|
| 42 |
+
</recurring>
|
| 43 |
+
<sort_order translate="label">
|
| 44 |
+
<label>Sort Order</label>
|
| 45 |
+
<frontend_type>text</frontend_type>
|
| 46 |
+
<sort_order>100</sort_order>
|
| 47 |
+
<show_in_default>1</show_in_default>
|
| 48 |
+
<show_in_website>1</show_in_website>
|
| 49 |
+
<show_in_store>1</show_in_store>
|
| 50 |
+
<frontend_class>validate-number</frontend_class>
|
| 51 |
+
</sort_order>
|
| 52 |
+
<paymill_minimum_order_amount translate="label">
|
| 53 |
+
<label>Minimum order amount</label>
|
| 54 |
+
<frontend_type>text</frontend_type>
|
| 55 |
+
<sort_order>100</sort_order>
|
| 56 |
+
<show_in_default>1</show_in_default>
|
| 57 |
+
<show_in_website>1</show_in_website>
|
| 58 |
+
<show_in_store>1</show_in_store>
|
| 59 |
+
<frontend_class>validate-number</frontend_class>
|
| 60 |
+
</paymill_minimum_order_amount>
|
| 61 |
+
<paymill_debug_mode translate="label">
|
| 62 |
+
<label>Paymill debug mode</label>
|
| 63 |
+
<frontend_type>select</frontend_type>
|
| 64 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 65 |
+
<sort_order>4</sort_order>
|
| 66 |
+
<show_in_default>1</show_in_default>
|
| 67 |
+
<show_in_website>1</show_in_website>
|
| 68 |
+
<show_in_store>1</show_in_store>
|
| 69 |
+
</paymill_debug_mode>
|
| 70 |
+
<paymill_private_api_key translate="label">
|
| 71 |
+
<label>Private Paymill API Key</label>
|
| 72 |
+
<frontend_type>text</frontend_type>
|
| 73 |
+
<sort_order>2</sort_order>
|
| 74 |
+
<show_in_default>1</show_in_default>
|
| 75 |
+
<show_in_website>1</show_in_website>
|
| 76 |
+
<show_in_store>1</show_in_store>
|
| 77 |
+
</paymill_private_api_key>
|
| 78 |
+
<paymill_public_api_key translate="label">
|
| 79 |
+
<label>Public Paymill API Key</label>
|
| 80 |
+
<frontend_type>text</frontend_type>
|
| 81 |
+
<sort_order>3</sort_order>
|
| 82 |
+
<show_in_default>1</show_in_default>
|
| 83 |
+
<show_in_website>1</show_in_website>
|
| 84 |
+
<show_in_store>1</show_in_store>
|
| 85 |
+
</paymill_public_api_key>
|
| 86 |
+
<paymill_bridge_endpoint translate="label">
|
| 87 |
+
<label>Paymill bridge URL</label>
|
| 88 |
+
<frontend_type>text</frontend_type>
|
| 89 |
+
<sort_order>5</sort_order>
|
| 90 |
+
<show_in_default>1</show_in_default>
|
| 91 |
+
<show_in_website>1</show_in_website>
|
| 92 |
+
<show_in_store>1</show_in_store>
|
| 93 |
+
</paymill_bridge_endpoint>
|
| 94 |
+
<paymill_api_endpoint translate="label">
|
| 95 |
+
<label>Paymill API Endpoint</label>
|
| 96 |
+
<frontend_type>text</frontend_type>
|
| 97 |
+
<sort_order>6</sort_order>
|
| 98 |
+
<show_in_default>1</show_in_default>
|
| 99 |
+
<show_in_website>1</show_in_website>
|
| 100 |
+
<show_in_store>1</show_in_store>
|
| 101 |
+
</paymill_api_endpoint>
|
| 102 |
+
<title>
|
| 103 |
+
<label>Title</label>
|
| 104 |
+
<frontend_type>text</frontend_type>
|
| 105 |
+
<sort_order>8</sort_order>
|
| 106 |
+
<show_in_default>1</show_in_default>
|
| 107 |
+
<show_in_website>1</show_in_website>
|
| 108 |
+
<show_in_store>1</show_in_store>
|
| 109 |
+
</title>
|
| 110 |
+
<order_status translate="label">
|
| 111 |
+
<label>New order status</label>
|
| 112 |
+
<frontend_type>select</frontend_type>
|
| 113 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
| 114 |
+
<sort_order>9</sort_order>
|
| 115 |
+
<show_in_default>1</show_in_default>
|
| 116 |
+
<show_in_website>1</show_in_website>
|
| 117 |
+
<show_in_store>1</show_in_store>
|
| 118 |
+
</order_status>
|
| 119 |
+
<paymill_accepted_currencies translate="label">
|
| 120 |
+
<label>Accepted Currencies</label>
|
| 121 |
+
<frontend_type>text</frontend_type>
|
| 122 |
+
<sort_order>10</sort_order>
|
| 123 |
+
<show_in_default>1</show_in_default>
|
| 124 |
+
<show_in_website>1</show_in_website>
|
| 125 |
+
<show_in_store>1</show_in_store>
|
| 126 |
+
</paymill_accepted_currencies>
|
| 127 |
+
<paymill_lib_version translate="label">
|
| 128 |
+
<label>Paymill library version</label>
|
| 129 |
+
<frontend_type>select</frontend_type>
|
| 130 |
+
<source_model>Paymill_Paymillcc_LibraryVersion</source_model>
|
| 131 |
+
<sort_order>11</sort_order>
|
| 132 |
+
<show_in_default>1</show_in_default>
|
| 133 |
+
<show_in_website>1</show_in_website>
|
| 134 |
+
<show_in_store>1</show_in_store>
|
| 135 |
+
</paymill_lib_version>
|
| 136 |
+
<paymill_show_credits translate="label">
|
| 137 |
+
<label>Show Paymill label</label>
|
| 138 |
+
<frontend_type>select</frontend_type>
|
| 139 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 140 |
+
<sort_order>12</sort_order>
|
| 141 |
+
<show_in_default>1</show_in_default>
|
| 142 |
+
<show_in_website>1</show_in_website>
|
| 143 |
+
<show_in_store>1</show_in_store>
|
| 144 |
+
</paymill_show_credits>
|
| 145 |
+
</fields>
|
| 146 |
+
</paymillcc>
|
| 147 |
+
</groups>
|
| 148 |
+
</payment>
|
| 149 |
+
</sections>
|
| 150 |
+
</config>
|
app/code/community/Paymill/Paymillcc/sql/paymillcc_setup/mysql4-install-2.1.2.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
$installer->startSetup();
|
| 5 |
+
|
| 6 |
+
$installer->run("
|
| 7 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('paymill_cc_additional_customer_data')}` (
|
| 8 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
| 9 |
+
`user_id` varchar(255) NOT NULL,
|
| 10 |
+
`user_data` varchar(256) NOT NULL,
|
| 11 |
+
PRIMARY KEY (`id`)
|
| 12 |
+
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;"
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
$installer->endSetup();
|
app/code/community/Paymill/Paymillcc/sql/paymillcc_setup/mysql4-upgrade-2.1.1-2.1.2.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
$installer->startSetup();
|
| 5 |
+
|
| 6 |
+
$installer->run("
|
| 7 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('paymill_cc_additional_customer_data')}` (
|
| 8 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
| 9 |
+
`user_id` varchar(255) NOT NULL,
|
| 10 |
+
`user_data` varchar(256) NOT NULL,
|
| 11 |
+
PRIMARY KEY (`id`)
|
| 12 |
+
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;"
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
$installer->endSetup();
|
app/code/community/Paymill/Paymillelv/Block/Form/Paymill.php
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Paymill_Paymillelv_Block_Form_Paymill extends Mage_Payment_Block_Form
|
| 4 |
+
{
|
| 5 |
+
public $paymillBridgeEndpoint;
|
| 6 |
+
public $paymillPublicApiKey;
|
| 7 |
+
public $paymillDebugMode = "false";
|
| 8 |
+
|
| 9 |
+
protected function _construct()
|
| 10 |
+
{
|
| 11 |
+
// read some configuration data
|
| 12 |
+
|
| 13 |
+
$this->paymillPublicApiKey = Mage::getStoreConfig(
|
| 14 |
+
'payment/paymillelv/paymill_public_api_key',
|
| 15 |
+
Mage::app()->getStore()
|
| 16 |
+
);
|
| 17 |
+
|
| 18 |
+
$this->paymillBridgeEndpoint = Mage::getStoreConfig(
|
| 19 |
+
'payment/paymillelv/paymill_bridge_endpoint',
|
| 20 |
+
Mage::app()->getStore()
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
+
$this->paymillDebugMode = Mage::getStoreConfig(
|
| 24 |
+
'payment/paymillelv/paymill_debug_mode',
|
| 25 |
+
Mage::app()->getStore()
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
$this->showPaymillLabel = Mage::getStoreConfig(
|
| 29 |
+
'payment/paymillelv/paymill_show_credits',
|
| 30 |
+
Mage::app()->getStore()
|
| 31 |
+
);
|
| 32 |
+
|
| 33 |
+
$this->paymillApiEndpoint = Mage::getStoreConfig(
|
| 34 |
+
'payment/paymillelv/paymill_api_endpoint',
|
| 35 |
+
Mage::app()->getStore()
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
if ($this->paymillDebugMode == "") {
|
| 39 |
+
$this->paymillDebugMode = "false";
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
parent::_construct();
|
| 43 |
+
|
| 44 |
+
// load paymill form
|
| 45 |
+
$this->setTemplate('paymill/form/paymill_elv.phtml');
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
?>
|
app/code/community/Paymill/Paymillelv/Block/Info/Paymill.php
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Paymill_Paymillelv_Block_Info_Paymill extends Mage_Payment_Block_Info_Cc
|
| 4 |
+
{
|
| 5 |
+
/**
|
| 6 |
+
* Prepare credit card related payment info
|
| 7 |
+
*
|
| 8 |
+
* @param Varien_Object|array $transport
|
| 9 |
+
* @return Varien_Object
|
| 10 |
+
*/
|
| 11 |
+
protected function _prepareSpecificInformation($transport = null)
|
| 12 |
+
{
|
| 13 |
+
$transport = parent::_prepareSpecificInformation($transport);
|
| 14 |
+
$additionalInformation = array();
|
| 15 |
+
if(Mage::app()->getStore()->isAdmin()) {
|
| 16 |
+
$order = Mage::registry('current_order');
|
| 17 |
+
if(!$order && Mage::registry('current_shipment')) {
|
| 18 |
+
$order = Mage::registry('current_shipment')->getOrder();
|
| 19 |
+
}
|
| 20 |
+
elseif (!$order && Mage::registry('current_invoice')) {
|
| 21 |
+
$order = Mage::registry('current_invoice')->getOrder();
|
| 22 |
+
} elseif (!$order && Mage::registry('current_creditmemo')) {
|
| 23 |
+
$order = Mage::registry('current_creditmemo')->getOrder();
|
| 24 |
+
}
|
| 25 |
+
if($order) {
|
| 26 |
+
$additionalInformation = array(
|
| 27 |
+
'Transaction ID' => ' ' . $order->getPayment()->getAdditionalInformation('paymill_transaction_id')
|
| 28 |
+
);
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
return $transport->setData($additionalInformation);
|
| 33 |
+
}
|
| 34 |
+
}
|
app/code/community/Paymill/Paymillelv/Helper/Data.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Paymill_Paymillelv_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
+
{
|
| 4 |
+
|
| 5 |
+
}
|
| 6 |
+
?>
|
app/code/community/Paymill/Paymillelv/Model/Customerdata.php
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillelv_Model_Customerdata extends Mage_Core_Model_Abstract
|
| 22 |
+
{
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Construct
|
| 26 |
+
*/
|
| 27 |
+
function _construct()
|
| 28 |
+
{
|
| 29 |
+
parent::_construct();
|
| 30 |
+
$this->_init('paymillelv/customerdata');
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public function setEntry($customerId, $data)
|
| 34 |
+
{
|
| 35 |
+
//$this->setId(null);
|
| 36 |
+
$this->setUserId($customerId);
|
| 37 |
+
$this->setUserData($data);
|
| 38 |
+
$this->save();
|
| 39 |
+
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public function loadByUserId($customerId)
|
| 43 |
+
{
|
| 44 |
+
return $this->loadByAttribute('user_id', $customerId);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
public function loadByAttribute($attribute, $value, $additionalAttributes = '*')
|
| 48 |
+
{
|
| 49 |
+
$collection = $this->getResourceCollection()
|
| 50 |
+
->addFieldToSelect($additionalAttributes)
|
| 51 |
+
->addFieldToFilter($attribute, $value);
|
| 52 |
+
|
| 53 |
+
foreach ($collection as $object) {
|
| 54 |
+
return $object;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
return null;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
}
|
app/code/community/Paymill/Paymillelv/Model/Mysql4/Customerdata.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillelv_Model_Mysql4_Customerdata extends Mage_Core_Model_Mysql4_Abstract
|
| 22 |
+
{
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Construct
|
| 26 |
+
*/
|
| 27 |
+
function _construct()
|
| 28 |
+
{
|
| 29 |
+
$this->_init('paymillelv/customerdata', 'id');
|
| 30 |
+
}
|
| 31 |
+
}
|
app/code/community/Paymill/Paymillelv/Model/Mysql4/Customerdata/Collection.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* @category PayIntelligent
|
| 16 |
+
* @package PayIntelligent_RatePAY
|
| 17 |
+
* @copyright Copyright (c) 2011 PayIntelligent GmbH (http://www.payintelligent.de)
|
| 18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class Paymill_Paymillelv_Model_Mysql4_Customerdata_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
| 22 |
+
{
|
| 23 |
+
/**
|
| 24 |
+
* Construct
|
| 25 |
+
*/
|
| 26 |
+
public function _construct()
|
| 27 |
+
{
|
| 28 |
+
parent::_construct();
|
| 29 |
+
$this->_init('paymillelv/customerdata');
|
| 30 |
+
}
|
| 31 |
+
}
|
app/code/community/Paymill/Paymillelv/Model/PaymentAbstract.php
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
abstract class Paymill_Paymillcc_Model_PaymentAbstract extends Mage_Payment_Model_Method_Cc
|
| 4 |
+
{
|
| 5 |
+
/**
|
| 6 |
+
* Processes the payment against the paymill API
|
| 7 |
+
* @param $params array The settings array
|
| 8 |
+
* @return boolean
|
| 9 |
+
*/
|
| 10 |
+
protected function _processPayment($params)
|
| 11 |
+
{
|
| 12 |
+
|
| 13 |
+
// setup the logger
|
| 14 |
+
$logger = $params['loggerCallback'];
|
| 15 |
+
|
| 16 |
+
// setup client params
|
| 17 |
+
$clientParams = array(
|
| 18 |
+
'email' => $params['email'],
|
| 19 |
+
'description' => $params['name']
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
// setup credit card params
|
| 23 |
+
$paymentParams = array(
|
| 24 |
+
'token' => $params['token']
|
| 25 |
+
);
|
| 26 |
+
|
| 27 |
+
// setup transaction params
|
| 28 |
+
$transactionParams = array(
|
| 29 |
+
'amount' => $params['amount'],
|
| 30 |
+
'currency' => $params['currency'],
|
| 31 |
+
'description' => $params['description']
|
| 32 |
+
);
|
| 33 |
+
|
| 34 |
+
require_once $params['libBase'] . 'Services/Paymill/Transactions.php';
|
| 35 |
+
require_once $params['libBase'] . 'Services/Paymill/Clients.php';
|
| 36 |
+
require_once $params['libBase'] . 'Services/Paymill/Payments.php';
|
| 37 |
+
|
| 38 |
+
$clientsObject = new Services_Paymill_Clients(
|
| 39 |
+
$params['privateKey'], $params['apiUrl']
|
| 40 |
+
);
|
| 41 |
+
$transactionsObject = new Services_Paymill_Transactions(
|
| 42 |
+
$params['privateKey'], $params['apiUrl']
|
| 43 |
+
);
|
| 44 |
+
$paymentsObject = new Services_Paymill_Payments(
|
| 45 |
+
$params['privateKey'], $params['apiUrl']
|
| 46 |
+
);
|
| 47 |
+
|
| 48 |
+
// perform conection to the Paymill API and trigger the payment
|
| 49 |
+
try {
|
| 50 |
+
if (!array_key_exists('client_id', $params)) {
|
| 51 |
+
$client = $clientsObject->create($clientParams);
|
| 52 |
+
if (!isset($client['id'])) {
|
| 53 |
+
call_user_func_array($logger, array("No client created" . var_export($client, true)));
|
| 54 |
+
return false;
|
| 55 |
+
} else {
|
| 56 |
+
call_user_func_array($logger, array("Client created: " . $client['id']));
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
// create card
|
| 60 |
+
$paymentParams['client'] = $client['id'];
|
| 61 |
+
} else {
|
| 62 |
+
$paymentParams['client'] = $params['client_id'];
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
$payment = $paymentsObject->create($paymentParams);
|
| 66 |
+
if (!array_key_exists('client_id', $params)) {
|
| 67 |
+
if (!isset($payment['id'])) {
|
| 68 |
+
call_user_func_array($logger, array("No payment (credit card) created: " . var_export($payment, true) . " with params " . var_export($paymentParams, true)));
|
| 69 |
+
return false;
|
| 70 |
+
} else {
|
| 71 |
+
call_user_func_array($logger, array("Payment (credit card) created: " . $payment['id']));
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
// create transaction
|
| 75 |
+
//$transactionParams['client'] = $client['id'];
|
| 76 |
+
$transactionParams['payment'] = $payment['id'];
|
| 77 |
+
} else {
|
| 78 |
+
$transactionParams['payment'] = $params['payment_id'];
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
$transaction = $transactionsObject->create($transactionParams);
|
| 82 |
+
|
| 83 |
+
if(isset($transaction['data']['response_code'])){
|
| 84 |
+
call_user_func_array($logger, array("An Error occured: " . var_export($transaction, true)));
|
| 85 |
+
return false;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
if (!isset($transaction['id'])) {
|
| 89 |
+
call_user_func_array($logger, array("No transaction created" . var_export($transaction, true)));
|
| 90 |
+
return false;
|
| 91 |
+
} else {
|
| 92 |
+
$this->_setPaymillClientToken($client['id']);
|
| 93 |
+
$this->_setPaymillPaymentToken($payment['id']);
|
| 94 |
+
$this->_setPaymillTransactionId($transaction['id']);
|
| 95 |
+
call_user_func_array($logger, array("Transaction created: " . $transaction['id']));
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// check result
|
| 99 |
+
if (is_array($transaction) && array_key_exists('status', $transaction)) {
|
| 100 |
+
if ($transaction['status'] == "closed") {
|
| 101 |
+
// transaction was successfully issued
|
| 102 |
+
return true;
|
| 103 |
+
} elseif ($transaction['status'] == "open") {
|
| 104 |
+
// transaction was issued but status is open for any reason
|
| 105 |
+
call_user_func_array($logger, array("Status is open."));
|
| 106 |
+
return false;
|
| 107 |
+
} else {
|
| 108 |
+
// another error occured
|
| 109 |
+
call_user_func_array($logger, array("Unknown error." . var_export($transaction, true)));
|
| 110 |
+
return false;
|
| 111 |
+
}
|
| 112 |
+
} else {
|
| 113 |
+
// another error occured
|
| 114 |
+
call_user_func_array($logger, array("Transaction could not be issued."));
|
| 115 |
+
return false;
|
| 116 |
+
}
|
| 117 |
+
} catch (Services_Paymill_Exception $ex) {
|
| 118 |
+
// paymill wrapper threw an exception
|
| 119 |
+
call_user_func_array($logger, array("Exception thrown from paymill wrapper: " . $ex->getMessage()));
|
| 120 |
+
return false;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
return true;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
protected abstract function _setPaymillClientToken($id);
|
| 127 |
+
|
| 128 |
+
protected abstract function _setPaymillPaymentToken($id);
|
| 129 |
+
|
| 130 |
+
protected abstract function _setPaymillTransactionId($id);
|
| 131 |
+
}
|
app/code/community/Paymill/Paymillelv/Model/PaymentMethod.php
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
// require this here due to a Magento bug
|
| 4 |
+
require_once 'lib/Zend/Log.php';
|
| 5 |
+
require_once 'lib/Zend/Log/Formatter/Simple.php';
|
| 6 |
+
require_once 'lib/Zend/Log/Writer/Stream.php';
|
| 7 |
+
|
| 8 |
+
class Paymill_Paymillelv_Model_PaymentMethod extends Paymill_Paymillcc_Model_PaymentAbstract
|
| 9 |
+
{
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* unique internal payment method identifier
|
| 13 |
+
*
|
| 14 |
+
* @var string [a-z0-9_]
|
| 15 |
+
*/
|
| 16 |
+
protected $_code = 'paymillelv';
|
| 17 |
+
protected $_formBlockType = 'paymillelv/form_paymill';
|
| 18 |
+
protected $_infoBlockType = 'paymillelv/info_paymill';
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* Is this payment method a gateway (online auth/charge) ?
|
| 22 |
+
*/
|
| 23 |
+
protected $_isGateway = false;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Can authorize online?
|
| 27 |
+
*/
|
| 28 |
+
protected $_canAuthorize = true;
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Can capture funds online?
|
| 32 |
+
*/
|
| 33 |
+
protected $_canCapture = false;
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Can capture partial amounts online?
|
| 37 |
+
*/
|
| 38 |
+
protected $_canCapturePartial = false;
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* Can refund online?
|
| 42 |
+
*/
|
| 43 |
+
protected $_canRefund = false;
|
| 44 |
+
|
| 45 |
+
/**
|
| 46 |
+
* Can void transactions online?
|
| 47 |
+
*/
|
| 48 |
+
protected $_canVoid = true;
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* Can use this payment method in administration panel?
|
| 52 |
+
*/
|
| 53 |
+
protected $_canUseInternal = false;
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* Can show this payment method as an option on checkout payment page?
|
| 57 |
+
*/
|
| 58 |
+
protected $_canUseCheckout = true;
|
| 59 |
+
|
| 60 |
+
/**
|
| 61 |
+
* Is this payment method suitable for multi-shipping checkout?
|
| 62 |
+
*/
|
| 63 |
+
protected $_canUseForMultishipping = true;
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Can save credit card information for future processing?
|
| 67 |
+
*/
|
| 68 |
+
protected $_canSaveCc = false;
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
*/
|
| 72 |
+
public function assignData($data)
|
| 73 |
+
{
|
| 74 |
+
|
| 75 |
+
if (!($data instanceof Varien_Object)) {
|
| 76 |
+
$data = new Varien_Object($data);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
$info = $this->getInfoInstance();
|
| 80 |
+
|
| 81 |
+
// read the paymill_transaction_token from the credit
|
| 82 |
+
// card form and store it for later use
|
| 83 |
+
$info->setAdditionalInformation(
|
| 84 |
+
"paymill_elv_transaction_token", $data->paymill_elv_transaction_token
|
| 85 |
+
);
|
| 86 |
+
return $this;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* Serverside validations.
|
| 91 |
+
*/
|
| 92 |
+
public function validate()
|
| 93 |
+
{
|
| 94 |
+
$info = $this->getInfoInstance();
|
| 95 |
+
$token = $info->getAdditionalInformation("paymill_elv_transaction_token");
|
| 96 |
+
if (!$token && is_null(Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))) {
|
| 97 |
+
self::logAction("No transaction code was received in PaymentMethod (Paymill_Paymillelv_Model_PaymentMethod::validate)");
|
| 98 |
+
Mage::throwException(
|
| 99 |
+
Mage::helper('paymillelv')->__("Error while performing your payment. The payment was not processed.")
|
| 100 |
+
);
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
return $this;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* This method is triggered after order is placed.
|
| 108 |
+
*
|
| 109 |
+
* @return boolean Returns true if the payment was successfully processed
|
| 110 |
+
*/
|
| 111 |
+
public function authorize(Varien_Object $payment, $amount)
|
| 112 |
+
{
|
| 113 |
+
$info = $this->getInfoInstance();
|
| 114 |
+
// retrieve the transaction_token and save it for later processing
|
| 115 |
+
$token = $info->getAdditionalInformation("paymill_elv_transaction_token");
|
| 116 |
+
|
| 117 |
+
// process the payment
|
| 118 |
+
$result = $this->processPayment($payment, $amount, $token);
|
| 119 |
+
if ($result == false) {
|
| 120 |
+
$payment->setStatus('ERROR')->setIsTransactionClosed(1)->save();
|
| 121 |
+
throw new Exception(
|
| 122 |
+
Mage::helper('paymillelv')->__("Payment was not successfully processed. See log.")
|
| 123 |
+
);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getStoreConfig('payment/paymillelv/recurring', Mage::app()->getStore())) {
|
| 127 |
+
if (is_null(Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))) {
|
| 128 |
+
Mage::getSingleton("paymillelv/customerdata")->setEntry(
|
| 129 |
+
Mage::getSingleton('customer/session')->getCustomer()->getId(),
|
| 130 |
+
Mage::getSingleton('core/session')->getPaymillElvClientToken() . '|' . Mage::getSingleton('core/session')->getPaymillElvPaymentToken()
|
| 131 |
+
);
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
$transactionId = Mage::getSingleton('core/session')->getPaymillTransactionId();
|
| 136 |
+
$info->setAdditionalInformation('paymill_transaction_id', $transactionId);
|
| 137 |
+
$payment->setStatus('APPROVED')
|
| 138 |
+
->setTransactionId($transactionId)
|
| 139 |
+
->setIsTransactionClosed(1)
|
| 140 |
+
->save();
|
| 141 |
+
|
| 142 |
+
return $this;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/**
|
| 146 |
+
* This method triggers the payment.
|
| 147 |
+
* It is triggered when the invoice is created.
|
| 148 |
+
* @return void
|
| 149 |
+
*/
|
| 150 |
+
public function capture(Varien_Object $payment, $amount)
|
| 151 |
+
{
|
| 152 |
+
return $this;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
/**
|
| 156 |
+
* Specify currency support
|
| 157 |
+
*/
|
| 158 |
+
public function canUseForCurrency($currency)
|
| 159 |
+
{
|
| 160 |
+
$currency = Mage::getSingleton('checkout/session')->getQuote()->getQuoteCurrencyCode();
|
| 161 |
+
|
| 162 |
+
$acceptedCurrencies = Mage::getStoreConfig(
|
| 163 |
+
'payment/paymillelv/paymill_accepted_currencies', Mage::app()->getStore()
|
| 164 |
+
);
|
| 165 |
+
$acceptedCurrenciesExploded = explode(',', trim(strtolower($acceptedCurrencies)));
|
| 166 |
+
|
| 167 |
+
if (!in_array(strtolower($currency), $acceptedCurrenciesExploded)) {
|
| 168 |
+
return false;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
return true;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
/**
|
| 175 |
+
* Specify minimum order amount from config
|
| 176 |
+
* @return boolean Returns true if the payment method is available for the current context
|
| 177 |
+
*/
|
| 178 |
+
public function isAvailable($quote = null)
|
| 179 |
+
{
|
| 180 |
+
if (is_object($quote)) {
|
| 181 |
+
// is active
|
| 182 |
+
$paymillActive = Mage::getStoreConfig(
|
| 183 |
+
'payment/paymillelv/active', Mage::app()->getStore()
|
| 184 |
+
);
|
| 185 |
+
|
| 186 |
+
if (!$paymillActive) {
|
| 187 |
+
return false;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
// get minimum order amount
|
| 191 |
+
$paymillMinimumOrderAmount = Mage::getStoreConfig(
|
| 192 |
+
'payment/paymillelv/paymill_minimum_order_amount', Mage::app()->getStore()
|
| 193 |
+
);
|
| 194 |
+
|
| 195 |
+
if ($quote && $quote->getBaseGrandTotal() <= 0.5) {
|
| 196 |
+
return false;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
if ($quote && $quote->getBaseGrandTotal() <= $paymillMinimumOrderAmount) {
|
| 200 |
+
return false;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
return true;
|
| 204 |
+
}
|
| 205 |
+
return false;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
/**
|
| 209 |
+
* The payment capturing method
|
| 210 |
+
* @param Varien_Object $payment The payment object
|
| 211 |
+
* @param $amount The amount to be captures
|
| 212 |
+
* @return boolean $result Returns true if the payment was successfully processed
|
| 213 |
+
*/
|
| 214 |
+
public function processPayment(Varien_Object $payment, $amount, $token)
|
| 215 |
+
{
|
| 216 |
+
// get some relevant objects
|
| 217 |
+
$order = $payment->getOrder();
|
| 218 |
+
$billing = $order->getBillingAddress();
|
| 219 |
+
|
| 220 |
+
$libBase = 'lib/paymill/v2/lib/';
|
| 221 |
+
|
| 222 |
+
$data = array(
|
| 223 |
+
'token' => $token,
|
| 224 |
+
'amount' => round($amount * 100),
|
| 225 |
+
'currency' => strtolower($payment->getOrder()->getOrderCurrency()->getCode()),
|
| 226 |
+
'name' => $billing->getName(),
|
| 227 |
+
'email' => $order->getCustomerEmail(),
|
| 228 |
+
'description' => 'Order from: '
|
| 229 |
+
. Mage::getStoreConfig('general/store_information/name', Mage::app()->getStore())
|
| 230 |
+
. ' ' . sprintf('#%s, %s', $order->getIncrementId(), $order->getCustomerEmail()),
|
| 231 |
+
'libBase' => $libBase,
|
| 232 |
+
'privateKey' => Mage::getStoreConfig(
|
| 233 |
+
'payment/paymillelv/paymill_private_api_key', Mage::app()->getStore()
|
| 234 |
+
),
|
| 235 |
+
'apiUrl' => Mage::getStoreConfig(
|
| 236 |
+
'payment/paymillelv/paymill_api_endpoint', Mage::app()->getStore()
|
| 237 |
+
),
|
| 238 |
+
'loggerCallback' => array('Paymill_Paymillelv_Model_PaymentMethod', 'logAction')
|
| 239 |
+
);
|
| 240 |
+
|
| 241 |
+
$paymillUser = Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId());
|
| 242 |
+
if (!is_null($paymillUser)){
|
| 243 |
+
$token = explode('|', $paymillUser->getUserData());
|
| 244 |
+
$data['client_id'] = $token[0];
|
| 245 |
+
$data['payment_id'] = $token[1];
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// process the payment
|
| 249 |
+
$result = $this->_processPayment($data);
|
| 250 |
+
|
| 251 |
+
return $result;
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
protected function _setPaymillClientToken($id)
|
| 255 |
+
{
|
| 256 |
+
Mage::getSingleton('core/session')->setPaymillElvClientToken($id);
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
protected function _setPaymillPaymentToken($id)
|
| 260 |
+
{
|
| 261 |
+
Mage::getSingleton('core/session')->setPaymillElvPaymentToken($id);
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
protected function _setPaymillTransactionId($id)
|
| 265 |
+
{
|
| 266 |
+
Mage::getSingleton('core/session')->setPaymillTransactionId($id);
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
/**
|
| 270 |
+
* Logs an event
|
| 271 |
+
* @param $message The message to be logged
|
| 272 |
+
*/
|
| 273 |
+
public static function logAction($message)
|
| 274 |
+
{
|
| 275 |
+
Mage::log($message);
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
}
|
app/code/community/Paymill/Paymillelv/etc/config.xml
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Paymill_Paymillelv>
|
| 5 |
+
<version>2.1.4</version>
|
| 6 |
+
</Paymill_Paymillelv>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<blocks>
|
| 10 |
+
<paymillelv>
|
| 11 |
+
<class>Paymill_Paymillelv_Block</class>
|
| 12 |
+
</paymillelv>
|
| 13 |
+
</blocks>
|
| 14 |
+
<models>
|
| 15 |
+
<paymillelv>
|
| 16 |
+
<class>Paymill_Paymillelv_Model</class>
|
| 17 |
+
<resourceModel>paymillelv_mysql4</resourceModel>
|
| 18 |
+
</paymillelv>
|
| 19 |
+
<paymillelv_mysql4>
|
| 20 |
+
<class>Paymill_Paymillelv_Model_Mysql4</class>
|
| 21 |
+
<entities>
|
| 22 |
+
<customerdata>
|
| 23 |
+
<table>paymill_elv_additional_customer_data</table>
|
| 24 |
+
</customerdata>
|
| 25 |
+
</entities>
|
| 26 |
+
</paymillelv_mysql4>
|
| 27 |
+
</models>
|
| 28 |
+
<resources>
|
| 29 |
+
<paymillelv_setup>
|
| 30 |
+
<setup>
|
| 31 |
+
<module>Paymill_Paymillelv</module>
|
| 32 |
+
<class>Mage_Customer_Model_Entity_Setup</class>
|
| 33 |
+
</setup>
|
| 34 |
+
<connection>
|
| 35 |
+
<use>core_setup</use>
|
| 36 |
+
</connection>
|
| 37 |
+
</paymillelv_setup>
|
| 38 |
+
<paymillelv_write>
|
| 39 |
+
<connection>
|
| 40 |
+
<use>core_write</use>
|
| 41 |
+
</connection>
|
| 42 |
+
</paymillelv_write>
|
| 43 |
+
<paymillelv_read>
|
| 44 |
+
<connection>
|
| 45 |
+
<use>core_read</use>
|
| 46 |
+
</connection>
|
| 47 |
+
</paymillelv_read>
|
| 48 |
+
</resources>
|
| 49 |
+
<helpers>
|
| 50 |
+
<paymillelv>
|
| 51 |
+
<class>Paymill_Paymillelv_Helper</class>
|
| 52 |
+
</paymillelv>
|
| 53 |
+
</helpers>
|
| 54 |
+
</global>
|
| 55 |
+
<frontend>
|
| 56 |
+
<translate>
|
| 57 |
+
<modules>
|
| 58 |
+
<Paymill_Paymillelv>
|
| 59 |
+
<files>
|
| 60 |
+
<default>Paymill_Paymillelv.csv</default>
|
| 61 |
+
</files>
|
| 62 |
+
</Paymill_Paymillelv>
|
| 63 |
+
</modules>
|
| 64 |
+
</translate>
|
| 65 |
+
</frontend>
|
| 66 |
+
<adminhtml>
|
| 67 |
+
<translate>
|
| 68 |
+
<modules>
|
| 69 |
+
<Paymill_Paymillelv>
|
| 70 |
+
<files>
|
| 71 |
+
<default>Paymill_Paymillelv.csv</default>
|
| 72 |
+
</files>
|
| 73 |
+
</Paymill_Paymillelv>
|
| 74 |
+
</modules>
|
| 75 |
+
</translate>
|
| 76 |
+
</adminhtml>
|
| 77 |
+
<default>
|
| 78 |
+
<payment>
|
| 79 |
+
<paymillelv>
|
| 80 |
+
<active>0</active>
|
| 81 |
+
<model>paymillelv/paymentMethod</model>
|
| 82 |
+
<order_status>pending</order_status>
|
| 83 |
+
<title>Elektronisches Lastschriftverfahren</title>
|
| 84 |
+
<payment_action>authorize</payment_action>
|
| 85 |
+
<allowspecific>0</allowspecific>
|
| 86 |
+
<paymill_bridge_endpoint>https://bridge.paymill.com/</paymill_bridge_endpoint>
|
| 87 |
+
<paymill_api_endpoint>https://api.paymill.com/v2/</paymill_api_endpoint>
|
| 88 |
+
<paymill_show_credits>1</paymill_show_credits>
|
| 89 |
+
<paymill_accepted_currencies>EUR</paymill_accepted_currencies>
|
| 90 |
+
</paymillelv>
|
| 91 |
+
</payment>
|
| 92 |
+
</default>
|
| 93 |
+
</config>
|
app/code/community/Paymill/Paymillelv/etc/system.xml
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<sections>
|
| 4 |
+
<!-- payment tab -->
|
| 5 |
+
<payment>
|
| 6 |
+
<groups>
|
| 7 |
+
<!-- newmodule fieldset -->
|
| 8 |
+
<paymillelv translate="label" module="paymillelv">
|
| 9 |
+
<!-- will have title 'New Module' -->
|
| 10 |
+
<label>Paymill ELV</label>
|
| 11 |
+
<!-- position between other payment methods -->
|
| 12 |
+
<sort_order>1</sort_order>
|
| 13 |
+
<!-- do not show this configuration options in store scope -->
|
| 14 |
+
<show_in_default>1</show_in_default>
|
| 15 |
+
<show_in_website>1</show_in_website>
|
| 16 |
+
<show_in_store>1</show_in_store>
|
| 17 |
+
<comment><![CDATA[<a href="https://www.paymill.de/" target="_blank">Click here to get a Paymill account</a>]]></comment>
|
| 18 |
+
<fields>
|
| 19 |
+
<!-- is this payment method active for the website? -->
|
| 20 |
+
<active translate="label">
|
| 21 |
+
<!-- label for the field -->
|
| 22 |
+
<label>Enabled</label>
|
| 23 |
+
<!-- input type for configuration value -->
|
| 24 |
+
<frontend_type>select</frontend_type>
|
| 25 |
+
<!-- model to take the option values from -->
|
| 26 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 27 |
+
<!-- field position -->
|
| 28 |
+
<sort_order>1</sort_order>
|
| 29 |
+
<!-- do not show this field in store scope -->
|
| 30 |
+
<show_in_default>1</show_in_default>
|
| 31 |
+
<show_in_website>1</show_in_website>
|
| 32 |
+
<show_in_store>1</show_in_store>
|
| 33 |
+
</active>
|
| 34 |
+
<recurring translate="label">
|
| 35 |
+
<label>Recurring Payment</label>
|
| 36 |
+
<frontend_type>select</frontend_type>
|
| 37 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 38 |
+
<sort_order>2</sort_order>
|
| 39 |
+
<show_in_default>1</show_in_default>
|
| 40 |
+
<show_in_website>1</show_in_website>
|
| 41 |
+
<show_in_store>1</show_in_store>
|
| 42 |
+
</recurring>
|
| 43 |
+
<sort_order translate="label">
|
| 44 |
+
<label>Sort Order</label>
|
| 45 |
+
<frontend_type>text</frontend_type>
|
| 46 |
+
<sort_order>100</sort_order>
|
| 47 |
+
<show_in_default>1</show_in_default>
|
| 48 |
+
<show_in_website>1</show_in_website>
|
| 49 |
+
<show_in_store>1</show_in_store>
|
| 50 |
+
<frontend_class>validate-number</frontend_class>
|
| 51 |
+
</sort_order>
|
| 52 |
+
<paymill_minimum_order_amount translate="label">
|
| 53 |
+
<label>Minimum order amount</label>
|
| 54 |
+
<frontend_type>text</frontend_type>
|
| 55 |
+
<sort_order>100</sort_order>
|
| 56 |
+
<show_in_default>1</show_in_default>
|
| 57 |
+
<show_in_website>1</show_in_website>
|
| 58 |
+
<show_in_store>1</show_in_store>
|
| 59 |
+
<frontend_class>validate-number</frontend_class>
|
| 60 |
+
</paymill_minimum_order_amount>
|
| 61 |
+
<paymill_debug_mode translate="label">
|
| 62 |
+
<label>Paymill debug mode</label>
|
| 63 |
+
<frontend_type>select</frontend_type>
|
| 64 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 65 |
+
<sort_order>4</sort_order>
|
| 66 |
+
<show_in_default>1</show_in_default>
|
| 67 |
+
<show_in_website>1</show_in_website>
|
| 68 |
+
<show_in_store>1</show_in_store>
|
| 69 |
+
</paymill_debug_mode>
|
| 70 |
+
<paymill_private_api_key translate="label">
|
| 71 |
+
<label>Private Paymill API Key</label>
|
| 72 |
+
<frontend_type>text</frontend_type>
|
| 73 |
+
<sort_order>2</sort_order>
|
| 74 |
+
<show_in_default>1</show_in_default>
|
| 75 |
+
<show_in_website>1</show_in_website>
|
| 76 |
+
<show_in_store>1</show_in_store>
|
| 77 |
+
</paymill_private_api_key>
|
| 78 |
+
<paymill_public_api_key translate="label">
|
| 79 |
+
<label>Public Paymill API Key</label>
|
| 80 |
+
<frontend_type>text</frontend_type>
|
| 81 |
+
<sort_order>3</sort_order>
|
| 82 |
+
<show_in_default>1</show_in_default>
|
| 83 |
+
<show_in_website>1</show_in_website>
|
| 84 |
+
<show_in_store>1</show_in_store>
|
| 85 |
+
</paymill_public_api_key>
|
| 86 |
+
<paymill_bridge_endpoint translate="label">
|
| 87 |
+
<label>Paymill bridge URL</label>
|
| 88 |
+
<frontend_type>text</frontend_type>
|
| 89 |
+
<sort_order>5</sort_order>
|
| 90 |
+
<show_in_default>1</show_in_default>
|
| 91 |
+
<show_in_website>1</show_in_website>
|
| 92 |
+
<show_in_store>1</show_in_store>
|
| 93 |
+
</paymill_bridge_endpoint>
|
| 94 |
+
<paymill_api_endpoint translate="label">
|
| 95 |
+
<label>Paymill API Endpoint</label>
|
| 96 |
+
<frontend_type>text</frontend_type>
|
| 97 |
+
<sort_order>6</sort_order>
|
| 98 |
+
<show_in_default>1</show_in_default>
|
| 99 |
+
<show_in_website>1</show_in_website>
|
| 100 |
+
<show_in_store>1</show_in_store>
|
| 101 |
+
</paymill_api_endpoint>
|
| 102 |
+
<title>
|
| 103 |
+
<label>Title</label>
|
| 104 |
+
<frontend_type>text</frontend_type>
|
| 105 |
+
<sort_order>8</sort_order>
|
| 106 |
+
<show_in_default>1</show_in_default>
|
| 107 |
+
<show_in_website>1</show_in_website>
|
| 108 |
+
<show_in_store>1</show_in_store>
|
| 109 |
+
</title>
|
| 110 |
+
<order_status translate="label">
|
| 111 |
+
<label>New order status</label>
|
| 112 |
+
<frontend_type>select</frontend_type>
|
| 113 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
| 114 |
+
<sort_order>9</sort_order>
|
| 115 |
+
<show_in_default>1</show_in_default>
|
| 116 |
+
<show_in_website>1</show_in_website>
|
| 117 |
+
<show_in_store>1</show_in_store>
|
| 118 |
+
</order_status>
|
| 119 |
+
<paymill_accepted_currencies translate="label">
|
| 120 |
+
<label>Accepted Currencies</label>
|
| 121 |
+
<frontend_type>text</frontend_type>
|
| 122 |
+
<sort_order>10</sort_order>
|
| 123 |
+
<show_in_default>1</show_in_default>
|
| 124 |
+
<show_in_website>1</show_in_website>
|
| 125 |
+
<show_in_store>1</show_in_store>
|
| 126 |
+
</paymill_accepted_currencies>
|
| 127 |
+
<paymill_show_credits translate="label">
|
| 128 |
+
<label>Show Paymill label</label>
|
| 129 |
+
<frontend_type>select</frontend_type>
|
| 130 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 131 |
+
<sort_order>12</sort_order>
|
| 132 |
+
<show_in_default>1</show_in_default>
|
| 133 |
+
<show_in_website>1</show_in_website>
|
| 134 |
+
<show_in_store>1</show_in_store>
|
| 135 |
+
</paymill_show_credits>
|
| 136 |
+
</fields>
|
| 137 |
+
</paymillelv>
|
| 138 |
+
</groups>
|
| 139 |
+
</payment>
|
| 140 |
+
</sections>
|
| 141 |
+
</config>
|
app/code/community/Paymill/Paymillelv/sql/paymillelv_setup/mysql4-install-2.1.2.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
$installer->startSetup();
|
| 5 |
+
|
| 6 |
+
$installer->run("
|
| 7 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('paymill_elv_additional_customer_data')}` (
|
| 8 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
| 9 |
+
`user_id` varchar(255) NOT NULL,
|
| 10 |
+
`user_data` varchar(256) NOT NULL,
|
| 11 |
+
PRIMARY KEY (`id`)
|
| 12 |
+
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;"
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
$installer->endSetup();
|
app/code/community/Paymill/Paymillelv/sql/paymillelv_setup/mysql4-upgrade-2.1.1-2.1.2.php
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
$installer->startSetup();
|
| 5 |
+
|
| 6 |
+
$installer->run("
|
| 7 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('paymill_elv_additional_customer_data')}` (
|
| 8 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
| 9 |
+
`user_id` varchar(255) NOT NULL,
|
| 10 |
+
`user_data` varchar(256) NOT NULL,
|
| 11 |
+
PRIMARY KEY (`id`)
|
| 12 |
+
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;"
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/paymill.xml
CHANGED
|
@@ -5,7 +5,7 @@ and open the template in the editor.
|
|
| 5 |
-->
|
| 6 |
<layout version="0.1.0">
|
| 7 |
<default>
|
| 8 |
-
<reference name="head">
|
| 9 |
<action method="addCss">
|
| 10 |
<stylesheet>css/paymill/logo.css</stylesheet>
|
| 11 |
</action>
|
|
@@ -20,9 +20,16 @@ and open the template in the editor.
|
|
| 20 |
</text>
|
| 21 |
</action>
|
| 22 |
</block>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
<action method="addJs">
|
| 24 |
<script>paymill/paymentForm.js</script>
|
| 25 |
</action>
|
|
|
|
| 26 |
</reference>
|
| 27 |
</default>
|
| 28 |
</layout>
|
| 5 |
-->
|
| 6 |
<layout version="0.1.0">
|
| 7 |
<default>
|
| 8 |
+
<reference name="head">
|
| 9 |
<action method="addCss">
|
| 10 |
<stylesheet>css/paymill/logo.css</stylesheet>
|
| 11 |
</action>
|
| 20 |
</text>
|
| 21 |
</action>
|
| 22 |
</block>
|
| 23 |
+
<action method="addJs">
|
| 24 |
+
<script>paymill/Iban.js</script>
|
| 25 |
+
</action>
|
| 26 |
+
<action method="addJs">
|
| 27 |
+
<script>paymill/BrandDetection.js</script>
|
| 28 |
+
</action>
|
| 29 |
<action method="addJs">
|
| 30 |
<script>paymill/paymentForm.js</script>
|
| 31 |
</action>
|
| 32 |
+
|
| 33 |
</reference>
|
| 34 |
</default>
|
| 35 |
</layout>
|
app/design/frontend/base/default/template/paymill/form/paymill.phtml
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php $_code = $this->getMethodCode() ?>
|
| 2 |
+
<script src="<?php echo Mage::getDesign()->getSkinUrl('paymill/jquery.min.js'); ?>"></script>
|
| 3 |
+
<link rel="stylesheet" type="text/css" href="<?php echo Mage::getDesign()->getSkinUrl('paymill/paymill_styles.css'); ?>" />
|
| 4 |
+
<!--
|
| 5 |
+
The payment form.
|
| 6 |
+
Important: do not process any card data to the server (leave name attribute away)
|
| 7 |
+
-->
|
| 8 |
+
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display: none">
|
| 9 |
+
<li>
|
| 10 |
+
<img src="<?php echo Mage::getDesign()->getSkinUrl('paymill/icon_visa.png'); ?>" />
|
| 11 |
+
<img src="<?php echo Mage::getDesign()->getSkinUrl('paymill/icon_mastercard.png'); ?>" />
|
| 12 |
+
</li>
|
| 13 |
+
<?php if (is_null(Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 14 |
+
<li>
|
| 15 |
+
<label for="paymillcc_cardholder" class="required"><em>*</em><?php echo Mage::helper('paymillcc')->__('Credit Card Holder') ?></label>
|
| 16 |
+
<div class="input-box">
|
| 17 |
+
<input type="text" class="input-text" id="paymillcc_cardholder" value="" autocomplete="off">
|
| 18 |
+
<div class="validation-advice" id="cardholder_error" style="display: none"></div>
|
| 19 |
+
</div>
|
| 20 |
+
</li>
|
| 21 |
+
<li>
|
| 22 |
+
<label for="paymillcc_number" class="required"><em>*</em><?php echo Mage::helper('paymillcc')->__('Credit Card Number') ?></label>
|
| 23 |
+
<div class="input-box">
|
| 24 |
+
<input type="text" id="paymillcc_number" class="input-text" value="" autocomplete="off">
|
| 25 |
+
<div class="validation-advice" id="number_error" style="display: none"></div>
|
| 26 |
+
<div id="paymill_card_type" style="display: none; color: #666; margin-top: 2px;"></div>
|
| 27 |
+
</div>
|
| 28 |
+
</li>
|
| 29 |
+
<li>
|
| 30 |
+
<label for="paymillcc_cvc" class="required"><em>*</em><?php echo Mage::helper('paymillcc')->__('Card Verification Number') ?></label>
|
| 31 |
+
<div class="input-box">
|
| 32 |
+
<input type="text" id="paymillcc_cvc" class="input-text" autocomplete="off" value="">
|
| 33 |
+
<div class="validation-advice" id="cvc_error" style="display: none"></div>
|
| 34 |
+
</div>
|
| 35 |
+
</li>
|
| 36 |
+
<li>
|
| 37 |
+
<label for="paymillcc_expiry" class="required"><em>*</em><?php echo Mage::helper('paymillcc')->__('Expiration Date') ?></label>
|
| 38 |
+
<div class="input-box">
|
| 39 |
+
<div class="v-fix">
|
| 40 |
+
<select id="paymillcc_expiry_month" class="month" autocomplete="off">
|
| 41 |
+
<option value="" selected="selected">--</option>
|
| 42 |
+
<option value="01">01 - <?php echo Mage::helper('paymillcc')->__('January'); ?></option>
|
| 43 |
+
<option value="02">02 - <?php echo Mage::helper('paymillcc')->__('February'); ?></option>
|
| 44 |
+
<option value="03">03 - <?php echo Mage::helper('paymillcc')->__('March'); ?></option>
|
| 45 |
+
<option value="04">04 - <?php echo Mage::helper('paymillcc')->__('April'); ?></option>
|
| 46 |
+
<option value="05">05 - <?php echo Mage::helper('paymillcc')->__('May'); ?></option>
|
| 47 |
+
<option value="06">06 - <?php echo Mage::helper('paymillcc')->__('June'); ?></option>
|
| 48 |
+
<option value="07">07 - <?php echo Mage::helper('paymillcc')->__('July'); ?></option>
|
| 49 |
+
<option value="08">08 - <?php echo Mage::helper('paymillcc')->__('August'); ?></option>
|
| 50 |
+
<option value="09">09 - <?php echo Mage::helper('paymillcc')->__('September'); ?></option>
|
| 51 |
+
<option value="10">10 - <?php echo Mage::helper('paymillcc')->__('October'); ?></option>
|
| 52 |
+
<option value="11">11 - <?php echo Mage::helper('paymillcc')->__('November'); ?></option>
|
| 53 |
+
<option value="12">12 - <?php echo Mage::helper('paymillcc')->__('December'); ?></option>
|
| 54 |
+
</select>
|
| 55 |
+
</div>
|
| 56 |
+
<div class="v-fix">
|
| 57 |
+
<select id="paymillcc_expiry_year" class="year" autocomplete="off">
|
| 58 |
+
<option value="" selected="selected">--</option>
|
| 59 |
+
<option value="2012">2012</option>
|
| 60 |
+
<option value="2013">2013</option>
|
| 61 |
+
<option value="2014">2014</option>
|
| 62 |
+
<option value="2015">2015</option>
|
| 63 |
+
<option value="2016">2016</option>
|
| 64 |
+
<option value="2017">2017</option>
|
| 65 |
+
<option value="2018">2018</option>
|
| 66 |
+
<option value="2019">2019</option>
|
| 67 |
+
<option value="2020">2020</option>
|
| 68 |
+
<option value="2021">2021</option>
|
| 69 |
+
<option value="2022">2022</option>
|
| 70 |
+
</select>
|
| 71 |
+
</div>
|
| 72 |
+
<div class="validation-advice" id="expiry_error" style="display: none"></div>
|
| 73 |
+
</div>
|
| 74 |
+
</li>
|
| 75 |
+
<?php endif; ?>
|
| 76 |
+
<?php if (!is_null(Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 77 |
+
<input type="hidden" id="paymill_existing_customer" value="true">
|
| 78 |
+
<?php elseif (is_null(Mage::getSingleton("paymillcc/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 79 |
+
<input type="hidden" id="paymill_existing_customer" value="false">
|
| 80 |
+
<?php endif; ?>
|
| 81 |
+
<!-- this gets the transaction token -->
|
| 82 |
+
<input type="hidden" id="paymill_order_amount" value="<?php print round($this->paymillPaymentAmount * 100); ?>">
|
| 83 |
+
<input type="hidden" id="paymill_transaction_token" type="text" value="" name="payment[paymill_transaction_token]" />
|
| 84 |
+
<?php if ($this->showPaymillLabel) { ?>
|
| 85 |
+
<li>
|
| 86 |
+
<div class="paymill_powered"><div class="paymill_credits"><?php echo Mage::helper('paymillcc')->__('Secure credit card payment powered by') ?> <a href="http://www.paymill.de" target="_blank">Paymill</a></div></div>
|
| 87 |
+
</li>
|
| 88 |
+
<?php } ?>
|
| 89 |
+
</ul>
|
| 90 |
+
<!--
|
| 91 |
+
PaymillPayment
|
| 92 |
+
Wrapper version: <?php print $this->paymillLibVersion; ?>;
|
| 93 |
+
API enpoint: <?php print $this->paymillApiEndpoint; ?>
|
| 94 |
+
-->
|
| 95 |
+
<script type="text/javascript">
|
| 96 |
+
var PAYMILL_PUBLIC_KEY = '<?php print $this->paymillPublicApiKey; ?>';
|
| 97 |
+
</script>
|
| 98 |
+
<script type="text/javascript" src="<?php print $this->paymillBridgeEndpoint; ?>"></script>
|
| 99 |
+
<script type="text/javascript">
|
| 100 |
+
jQuery.noConflict();
|
| 101 |
+
|
| 102 |
+
jQuery(document).ready(function(){
|
| 103 |
+
jQuery('#payment-buttons-container button:first').prop("onclick", null);
|
| 104 |
+
jQuery('#payment-buttons-container button:first').unbind('click');
|
| 105 |
+
jQuery('#payment-buttons-container button:first').click(paymill_payment_save_override);
|
| 106 |
+
// bind change listener to show the cardtype
|
| 107 |
+
jQuery('#paymillcc_number').change(function() {
|
| 108 |
+
if (paymill.cardType(jQuery('#paymillcc_number').val()) == "Visa") {
|
| 109 |
+
jQuery('#paymill_card_type').html("Visa").show();
|
| 110 |
+
} else if (paymill.cardType(jQuery('#paymillcc_number').val()) == "MasterCard") {
|
| 111 |
+
jQuery('#paymill_card_type').html("MasterCard").show();
|
| 112 |
+
} else {
|
| 113 |
+
jQuery('#paymill_card_type').hide();
|
| 114 |
+
}
|
| 115 |
+
});
|
| 116 |
+
|
| 117 |
+
});
|
| 118 |
+
|
| 119 |
+
if (typeof paymill_payment_save_override != 'function') {
|
| 120 |
+
function paymill_payment_save_override() {
|
| 121 |
+
if (payment.currentMethod == "paymillcc") {
|
| 122 |
+
if (jQuery('#paymill_existing_customer').val() == 'false') {
|
| 123 |
+
paymill_cc_payment_save_override();
|
| 124 |
+
} else {
|
| 125 |
+
payment.save();
|
| 126 |
+
}
|
| 127 |
+
} else if (payment.currentMethod == "paymillelv") {
|
| 128 |
+
if (jQuery('#paymill_elv_existing_customer').val() == 'false') {
|
| 129 |
+
paymill_elv_payment_save_override();
|
| 130 |
+
} else {
|
| 131 |
+
payment.save();
|
| 132 |
+
}
|
| 133 |
+
} else {
|
| 134 |
+
payment.save();
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
// is paymillPayment?
|
| 140 |
+
function paymill_is_paymill_cc_payment() {
|
| 141 |
+
return payment.currentMethod == "<?php print $_code; ?>";
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
// handler that is called when click on next step button
|
| 145 |
+
function paymill_cc_payment_save_override() {
|
| 146 |
+
if (paymill_is_paymill_cc_payment()) {
|
| 147 |
+
paymill_cc_debug('Paymill payment method triggered');
|
| 148 |
+
if (paymill_cc_validate()) {
|
| 149 |
+
paymill_cc_debug('Validation successful');
|
| 150 |
+
var cardholder = jQuery('#paymillcc_cardholder');
|
| 151 |
+
var number = jQuery('#paymillcc_number');
|
| 152 |
+
var expiry_month = jQuery('#paymillcc_expiry_month');
|
| 153 |
+
var expiry_year = jQuery('#paymillcc_expiry_year');
|
| 154 |
+
var cvc = jQuery('#paymillcc_cvc');
|
| 155 |
+
paymill.createToken({
|
| 156 |
+
number: number.val(),
|
| 157 |
+
exp_month: expiry_month.val(),
|
| 158 |
+
exp_year: expiry_year.val(),
|
| 159 |
+
cvc: cvc.val(),
|
| 160 |
+
cardholder: cardholder.val(),
|
| 161 |
+
amount_int: jQuery('#paymill_order_amount').val(),
|
| 162 |
+
currency: '<?php print $this->paymillPaymentCurrency; ?>'
|
| 163 |
+
}, paymill_cc_response_handler
|
| 164 |
+
);
|
| 165 |
+
}
|
| 166 |
+
} else {
|
| 167 |
+
payment.save();
|
| 168 |
+
}
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
// paymill response handler
|
| 172 |
+
function paymill_cc_response_handler(error, result) {
|
| 173 |
+
paymill_cc_debug('Start Paymill response handler');
|
| 174 |
+
if (error) {
|
| 175 |
+
alert("API returned error" + error.apierror);
|
| 176 |
+
paymill_cc_debug('An API error occured ' + error.apierror);
|
| 177 |
+
} else {
|
| 178 |
+
paymill_cc_debug('Received a token: ' + result.token);
|
| 179 |
+
jQuery('#paymill_transaction_token').val(result.token);
|
| 180 |
+
payment.save();
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// validation
|
| 185 |
+
function paymill_cc_validate() {
|
| 186 |
+
|
| 187 |
+
var cardholder = jQuery('#paymillcc_cardholder');
|
| 188 |
+
var number = jQuery('#paymillcc_number');
|
| 189 |
+
var expiry_month = jQuery('#paymillcc_expiry_month');
|
| 190 |
+
var expiry_year = jQuery('#paymillcc_expiry_year');
|
| 191 |
+
var cvc = jQuery('#paymillcc_cvc');
|
| 192 |
+
var cvc_error = jQuery('#cvc_error');
|
| 193 |
+
var expiry_error = jQuery('#expiry_error');
|
| 194 |
+
var number_error = jQuery('#number_error');
|
| 195 |
+
var cardholder_error = jQuery('#cardholder_error');
|
| 196 |
+
|
| 197 |
+
var result = true;
|
| 198 |
+
|
| 199 |
+
paymill_cc_debug('Start form validation');
|
| 200 |
+
|
| 201 |
+
// reset errors
|
| 202 |
+
cardholder_error.hide();
|
| 203 |
+
cvc_error.hide();
|
| 204 |
+
expiry_error.hide();
|
| 205 |
+
number_error.hide();
|
| 206 |
+
|
| 207 |
+
// error messages
|
| 208 |
+
error_msg_cardholder_missing = "<?php echo Mage::helper('paymillcc')->__('Credit Card Holder is missing') ?>";
|
| 209 |
+
error_msg_cardnumber_invalid = "<?php echo Mage::helper('paymillcc')->__('Your credit card number is invalid'); ?>";
|
| 210 |
+
error_msg_expiry_invalid = "<?php echo Mage::helper('paymillcc')->__('The expiration date is invalid'); ?>";
|
| 211 |
+
error_msg_cvc_invalid = "<?php echo Mage::helper('paymillcc')->__('The verification number is invalid'); ?>";
|
| 212 |
+
|
| 213 |
+
if (cardholder.val() == "") {
|
| 214 |
+
cardholder_error.html(error_msg_cardholder_missing).show();
|
| 215 |
+
cardholder.addClass('validation-failed');
|
| 216 |
+
result = false;
|
| 217 |
+
} else {
|
| 218 |
+
cardholder.removeClass('validation-failed');
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
if (!paymill.validateCardNumber(number.val())) {
|
| 222 |
+
number_error.html(error_msg_cardnumber_invalid).show();
|
| 223 |
+
number.addClass('validation-failed');
|
| 224 |
+
result = false;
|
| 225 |
+
} else {
|
| 226 |
+
number.removeClass('validation-failed');
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
if (!paymill.validateCvc(cvc.val())) {
|
| 230 |
+
cvc_error.html(error_msg_cvc_invalid).show();
|
| 231 |
+
cvc.addClass('validation-failed');
|
| 232 |
+
result = false;
|
| 233 |
+
} else {
|
| 234 |
+
cvc.removeClass('validation-failed');
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
if (!paymill.validateExpiry(expiry_month.val(), expiry_year.val())) {
|
| 238 |
+
expiry_error.html(error_msg_expiry_invalid).show();
|
| 239 |
+
expiry_month.addClass('validation-failed');
|
| 240 |
+
expiry_year.addClass('validation-failed');
|
| 241 |
+
result = false;
|
| 242 |
+
} else {
|
| 243 |
+
expiry_month.removeClass('validation-failed');
|
| 244 |
+
expiry_year.removeClass('validation-failed');
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
return result;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
// debug mode
|
| 251 |
+
function paymill_cc_debug(message) {
|
| 252 |
+
if (<?php print $this->paymillDebugMode; ?>) {
|
| 253 |
+
console.log("[PaymillCC] " + message);
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
// handling for onestep extension
|
| 258 |
+
function paymill_onestep_cc(onestep_callback) {
|
| 259 |
+
if (paymill_is_paymill_cc_payment()) {
|
| 260 |
+
paymill_cc_debug('Paymill payment method triggered');
|
| 261 |
+
if (paymill_cc_validate()) {
|
| 262 |
+
paymill_cc_debug('Validation successful');
|
| 263 |
+
var cardholder = jQuery('#paymillcc_cardholder');
|
| 264 |
+
var number = jQuery('#paymillcc_number');
|
| 265 |
+
var expiry_month = jQuery('#paymillcc_expiry_month');
|
| 266 |
+
var expiry_year = jQuery('#paymillcc_expiry_year');
|
| 267 |
+
var cvc = jQuery('#paymillcc_cvc');
|
| 268 |
+
paymill.createToken({
|
| 269 |
+
number: number.val(),
|
| 270 |
+
exp_month: expiry_month.val(),
|
| 271 |
+
exp_year: expiry_year.val(),
|
| 272 |
+
cvc: cvc.val(),
|
| 273 |
+
cardholder: cardholder.val(),
|
| 274 |
+
amount: '<?php print $this->paymillPaymentAmount; ?>',
|
| 275 |
+
currency: '<?php print $this->paymillPaymentCurrency; ?>'
|
| 276 |
+
}, function(error, result) {
|
| 277 |
+
paymill_cc_debug('Start Paymill response handler');
|
| 278 |
+
if (error) {
|
| 279 |
+
paymill_cc_debug('An API error occured ' + error.apierror);
|
| 280 |
+
return false;
|
| 281 |
+
} else {
|
| 282 |
+
paymill_cc_debug('Received a token: ' + result.token);
|
| 283 |
+
jQuery('#paymill_transaction_token').val(result.token);
|
| 284 |
+
onestep_callback();
|
| 285 |
+
}
|
| 286 |
+
}
|
| 287 |
+
);
|
| 288 |
+
return false;
|
| 289 |
+
} else {
|
| 290 |
+
return false;
|
| 291 |
+
}
|
| 292 |
+
} else {
|
| 293 |
+
return false;
|
| 294 |
+
}
|
| 295 |
+
return false;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
</script>
|
| 299 |
+
|
app/design/frontend/base/default/template/paymill/form/paymill_elv.phtml
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php $_code=$this->getMethodCode() ?>
|
| 2 |
+
<script src="<?php echo Mage::getDesign()->getSkinUrl('paymill/jquery.min.js'); ?>"></script>
|
| 3 |
+
<link rel="stylesheet" type="text/css" href="<?php echo Mage::getDesign()->getSkinUrl('paymill/paymill_styles.css'); ?>" />
|
| 4 |
+
<!--
|
| 5 |
+
The payment form.
|
| 6 |
+
Important: do not process any card data to the server (leave name attribute away)
|
| 7 |
+
-->
|
| 8 |
+
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display: none">
|
| 9 |
+
<li>
|
| 10 |
+
<img src="<?php echo Mage::getDesign()->getSkinUrl('paymill/icon_elv.png'); ?>" />
|
| 11 |
+
</li>
|
| 12 |
+
<?php if (is_null(Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 13 |
+
<li>
|
| 14 |
+
<label for="paymillelv_accountholder" class="required"><em>*</em>Kontoinhaber</label>
|
| 15 |
+
<div class="input-box">
|
| 16 |
+
<input type="text" class="input-text required-entry" id="paymillelv_accountholder" value="" autocomplete="off">
|
| 17 |
+
<div class="validation-advice" id="accountholder_error" style="display: none"></div>
|
| 18 |
+
</div>
|
| 19 |
+
</li>
|
| 20 |
+
<li>
|
| 21 |
+
<label for="paymillelv_accountnumber" class="required"><em>*</em>Kontonummer</label>
|
| 22 |
+
<div class="input-box">
|
| 23 |
+
<input type="text" id="paymillelv_accountnumber" class="input-text" value="" autocomplete="off">
|
| 24 |
+
<div class="validation-advice" id="accountnumber_error" style="display: none"></div>
|
| 25 |
+
</div>
|
| 26 |
+
</li>
|
| 27 |
+
<li>
|
| 28 |
+
<label for="paymillelv_banknumber" class="required"><em>*</em>Bankleitzahl</label>
|
| 29 |
+
<div class="input-box">
|
| 30 |
+
<input type="text" id="paymillelv_banknumber" class="input-text" autocomplete="off" value="">
|
| 31 |
+
<div class="validation-advice" id="banknumber_error" style="display: none"></div>
|
| 32 |
+
</div>
|
| 33 |
+
</li>
|
| 34 |
+
<?php endif; ?>
|
| 35 |
+
<?php if (!is_null(Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 36 |
+
<input type="hidden" id="paymill_elv_existing_customer" value="true">
|
| 37 |
+
<?php elseif (is_null(Mage::getSingleton("paymillelv/customerdata")->loadByUserId(Mage::getSingleton('customer/session')->getCustomer()->getId()))): ?>
|
| 38 |
+
<input type="hidden" id="paymill_elv_existing_customer" value="false">
|
| 39 |
+
<?php endif; ?>
|
| 40 |
+
<!-- this gets the transaction token -->
|
| 41 |
+
<input type="hidden" id="paymill_elv_transaction_token" type="text" value="" name="payment[paymill_elv_transaction_token]" />
|
| 42 |
+
<?php if ($this->showPaymillLabel) { ?>
|
| 43 |
+
<li>
|
| 44 |
+
<div class="paymill_powered"><div class="paymill_credits">Sicheres Lastschriftverfahren powered by <a href="http://www.paymill.de" target="_blank">Paymill</a></div></div>
|
| 45 |
+
</li>
|
| 46 |
+
<?php } ?>
|
| 47 |
+
</ul>
|
| 48 |
+
<!--
|
| 49 |
+
PaymillPaymentELV
|
| 50 |
+
API enpoint: <?php print $this->paymillApiEndpoint; ?>
|
| 51 |
+
-->
|
| 52 |
+
<script type="text/javascript">
|
| 53 |
+
var PAYMILL_PUBLIC_KEY = '<?php print $this->paymillPublicApiKey; ?>';
|
| 54 |
+
</script>
|
| 55 |
+
<script type="text/javascript" src="<?php print $this->paymillBridgeEndpoint; ?>"></script>
|
| 56 |
+
<script type="text/javascript">
|
| 57 |
+
jQuery.noConflict();
|
| 58 |
+
|
| 59 |
+
jQuery(document).ready(function(){
|
| 60 |
+
jQuery('#payment-buttons-container button:first').prop("onclick", null);
|
| 61 |
+
jQuery('#payment-buttons-container button:first').unbind('click');
|
| 62 |
+
jQuery('#payment-buttons-container button:first').click(paymill_payment_save_override);
|
| 63 |
+
});
|
| 64 |
+
|
| 65 |
+
if (typeof paymill_payment_save_override != 'function') {
|
| 66 |
+
function paymill_payment_save_override() {
|
| 67 |
+
if (payment.currentMethod == "paymillcc") {
|
| 68 |
+
if (jQuery('#paymill_existing_customer').val() == 'false') {
|
| 69 |
+
paymill_cc_payment_save_override();
|
| 70 |
+
} else {
|
| 71 |
+
payment.save();
|
| 72 |
+
}
|
| 73 |
+
} else if (payment.currentMethod == "paymillelv") {
|
| 74 |
+
if (jQuery('#paymill_elv_existing_customer').val() == 'false') {
|
| 75 |
+
paymill_elv_payment_save_override();
|
| 76 |
+
} else {
|
| 77 |
+
payment.save();
|
| 78 |
+
}
|
| 79 |
+
} else {
|
| 80 |
+
payment.save();
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
// is paymillPayment?
|
| 86 |
+
function paymill_is_paymill_elv_payment() {
|
| 87 |
+
return payment.currentMethod == "<?php print $_code; ?>";
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
// handler that is called when click on next step button
|
| 91 |
+
function paymill_elv_payment_save_override() {
|
| 92 |
+
if (paymill_is_paymill_elv_payment()) {
|
| 93 |
+
paymill_elv_debug('Paymill elv payment method triggered');
|
| 94 |
+
if (paymill_elv_validate()) {
|
| 95 |
+
paymill_elv_debug('Validation successful');
|
| 96 |
+
var accountholder = jQuery('#paymillelv_accountholder');
|
| 97 |
+
var accountnumber = jQuery('#paymillelv_accountnumber');
|
| 98 |
+
var banknumber = jQuery('#paymillelv_banknumber');
|
| 99 |
+
paymill.createToken({
|
| 100 |
+
number: accountnumber.val(),
|
| 101 |
+
bank: banknumber.val(),
|
| 102 |
+
accountholder: accountholder.val(),
|
| 103 |
+
}, paymill_elv_response_handler
|
| 104 |
+
);
|
| 105 |
+
}
|
| 106 |
+
} else {
|
| 107 |
+
payment.save();
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
// paymill response handler
|
| 112 |
+
function paymill_elv_response_handler(error, result) {
|
| 113 |
+
paymill_elv_debug('Start Paymill response handler');
|
| 114 |
+
if (error) {
|
| 115 |
+
alert("API returned error" + error.apierror);
|
| 116 |
+
paymill_elv_debug('An API error occured ' + error.apierror);
|
| 117 |
+
} else {
|
| 118 |
+
paymill_elv_debug('Received a token: ' + result.token);
|
| 119 |
+
jQuery('#paymill_elv_transaction_token').val(result.token);
|
| 120 |
+
payment.save();
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
// validation
|
| 125 |
+
function paymill_elv_validate() {
|
| 126 |
+
|
| 127 |
+
var accountholder = jQuery('#paymillelv_accountholder');
|
| 128 |
+
var accountnumber = jQuery('#paymillelv_accountnumber');
|
| 129 |
+
var banknumber = jQuery('#paymillelv_banknumber');
|
| 130 |
+
var banknumber_error = jQuery('#banknumber_error');
|
| 131 |
+
var accountnumber_error = jQuery('#accountnumber_error');
|
| 132 |
+
var accountholder_error = jQuery('#accountholder_error');
|
| 133 |
+
|
| 134 |
+
var result = true;
|
| 135 |
+
|
| 136 |
+
paymill_elv_debug('Start form validation');
|
| 137 |
+
|
| 138 |
+
// reset errors
|
| 139 |
+
banknumber_error.hide();
|
| 140 |
+
accountnumber_error.hide();
|
| 141 |
+
accountholder_error.hide();
|
| 142 |
+
|
| 143 |
+
// error messages
|
| 144 |
+
error_msg_accountholder_missing = "<?php echo Mage::helper('paymillelv')->__("The account holder is missing"); ?>";
|
| 145 |
+
error_msg_accountnumber_invalid = "<?php echo Mage::helper('paymillelv')->__("The account number is invalid"); ?>"
|
| 146 |
+
error_msg_banknumber_invalid = "<?php echo Mage::helper('paymillelv')->__("The bank code is invalid"); ?>"
|
| 147 |
+
|
| 148 |
+
if (accountholder.val() == "") {
|
| 149 |
+
accountholder_error.html(error_msg_accountholder_missing).show();
|
| 150 |
+
accountholder.addClass('validation-failed');
|
| 151 |
+
result = false;
|
| 152 |
+
} else {
|
| 153 |
+
accountholder.removeClass('validation-failed');
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
if (!paymill.validateAccountNumber(accountnumber.val())) {
|
| 157 |
+
accountnumber_error.html(error_msg_accountnumber_invalid).show();
|
| 158 |
+
accountnumber.addClass('validation-failed');
|
| 159 |
+
result = false;
|
| 160 |
+
} else {
|
| 161 |
+
accountnumber.removeClass('validation-failed');
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
if (!paymill.validateBankCode(banknumber.val())) {
|
| 165 |
+
banknumber_error.html(error_msg_banknumber_invalid).show();
|
| 166 |
+
banknumber.addClass('validation-failed');
|
| 167 |
+
result = false;
|
| 168 |
+
} else {
|
| 169 |
+
banknumber.removeClass('validation-failed');
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
return result;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
// debug mode
|
| 176 |
+
function paymill_elv_debug(message) {
|
| 177 |
+
if (<?php print $this->paymillDebugMode; ?>) {
|
| 178 |
+
console.log("[PaymillELV] " + message);
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
</script>
|
| 183 |
+
|
| 184 |
+
|
app/design/frontend/base/default/template/paymill/payment/form/creditcard.phtml
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 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>
|
| 5 |
<div class="input-box">
|
|
@@ -32,9 +35,12 @@
|
|
| 32 |
</div>
|
| 33 |
</li>
|
| 34 |
<li>
|
| 35 |
-
<label for="<?php echo $_code ?>_cvc"
|
| 36 |
<div class="input-box">
|
| 37 |
-
<
|
|
|
|
|
|
|
|
|
|
| 38 |
</div>
|
| 39 |
</li>
|
| 40 |
<li>
|
|
@@ -86,5 +92,7 @@
|
|
| 86 |
paymillCc.setPaymillCode('<?php echo $_code; ?>');
|
| 87 |
paymillCc.setCodes();
|
| 88 |
paymillCc.addPaymillEvents();
|
|
|
|
|
|
|
| 89 |
//]]>
|
| 90 |
</script>
|
| 1 |
<?php $_code = $this->getMethodCode(); ?>
|
| 2 |
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
|
| 3 |
+
<li>
|
| 4 |
+
<?php echo $this->getCreditCardLogosDisplay();?>
|
| 5 |
+
</li>
|
| 6 |
<li>
|
| 7 |
<label for="<?php echo $_code ?>_holdername" class="required"><em>*</em><?php echo $this->__("paymill_Holder") ?></label>
|
| 8 |
<div class="input-box">
|
| 35 |
</div>
|
| 36 |
</li>
|
| 37 |
<li>
|
| 38 |
+
<label for="<?php echo $_code ?>_cvc" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
|
| 39 |
<div class="input-box">
|
| 40 |
+
<div class="v-fix">
|
| 41 |
+
<input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv paymill-validate-cc-cvc" id="<?php echo $_code ?>_cvc" name="payment[cc_cid]" value="<?php echo $this->getPaymentEntry($_code, 'cvc'); ?>" />
|
| 42 |
+
</div>
|
| 43 |
+
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 44 |
</div>
|
| 45 |
</li>
|
| 46 |
<li>
|
| 92 |
paymillCc.setPaymillCode('<?php echo $_code; ?>');
|
| 93 |
paymillCc.setCodes();
|
| 94 |
paymillCc.addPaymillEvents();
|
| 95 |
+
<?php echo $this->getCreditCardLogosBrand();?>
|
| 96 |
+
paymillCc.setBrandCreditcards(paymillCcBrands);
|
| 97 |
//]]>
|
| 98 |
</script>
|
app/design/frontend/base/default/template/paymill/payment/form/directdebit.phtml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
<?php $_code = $this->getMethodCode(); ?>
|
|
|
|
| 2 |
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
|
| 3 |
<li>
|
| 4 |
<p class="paymill-payment-errors alert-error" style="display:none;"></p>
|
|
@@ -9,43 +10,29 @@
|
|
| 9 |
<input value="<?php echo $this->getPaymentEntry($_code, 'holder'); ?>" type="text" id="<?php echo $_code ?>_holdername" class="input-text paymill-validate-dd-holdername required-entry"/>
|
| 10 |
</div>
|
| 11 |
</li>
|
| 12 |
-
<?php if (!Mage::getStoreConfig('payment/' . $_code . '/sepa', Mage::app()->getStore()->getStoreId())): ?>
|
| 13 |
<li>
|
| 14 |
-
<label for="<?php echo $_code ?>
|
| 15 |
<div class="input-box">
|
| 16 |
-
<input value="<?php echo $
|
| 17 |
</div>
|
| 18 |
</li>
|
| 19 |
<li>
|
| 20 |
-
<label for="<?php echo $_code ?>
|
| 21 |
<div class="input-box">
|
| 22 |
-
<input value="<?php echo $
|
| 23 |
</div>
|
| 24 |
</li>
|
| 25 |
-
<?php else: ?>
|
| 26 |
-
<li>
|
| 27 |
-
<label for="<?php echo $_code ?>_iban" class="required"><em>*</em><?php echo $this->__("paymill_iban") ?></label>
|
| 28 |
-
<div class="input-box">
|
| 29 |
-
<input value="<?php echo $this->getPaymentEntry($_code, 'iban'); ?>" type="text" id="<?php echo $_code ?>_iban" class="input-text paymill-validate-dd-iban required-entry"/>
|
| 30 |
-
</div>
|
| 31 |
-
</li>
|
| 32 |
-
<li>
|
| 33 |
-
<label for="<?php echo $_code ?>_bic" class="required"><em>*</em><?php echo $this->__("paymill_bic") ?></label>
|
| 34 |
-
<div class="input-box">
|
| 35 |
-
<input value="<?php echo $this->getPaymentEntry($_code, 'bic'); ?>" type="text" id="<?php echo $_code ?>_bic" class="input-text paymill-validate-dd-bic required-entry"/>
|
| 36 |
-
</div>
|
| 37 |
-
</li>
|
| 38 |
-
<?php endif; ?>
|
| 39 |
<li>
|
| 40 |
<input class="paymill-payment-token-elv paymill-validate-elv-token" name="payment[paymill-payment-token-elv]" id="payment[paymill-payment-token-elv]" type="hidden" />
|
| 41 |
<input class="paymill-option-debug-elv" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->isInDebugMode(); ?>" />
|
| 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"); ?>" />
|
|
|
|
| 49 |
<input class="paymill-payment-error-elv-token" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_token"); ?>"/>
|
| 50 |
<input class="PAYMILL_internal_server_error-elv" type="hidden" value="<?php echo $this->__("PAYMILL_internal_server_error"); ?>"/>
|
| 51 |
<input class="PAYMILL_invalid_public_key-elv" type="hidden" value="<?php echo $this->__("PAYMILL_invalid_public_key"); ?>"/>
|
| 1 |
<?php $_code = $this->getMethodCode(); ?>
|
| 2 |
+
<?php $fastCheckoutData = $this->getPaymentEntryElv($_code); ?>
|
| 3 |
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
|
| 4 |
<li>
|
| 5 |
<p class="paymill-payment-errors alert-error" style="display:none;"></p>
|
| 10 |
<input value="<?php echo $this->getPaymentEntry($_code, 'holder'); ?>" type="text" id="<?php echo $_code ?>_holdername" class="input-text paymill-validate-dd-holdername required-entry"/>
|
| 11 |
</div>
|
| 12 |
</li>
|
|
|
|
| 13 |
<li>
|
| 14 |
+
<label for="<?php echo $_code ?>_account_iban" class="required"><em>*</em><?php echo $this->__("paymill_iban") ?> / <?php echo $this->__("paymill_account") ?></label>
|
| 15 |
<div class="input-box">
|
| 16 |
+
<input value="<?php echo $fastCheckoutData[0]; ?>" type="text" id="<?php echo $_code ?>_account_iban" class="input-text paymill-validate-dd-account-iban required-entry"/>
|
| 17 |
</div>
|
| 18 |
</li>
|
| 19 |
<li>
|
| 20 |
+
<label for="<?php echo $_code ?>_bankcode_bic" class="required"><em>*</em><?php echo $this->__("paymill_bic") ?> / <?php echo $this->__("paymill_bankcode") ?></label>
|
| 21 |
<div class="input-box">
|
| 22 |
+
<input value="<?php echo $fastCheckoutData[1]; ?>" type="text" id="<?php echo $_code ?>_bankcode_bic" class="input-text paymill-validate-dd-bankcode-bic required-entry"/>
|
| 23 |
</div>
|
| 24 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
<li>
|
| 26 |
<input class="paymill-payment-token-elv paymill-validate-elv-token" name="payment[paymill-payment-token-elv]" id="payment[paymill-payment-token-elv]" type="hidden" />
|
| 27 |
<input class="paymill-option-debug-elv" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->isInDebugMode(); ?>" />
|
| 28 |
<input class="paymill-info-public_key-elv" type="hidden" value="<?php echo Mage::helper('paymill/optionHelper')->getPublicKey(); ?>" />
|
| 29 |
<input class="paymill-info-fastCheckout-elv" type="hidden" value="<?php echo $this->isNormalCheckout($_code); ?>" />
|
|
|
|
| 30 |
<input class="paymill-payment-token-log-elv" type="hidden" value="<?php echo $this->getUrl('paymill/token/log', array('_secure'=>true)); ?>"/>
|
| 31 |
<input class="paymill-payment-error-number-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_number_elv"); ?>" />
|
| 32 |
<input class="paymill-payment-error-holder-elv" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_holder_elv"); ?>" />
|
| 33 |
+
<input class="paymill-payment-error-number-iban-elv" type="hidden" value="<?php echo $this->__("paymill_feedback_error_directdebit_number_iban"); ?>" />
|
| 34 |
<input class="paymill-payment-error-bankcode" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_bankcode"); ?>" />
|
| 35 |
+
<input class="paymill-payment-error-bankcode-bic-elv" type="hidden" value="<?php echo $this->__("paymill_feedback_error_directdebit_bankcode_bic"); ?>" />
|
| 36 |
<input class="paymill-payment-error-elv-token" type="hidden" value="<?php echo $this->__("paymill_error_text_invalid_token"); ?>"/>
|
| 37 |
<input class="PAYMILL_internal_server_error-elv" type="hidden" value="<?php echo $this->__("PAYMILL_internal_server_error"); ?>"/>
|
| 38 |
<input class="PAYMILL_invalid_public_key-elv" type="hidden" value="<?php echo $this->__("PAYMILL_invalid_public_key"); ?>"/>
|
app/design/frontend/base/default/template/paymill/payment/info/directdebit.phtml
CHANGED
|
@@ -2,5 +2,12 @@
|
|
| 2 |
<tr>
|
| 3 |
<td><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></td>
|
| 4 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
</table>
|
| 6 |
<?php echo $this->getChildHtml() ?>
|
| 2 |
<tr>
|
| 3 |
<td><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></td>
|
| 4 |
</tr>
|
| 5 |
+
<?php if(!is_null($this->getInfo()->getAdditionalInformation('paymillPrenotificationDate'))) : ?>
|
| 6 |
+
<tr>
|
| 7 |
+
<td>
|
| 8 |
+
<?php echo $this->__('paymill_prenotification_text') . " " . $this->getInfo()->getAdditionalInformation('paymillPrenotificationDate'); ?>
|
| 9 |
+
</td>
|
| 10 |
+
</tr>
|
| 11 |
+
<?php endif; ?>
|
| 12 |
</table>
|
| 13 |
<?php echo $this->getChildHtml() ?>
|
app/locale/de_DE/Paymill_Paymill.csv
CHANGED
|
@@ -1,121 +1,128 @@
|
|
| 1 |
-
|
| 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 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
"
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
"
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
"
|
| 75 |
-
"Problem with
|
| 76 |
-
"
|
| 77 |
-
"
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"Technical error with
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"
|
| 104 |
-
"
|
| 105 |
-
"
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
"
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
paymill_Amount,Betrag
|
| 2 |
+
paymill_accepted_currency,"Akzeptierte Währungen"
|
| 3 |
+
paymill_opt_Enabled,Aktivieren
|
| 4 |
+
paymill_opt_Countries,"Erlaubte Länder"
|
| 5 |
+
paymill_Activate_Debugging,"Debugging aktivieren"
|
| 6 |
+
paymill_fc_active,"Fast Checkout erlauben"
|
| 7 |
+
paymill_Activate_Logging,"Logging aktivieren"
|
| 8 |
+
paymill_preAuth_active,"Kreditkarten Transaktionen im Checkout autorisieren, Buchung bei Rechnungsgenerierung durchführen."
|
| 9 |
+
paymill_private_key_comment,"Ihren Private Key können Sie dem PAYMILL Cockpit entnehmen."
|
| 10 |
+
paymill_Private_Key,"Private Key"
|
| 11 |
+
paymill_public_key_comment,"Ihren Public Key können Sie dem PAYMILL Cockpit entnehmen."
|
| 12 |
+
paymill_Public_Key,"Public Key"
|
| 13 |
+
paymill_Show_Label,"PAYMILL Label im Checkout anzeigen"
|
| 14 |
+
paymill_opt_Sort,Reihenfolge
|
| 15 |
+
paymill_token_tolerace_tooltip,"Wert der bei Generierung des PAYMILL Tokens aufgeschlagen wird, um 3-D Secure Abweichungen zu vermeiden."
|
| 16 |
+
paymill_token_tolerace_comment,"Wert der bei Generierung des PAYMILL Tokens aufgeschlagen wird, um 3-D Secure Abweichungen zu vermeiden."
|
| 17 |
+
paymill_token_tolerace,"Token Toleranz Wert"
|
| 18 |
+
paymill_Currency,Währung
|
| 19 |
+
paymill_error_text_invalid_cvc,"Ungültige CVC"
|
| 20 |
+
PAYMILL_field_invalid_card_cvc,"Ungültige CVC"
|
| 21 |
+
paymill_error_text_invalid_holder_cc,"Bitte geben Sie einen Inhabernamen an."
|
| 22 |
+
PAYMILL_field_invalid_card_holder,"Bitte geben Sie einen Inhabernamen an."
|
| 23 |
+
paymill_error_text_invalid_number_cc,"Bitte geben Sie eine gültige Kreditkartennummer ein."
|
| 24 |
+
PAYMILL_field_invalid_card_number,"Bitte geben Sie eine gültige Kreditkartennummer ein."
|
| 25 |
+
paymill_error_text_invalid_expdate,"Ungültiges Ablaufdatum"
|
| 26 |
+
PAYMILL_field_invalid_bank_code,"Bitte geben Sie eine gültige Bankleitzahl an"
|
| 27 |
+
paymill_error_text_invalid_bankcode,"Bitte geben Sie eine gültige Bankleitzahl an"
|
| 28 |
+
paymill_error_text_invalid_holder_elv,"Bitte geben Sie den Namen des Kontoinhabers an"
|
| 29 |
+
PAYMILL_field_invalid_account_holder,"Bitte geben Sie den Namen des Kontoinhabers an"
|
| 30 |
+
paymill_error_text_invalid_number_elv,"Bitte geben Sie eine gültige Kontonummer ein"
|
| 31 |
+
PAYMILL_field_invalid_account_number,"Bitte geben Sie eine gültige Kontonummer ein"
|
| 32 |
+
paymill_error_text_invalid_payment,"Zahlart konnte nicht identifiziert werden. Bitte kontaktieren Sie den Support."
|
| 33 |
+
paymill_dialog_confirm,"Sind Sie sicher?"
|
| 34 |
+
paymill_slogan,"Sichere Kreditkartenzahlung powered by "
|
| 35 |
+
paymill_slogan_elv,"ELV powered by "
|
| 36 |
+
paymill_credit_card,Kreditkarte
|
| 37 |
+
paymill_creditcard,Kreditkarte
|
| 38 |
+
paymill_3ds_cancel,Abbrechen
|
| 39 |
+
paymill_Cvc,CVC
|
| 40 |
+
paymill_Holder,Karteninhaber
|
| 41 |
+
paymill_Number,Kartennummer
|
| 42 |
+
paymill_Date,"Gültig bis"
|
| 43 |
+
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."
|
| 44 |
+
paymill_directdebit,ELV
|
| 45 |
+
paymill_direct_debit,ELV
|
| 46 |
+
paymill_bankcode,Bankleitzahl
|
| 47 |
+
paymill_account,Kontonummer
|
| 48 |
+
paymill_backend_log_entry_date,Eintragsdatum
|
| 49 |
+
paymill_backend_log_dev_info,"Entwickler Informationen"
|
| 50 |
+
paymill_backend_log_id,Id
|
| 51 |
+
paymill_backend_log_merchant_info,"Händler Informationen"
|
| 52 |
+
paymill_log,"PAYMILL Log"
|
| 53 |
+
paymill_backend_log_version,Modulversion
|
| 54 |
+
paymill_credit_card_label,"PAYMILL Kreditkartenzahlung"
|
| 55 |
+
paymill_direct_debit_label,"PAYMILL ELV"
|
| 56 |
+
paymill_activate_sepa,"SEPA Formular anzeigen"
|
| 57 |
+
paymill_Basic_Setting,"Paymill Grundeinstellungen"
|
| 58 |
+
paymill_iban,IBAN
|
| 59 |
+
paymill_bic,BIC
|
| 60 |
+
paymill_public_key_tooltip,"Bitte geben Sie Ihren Public Key an."
|
| 61 |
+
paymill_private_key_tooltip,"Bitte geben Sie Ihren Private Key an."
|
| 62 |
+
paymill_error_text_invalid_token,"Der folgende Fehler ist aufgetreten:"
|
| 63 |
+
paymill_error_text_no_entry_selected,"Bitte wählen Sie einen Eintrag aus"
|
| 64 |
+
paymill_action_delete,"Eintrag löschen"
|
| 65 |
+
paymill_backend_log_dev_info_additional,"Detail Debug Informationen"
|
| 66 |
+
paymill_checkout_generating_invoice,"Rechnung wird generiert"
|
| 67 |
+
paymill_log_action_success,"Ihre Operation war erfolgreich"
|
| 68 |
+
paymill_checkout_desc,Beschreibung
|
| 69 |
+
"General undefined response.","General undefined response."
|
| 70 |
+
"Still waiting on something.","Still waiting on something."
|
| 71 |
+
"General success response.","General success response."
|
| 72 |
+
"General problem with data.","General problem with data."
|
| 73 |
+
"General problem with payment data.","General problem with payment data."
|
| 74 |
+
"Problem with credit card data.","Problem with credit card data."
|
| 75 |
+
"Problem with cvv.","Problem with cvv."
|
| 76 |
+
"Card expired or not yet valid.","Card expired or not yet valid."
|
| 77 |
+
"Limit exceeded.","Limit exceeded."
|
| 78 |
+
"Card invalid.","Card invalid."
|
| 79 |
+
"Expiry date not valid.","Expiry date not valid."
|
| 80 |
+
"Credit card brand required.","Credit card brand required."
|
| 81 |
+
"Problem with bank account data.","Problem with bank account data."
|
| 82 |
+
"Bank account data combination mismatch.","Bank account data combination mismatch."
|
| 83 |
+
"User authentication failed.","User authentication failed."
|
| 84 |
+
"Problem with 3d secure data.","Problem with 3d secure data."
|
| 85 |
+
"Currency / amount mismatch","Currency / amount mismatch"
|
| 86 |
+
"Problem with input data.","Problem with input data."
|
| 87 |
+
"Amount too low or zero.","Amount too low or zero."
|
| 88 |
+
"Usage field too long.","Usage field too long."
|
| 89 |
+
"Currency not allowed.","Currency not allowed."
|
| 90 |
+
"General problem with backend.","General problem with backend."
|
| 91 |
+
"Country blacklisted.","Country blacklisted."
|
| 92 |
+
"Technical error with credit card.","Technical error with credit card."
|
| 93 |
+
"Error limit exceeded.","Error limit exceeded."
|
| 94 |
+
"Card declined by authorization system.","Card declined by authorization system."
|
| 95 |
+
"Manipulation or stolen card.","Manipulation or stolen card."
|
| 96 |
+
"Card restricted.","Card restricted"
|
| 97 |
+
"Invalid card configuration data.","Invalid card configuration data."
|
| 98 |
+
"Technical error with bank account.","Technical error with bank account."
|
| 99 |
+
"Card blacklisted.","Card blacklisted."
|
| 100 |
+
"Technical error with 3D secure.","Technical error with 3D secure."
|
| 101 |
+
"Decline because of risk issues.","Decline because of risk issues."
|
| 102 |
+
"General timeout.","General timeout."
|
| 103 |
+
"Timeout on side of the acquirer.","Timeout on side of the acquirer."
|
| 104 |
+
"Risk management transaction timeout.","Risk management transaction timeout"
|
| 105 |
+
"Duplicate transaction.","Duplicate transaction."
|
| 106 |
+
PAYMILL_internal_server_error,"The communication with the psp failed."
|
| 107 |
+
PAYMILL_invalid_public_key,"The public key is invalid."
|
| 108 |
+
PAYMILL_invalid_payment_data,"Paymentmethod, card type currency or country not authorized"
|
| 109 |
+
PAYMILL_unknown_error,"Unknown Error"
|
| 110 |
+
PAYMILL_3ds_cancelled,"3-D Secure process has been canceled by the user"
|
| 111 |
+
PAYMILL_field_invalid_card_exp_year,"Invalid Expiry Year"
|
| 112 |
+
PAYMILL_field_invalid_card_exp_month,"Invalid Expiry Month"
|
| 113 |
+
PAYMILL_field_invalid_card_exp,"Credit Card not valid"
|
| 114 |
+
PAYMILL_field_invalid_amount_int,"Missing amount for 3-D Secure"
|
| 115 |
+
PAYMILL_field_field_invalid_amount,"Missing amount for 3-D Secure"
|
| 116 |
+
PAYMILL_field_field_field_invalid_currency,"Invalid currency for 3-D Secure"
|
| 117 |
+
PAYMILL_field_invalid_iban,"Invalid IBAN"
|
| 118 |
+
PAYMILL_field_invalid_bic,"Invalid BIC"
|
| 119 |
+
PAYMILL_field_invalid_country,"Invalid country for sepa transactions"
|
| 120 |
+
PAYMILL_field_invalid_bank_data,"Invalid bank data"
|
| 121 |
+
paymill_send_invoice_mail,"Rechnungsemail senden"
|
| 122 |
+
paymill_error_text_invalid_iban_elv,"Bitte geben Sie eine gültige IBAN an."
|
| 123 |
+
paymill_error_text_invalid_bic,"Bitte geben Sie eine gültige BIC an."
|
| 124 |
+
paymill_accepted_creditcards,"Akzeptierte Kreditkarten"
|
| 125 |
+
paymill_feedback_error_directdebit_number_iban,"Bitte geben Sie eine gültige IBAN/Kontonummer ein."
|
| 126 |
+
paymill_feedback_error_directdebit_bankcode_bic,"Bitte geben Sie eine gültige BIC/Bankleitzahl an."
|
| 127 |
+
paymill_prenotification,"Tage bis zum Einzug"
|
| 128 |
+
paymill_prenotification_text,"Die Lastschrift wird zu dem folgenden Termin eingezogen:"
|
app/locale/en_GB/Paymill_Paymill.csv
CHANGED
|
@@ -1,121 +1,128 @@
|
|
| 1 |
-
|
| 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 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
"
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
"
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
"
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
"
|
| 75 |
-
"Problem with
|
| 76 |
-
"
|
| 77 |
-
"
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"Technical error with
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"
|
| 104 |
-
"
|
| 105 |
-
"
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
"
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
paymill_Amount,Amount
|
| 2 |
+
paymill_accepted_currency,"Accepted currencies"
|
| 3 |
+
paymill_opt_Enabled,Activate
|
| 4 |
+
paymill_opt_Countries,"Accepted countries"
|
| 5 |
+
paymill_Activate_Debugging,"Activate debugging"
|
| 6 |
+
paymill_fc_active,"Enable fast checkout"
|
| 7 |
+
paymill_Activate_Logging,"Activate logging."
|
| 8 |
+
paymill_preAuth_active,"Preauthorize transactions during checkout. Charge will be performed when generating invoices."
|
| 9 |
+
paymill_private_key_comment,"You can find your private key in the PAYMILL cockpit."
|
| 10 |
+
paymill_Private_Key,"Private key"
|
| 11 |
+
paymill_public_key_comment,"You can find your public key in the PAYMILL cockpit."
|
| 12 |
+
paymill_Public_Key,"Public key"
|
| 13 |
+
paymill_Show_Label,"Display PAYMILL logo during checkout."
|
| 14 |
+
paymill_opt_Sort,Sequence
|
| 15 |
+
paymill_token_tolerace_tooltip,"Amount that will be surcharged when generating the PAYMILL Token. This is to avoid deviations of 3-D secure."
|
| 16 |
+
paymill_token_tolerace_comment,"Amount that will be surcharged when generating the PAYMILL Token. This is to avoid deviations of 3-D secure."
|
| 17 |
+
paymill_token_tolerace,"Token tolerance value"
|
| 18 |
+
paymill_Currency,Currency
|
| 19 |
+
paymill_error_text_invalid_cvc,"Invalid CVC"
|
| 20 |
+
PAYMILL_field_invalid_card_cvc,"Invalid CVC"
|
| 21 |
+
paymill_error_text_invalid_holder_cc,"Please enter the card holder's name."
|
| 22 |
+
PAYMILL_field_invalid_card_holder,"Please enter the card holder's name."
|
| 23 |
+
paymill_error_text_invalid_number_cc,"Please enter a valid credit card number."
|
| 24 |
+
PAYMILL_field_invalid_card_number,"Please enter a valid credit card number."
|
| 25 |
+
paymill_error_text_invalid_expdate,"Invalid expiration date"
|
| 26 |
+
PAYMILL_field_invalid_bank_code,"Please enter a valid direct debit bank code."
|
| 27 |
+
paymill_error_text_invalid_bankcode,"Please enter a valid direct debit bank code."
|
| 28 |
+
paymill_error_text_invalid_holder_elv,"Please enter the name of the direct debit account holder"
|
| 29 |
+
PAYMILL_field_invalid_account_holder,"Please enter the name of the direct debit account holder"
|
| 30 |
+
paymill_error_text_invalid_number_elv,"Please enter a valid direct debit account number"
|
| 31 |
+
PAYMILL_field_invalid_account_number,"Please enter a valid direct debit account number"
|
| 32 |
+
paymill_error_text_invalid_payment,"Payment method could not be identified. Please contact support."
|
| 33 |
+
paymill_dialog_confirm,"Are you sure?"
|
| 34 |
+
paymill_slogan,"Secure credit card payments powered by"
|
| 35 |
+
paymill_slogan_elv,"Direct debit powered by"
|
| 36 |
+
paymill_credit_card,"Credit card"
|
| 37 |
+
paymill_creditcard,"Credit card"
|
| 38 |
+
paymill_3ds_cancel,Cancel
|
| 39 |
+
paymill_Cvc,CVC
|
| 40 |
+
paymill_Holder,"Card holder"
|
| 41 |
+
paymill_Number,"Card number"
|
| 42 |
+
paymill_Date,"Valid until"
|
| 43 |
+
paymill_cvc_tooltip,"The CVV code or CVC is a security feature of credit cards. It usually is a three to four digit long number. On VISA credit cards, it is called CVV code. The same code can be found on MasterCard credit cards - where however it is called CVC. CVC is an abbreviation for ""Card Validation Code"". CVV code on the other hand is an abbreviation for ""Card Validation Value code"". Similar to MasterCard and Visa, other brands such as Diners Club, Discover and JCB contain a three digit number that can usually be found on the back of the credit card. MAESTRO cards exist with and without a three digit CVV. In case a MAESTRO card without a CVV will be used, it is possible to enter 000 to the form instead. American Express uses the CID (card identification number). The CID is a four digit number that can usually be found on the front of the card, top right from the credit card number. "
|
| 44 |
+
paymill_directdebit,"Direct debit"
|
| 45 |
+
paymill_direct_debit,"Direct debit"
|
| 46 |
+
paymill_bankcode,"Bank code"
|
| 47 |
+
paymill_account,"Account number"
|
| 48 |
+
paymill_backend_log_entry_date,"Date of entry"
|
| 49 |
+
paymill_backend_log_dev_info,"Inform developer"
|
| 50 |
+
paymill_backend_log_id,Id
|
| 51 |
+
paymill_backend_log_merchant_info,"Merchant information"
|
| 52 |
+
paymill_log,"PAYMILL log"
|
| 53 |
+
paymill_backend_log_version,"Module version"
|
| 54 |
+
paymill_credit_card_label,"PAYMILL credit card payments"
|
| 55 |
+
paymill_direct_debit_label,"PAYMILL direct debit"
|
| 56 |
+
paymill_activate_sepa,"Show SEPA form"
|
| 57 |
+
paymill_Basic_Setting,"Paymill Basic Settings"
|
| 58 |
+
paymill_iban,IBAN
|
| 59 |
+
paymill_bic,BIC
|
| 60 |
+
paymill_public_key_tooltip,"Please enter a valid publickey"
|
| 61 |
+
paymill_private_key_tooltip,"Please enter a valid privatekey"
|
| 62 |
+
paymill_error_text_invalid_token,"The following error occurred:"
|
| 63 |
+
paymill_error_text_no_entry_selected,"Please select an entry"
|
| 64 |
+
paymill_action_delete,"Delete entry"
|
| 65 |
+
paymill_backend_log_dev_info_additional,"Additional Developer Information"
|
| 66 |
+
paymill_checkout_generating_invoice,"Invoice is beeing generated"
|
| 67 |
+
paymill_log_action_success,"Action successful"
|
| 68 |
+
paymill_checkout_desc,"Description text"
|
| 69 |
+
"General undefined response.","General undefined response."
|
| 70 |
+
"Still waiting on something.","Still waiting on something."
|
| 71 |
+
"General success response.","General success response."
|
| 72 |
+
"General problem with data.","General problem with data."
|
| 73 |
+
"General problem with payment data.","General problem with payment data."
|
| 74 |
+
"Problem with credit card data.","Problem with credit card data."
|
| 75 |
+
"Problem with cvv.","Problem with cvv."
|
| 76 |
+
"Card expired or not yet valid.","Card expired or not yet valid."
|
| 77 |
+
"Limit exceeded.","Limit exceeded."
|
| 78 |
+
"Card invalid.","Card invalid."
|
| 79 |
+
"Expiry date not valid.","Expiry date not valid."
|
| 80 |
+
"Credit card brand required.","Credit card brand required."
|
| 81 |
+
"Problem with bank account data.","Problem with bank account data."
|
| 82 |
+
"Bank account data combination mismatch.","Bank account data combination mismatch."
|
| 83 |
+
"User authentication failed.","User authentication failed."
|
| 84 |
+
"Problem with 3d secure data.","Problem with 3d secure data."
|
| 85 |
+
"Currency / amount mismatch","Currency / amount mismatch"
|
| 86 |
+
"Problem with input data.","Problem with input data."
|
| 87 |
+
"Amount too low or zero.","Amount too low or zero."
|
| 88 |
+
"Usage field too long.","Usage field too long."
|
| 89 |
+
"Currency not allowed.","Currency not allowed."
|
| 90 |
+
"General problem with backend.","General problem with backend."
|
| 91 |
+
"Country blacklisted.","Country blacklisted."
|
| 92 |
+
"Technical error with credit card.","Technical error with credit card."
|
| 93 |
+
"Error limit exceeded.","Error limit exceeded."
|
| 94 |
+
"Card declined by authorization system.","Card declined by authorization system."
|
| 95 |
+
"Manipulation or stolen card.","Manipulation or stolen card."
|
| 96 |
+
"Card restricted.","Card restricted"
|
| 97 |
+
"Invalid card configuration data.","Invalid card configuration data."
|
| 98 |
+
"Technical error with bank account.","Technical error with bank account."
|
| 99 |
+
"Card blacklisted.","Card blacklisted."
|
| 100 |
+
"Technical error with 3D secure.","Technical error with 3D secure."
|
| 101 |
+
"Decline because of risk issues.","Decline because of risk issues."
|
| 102 |
+
"General timeout.","General timeout."
|
| 103 |
+
"Timeout on side of the acquirer.","Timeout on side of the acquirer."
|
| 104 |
+
"Risk management transaction timeout.","Risk management transaction timeout"
|
| 105 |
+
"Duplicate transaction.","Duplicate transaction."
|
| 106 |
+
PAYMILL_internal_server_error,"The communication with the psp failed."
|
| 107 |
+
PAYMILL_invalid_public_key,"The public key is invalid."
|
| 108 |
+
PAYMILL_invalid_payment_data,"Paymentmethod, card type currency or country not authorized"
|
| 109 |
+
PAYMILL_unknown_error,"Unknown Error"
|
| 110 |
+
PAYMILL_3ds_cancelled,"3-D Secure process has been canceled by the user"
|
| 111 |
+
PAYMILL_field_invalid_card_exp_year,"Invalid Expiry Year"
|
| 112 |
+
PAYMILL_field_invalid_card_exp_month,"Invalid Expiry Month"
|
| 113 |
+
PAYMILL_field_invalid_card_exp,"Credit Card not valid"
|
| 114 |
+
PAYMILL_field_invalid_amount_int,"Missing amount for 3-D Secure"
|
| 115 |
+
PAYMILL_field_field_invalid_amount,"Missing amount for 3-D Secure"
|
| 116 |
+
PAYMILL_field_field_field_invalid_currency,"Invalid currency for 3-D Secure"
|
| 117 |
+
PAYMILL_field_invalid_iban,"Invalid IBAN"
|
| 118 |
+
PAYMILL_field_invalid_bic,"Invalid BIC"
|
| 119 |
+
PAYMILL_field_invalid_country,"Invalid country for sepa transactions"
|
| 120 |
+
PAYMILL_field_invalid_bank_data,"Invalid bank data"
|
| 121 |
+
paymill_send_invoice_mail,"Send invoice mail"
|
| 122 |
+
paymill_error_text_invalid_iban_elv,"Please enter a valid iban"
|
| 123 |
+
paymill_error_text_invalid_bic,"Please enter a valid bic."
|
| 124 |
+
paymill_accepted_creditcards,"Accepted Credit Card Brands"
|
| 125 |
+
paymill_feedback_error_directdebit_number_iban,"Please enter a valid IBAN/direct debit account number"
|
| 126 |
+
paymill_feedback_error_directdebit_bankcode_bic,"Please enter a valid BIC/direct debit bank code"
|
| 127 |
+
paymill_prenotification,"Days until the debit"
|
| 128 |
+
paymill_prenotification_text,"The direct debit is drawn to the following date:"
|
app/locale/en_US/Paymill_Paymill.csv
CHANGED
|
@@ -1,121 +1,128 @@
|
|
| 1 |
-
|
| 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 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
"
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
"
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
"Problem with
|
| 75 |
-
"
|
| 76 |
-
"
|
| 77 |
-
"
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"
|
| 104 |
-
"
|
| 105 |
-
"
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
"
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
paymill_Amount,Amount
|
| 2 |
+
paymill_accepted_currency,"Accepted currencies"
|
| 3 |
+
paymill_opt_Enabled,Activate
|
| 4 |
+
paymill_opt_Countries,"Accepted countries"
|
| 5 |
+
paymill_Activate_Debugging,"Activate debugging"
|
| 6 |
+
paymill_fc_active,"Enable fast checkout"
|
| 7 |
+
paymill_Activate_Logging,"Activate logging."
|
| 8 |
+
paymill_preAuth_active,"Preauthorize transactions during checkout. Charge will be performed when generating invoices."
|
| 9 |
+
paymill_private_key_comment,"You can find your private key in the PAYMILL cockpit."
|
| 10 |
+
paymill_Private_Key,"Private key"
|
| 11 |
+
paymill_public_key_comment,"You can find your public key in the PAYMILL cockpit."
|
| 12 |
+
paymill_Public_Key,"Public key"
|
| 13 |
+
paymill_Show_Label,"Display PAYMILL logo during checkout."
|
| 14 |
+
paymill_opt_Sort,Sequence
|
| 15 |
+
paymill_token_tolerace_tooltip,"Amount that will be surcharged when generating the PAYMILL Token. This is to avoid deviations of 3-D secure."
|
| 16 |
+
paymill_token_tolerace_comment,"Amount that will be surcharged when generating the PAYMILL Token. This is to avoid deviations of 3-D secure."
|
| 17 |
+
paymill_token_tolerace,"Token tolerance value"
|
| 18 |
+
paymill_Currency,Currency
|
| 19 |
+
paymill_error_text_invalid_cvc,"Invalid CVC"
|
| 20 |
+
PAYMILL_field_invalid_card_cvc,"Invalid CVC"
|
| 21 |
+
paymill_error_text_invalid_holder_cc,"Please enter the card holder's name."
|
| 22 |
+
PAYMILL_field_invalid_card_holder,"Please enter the card holder's name."
|
| 23 |
+
paymill_error_text_invalid_number_cc,"Please enter a valid credit card number."
|
| 24 |
+
PAYMILL_field_invalid_card_number,"Please enter a valid credit card number."
|
| 25 |
+
paymill_error_text_invalid_expdate,"Invalid expiration date"
|
| 26 |
+
PAYMILL_field_invalid_bank_code,"Please enter a valid direct debit bank code."
|
| 27 |
+
paymill_error_text_invalid_bankcode,"Please enter a valid direct debit bank code."
|
| 28 |
+
paymill_error_text_invalid_holder_elv,"Please enter the name of the direct debit account holder"
|
| 29 |
+
PAYMILL_field_invalid_account_holder,"Please enter the name of the direct debit account holder"
|
| 30 |
+
paymill_error_text_invalid_number_elv,"Please enter a valid direct debit account number"
|
| 31 |
+
PAYMILL_field_invalid_account_number,"Please enter a valid direct debit account number"
|
| 32 |
+
paymill_error_text_invalid_payment,"Payment method could not be identified. Please contact support."
|
| 33 |
+
paymill_dialog_confirm,"Are you sure?"
|
| 34 |
+
paymill_slogan,"Secure credit card payments powered by"
|
| 35 |
+
paymill_slogan_elv,"Direct debit powered by"
|
| 36 |
+
paymill_credit_card,"Credit card"
|
| 37 |
+
paymill_creditcard,"Credit card"
|
| 38 |
+
paymill_3ds_cancel,Cancel
|
| 39 |
+
paymill_Cvc,CVC
|
| 40 |
+
paymill_Holder,"Card holder"
|
| 41 |
+
paymill_Number,"Card number"
|
| 42 |
+
paymill_Date,"Valid until"
|
| 43 |
+
paymill_cvc_tooltip,"The CVV code or CVC is a security feature of credit cards. It usually is a three to four digit long number. On VISA credit cards, it is called CVV code. The same code can be found on MasterCard credit cards - where however it is called CVC. CVC is an abbreviation for ""Card Validation Code"". CVV code on the other hand is an abbreviation for ""Card Validation Value code"". Similar to MasterCard and Visa, other brands such as Diners Club, Discover and JCB contain a three digit number that can usually be found on the back of the credit card. MAESTRO cards exist with and without a three digit CVV. In case a MAESTRO card without a CVV will be used, it is possible to enter 000 to the form instead. American Express uses the CID (card identification number). The CID is a four digit number that can usually be found on the front of the card, top right from the credit card number. "
|
| 44 |
+
paymill_directdebit,"Direct debit"
|
| 45 |
+
paymill_direct_debit,"Direct debit"
|
| 46 |
+
paymill_bankcode,"Bank code"
|
| 47 |
+
paymill_account,"Account number"
|
| 48 |
+
paymill_backend_log_entry_date,"Date of entry"
|
| 49 |
+
paymill_backend_log_dev_info,"Inform developer"
|
| 50 |
+
paymill_backend_log_id,Id
|
| 51 |
+
paymill_backend_log_merchant_info,"Merchant information"
|
| 52 |
+
paymill_log,"PAYMILL log"
|
| 53 |
+
paymill_backend_log_version,"Module version"
|
| 54 |
+
paymill_credit_card_label,"PAYMILL credit card payments"
|
| 55 |
+
paymill_direct_debit_label,"PAYMILL direct debit"
|
| 56 |
+
paymill_activate_sepa,"Show SEPA form"
|
| 57 |
+
paymill_Basic_Setting,"Paymill Basic Settings"
|
| 58 |
+
paymill_iban,IBAN
|
| 59 |
+
paymill_bic,BIC
|
| 60 |
+
paymill_public_key_tooltip,"Please enter a valid publickey"
|
| 61 |
+
paymill_private_key_tooltip,"Please enter a valid privatekey"
|
| 62 |
+
paymill_error_text_invalid_token,"The following error occurred:"
|
| 63 |
+
paymill_error_text_no_entry_selected,"Please select an entry"
|
| 64 |
+
paymill_action_delete,"Delete entry"
|
| 65 |
+
paymill_backend_log_dev_info_additional,"Additional Developer Information"
|
| 66 |
+
paymill_checkout_generating_invoice,"Invoice is beeing generated"
|
| 67 |
+
paymill_log_action_success,"Action successful"
|
| 68 |
+
paymill_checkout_desc,"Description text"
|
| 69 |
+
"General undefined response.","General undefined response."
|
| 70 |
+
"Still waiting on something.","Still waiting on something."
|
| 71 |
+
"General success response.","General success response."
|
| 72 |
+
"General problem with data.","General problem with data."
|
| 73 |
+
"General problem with payment data.","General problem with payment data."
|
| 74 |
+
"Problem with credit card data.","Problem with credit card data."
|
| 75 |
+
"Problem with cvv.","Problem with cvv."
|
| 76 |
+
"Card expired or not yet valid.","Card expired or not yet valid."
|
| 77 |
+
"Limit exceeded.","Limit exceeded."
|
| 78 |
+
"Card invalid.","Card invalid."
|
| 79 |
+
"Expiry date not valid.","Expiry date not valid."
|
| 80 |
+
"Credit card brand required.","Credit card brand required."
|
| 81 |
+
"Problem with bank account data.","Problem with bank account data."
|
| 82 |
+
"Bank account data combination mismatch.","Bank account data combination mismatch."
|
| 83 |
+
"User authentication failed.","User authentication failed."
|
| 84 |
+
"Problem with 3d secure data.","Problem with 3d secure data."
|
| 85 |
+
"Currency / amount mismatch","Currency / amount mismatch"
|
| 86 |
+
"Problem with input data.","Problem with input data."
|
| 87 |
+
"Amount too low or zero.","Amount too low or zero."
|
| 88 |
+
"Usage field too long.","Usage field too long."
|
| 89 |
+
"Currency not allowed.","Currency not allowed."
|
| 90 |
+
"General problem with backend.","General problem with backend."
|
| 91 |
+
"Country blacklisted.","Country blacklisted."
|
| 92 |
+
"Technical error with credit card.","Technical error with credit card."
|
| 93 |
+
"Error limit exceeded.","Error limit exceeded."
|
| 94 |
+
"Card declined by authorization system.","Card declined by authorization system."
|
| 95 |
+
"Manipulation or stolen card.","Manipulation or stolen card."
|
| 96 |
+
"Card restricted.","Card restricted"
|
| 97 |
+
"Invalid card configuration data.","Invalid card configuration data."
|
| 98 |
+
"Technical error with bank account.","Technical error with bank account."
|
| 99 |
+
"Card blacklisted.","Card blacklisted."
|
| 100 |
+
"Technical error with 3D secure.","Technical error with 3D secure."
|
| 101 |
+
"Decline because of risk issues.","Decline because of risk issues."
|
| 102 |
+
"General timeout.","General timeout."
|
| 103 |
+
"Timeout on side of the acquirer.","Timeout on side of the acquirer."
|
| 104 |
+
"Risk management transaction timeout.","Risk management transaction timeout"
|
| 105 |
+
"Duplicate transaction.","Duplicate transaction."
|
| 106 |
+
PAYMILL_internal_server_error,"The communication with the psp failed."
|
| 107 |
+
PAYMILL_invalid_public_key,"The public key is invalid."
|
| 108 |
+
PAYMILL_invalid_payment_data,"Paymentmethod, card type currency or country not authorized"
|
| 109 |
+
PAYMILL_unknown_error,"Unknown Error"
|
| 110 |
+
PAYMILL_3ds_cancelled,"3-D Secure process has been canceled by the user"
|
| 111 |
+
PAYMILL_field_invalid_card_exp_year,"Invalid Expiry Year"
|
| 112 |
+
PAYMILL_field_invalid_card_exp_month,"Invalid Expiry Month"
|
| 113 |
+
PAYMILL_field_invalid_card_exp,"Credit Card not valid"
|
| 114 |
+
PAYMILL_field_invalid_amount_int,"Missing amount for 3-D Secure"
|
| 115 |
+
PAYMILL_field_field_invalid_amount,"Missing amount for 3-D Secure"
|
| 116 |
+
PAYMILL_field_field_field_invalid_currency,"Invalid currency for 3-D Secure"
|
| 117 |
+
PAYMILL_field_invalid_iban,"Invalid IBAN"
|
| 118 |
+
PAYMILL_field_invalid_bic,"Invalid BIC"
|
| 119 |
+
PAYMILL_field_invalid_country,"Invalid country for sepa transactions"
|
| 120 |
+
PAYMILL_field_invalid_bank_data,"Invalid bank data"
|
| 121 |
+
paymill_send_invoice_mail,"Send invoice mail"
|
| 122 |
+
paymill_error_text_invalid_iban_elv,"Please enter a valid iban"
|
| 123 |
+
paymill_error_text_invalid_bic,"Please enter a valid bic."
|
| 124 |
+
paymill_accepted_creditcards,"Accepted Credit Card Brands"
|
| 125 |
+
paymill_feedback_error_directdebit_number_iban,"Please enter a valid IBAN/direct debit account number"
|
| 126 |
+
paymill_feedback_error_directdebit_bankcode_bic,"Please enter a valid BIC/direct debit bank code"
|
| 127 |
+
paymill_prenotification,"Days until the debit"
|
| 128 |
+
paymill_prenotification_text,"The direct debit is drawn to the following date:"
|
app/locale/es_ES/Paymill_Paymill.csv
CHANGED
|
@@ -1,121 +1,128 @@
|
|
| 1 |
-
|
| 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 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
"
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
"
|
| 62 |
-
"
|
| 63 |
-
"
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
"Problem with
|
| 75 |
-
"
|
| 76 |
-
"
|
| 77 |
-
"
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"
|
| 104 |
-
"
|
| 105 |
-
"
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
"
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
paymill_Amount,Cantidad
|
| 2 |
+
paymill_accepted_currency,"Monedas aceptadas"
|
| 3 |
+
paymill_opt_Enabled,Activar
|
| 4 |
+
paymill_opt_Countries,"Países aceptados"
|
| 5 |
+
paymill_Activate_Debugging,"Activar debugging"
|
| 6 |
+
paymill_fc_active,"Activar la compra rápida"
|
| 7 |
+
paymill_Activate_Logging,"Activar el registro"
|
| 8 |
+
paymill_preAuth_active,"Autorizar previamente las transacciones durante el proceso de compra. Los cargos se llevarán a cabo una vez generadas las facturas."
|
| 9 |
+
paymill_private_key_comment,"Puedes encontrar tu clave privada en el Cockpit de PAYMILL"
|
| 10 |
+
paymill_Private_Key,"Clave privada"
|
| 11 |
+
paymill_public_key_comment,"Puede encontrar su clave pública en el Cockpit de PAYMILL"
|
| 12 |
+
paymill_Public_Key,"Clave pública"
|
| 13 |
+
paymill_Show_Label,"Mostrar el logo de PAYMILL durante el proceso de compra."
|
| 14 |
+
paymill_opt_Sort,Secuencia
|
| 15 |
+
paymill_token_tolerace_tooltip,"Cantidad adicional que se cargará cuando se genere el Token de PAYMILL. Esto es para evitar desviaciones en el 3D Secure"
|
| 16 |
+
paymill_token_tolerace_comment,"Cantidad adicional que se cargará cuando se genere el Token de PAYMILL. Esto es para evitar desviaciones en el 3D Secure"
|
| 17 |
+
paymill_token_tolerace,"Tolerancia del Token"
|
| 18 |
+
paymill_Currency,Moneda
|
| 19 |
+
paymill_error_text_invalid_cvc,"CVC inválido"
|
| 20 |
+
PAYMILL_field_invalid_card_cvc,"CVC inválido"
|
| 21 |
+
paymill_error_text_invalid_holder_cc,"Por favor, introduce el nombre del titular de la tarjeta"
|
| 22 |
+
PAYMILL_field_invalid_card_holder,"Por favor, introduce el nombre del titular de la tarjeta"
|
| 23 |
+
paymill_error_text_invalid_number_cc,"Por favor, introduce un número válido de tarjeta de crédito."
|
| 24 |
+
PAYMILL_field_invalid_card_number,"Por favor, introduce un número válido de tarjeta de crédito."
|
| 25 |
+
paymill_error_text_invalid_expdate,"Fecha de expiración inválida"
|
| 26 |
+
PAYMILL_field_invalid_bank_code,"Por favor, introduce un código bancario válido de domiciliación bancaria."
|
| 27 |
+
paymill_error_text_invalid_bankcode,"Por favor, introduce un código bancario válido de domiciliación bancaria."
|
| 28 |
+
paymill_error_text_invalid_holder_elv,"Por favor, introduce el nombre del titular de la cuenta para la domiciliación bancaria."
|
| 29 |
+
PAYMILL_field_invalid_account_holder,"Por favor, introduce el nombre del titular de la cuenta para la domiciliación bancaria."
|
| 30 |
+
paymill_error_text_invalid_number_elv,"Por favor, introduce un número válido de la cuenta para la domiciliación bancaria."
|
| 31 |
+
PAYMILL_field_invalid_account_number,"Por favor, introduce un número válido de la cuenta para la domiciliación bancaria."
|
| 32 |
+
paymill_error_text_invalid_payment,"El método de pago no se ha podido identificar. Por favor, contacta con nuestro equipo de soporte."
|
| 33 |
+
paymill_dialog_confirm,"¿Estás seguro?"
|
| 34 |
+
paymill_slogan,"Pagos seguros con tarjeta de crédito gestionados por"
|
| 35 |
+
paymill_slogan_elv,"Domiciliación bancaria gestionada por"
|
| 36 |
+
paymill_credit_card,"Tarjeta de crédito"
|
| 37 |
+
paymill_creditcard,"Tarjeta de crédito"
|
| 38 |
+
paymill_3ds_cancel,Cancelar
|
| 39 |
+
paymill_Cvc,"Código CVC"
|
| 40 |
+
paymill_Holder,"Titular de la tarjeta"
|
| 41 |
+
paymill_Number,"Número de tarjeta"
|
| 42 |
+
paymill_Date,"Válida hasta"
|
| 43 |
+
paymill_cvc_tooltip,"El código CVV o CVC es una medida de seguridad de las tarjetas de crédito. Normalmente es un número de tres a cuatro dígitos de longitud. En las tarjetas de crédito VISA, se le llama código CVV. Se puede encontrar este mismo código en las tarjetas de crédito MasterCard -donde se le llama CVC. CVC es la abreviatura de ""código de validez de la tarjeta"". El código CVV, por otro lado, es la abreviatura de ""código de valor de verificación de la tarjeta"". Parecidas a MasterCard y Visa, otras tarjetas como Diners Club, Discover y JCB contienen un número de tres dígitos que se encuentra normalmente en el reverso de la tarjeta de crédito. Las tarjetas MAESTRO pueden tener o no el código CVV de tres dígitos. En caso de usar una tarjeta MAESTRO sin CVV, puede introducir 000 en el formulario en su lugar. American Express usa el CID (número de identificación de la tarjeta). El CID es un número de cuatro dígitos que normalmente se encuentra en el anverso de la tarjeta, arriba a la derecha del número de la tarjeta de crédito."
|
| 44 |
+
paymill_directdebit,"Domiciliación bancaria"
|
| 45 |
+
paymill_direct_debit,"Domiciliación bancaria"
|
| 46 |
+
paymill_bankcode,"Código bancario"
|
| 47 |
+
paymill_account,"Número de cuenta"
|
| 48 |
+
paymill_backend_log_entry_date,"Fecha de registro"
|
| 49 |
+
paymill_backend_log_dev_info,"Desarrollador de informes"
|
| 50 |
+
paymill_backend_log_id,Identificación
|
| 51 |
+
paymill_backend_log_merchant_info,"Información del comerciante"
|
| 52 |
+
paymill_log,"Registro de PAYMILL"
|
| 53 |
+
paymill_backend_log_version,"Versión del módulo"
|
| 54 |
+
paymill_credit_card_label,"Pagos con tarjeta de crédito PAYMILL"
|
| 55 |
+
paymill_direct_debit_label,"Pagos con dedomiciliación bancaria PAYMILL"
|
| 56 |
+
paymill_activate_sepa,"Mostrar solicitud SEPA"
|
| 57 |
+
paymill_Basic_Setting,"Configuración Básica Paymill"
|
| 58 |
+
paymill_iban,IBAN
|
| 59 |
+
paymill_bic,BIC
|
| 60 |
+
paymill_public_key_tooltip,"Por favor, introduzca una clave pública válida"
|
| 61 |
+
paymill_private_key_tooltip,"Por favor, introduzca una clave privada válida"
|
| 62 |
+
paymill_error_text_invalid_token,"El siguiente error ha ocurrido:"
|
| 63 |
+
paymill_error_text_no_entry_selected,"Por favor, seleccione una entrada"
|
| 64 |
+
paymill_action_delete,"Borrar entrada"
|
| 65 |
+
paymill_backend_log_dev_info_additional,"Información Adicional del Desarrollador"
|
| 66 |
+
paymill_checkout_generating_invoice,"Se está generando la factura"
|
| 67 |
+
paymill_log_action_success,"Acción correcta"
|
| 68 |
+
paymill_checkout_desc,"Texto descriptivo"
|
| 69 |
+
"General undefined response.","General undefined response."
|
| 70 |
+
"Still waiting on something.","Still waiting on something."
|
| 71 |
+
"General success response.","General success response."
|
| 72 |
+
"General problem with data.","General problem with data."
|
| 73 |
+
"General problem with payment data.","General problem with payment data."
|
| 74 |
+
"Problem with credit card data.","Problem with credit card data."
|
| 75 |
+
"Problem with cvv.","Problem with cvv."
|
| 76 |
+
"Card expired or not yet valid.","Card expired or not yet valid."
|
| 77 |
+
"Limit exceeded.","Limit exceeded."
|
| 78 |
+
"Card invalid.","Card invalid."
|
| 79 |
+
"Expiry date not valid.","Expiry date not valid."
|
| 80 |
+
"Credit card brand required.","Credit card brand required."
|
| 81 |
+
"Problem with bank account data.","Problem with bank account data."
|
| 82 |
+
"Bank account data combination mismatch.","Bank account data combination mismatch."
|
| 83 |
+
"User authentication failed.","User authentication failed."
|
| 84 |
+
"Problem with 3d secure data.","Problem with 3d secure data."
|
| 85 |
+
"Currency / amount mismatch","Currency / amount mismatch"
|
| 86 |
+
"Problem with input data.","Problem with input data."
|
| 87 |
+
"Amount too low or zero.","Amount too low or zero."
|
| 88 |
+
"Usage field too long.","Usage field too long."
|
| 89 |
+
"Currency not allowed.","Currency not allowed."
|
| 90 |
+
"General problem with backend.","General problem with backend."
|
| 91 |
+
"Country blacklisted.","Country blacklisted."
|
| 92 |
+
"Technical error with credit card.","Technical error with credit card."
|
| 93 |
+
"Error limit exceeded.","Error limit exceeded."
|
| 94 |
+
"Card declined by authorization system.","Card declined by authorization system."
|
| 95 |
+
"Manipulation or stolen card.","Manipulation or stolen card."
|
| 96 |
+
"Card restricted.","Card restricted"
|
| 97 |
+
"Invalid card configuration data.","Invalid card configuration data."
|
| 98 |
+
"Technical error with bank account.","Technical error with bank account."
|
| 99 |
+
"Card blacklisted.","Card blacklisted."
|
| 100 |
+
"Technical error with 3D secure.","Technical error with 3D secure."
|
| 101 |
+
"Decline because of risk issues.","Decline because of risk issues."
|
| 102 |
+
"General timeout.","General timeout."
|
| 103 |
+
"Timeout on side of the acquirer.","Timeout on side of the acquirer."
|
| 104 |
+
"Risk management transaction timeout.","Risk management transaction timeout"
|
| 105 |
+
"Duplicate transaction.","Duplicate transaction."
|
| 106 |
+
PAYMILL_internal_server_error,"The communication with the psp failed."
|
| 107 |
+
PAYMILL_invalid_public_key,"The public key is invalid."
|
| 108 |
+
PAYMILL_invalid_payment_data,"Paymentmethod, card type currency or country not authorized"
|
| 109 |
+
PAYMILL_unknown_error,"Unknown Error"
|
| 110 |
+
PAYMILL_3ds_cancelled,"3-D Secure process has been canceled by the user"
|
| 111 |
+
PAYMILL_field_invalid_card_exp_year,"Invalid Expiry Year"
|
| 112 |
+
PAYMILL_field_invalid_card_exp_month,"Invalid Expiry Month"
|
| 113 |
+
PAYMILL_field_invalid_card_exp,"Credit Card not valid"
|
| 114 |
+
PAYMILL_field_invalid_amount_int,"Missing amount for 3-D Secure"
|
| 115 |
+
PAYMILL_field_field_invalid_amount,"Missing amount for 3-D Secure"
|
| 116 |
+
PAYMILL_field_field_field_invalid_currency,"Invalid currency for 3-D Secure"
|
| 117 |
+
PAYMILL_field_invalid_iban,"Invalid IBAN"
|
| 118 |
+
PAYMILL_field_invalid_bic,"Invalid BIC"
|
| 119 |
+
PAYMILL_field_invalid_country,"Invalid country for sepa transactions"
|
| 120 |
+
PAYMILL_field_invalid_bank_data,"Invalid bank data"
|
| 121 |
+
paymill_send_invoice_mail,"Enviar factura por correo"
|
| 122 |
+
paymill_error_text_invalid_iban_elv,"Por favor, introduzca un IBAN válido"
|
| 123 |
+
paymill_error_text_invalid_bic,"Por favor, introduzca un BIC válido."
|
| 124 |
+
paymill_accepted_creditcards,"Tipo de tarjetas de crédito aceptadas"
|
| 125 |
+
paymill_feedback_error_directdebit_number_iban,"Por favor, indique un código bancario o identificación válida"
|
| 126 |
+
paymill_feedback_error_directdebit_bankcode_bic,"Por favor, indique un número de cuenta o IBAN válido"
|
| 127 |
+
paymill_prenotification,"Days until the debit"
|
| 128 |
+
paymill_prenotification_text,"The direct debit is drawn to the following date:"
|
js/paymill/BrandDetection.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PaymillBrandDetection = function() {};
|
| 2 |
+
|
| 3 |
+
PaymillBrandDetection.prototype.option =
|
| 4 |
+
{
|
| 5 |
+
'minlength': 6
|
| 6 |
+
};
|
| 7 |
+
|
| 8 |
+
PaymillBrandDetection.prototype.creditcard =
|
| 9 |
+
{
|
| 10 |
+
'carte-bleue' : {
|
| 11 |
+
'pattern': /^(415006|497|407497|513)/,
|
| 12 |
+
'cardlength': [13, 16],
|
| 13 |
+
'luhn': false,
|
| 14 |
+
'cvc': [3]
|
| 15 |
+
},
|
| 16 |
+
'carta-si': {
|
| 17 |
+
'pattern': /^(45399[78]|432913|5255)/,
|
| 18 |
+
'cardlength': [16],
|
| 19 |
+
'luhn': false,
|
| 20 |
+
'cvc': [3]
|
| 21 |
+
},
|
| 22 |
+
'dankort' : {
|
| 23 |
+
'pattern': /^(4571|5019)/,
|
| 24 |
+
'cardlength': [16],
|
| 25 |
+
'luhn': false,
|
| 26 |
+
'cvc': [3]
|
| 27 |
+
},
|
| 28 |
+
'china-unionpay' : {
|
| 29 |
+
'pattern': /^(62|88)/,
|
| 30 |
+
'cardlength': [16, 17, 18, 19],
|
| 31 |
+
'luhn': false,
|
| 32 |
+
'cvc': [3]
|
| 33 |
+
},
|
| 34 |
+
'discover': {
|
| 35 |
+
'pattern': /^6(011|5)/,
|
| 36 |
+
'cardlength': [16],
|
| 37 |
+
'luhn': false,
|
| 38 |
+
'cvc': [3]
|
| 39 |
+
},
|
| 40 |
+
'diners-club' : {
|
| 41 |
+
'pattern': /^3(0[0-5]|[68])/,
|
| 42 |
+
'cardlength': [14],
|
| 43 |
+
'luhn': false,
|
| 44 |
+
'cvc': [3]
|
| 45 |
+
},
|
| 46 |
+
'maestro' : {
|
| 47 |
+
'pattern': /^(5018|5020|5038|5893|6304|6759|6761|6762|6763|0604|6390)/,
|
| 48 |
+
'cardlength': [12, 13, 14, 15, 16, 17, 18, 19],
|
| 49 |
+
'luhn': false,
|
| 50 |
+
'cvc': [0, 3, 4]
|
| 51 |
+
},
|
| 52 |
+
'jcb' : {
|
| 53 |
+
'pattern': /^(2131|1800|35)/,
|
| 54 |
+
'cardlength': [16],
|
| 55 |
+
'luhn': false,
|
| 56 |
+
'cvc': [3]
|
| 57 |
+
},
|
| 58 |
+
'amex' : {
|
| 59 |
+
'pattern': /^(3[47])/,
|
| 60 |
+
'cardlength': [15],
|
| 61 |
+
'luhn': false,
|
| 62 |
+
'cvc': [3, 4]
|
| 63 |
+
},
|
| 64 |
+
'mastercard' : {
|
| 65 |
+
'pattern': /^(5[1-5])/,
|
| 66 |
+
'cardlength': [16],
|
| 67 |
+
'luhn': false,
|
| 68 |
+
'cvc': [3]
|
| 69 |
+
},
|
| 70 |
+
'visa' : {
|
| 71 |
+
'pattern': /^(4)/,
|
| 72 |
+
'cardlength': [13, 16],
|
| 73 |
+
'luhn': false,
|
| 74 |
+
'cvc': [3]
|
| 75 |
+
}
|
| 76 |
+
};
|
| 77 |
+
|
| 78 |
+
PaymillBrandDetection.prototype.detect = function(cardnumber)
|
| 79 |
+
{
|
| 80 |
+
var brand = 'unknown';
|
| 81 |
+
if (cardnumber.length >= this.option.minlength) {
|
| 82 |
+
for (var cardinfo in this.creditcard) {
|
| 83 |
+
if (this.creditcard[cardinfo].pattern.test(cardnumber)) {
|
| 84 |
+
brand = cardinfo;
|
| 85 |
+
break;
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
return brand;
|
| 90 |
+
};
|
| 91 |
+
|
| 92 |
+
PaymillBrandDetection.prototype.validate = function(cardnumber)
|
| 93 |
+
{
|
| 94 |
+
return this.creditcard[this.detect(cardnumber)].cardlength.indexOf(cardnumber.length) !== -1;
|
| 95 |
+
};
|
| 96 |
+
|
| 97 |
+
PaymillBrandDetection.prototype.luhn = function(cardnumber)
|
| 98 |
+
{
|
| 99 |
+
//todo
|
| 100 |
+
};
|
js/paymill/Iban.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PaymillIban = function() {
|
| 2 |
+
};
|
| 3 |
+
PaymillIban.prototype.countries = {
|
| 4 |
+
'AL': 28,
|
| 5 |
+
'AD': 24,
|
| 6 |
+
'AZ': 28,
|
| 7 |
+
'BH': 22,
|
| 8 |
+
'BE': 16,
|
| 9 |
+
'BA': 20,
|
| 10 |
+
'BR': 29,
|
| 11 |
+
'BG': 22,
|
| 12 |
+
'CR': 21,
|
| 13 |
+
'DK': 18,
|
| 14 |
+
'DE': 22,
|
| 15 |
+
'DO': 28,
|
| 16 |
+
'EE': 20,
|
| 17 |
+
'FO': 18,
|
| 18 |
+
'FI': 18,
|
| 19 |
+
'FR': 27,
|
| 20 |
+
'GF': 27,
|
| 21 |
+
'PF': 27,
|
| 22 |
+
'TF': 27,
|
| 23 |
+
'GE': 22,
|
| 24 |
+
'GI': 23,
|
| 25 |
+
'GR': 27,
|
| 26 |
+
'GL': 18,
|
| 27 |
+
'GP': 27,
|
| 28 |
+
'GT': 28,
|
| 29 |
+
'HK': 16,
|
| 30 |
+
'IE': 22,
|
| 31 |
+
'IS': 26,
|
| 32 |
+
'IL': 23,
|
| 33 |
+
'IT': 27,
|
| 34 |
+
'JO': 30,
|
| 35 |
+
'VG': 24,
|
| 36 |
+
'KZ': 20,
|
| 37 |
+
'QA': 29,
|
| 38 |
+
'HR': 21,
|
| 39 |
+
'KW': 30,
|
| 40 |
+
'LV': 21,
|
| 41 |
+
'LB': 28,
|
| 42 |
+
'LI': 21,
|
| 43 |
+
'LT': 20,
|
| 44 |
+
'LU': 20,
|
| 45 |
+
'MT': 31,
|
| 46 |
+
'MA': 24,
|
| 47 |
+
'MQ': 27,
|
| 48 |
+
'MR': 27,
|
| 49 |
+
'MU': 30,
|
| 50 |
+
'YT': 27,
|
| 51 |
+
'MK': 19,
|
| 52 |
+
'MD': 24,
|
| 53 |
+
'MC': 27,
|
| 54 |
+
'ME': 22,
|
| 55 |
+
'NC': 27,
|
| 56 |
+
'NL': 18,
|
| 57 |
+
'NO': 15,
|
| 58 |
+
'AT': 20,
|
| 59 |
+
'PK': 24,
|
| 60 |
+
'PS': 29,
|
| 61 |
+
'PL': 28,
|
| 62 |
+
'PT': 25,
|
| 63 |
+
'RE': 27,
|
| 64 |
+
'RO': 24,
|
| 65 |
+
'BL': 27,
|
| 66 |
+
'MF': 27,
|
| 67 |
+
'SM': 27,
|
| 68 |
+
'SA': 24,
|
| 69 |
+
'SE': 24,
|
| 70 |
+
'CH': 21,
|
| 71 |
+
'RS': 22,
|
| 72 |
+
'SK': 24,
|
| 73 |
+
'SI': 19,
|
| 74 |
+
'ES': 24,
|
| 75 |
+
'PM': 27,
|
| 76 |
+
'CZ': 24,
|
| 77 |
+
'TN': 24,
|
| 78 |
+
'TR': 26,
|
| 79 |
+
'HU': 28,
|
| 80 |
+
'AE': 23,
|
| 81 |
+
'GB': 22,
|
| 82 |
+
'WF': 27,
|
| 83 |
+
'CY': 28
|
| 84 |
+
};
|
| 85 |
+
|
| 86 |
+
PaymillIban.prototype.alphabet = {
|
| 87 |
+
'A': '10',
|
| 88 |
+
'B': '11',
|
| 89 |
+
'C': '12',
|
| 90 |
+
'D': '13',
|
| 91 |
+
'E': '14',
|
| 92 |
+
'F': '15',
|
| 93 |
+
'G': '16',
|
| 94 |
+
'H': '17',
|
| 95 |
+
'I': '18',
|
| 96 |
+
'J': '19',
|
| 97 |
+
'K': '20',
|
| 98 |
+
'L': '21',
|
| 99 |
+
'M': '22',
|
| 100 |
+
'N': '23',
|
| 101 |
+
'O': '24',
|
| 102 |
+
'P': '25',
|
| 103 |
+
'Q': '26',
|
| 104 |
+
'R': '27',
|
| 105 |
+
'S': '28',
|
| 106 |
+
'T': '29',
|
| 107 |
+
'U': '30',
|
| 108 |
+
'V': '31',
|
| 109 |
+
'W': '32',
|
| 110 |
+
'X': '33',
|
| 111 |
+
'Y': '34',
|
| 112 |
+
'Z': '35'
|
| 113 |
+
};
|
| 114 |
+
|
| 115 |
+
PaymillIban.prototype.iban = '';
|
| 116 |
+
|
| 117 |
+
PaymillIban.prototype.validate = function(iban) {
|
| 118 |
+
if (iban === undefined || iban === "") {
|
| 119 |
+
return false;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
//removing spaces
|
| 123 |
+
iban = iban.replace(/\s+/g, "");
|
| 124 |
+
|
| 125 |
+
this.iban = iban;
|
| 126 |
+
|
| 127 |
+
if (!this.checkString) {
|
| 128 |
+
return false;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
if (!this.checkLength()) {
|
| 132 |
+
return false;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
this.changeCharacterPosition(iban);
|
| 136 |
+
this.replaceLettersWithNumbers();
|
| 137 |
+
|
| 138 |
+
ibanWithoutCheckDigits = this.iban.substr(0, this.iban.length - 2);
|
| 139 |
+
ibanWithZeroCheckDigits = ibanWithoutCheckDigits + "00";
|
| 140 |
+
ibanCheckDigits = this.iban.substr(this.iban.length - 2, 2);
|
| 141 |
+
|
| 142 |
+
calcCheckDigits = (98 - this.calculate(ibanWithZeroCheckDigits)).toString();
|
| 143 |
+
|
| 144 |
+
if (calcCheckDigits.length === 1) {
|
| 145 |
+
calcCheckDigits = '0' + calcCheckDigits;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
if (calcCheckDigits !== ibanCheckDigits) {
|
| 149 |
+
return false;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if (this.calculate(this.iban) !== '01') {
|
| 153 |
+
return false;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
return true;
|
| 157 |
+
};
|
| 158 |
+
|
| 159 |
+
//checking if the given IBAN is alphanumeric, the first two positions are letters and the next two positions numbers
|
| 160 |
+
PaymillIban.prototype.checkString = function() {
|
| 161 |
+
return this.iban.match(/^[a-z]{2}[0-9]{2}[a-z0-9]+$/i) !== null;
|
| 162 |
+
};
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
//checking if the given IBAN has the right length based on the first two letters which have to be a country code
|
| 166 |
+
PaymillIban.prototype.checkLength = function() {
|
| 167 |
+
countryCode = this.iban.substr(0, 2);
|
| 168 |
+
return this.countries[countryCode] === this.iban.length;
|
| 169 |
+
};
|
| 170 |
+
|
| 171 |
+
//Replace Letters with Numbers A = 10,....,Z = 35
|
| 172 |
+
PaymillIban.prototype.replaceLettersWithNumbers = function() {
|
| 173 |
+
for (character in this.alphabet) {
|
| 174 |
+
regex = new RegExp(character, 'g');
|
| 175 |
+
this.iban = this.iban.replace(regex, this.alphabet[character]);
|
| 176 |
+
}
|
| 177 |
+
};
|
| 178 |
+
|
| 179 |
+
//Puts the first 4 Characters to the End
|
| 180 |
+
PaymillIban.prototype.changeCharacterPosition = function() {
|
| 181 |
+
firstFourCharacters = this.iban.substr(0, 4);
|
| 182 |
+
leftOverString = this.iban.substr(4);
|
| 183 |
+
this.iban = leftOverString + firstFourCharacters;
|
| 184 |
+
};
|
| 185 |
+
|
| 186 |
+
//calculate the IBAN Hash with piece-wise manner modulo operations, since javascript cant handle 128 bit integer
|
| 187 |
+
PaymillIban.prototype.calculate = function(iban) {
|
| 188 |
+
start = 0;
|
| 189 |
+
length = 9;
|
| 190 |
+
loop = true;
|
| 191 |
+
remainder = '';
|
| 192 |
+
while (loop) {
|
| 193 |
+
if (iban.substr(start, length).length < 7) {
|
| 194 |
+
loop = false;
|
| 195 |
+
length = iban.substr(start, length).length;
|
| 196 |
+
}
|
| 197 |
+
tempInt = remainder + iban.substr(start, length);
|
| 198 |
+
remainder = (tempInt % 97) + "";
|
| 199 |
+
if (remainder.length === 1) {
|
| 200 |
+
remainder = '0' + remainder;
|
| 201 |
+
}
|
| 202 |
+
start = start + length;
|
| 203 |
+
length = 7;
|
| 204 |
+
}
|
| 205 |
+
return remainder;
|
| 206 |
+
};
|
js/paymill/paymentForm.js
CHANGED
|
@@ -1,23 +1,38 @@
|
|
| 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 = {
|
|
@@ -57,67 +72,32 @@ Paymill.prototype.debug = function(message)
|
|
| 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 |
-
|
|
|
|
| 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 |
-
|
| 114 |
-
|
| 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]) {
|
|
@@ -128,18 +108,19 @@ Paymill.prototype.getValueIfExist = function(selector)
|
|
| 128 |
}
|
| 129 |
|
| 130 |
/**
|
| 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 |
-
|
| 139 |
if (!window.PAYMILL_LOADING !== "undefined" && window.PAYMILL_LOADING) {
|
| 140 |
return false;
|
| 141 |
}
|
| 142 |
-
|
| 143 |
switch (this.paymillSelectedPaymentName) {
|
| 144 |
case this.paymillCc:
|
| 145 |
paymill.config('3ds_cancel_label', pmQuery('.paymill_3ds_cancel').val());
|
|
@@ -174,10 +155,10 @@ Paymill.prototype.paymillSubmitForm = function()
|
|
| 174 |
break;
|
| 175 |
case this.paymillElv:
|
| 176 |
if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'false') {
|
| 177 |
-
if (
|
| 178 |
var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
|
| 179 |
-
&& paymill.validateAccountNumber(pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 180 |
-
&& paymill.validateBankCode(pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 181 |
|
| 182 |
if (!valid) {
|
| 183 |
return false;
|
|
@@ -186,14 +167,18 @@ Paymill.prototype.paymillSubmitForm = function()
|
|
| 186 |
window.PAYMILL_LOADING = true;
|
| 187 |
this.debug("Generating Token");
|
| 188 |
paymill.createToken({
|
| 189 |
-
number: pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 190 |
-
bank: pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 191 |
accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
|
| 192 |
}, paymillResponseHandler);
|
| 193 |
} else {
|
|
|
|
|
|
|
|
|
|
| 194 |
var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
|
| 195 |
-
&& pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 196 |
-
&& pmQuery('#' + this.paymillSelectedPaymentName + '
|
|
|
|
| 197 |
|
| 198 |
if (!valid) {
|
| 199 |
return false;
|
|
@@ -202,8 +187,8 @@ Paymill.prototype.paymillSubmitForm = function()
|
|
| 202 |
window.PAYMILL_LOADING = true;
|
| 203 |
this.debug("Generating Token");
|
| 204 |
paymill.createToken({
|
| 205 |
-
iban:
|
| 206 |
-
bic: pmQuery('#' + this.paymillSelectedPaymentName + '
|
| 207 |
accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
|
| 208 |
}, paymillResponseHandler);
|
| 209 |
}
|
|
@@ -215,6 +200,10 @@ Paymill.prototype.paymillSubmitForm = function()
|
|
| 215 |
return false;
|
| 216 |
}
|
| 217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
Paymill.prototype.logError = function(data)
|
| 219 |
{
|
| 220 |
var that = this;
|
|
@@ -230,6 +219,10 @@ Paymill.prototype.logError = function(data)
|
|
| 230 |
});
|
| 231 |
}
|
| 232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
Paymill.prototype.getTokenAmount = function()
|
| 234 |
{
|
| 235 |
var that = this;
|
|
@@ -259,6 +252,9 @@ Paymill.prototype.getTokenAmount = function()
|
|
| 259 |
return returnVal;
|
| 260 |
}
|
| 261 |
|
|
|
|
|
|
|
|
|
|
| 262 |
Paymill.prototype.unsetElvValidationRules = function()
|
| 263 |
{
|
| 264 |
var nvElv = {
|
|
@@ -270,32 +266,16 @@ Paymill.prototype.unsetElvValidationRules = function()
|
|
| 270 |
},
|
| 271 |
''
|
| 272 |
),
|
| 273 |
-
'paymill-validate-dd-iban': new Validator(
|
| 274 |
-
'paymill-validate-dd-iban',
|
| 275 |
-
'',
|
| 276 |
-
function(v) {
|
| 277 |
-
return true;
|
| 278 |
-
},
|
| 279 |
-
''
|
| 280 |
-
),
|
| 281 |
-
'paymill-validate-dd-bic': new Validator(
|
| 282 |
-
'paymill-validate-dd-bic',
|
| 283 |
-
'',
|
| 284 |
-
function(v) {
|
| 285 |
-
return true;
|
| 286 |
-
},
|
| 287 |
-
''
|
| 288 |
-
),
|
| 289 |
-
'paymill-validate-dd-account': new Validator(
|
| 290 |
-
'paymill-validate-dd-account',
|
| 291 |
'',
|
| 292 |
function(v) {
|
| 293 |
return true;
|
| 294 |
},
|
| 295 |
''
|
| 296 |
),
|
| 297 |
-
'paymill-validate-dd-bankcode': new Validator(
|
| 298 |
-
'paymill-validate-dd-bankcode',
|
| 299 |
'',
|
| 300 |
function(v) {
|
| 301 |
return true;
|
|
@@ -307,6 +287,9 @@ Paymill.prototype.unsetElvValidationRules = function()
|
|
| 307 |
Object.extend(Validation.methods, nvElv);
|
| 308 |
}
|
| 309 |
|
|
|
|
|
|
|
|
|
|
| 310 |
Paymill.prototype.unsetCcValidationRules = function()
|
| 311 |
{
|
| 312 |
var nvCc = {
|
|
@@ -355,6 +338,9 @@ Paymill.prototype.unsetCcValidationRules = function()
|
|
| 355 |
Object.extend(Validation.methods, nvCc);
|
| 356 |
}
|
| 357 |
|
|
|
|
|
|
|
|
|
|
| 358 |
Paymill.prototype.setElvValidationRules = function()
|
| 359 |
{
|
| 360 |
var nvElv = {
|
|
@@ -366,35 +352,26 @@ Paymill.prototype.setElvValidationRules = function()
|
|
| 366 |
},
|
| 367 |
''
|
| 368 |
),
|
| 369 |
-
'paymill-validate-dd-iban': new Validator(
|
| 370 |
-
'paymill-validate-dd-iban',
|
| 371 |
-
this.getValueIfExist('.paymill-payment-error-iban-elv'),
|
| 372 |
function(v) {
|
| 373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
},
|
| 375 |
''
|
| 376 |
),
|
| 377 |
-
'paymill-validate-dd-bic': new Validator(
|
| 378 |
-
'paymill-validate-dd-bic',
|
| 379 |
-
this.getValueIfExist('.paymill-payment-error-bic-elv'),
|
| 380 |
function(v) {
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
'paymill-validate-dd-account': new Validator(
|
| 386 |
-
'paymill-validate-dd-account',
|
| 387 |
-
this.getValueIfExist('.paymill-payment-error-number-elv'),
|
| 388 |
-
function(v) {
|
| 389 |
-
return paymill.validateAccountNumber(v);
|
| 390 |
-
},
|
| 391 |
-
''
|
| 392 |
-
),
|
| 393 |
-
'paymill-validate-dd-bankcode': new Validator(
|
| 394 |
-
'paymill-validate-dd-bankcode',
|
| 395 |
-
this.getValueIfExist('.paymill-payment-error-bankcode'),
|
| 396 |
-
function(v) {
|
| 397 |
-
return paymill.validateBankCode(v);
|
| 398 |
},
|
| 399 |
''
|
| 400 |
)
|
|
@@ -403,6 +380,9 @@ Paymill.prototype.setElvValidationRules = function()
|
|
| 403 |
Object.extend(Validation.methods, nvElv);
|
| 404 |
}
|
| 405 |
|
|
|
|
|
|
|
|
|
|
| 406 |
Paymill.prototype.setCcValidationRules = function()
|
| 407 |
{
|
| 408 |
var that = this;
|
|
@@ -457,10 +437,13 @@ Paymill.prototype.setCcValidationRules = function()
|
|
| 457 |
Object.extend(Validation.methods, nvCc);
|
| 458 |
}
|
| 459 |
|
|
|
|
|
|
|
|
|
|
| 460 |
Paymill.prototype.addPaymillEvents = function()
|
| 461 |
{
|
| 462 |
var that = this;
|
| 463 |
-
|
| 464 |
this.setElvValidationRules();
|
| 465 |
|
| 466 |
this.setCcValidationRules();
|
|
@@ -473,43 +456,19 @@ Paymill.prototype.addPaymillEvents = function()
|
|
| 473 |
that.unsetCcValidationRules();
|
| 474 |
}
|
| 475 |
|
| 476 |
-
pmQuery('#' + this.paymillCode + '_iban').keyup(function() {
|
| 477 |
-
var iban = pmQuery('#' + that.paymillCode + '_iban').val();
|
| 478 |
-
if (!iban.match(/^DE/)) {
|
| 479 |
-
var newVal = "DE";
|
| 480 |
-
if (iban.match(/^.{2}(.*)/)) {
|
| 481 |
-
newVal += iban.match(/^.{2}(.*)/)[1];
|
| 482 |
-
}
|
| 483 |
-
|
| 484 |
-
pmQuery('#' + that.paymillCode + '_iban').val(newVal);
|
| 485 |
-
}
|
| 486 |
-
});
|
| 487 |
-
|
| 488 |
-
pmQuery('#' + this.paymillCode + '_iban').trigger('keyup');
|
| 489 |
-
|
| 490 |
if (!this.eventFlag) {
|
| 491 |
-
|
| 492 |
pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
|
| 493 |
that.setElvValidationRules();
|
| 494 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 495 |
});
|
| 496 |
|
| 497 |
-
pmQuery('#' + this.paymillCode + '
|
| 498 |
that.setElvValidationRules();
|
| 499 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 500 |
});
|
| 501 |
|
| 502 |
-
pmQuery('#' + this.paymillCode + '
|
| 503 |
-
that.setElvValidationRules();
|
| 504 |
-
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 505 |
-
});
|
| 506 |
-
|
| 507 |
-
pmQuery('#' + this.paymillCode + '_iban').live('input', function() {
|
| 508 |
-
that.setElvValidationRules();
|
| 509 |
-
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 510 |
-
});
|
| 511 |
-
|
| 512 |
-
pmQuery('#' + this.paymillCode + '_bic').live('input', function() {
|
| 513 |
that.setElvValidationRules();
|
| 514 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 515 |
});
|
|
@@ -563,23 +522,11 @@ Paymill.prototype.addPaymillEvents = function()
|
|
| 563 |
that.paymillSubmitForm();
|
| 564 |
});
|
| 565 |
|
| 566 |
-
pmQuery('#' + this.paymillCode + '
|
| 567 |
that.paymillSubmitForm();
|
| 568 |
});
|
| 569 |
|
| 570 |
-
pmQuery('#' + this.paymillCode + '
|
| 571 |
-
that.paymillSubmitForm();
|
| 572 |
-
});
|
| 573 |
-
|
| 574 |
-
pmQuery('#' + this.paymillCode + '_bankcode').live('input', function() {
|
| 575 |
-
that.paymillSubmitForm();
|
| 576 |
-
});
|
| 577 |
-
|
| 578 |
-
pmQuery('#' + this.paymillCode + '_iban').live('input', function() {
|
| 579 |
-
that.paymillSubmitForm();
|
| 580 |
-
});
|
| 581 |
-
|
| 582 |
-
pmQuery('#' + this.paymillCode + '_bic').live('input', function() {
|
| 583 |
that.paymillSubmitForm();
|
| 584 |
});
|
| 585 |
|
|
@@ -595,22 +542,21 @@ Paymill.prototype.addPaymillEvents = function()
|
|
| 595 |
paymillResponseHandler = function(error, result)
|
| 596 |
{
|
| 597 |
window.PAYMILL_LOADING = false;
|
| 598 |
-
|
| 599 |
var nv = {};
|
| 600 |
paymillObj = new Paymill();
|
| 601 |
paymillObj.setCodes();
|
| 602 |
if (error) {
|
| 603 |
-
pmQuery('#paymill_creditcard_cvc').val('');
|
| 604 |
var message = 'unknown_error';
|
| 605 |
var key = error.apierror;
|
| 606 |
if(paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode()) !== ''){
|
| 607 |
message = paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode());
|
| 608 |
}
|
| 609 |
-
|
| 610 |
if (message === 'unknown_error' && error.message !== undefined) {
|
| 611 |
message = error.message;
|
| 612 |
}
|
| 613 |
-
|
| 614 |
// Appending error
|
| 615 |
nv['paymill-validate-' + paymillObj.getPaymillCode() + '-token'] = new Validator(
|
| 616 |
'paymill-validate-' + paymillObj.getPaymillCode() + '-token',
|
|
@@ -622,7 +568,9 @@ paymillResponseHandler = function(error, result)
|
|
| 622 |
);
|
| 623 |
|
| 624 |
Object.extend(Validation.methods, nv);
|
| 625 |
-
|
|
|
|
|
|
|
| 626 |
paymillObj.logError(error);
|
| 627 |
|
| 628 |
paymillObj.debug(error.apierror);
|
|
@@ -643,4 +591,21 @@ paymillResponseHandler = function(error, result)
|
|
| 643 |
paymillObj.debug("Saving Token in Form: " + result.token);
|
| 644 |
pmQuery('.paymill-payment-token-' + paymillObj.getPaymillCode()).val(result.token);
|
| 645 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 646 |
}
|
| 1 |
var PAYMILL_PUBLIC_KEY = null;
|
| 2 |
|
| 3 |
+
/**
|
| 4 |
+
* Build object
|
| 5 |
+
* @returns {Paymill}
|
| 6 |
+
*/
|
| 7 |
function Paymill()
|
| 8 |
{
|
| 9 |
this.paymillSelectedPaymentName = "Preparing Payment";
|
| 10 |
this.eventFlag = false;
|
| 11 |
+
|
| 12 |
}
|
| 13 |
|
| 14 |
+
/**
|
| 15 |
+
* Set payment code
|
| 16 |
+
* @param String code
|
| 17 |
+
*/
|
| 18 |
Paymill.prototype.setPaymillCode = function(code)
|
| 19 |
{
|
| 20 |
this.paymillCode = code;
|
| 21 |
}
|
| 22 |
|
| 23 |
+
/**
|
| 24 |
+
* Set the possible payment codes
|
| 25 |
+
*/
|
| 26 |
Paymill.prototype.setCodes = function()
|
| 27 |
{
|
| 28 |
this.paymillCc = 'paymill_creditcard';
|
| 29 |
this.paymillElv = 'paymill_directdebit';
|
| 30 |
}
|
| 31 |
|
| 32 |
+
/**
|
| 33 |
+
* Get selected payments short code
|
| 34 |
+
* @returns String
|
| 35 |
+
*/
|
| 36 |
Paymill.prototype.getPaymillCode = function()
|
| 37 |
{
|
| 38 |
var methods = {
|
| 72 |
}
|
| 73 |
}
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
/**
|
| 76 |
* Event Handler for the display of the card icons
|
| 77 |
*/
|
| 78 |
Paymill.prototype.paymillShowCardIcon = function()
|
| 79 |
{
|
| 80 |
+
var detector = new PaymillBrandDetection();
|
| 81 |
+
var brand = detector.detect(pmQuery('#' + this.paymillCode + '_number').val());
|
| 82 |
brand = brand.toLowerCase();
|
| 83 |
pmQuery('#' + this.paymillCode + '_number')[0].className = pmQuery('#' + this.paymillCode + '_number')[0].className.replace(/paymill-card-number-.*/g, '');
|
| 84 |
if (brand !== 'unknown') {
|
| 85 |
+
if(this.creditcards.length > 0 && pmQuery.inArray(brand, this.creditcards) === -1) {
|
| 86 |
+
return;
|
| 87 |
+
}
|
|
|
|
| 88 |
pmQuery('#' + this.paymillCode + '_number').addClass("paymill-card-number-" + brand);
|
| 89 |
+
if (!detector.validate(pmQuery('#' + this.paymillCode + '_number').val())) {
|
| 90 |
+
pmQuery('#' + this.paymillCode + '_number').addClass("paymill-card-number-grayscale");
|
| 91 |
+
}
|
| 92 |
}
|
| 93 |
}
|
| 94 |
|
| 95 |
+
/**
|
| 96 |
+
* Prototype selector
|
| 97 |
+
*
|
| 98 |
+
* @param {type} selector
|
| 99 |
+
* @returns {String}
|
| 100 |
+
*/
|
| 101 |
Paymill.prototype.getValueIfExist = function(selector)
|
| 102 |
{
|
| 103 |
if ($$(selector)[0]) {
|
| 108 |
}
|
| 109 |
|
| 110 |
/**
|
| 111 |
+
* Validate the form data and try to create a token
|
| 112 |
+
*
|
| 113 |
* @returns {Boolean}
|
| 114 |
*/
|
| 115 |
Paymill.prototype.paymillSubmitForm = function()
|
| 116 |
{
|
| 117 |
PAYMILL_PUBLIC_KEY = pmQuery('.paymill-info-public_key-' + this.getPaymillCode()).val();
|
| 118 |
this.paymillSelectedPaymentName = pmQuery("input[name='payment[method]']:checked").val();
|
| 119 |
+
|
| 120 |
if (!window.PAYMILL_LOADING !== "undefined" && window.PAYMILL_LOADING) {
|
| 121 |
return false;
|
| 122 |
}
|
| 123 |
+
|
| 124 |
switch (this.paymillSelectedPaymentName) {
|
| 125 |
case this.paymillCc:
|
| 126 |
paymill.config('3ds_cancel_label', pmQuery('.paymill_3ds_cancel').val());
|
| 155 |
break;
|
| 156 |
case this.paymillElv:
|
| 157 |
if (pmQuery('.paymill-info-fastCheckout-elv').val() === 'false') {
|
| 158 |
+
if (!this.isSepa()) {
|
| 159 |
var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
|
| 160 |
+
&& paymill.validateAccountNumber(pmQuery('#' + this.paymillSelectedPaymentName + '_account_iban').val())
|
| 161 |
+
&& paymill.validateBankCode(pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode_bic').val());
|
| 162 |
|
| 163 |
if (!valid) {
|
| 164 |
return false;
|
| 167 |
window.PAYMILL_LOADING = true;
|
| 168 |
this.debug("Generating Token");
|
| 169 |
paymill.createToken({
|
| 170 |
+
number: pmQuery('#' + this.paymillSelectedPaymentName + '_account_iban').val(),
|
| 171 |
+
bank: pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode_bic').val(),
|
| 172 |
accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
|
| 173 |
}, paymillResponseHandler);
|
| 174 |
} else {
|
| 175 |
+
ibanWithoutSpaces = pmQuery('#' + this.paymillSelectedPaymentName + '_account_iban').val();
|
| 176 |
+
ibanWithoutSpaces = ibanWithoutSpaces.replace(/\s+/g, "");
|
| 177 |
+
ibanValidator = new PaymillIban();
|
| 178 |
var valid = pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val() !== ''
|
| 179 |
+
&& ibanValidator.validate(pmQuery('#' + this.paymillSelectedPaymentName + '_account_iban').val())
|
| 180 |
+
&& (pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode_bic').val().length === 8
|
| 181 |
+
|| pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode_bic').val().length === 11);
|
| 182 |
|
| 183 |
if (!valid) {
|
| 184 |
return false;
|
| 187 |
window.PAYMILL_LOADING = true;
|
| 188 |
this.debug("Generating Token");
|
| 189 |
paymill.createToken({
|
| 190 |
+
iban: ibanWithoutSpaces,
|
| 191 |
+
bic: pmQuery('#' + this.paymillSelectedPaymentName + '_bankcode_bic').val(),
|
| 192 |
accountholder: pmQuery('#' + this.paymillSelectedPaymentName + '_holdername').val()
|
| 193 |
}, paymillResponseHandler);
|
| 194 |
}
|
| 200 |
return false;
|
| 201 |
}
|
| 202 |
|
| 203 |
+
/**
|
| 204 |
+
* Log data
|
| 205 |
+
* @param String data
|
| 206 |
+
*/
|
| 207 |
Paymill.prototype.logError = function(data)
|
| 208 |
{
|
| 209 |
var that = this;
|
| 219 |
});
|
| 220 |
}
|
| 221 |
|
| 222 |
+
/**
|
| 223 |
+
* Return order amount
|
| 224 |
+
* @return float
|
| 225 |
+
*/
|
| 226 |
Paymill.prototype.getTokenAmount = function()
|
| 227 |
{
|
| 228 |
var that = this;
|
| 252 |
return returnVal;
|
| 253 |
}
|
| 254 |
|
| 255 |
+
/**
|
| 256 |
+
* Unset elv validation rules
|
| 257 |
+
*/
|
| 258 |
Paymill.prototype.unsetElvValidationRules = function()
|
| 259 |
{
|
| 260 |
var nvElv = {
|
| 266 |
},
|
| 267 |
''
|
| 268 |
),
|
| 269 |
+
'paymill-validate-dd-account-iban': new Validator(
|
| 270 |
+
'paymill-validate-dd-account-iban',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
'',
|
| 272 |
function(v) {
|
| 273 |
return true;
|
| 274 |
},
|
| 275 |
''
|
| 276 |
),
|
| 277 |
+
'paymill-validate-dd-bankcode-bic': new Validator(
|
| 278 |
+
'paymill-validate-dd-bankcode-bic',
|
| 279 |
'',
|
| 280 |
function(v) {
|
| 281 |
return true;
|
| 287 |
Object.extend(Validation.methods, nvElv);
|
| 288 |
}
|
| 289 |
|
| 290 |
+
/**
|
| 291 |
+
* Unset cc validation rules
|
| 292 |
+
*/
|
| 293 |
Paymill.prototype.unsetCcValidationRules = function()
|
| 294 |
{
|
| 295 |
var nvCc = {
|
| 338 |
Object.extend(Validation.methods, nvCc);
|
| 339 |
}
|
| 340 |
|
| 341 |
+
/**
|
| 342 |
+
* Set elv validation rules
|
| 343 |
+
*/
|
| 344 |
Paymill.prototype.setElvValidationRules = function()
|
| 345 |
{
|
| 346 |
var nvElv = {
|
| 352 |
},
|
| 353 |
''
|
| 354 |
),
|
| 355 |
+
'paymill-validate-dd-account-iban': new Validator(
|
| 356 |
+
'paymill-validate-dd-account-iban',
|
| 357 |
+
this.getValueIfExist('.paymill-payment-error-number-iban-elv'),
|
| 358 |
function(v) {
|
| 359 |
+
if(paymillElv.isSepa()) {
|
| 360 |
+
iban = new PaymillIban();
|
| 361 |
+
return iban.validate(v);
|
| 362 |
+
}
|
| 363 |
+
return paymill.validateAccountNumber(v);
|
| 364 |
},
|
| 365 |
''
|
| 366 |
),
|
| 367 |
+
'paymill-validate-dd-bankcode-bic': new Validator(
|
| 368 |
+
'paymill-validate-dd-bankcode-bic',
|
| 369 |
+
this.getValueIfExist('.paymill-payment-error-bankcode-bic-elv'),
|
| 370 |
function(v) {
|
| 371 |
+
if(paymillElv.isSepa()) {
|
| 372 |
+
return v.length === 8 || v.length === 11;
|
| 373 |
+
}
|
| 374 |
+
return paymill.validateBankCode(v);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
},
|
| 376 |
''
|
| 377 |
)
|
| 380 |
Object.extend(Validation.methods, nvElv);
|
| 381 |
}
|
| 382 |
|
| 383 |
+
/**
|
| 384 |
+
* Set cc validation rules
|
| 385 |
+
*/
|
| 386 |
Paymill.prototype.setCcValidationRules = function()
|
| 387 |
{
|
| 388 |
var that = this;
|
| 437 |
Object.extend(Validation.methods, nvCc);
|
| 438 |
}
|
| 439 |
|
| 440 |
+
/**
|
| 441 |
+
* Add all paymill events
|
| 442 |
+
*/
|
| 443 |
Paymill.prototype.addPaymillEvents = function()
|
| 444 |
{
|
| 445 |
var that = this;
|
| 446 |
+
|
| 447 |
this.setElvValidationRules();
|
| 448 |
|
| 449 |
this.setCcValidationRules();
|
| 456 |
that.unsetCcValidationRules();
|
| 457 |
}
|
| 458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
if (!this.eventFlag) {
|
| 460 |
+
|
| 461 |
pmQuery('#' + this.paymillCode + '_holdername').live('input', function() {
|
| 462 |
that.setElvValidationRules();
|
| 463 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 464 |
});
|
| 465 |
|
| 466 |
+
pmQuery('#' + this.paymillCode + '_account_iban').live('input', function() {
|
| 467 |
that.setElvValidationRules();
|
| 468 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 469 |
});
|
| 470 |
|
| 471 |
+
pmQuery('#' + this.paymillCode + '_bankcode_bic').live('input', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
that.setElvValidationRules();
|
| 473 |
pmQuery('.paymill-info-fastCheckout-elv').val('false');
|
| 474 |
});
|
| 522 |
that.paymillSubmitForm();
|
| 523 |
});
|
| 524 |
|
| 525 |
+
pmQuery('#' + this.paymillCode + '_account_iban').live('input', function() {
|
| 526 |
that.paymillSubmitForm();
|
| 527 |
});
|
| 528 |
|
| 529 |
+
pmQuery('#' + this.paymillCode + '_bankcode_bic').live('input', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 530 |
that.paymillSubmitForm();
|
| 531 |
});
|
| 532 |
|
| 542 |
paymillResponseHandler = function(error, result)
|
| 543 |
{
|
| 544 |
window.PAYMILL_LOADING = false;
|
| 545 |
+
|
| 546 |
var nv = {};
|
| 547 |
paymillObj = new Paymill();
|
| 548 |
paymillObj.setCodes();
|
| 549 |
if (error) {
|
|
|
|
| 550 |
var message = 'unknown_error';
|
| 551 |
var key = error.apierror;
|
| 552 |
if(paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode()) !== ''){
|
| 553 |
message = paymillObj.getValueIfExist('.PAYMILL_' + key + '-' + paymillObj.getPaymillCode());
|
| 554 |
}
|
| 555 |
+
|
| 556 |
if (message === 'unknown_error' && error.message !== undefined) {
|
| 557 |
message = error.message;
|
| 558 |
}
|
| 559 |
+
|
| 560 |
// Appending error
|
| 561 |
nv['paymill-validate-' + paymillObj.getPaymillCode() + '-token'] = new Validator(
|
| 562 |
'paymill-validate-' + paymillObj.getPaymillCode() + '-token',
|
| 568 |
);
|
| 569 |
|
| 570 |
Object.extend(Validation.methods, nv);
|
| 571 |
+
var paymillValidator = new Validation(pmQuery('#paymill_creditcard_cvc').get(0).form.id);
|
| 572 |
+
paymillValidator.validate();
|
| 573 |
+
pmQuery('#paymill_creditcard_cvc').val('');
|
| 574 |
paymillObj.logError(error);
|
| 575 |
|
| 576 |
paymillObj.debug(error.apierror);
|
| 591 |
paymillObj.debug("Saving Token in Form: " + result.token);
|
| 592 |
pmQuery('.paymill-payment-token-' + paymillObj.getPaymillCode()).val(result.token);
|
| 593 |
}
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
/**
|
| 597 |
+
* If array is empty, all creditcards are shown in Brand Detection
|
| 598 |
+
*/
|
| 599 |
+
Paymill.prototype.setBrandCreditcards = function(creditcards)
|
| 600 |
+
{
|
| 601 |
+
this.creditcards = creditcards;
|
| 602 |
+
}
|
| 603 |
+
|
| 604 |
+
/**
|
| 605 |
+
* If value starts with 2 letters, it will be considered as sepa
|
| 606 |
+
*/
|
| 607 |
+
Paymill.prototype.isSepa = function()
|
| 608 |
+
{
|
| 609 |
+
var reg = new RegExp(/^\D{2}/);
|
| 610 |
+
return reg.test(pmQuery('#' + this.paymillCode + '_account_iban').val());
|
| 611 |
}
|
lib/Services/Paymill/Apiclient/Curl.php
CHANGED
|
@@ -77,13 +77,11 @@ class Services_Paymill_Apiclient_Curl implements Services_Paymill_Apiclient_Inte
|
|
| 77 |
$responseCode = $this->_responseArray['body']['data']['response_code'];
|
| 78 |
}
|
| 79 |
|
| 80 |
-
return array(
|
| 81 |
-
"data" => array(
|
| 82 |
"error" => $errorMessage,
|
| 83 |
"response_code" => $responseCode,
|
| 84 |
"http_status_code" => $httpStatusCode
|
| 85 |
-
|
| 86 |
-
);
|
| 87 |
}
|
| 88 |
|
| 89 |
return $this->_responseArray['body'];
|
| 77 |
$responseCode = $this->_responseArray['body']['data']['response_code'];
|
| 78 |
}
|
| 79 |
|
| 80 |
+
return array("data" => array(
|
|
|
|
| 81 |
"error" => $errorMessage,
|
| 82 |
"response_code" => $responseCode,
|
| 83 |
"http_status_code" => $httpStatusCode
|
| 84 |
+
));
|
|
|
|
| 85 |
}
|
| 86 |
|
| 87 |
return $this->_responseArray['body'];
|
lib/Services/Paymill/PaymentProcessor.php
CHANGED
|
@@ -74,14 +74,15 @@ class Services_Paymill_PaymentProcessor
|
|
| 74 |
*/
|
| 75 |
private function _createClient()
|
| 76 |
{
|
|
|
|
| 77 |
if (isset($this->_clientId)) {
|
| 78 |
$this->_log("Client using: " . $this->_clientId);
|
| 79 |
} else {
|
| 80 |
$client = $this->_clientsObject->create(
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
);
|
| 86 |
|
| 87 |
$this->_validateResult($client, 'Client');
|
|
@@ -99,18 +100,18 @@ class Services_Paymill_PaymentProcessor
|
|
| 99 |
*/
|
| 100 |
private function _createPayment()
|
| 101 |
{
|
|
|
|
| 102 |
if (isset($this->_paymentId)) {
|
| 103 |
$this->_log("Payment using: " . $this->_paymentId);
|
| 104 |
} else {
|
| 105 |
$payment = $this->_paymentsObject->create(
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
);
|
| 111 |
|
| 112 |
$this->_validateResult($payment, 'Payment');
|
| 113 |
-
|
| 114 |
$this->_paymentId = $payment['id'];
|
| 115 |
}
|
| 116 |
return true;
|
|
@@ -124,6 +125,7 @@ class Services_Paymill_PaymentProcessor
|
|
| 124 |
*/
|
| 125 |
private function _createTransaction()
|
| 126 |
{
|
|
|
|
| 127 |
$parameter = array(
|
| 128 |
'amount' => $this->_amount,
|
| 129 |
'currency' => $this->_currency,
|
|
@@ -148,13 +150,13 @@ class Services_Paymill_PaymentProcessor
|
|
| 148 |
private function _createPreauthorization()
|
| 149 |
{
|
| 150 |
$preAuth = $this->_preauthObject->create(
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
);
|
| 159 |
$this->_validateResult($preAuth, 'Preauthorization');
|
| 160 |
$this->_preauthId = $preAuth['preauthorization']['id'];
|
|
@@ -248,44 +250,52 @@ class Services_Paymill_PaymentProcessor
|
|
| 248 |
* @param string $type
|
| 249 |
* @return boolean
|
| 250 |
*/
|
| 251 |
-
private function _validateResult($
|
| 252 |
{
|
| 253 |
-
$this->_lastResponse = $
|
| 254 |
-
if (isset($
|
| 255 |
-
$this->_log("An Error occured: " . $
|
| 256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
}
|
| 258 |
-
|
| 259 |
-
if (isset($
|
| 260 |
-
$this->_log("An Error occured: " . $
|
| 261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
}
|
| 263 |
|
| 264 |
-
if (!isset($
|
| 265 |
-
$this->_log("No $type created.", var_export($
|
| 266 |
throw new Exception("Invalid Result Exception: Invalid Id");
|
| 267 |
} else {
|
| 268 |
-
$this->_log("$type created.", isset($
|
| 269 |
}
|
| 270 |
|
| 271 |
// check result
|
| 272 |
if ($type == 'Transaction') {
|
| 273 |
-
if (is_array($
|
| 274 |
-
if ($
|
| 275 |
// transaction was successfully issued
|
| 276 |
return true;
|
| 277 |
-
} elseif ($
|
| 278 |
// transaction was issued but status is open for any reason
|
| 279 |
-
$this->_log("Status is open.", var_export($
|
| 280 |
throw new Exception("Invalid Result Exception: Invalid Orderstate");
|
| 281 |
} else {
|
| 282 |
// another error occured
|
| 283 |
-
$this->_log("Unknown error." . var_export($
|
| 284 |
throw new Exception("Invalid Result Exception: Unknown Error");
|
| 285 |
}
|
| 286 |
} else {
|
| 287 |
// another error occured
|
| 288 |
-
$this->_log("$type could not be issued.", var_export($
|
| 289 |
throw new Exception("Invalid Result Exception: $type could not be issued.");
|
| 290 |
}
|
| 291 |
} else {
|
|
@@ -293,6 +303,12 @@ class Services_Paymill_PaymentProcessor
|
|
| 293 |
}
|
| 294 |
}
|
| 295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
private function _processPreAuthCapture($captureNow)
|
| 297 |
{
|
| 298 |
$this->_createPreauthorization();
|
|
@@ -341,6 +357,11 @@ class Services_Paymill_PaymentProcessor
|
|
| 341 |
}
|
| 342 |
}
|
| 343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
final public function capture()
|
| 345 |
{
|
| 346 |
$this->_initiatePhpWrapperClasses();
|
|
@@ -351,6 +372,78 @@ class Services_Paymill_PaymentProcessor
|
|
| 351 |
}
|
| 352 |
|
| 353 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
* Returns the objects data
|
| 355 |
*
|
| 356 |
* @return array
|
|
@@ -372,6 +465,23 @@ class Services_Paymill_PaymentProcessor
|
|
| 372 |
);
|
| 373 |
}
|
| 374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
/* * **************************************************************************************************************
|
| 376 |
* *********************************************** Getter **************************************************
|
| 377 |
* *************************************************************************************************************** */
|
|
@@ -425,7 +535,7 @@ class Services_Paymill_PaymentProcessor
|
|
| 425 |
{
|
| 426 |
return $this->_lastResponse;
|
| 427 |
}
|
| 428 |
-
|
| 429 |
public function getErrorCode()
|
| 430 |
{
|
| 431 |
return $this->_errorCode;
|
|
@@ -441,7 +551,10 @@ class Services_Paymill_PaymentProcessor
|
|
| 441 |
*/
|
| 442 |
public function setClientId($clientId = null)
|
| 443 |
{
|
| 444 |
-
$this->
|
|
|
|
|
|
|
|
|
|
| 445 |
}
|
| 446 |
|
| 447 |
/**
|
|
@@ -450,7 +563,10 @@ class Services_Paymill_PaymentProcessor
|
|
| 450 |
*/
|
| 451 |
public function setPaymentId($paymentId = null)
|
| 452 |
{
|
| 453 |
-
$this->
|
|
|
|
|
|
|
|
|
|
| 454 |
}
|
| 455 |
|
| 456 |
/**
|
| 74 |
*/
|
| 75 |
private function _createClient()
|
| 76 |
{
|
| 77 |
+
$this->_initiatePhpWrapperClasses();
|
| 78 |
if (isset($this->_clientId)) {
|
| 79 |
$this->_log("Client using: " . $this->_clientId);
|
| 80 |
} else {
|
| 81 |
$client = $this->_clientsObject->create(
|
| 82 |
+
array(
|
| 83 |
+
'email' => $this->_email,
|
| 84 |
+
'description' => $this->_description
|
| 85 |
+
)
|
| 86 |
);
|
| 87 |
|
| 88 |
$this->_validateResult($client, 'Client');
|
| 100 |
*/
|
| 101 |
private function _createPayment()
|
| 102 |
{
|
| 103 |
+
$this->_initiatePhpWrapperClasses();
|
| 104 |
if (isset($this->_paymentId)) {
|
| 105 |
$this->_log("Payment using: " . $this->_paymentId);
|
| 106 |
} else {
|
| 107 |
$payment = $this->_paymentsObject->create(
|
| 108 |
+
array(
|
| 109 |
+
'token' => $this->_token,
|
| 110 |
+
'client' => $this->_clientId
|
| 111 |
+
)
|
| 112 |
);
|
| 113 |
|
| 114 |
$this->_validateResult($payment, 'Payment');
|
|
|
|
| 115 |
$this->_paymentId = $payment['id'];
|
| 116 |
}
|
| 117 |
return true;
|
| 125 |
*/
|
| 126 |
private function _createTransaction()
|
| 127 |
{
|
| 128 |
+
$this->_initiatePhpWrapperClasses();
|
| 129 |
$parameter = array(
|
| 130 |
'amount' => $this->_amount,
|
| 131 |
'currency' => $this->_currency,
|
| 150 |
private function _createPreauthorization()
|
| 151 |
{
|
| 152 |
$preAuth = $this->_preauthObject->create(
|
| 153 |
+
array(
|
| 154 |
+
'amount' => $this->_preAuthAmount,
|
| 155 |
+
'currency' => $this->_currency,
|
| 156 |
+
'description' => $this->_description,
|
| 157 |
+
'payment' => $this->_paymentId,
|
| 158 |
+
'client' => $this->_clientId,
|
| 159 |
+
)
|
| 160 |
);
|
| 161 |
$this->_validateResult($preAuth, 'Preauthorization');
|
| 162 |
$this->_preauthId = $preAuth['preauthorization']['id'];
|
| 250 |
* @param string $type
|
| 251 |
* @return boolean
|
| 252 |
*/
|
| 253 |
+
private function _validateResult($paymillObject, $type)
|
| 254 |
{
|
| 255 |
+
$this->_lastResponse = $paymillObject;
|
| 256 |
+
if (isset($paymillObject['data']['response_code']) && $paymillObject['data']['response_code'] !== 20000) {
|
| 257 |
+
$this->_log("An Error occured: " . $paymillObject['data']['response_code'], var_export($paymillObject, true));
|
| 258 |
+
if (empty($paymillObject['data']['response_code'])) {
|
| 259 |
+
$paymillObject['data']['response_code'] = 0;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
throw new Exception("Invalid Result Exception: Invalid ResponseCode", $paymillObject['data']['response_code']);
|
| 263 |
}
|
| 264 |
+
|
| 265 |
+
if (isset($paymillObject['response_code']) && $paymillObject['response_code'] !== 20000) {
|
| 266 |
+
$this->_log("An Error occured: " . $paymillObject['response_code'], var_export($paymillObject, true));
|
| 267 |
+
if (empty($paymillObject['response_code'])) {
|
| 268 |
+
$paymillObject['response_code'] = 0;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
throw new Exception("Invalid Result Exception: Invalid ResponseCode", (int)$paymillObject['response_code']);
|
| 272 |
}
|
| 273 |
|
| 274 |
+
if (!isset($paymillObject['id']) && !isset($paymillObject['data']['id'])) {
|
| 275 |
+
$this->_log("No $type created.", var_export($paymillObject, true));
|
| 276 |
throw new Exception("Invalid Result Exception: Invalid Id");
|
| 277 |
} else {
|
| 278 |
+
$this->_log("$type created.", isset($paymillObject['id']) ? $paymillObject['id'] : $paymillObject['data']['id']);
|
| 279 |
}
|
| 280 |
|
| 281 |
// check result
|
| 282 |
if ($type == 'Transaction') {
|
| 283 |
+
if (is_array($paymillObject) && array_key_exists('status', $paymillObject)) {
|
| 284 |
+
if ($paymillObject['status'] == "closed") {
|
| 285 |
// transaction was successfully issued
|
| 286 |
return true;
|
| 287 |
+
} elseif ($paymillObject['status'] == "open") {
|
| 288 |
// transaction was issued but status is open for any reason
|
| 289 |
+
$this->_log("Status is open.", var_export($paymillObject, true));
|
| 290 |
throw new Exception("Invalid Result Exception: Invalid Orderstate");
|
| 291 |
} else {
|
| 292 |
// another error occured
|
| 293 |
+
$this->_log("Unknown error." . var_export($paymillObject, true));
|
| 294 |
throw new Exception("Invalid Result Exception: Unknown Error");
|
| 295 |
}
|
| 296 |
} else {
|
| 297 |
// another error occured
|
| 298 |
+
$this->_log("$type could not be issued.", var_export($paymillObject, true));
|
| 299 |
throw new Exception("Invalid Result Exception: $type could not be issued.");
|
| 300 |
}
|
| 301 |
} else {
|
| 303 |
}
|
| 304 |
}
|
| 305 |
|
| 306 |
+
/**
|
| 307 |
+
* Creates a transaction when capturenow is true otherwise a preauthorisation will be created
|
| 308 |
+
*
|
| 309 |
+
* @param boolean $captureNow
|
| 310 |
+
* @return boolean
|
| 311 |
+
*/
|
| 312 |
private function _processPreAuthCapture($captureNow)
|
| 313 |
{
|
| 314 |
$this->_createPreauthorization();
|
| 357 |
}
|
| 358 |
}
|
| 359 |
|
| 360 |
+
/**
|
| 361 |
+
* Captures from an existing preauthorisation
|
| 362 |
+
*
|
| 363 |
+
* @return boolean
|
| 364 |
+
*/
|
| 365 |
final public function capture()
|
| 366 |
{
|
| 367 |
$this->_initiatePhpWrapperClasses();
|
| 372 |
}
|
| 373 |
|
| 374 |
/**
|
| 375 |
+
* Creates a client
|
| 376 |
+
* If no parameters are set, the values stored in the class will be used
|
| 377 |
+
*
|
| 378 |
+
* @param string $email
|
| 379 |
+
* @param string $description
|
| 380 |
+
* @return boolean
|
| 381 |
+
*/
|
| 382 |
+
public function createClient($email = null, $description = null){
|
| 383 |
+
$result = false;
|
| 384 |
+
$email = isset($email) ? $email : $this->_email;
|
| 385 |
+
$description = isset($description) ? $description : $this->_description;
|
| 386 |
+
if(!in_array(null, array($email, $description))){
|
| 387 |
+
$this->_clientId = null;
|
| 388 |
+
$this->_email = $email;
|
| 389 |
+
$this->_description = $description;
|
| 390 |
+
$result = $this->_createClient();
|
| 391 |
+
}
|
| 392 |
+
return $result;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
/**
|
| 396 |
+
* Creates a Payment
|
| 397 |
+
* If no parameters are set, the values stored in the class will be used
|
| 398 |
+
*
|
| 399 |
+
* @param string $token
|
| 400 |
+
* @param string $client
|
| 401 |
+
* @return boolean
|
| 402 |
+
*/
|
| 403 |
+
public function createPayment($token = null, $client = null){
|
| 404 |
+
$result = false;
|
| 405 |
+
$token = isset($token) ? $token : $this->_token;
|
| 406 |
+
$client = isset($client) ? $client : $this->_clientId;
|
| 407 |
+
if(!in_array(null, array($token, $client))){
|
| 408 |
+
$this->_paymentId = null;
|
| 409 |
+
$this->_token = $token;
|
| 410 |
+
$this->_clientId = $client;
|
| 411 |
+
$result = $this->_createPayment();
|
| 412 |
+
}
|
| 413 |
+
return $result;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
/**
|
| 417 |
+
* Creates a Transaction
|
| 418 |
+
* If no parameters are set, the values stored in the class will be used
|
| 419 |
+
*
|
| 420 |
+
* @param integer $amount
|
| 421 |
+
* @param string $currency
|
| 422 |
+
* @param string $description
|
| 423 |
+
* @param string $preauthorisation
|
| 424 |
+
* @param string $source
|
| 425 |
+
* @return boolean
|
| 426 |
+
*/
|
| 427 |
+
public function createTransaction($amount = null, $currency = null, $description = null, $preauthorisation = null, $source = null){
|
| 428 |
+
$result = false;
|
| 429 |
+
$amount = isset($amount) ? $amount : $this->_amount;
|
| 430 |
+
$currency = isset($currency) ? $currency : $this->_currency;
|
| 431 |
+
$description = isset($description) ? $description : $this->_description;
|
| 432 |
+
$preauthorisation = isset($preauthorisation) ? $preauthorisation : $this->_preauthId;
|
| 433 |
+
$source = isset($source) ? $source : $this->_source;
|
| 434 |
+
if(!in_array(null, array($amount, $currency, $description))){
|
| 435 |
+
$this->_transactionId = null;
|
| 436 |
+
$this->_amount = $amount;
|
| 437 |
+
$this->_currency = $currency;
|
| 438 |
+
$this->_description = $description;
|
| 439 |
+
$this->_preauthId = $preauthorisation;
|
| 440 |
+
$this->_source = $source;
|
| 441 |
+
$result = $this->_createTransaction();
|
| 442 |
+
}
|
| 443 |
+
return $result;
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
/**
|
| 447 |
* Returns the objects data
|
| 448 |
*
|
| 449 |
* @return array
|
| 465 |
);
|
| 466 |
}
|
| 467 |
|
| 468 |
+
/**
|
| 469 |
+
* Validates the Id by getting the object with the ID from Paymill
|
| 470 |
+
*
|
| 471 |
+
* @param string $id
|
| 472 |
+
* @param Service_Paymill_Base $object
|
| 473 |
+
* @return boolean
|
| 474 |
+
*/
|
| 475 |
+
private function isIdValid($id, $object)
|
| 476 |
+
{
|
| 477 |
+
$result = $object->getOne($id);
|
| 478 |
+
if (array_key_exists('id', $result)) {
|
| 479 |
+
return $result['id'] === $id;
|
| 480 |
+
} else {
|
| 481 |
+
return false;
|
| 482 |
+
}
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
/* * **************************************************************************************************************
|
| 486 |
* *********************************************** Getter **************************************************
|
| 487 |
* *************************************************************************************************************** */
|
| 535 |
{
|
| 536 |
return $this->_lastResponse;
|
| 537 |
}
|
| 538 |
+
|
| 539 |
public function getErrorCode()
|
| 540 |
{
|
| 541 |
return $this->_errorCode;
|
| 551 |
*/
|
| 552 |
public function setClientId($clientId = null)
|
| 553 |
{
|
| 554 |
+
$this->_initiatePhpWrapperClasses();
|
| 555 |
+
if ($this->isIdValid($clientId, $this->_clientsObject)) {
|
| 556 |
+
$this->_clientId = $clientId;
|
| 557 |
+
}
|
| 558 |
}
|
| 559 |
|
| 560 |
/**
|
| 563 |
*/
|
| 564 |
public function setPaymentId($paymentId = null)
|
| 565 |
{
|
| 566 |
+
$this->_initiatePhpWrapperClasses();
|
| 567 |
+
if ($this->isIdValid($paymentId, $this->_paymentsObject)) {
|
| 568 |
+
$this->_paymentId = $paymentId;
|
| 569 |
+
}
|
| 570 |
}
|
| 571 |
|
| 572 |
/**
|
lib/Services/Paymill/Transactions.php
CHANGED
|
@@ -10,23 +10,10 @@ class Services_Paymill_Transactions extends Services_Paymill_Base
|
|
| 10 |
*/
|
| 11 |
protected $_serviceResource = 'transactions/';
|
| 12 |
|
| 13 |
-
/**
|
| 14 |
-
* General REST PUT verb
|
| 15 |
-
* Update resource item
|
| 16 |
-
*
|
| 17 |
-
* @param array $itemData
|
| 18 |
-
*
|
| 19 |
-
* @return array item updated or null
|
| 20 |
-
*/
|
| 21 |
-
public function update(array $itemData = array())
|
| 22 |
-
{
|
| 23 |
-
throw new Services_Paymill_Exception( __CLASS__ . " does not support " . __METHOD__, "404");
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
/**
|
| 27 |
* General REST DELETE verb
|
| 28 |
* Delete or inactivate/cancel resource item
|
| 29 |
-
*
|
| 30 |
* @param string $clientId
|
| 31 |
*
|
| 32 |
* @return array item deleted
|
| 10 |
*/
|
| 11 |
protected $_serviceResource = 'transactions/';
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
/**
|
| 14 |
* General REST DELETE verb
|
| 15 |
* Delete or inactivate/cancel resource item
|
| 16 |
+
*
|
| 17 |
* @param string $clientId
|
| 18 |
*
|
| 19 |
* @return array item deleted
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Paymill_Paymill</name>
|
| 4 |
-
<version>3.6.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -13,12 +13,16 @@ The Paymill Magento extension provides a credit card form and a direct debit for
|
|
| 13 |
<br /><br />
|
| 14 |
IMPORTANT: Only use the latest version.
|
| 15 |
</description>
|
| 16 |
-
<notes> *
|
| 17 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
<authors><author><name>PayIntelligent</name><user>Paymill</user><email>community@paymill.de</email></author></authors>
|
| 19 |
-
<date>2014-
|
| 20 |
-
<time>10:
|
| 21 |
-
<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="85d6e40be73890112802483df85b52aa"/><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="5485e0c2db15a68aa98253b8be71018a"/><file name="system.xml" hash="813fcdc246b0d79efa8e55de5b562c1e"/></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="352634ae093cc76fbc3d9a51f5a5b5d6"/></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>
|
| 22 |
<compatible/>
|
| 23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 24 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Paymill_Paymill</name>
|
| 4 |
+
<version>3.6.6</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
| 13 |
<br /><br />
|
| 14 |
IMPORTANT: Only use the latest version.
|
| 15 |
</description>
|
| 16 |
+
<notes> * changed CVC field design to Magento CVC design with "What is this" Link and Popup
|
| 17 |
+
* added credit card logos, which can be selected to be shown in the checkout
|
| 18 |
+
* changed ELV/SEPA to one form
|
| 19 |
+
* added Prenotification for SEPA
|
| 20 |
+
* updated PHP Wrapper
|
| 21 |
+
</notes>
|
| 22 |
<authors><author><name>PayIntelligent</name><user>Paymill</user><email>community@paymill.de</email></author></authors>
|
| 23 |
+
<date>2014-05-28</date>
|
| 24 |
+
<time>10:09:08</time>
|
| 25 |
+
<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="4ab6e5fd7ed822e951af4e6e146d62db"/><file name="PaymentFormDirectdebit.php" hash="ea9ab99268994373866162d432d27556"/></dir><dir name="Info"><file name="PaymentFormCreditcard.php" hash="9d11216e743fa204bea678276f5a16b3"/><file name="PaymentFormDirectdebit.php" hash="d3a3e0384aa932972a97bc8f719ff545"/></dir></dir></dir><dir name="Helper"><file name="CustomerHelper.php" hash="c2470707af04507f97ddf2badbccad15"/><file name="Data.php" hash="8e55041f6bb52f1e142b86dfa486b85e"/><file name="FastCheckoutHelper.php" hash="d8577264d2bd9d60b231e12377b8385c"/><file name="LoggingHelper.php" hash="53ea7f4d5c3af8de149a06dbe37ac061"/><file name="OptionHelper.php" hash="946835d135b4a557abd37da91fe18e0c"/><file name="PaymentHelper.php" hash="a0fd6101dc9086645e88979608f63bf8"/><file name="RefundHelper.php" hash="b936d48e6f9022acb0370ec755cf5850"/><file name="TransactionHelper.php" hash="47d9c36e832df8fcb6d6b2de87e09197"/></dir><dir name="Model"><file name="Fastcheckout.php" hash="e3b585d2f3265300f08fa44a4e9ccd7b"/><dir name="Log"><file name="Search.php" hash="0ca873e4779126dabf04a413cf53b619"/></dir><file name="Log.php" hash="0662d814e53bd2eeb6f5c906c16ad971"/><dir name="Method"><file name="MethodModelAbstract.php" hash="c9e628ed3dd27c1ee0f5bff51bac92e4"/><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"/><dir name="Source"><dir name="Creditcard"><file name="Creditcards.php" hash="f9814533458669b89b7edaa43d5979e2"/></dir></dir><file name="TransactionData.php" hash="e23465382d7a6a30d207156e1bc89989"/></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="776fbffa41ce092ce5d353831a79ba9d"/><file name="system.xml" hash="6f02a611de60c4d057e3df518d4f91d8"/></dir><dir name="sql"><dir name="paymill_setup"><file name="mysql4-install-3.0.0.php" hash="37e5e1850e143315779e30bd1b45f277"/></dir></dir></dir><dir name="Paymillcc"><dir name="Block"><dir name="Form"><file name="Paymill.php" hash="e0a8d4d996c4d967433d146c66066675"/></dir><dir name="Info"><file name="Paymill.php" hash="227a03895daff070b81db745832113b5"/></dir></dir><dir name="Helper"><file name="Data.php" hash="901beaefa74e1d111d535b6d7a039f8b"/></dir><file name="LibraryVersion.php" hash="5df580a71fe7d5ef555838427b00ffba"/><dir name="Model"><file name="Customerdata.php" hash="cb9acf05ad612c3012554b6e20c66a20"/><dir name="Mysql4"><dir name="Customerdata"><file name="Collection.php" hash="b89dd70704e7fdf0cd6cd955c8bec7e3"/></dir><file name="Customerdata.php" hash="fd65309ee965a98e6840127c70ca3fdd"/></dir><file name="PaymentAbstract.php" hash="bbf1ecb31bcf6bef5614bad8ac4a9cc8"/><file name="PaymentMethod.php" hash="92650ea95a9d1b5a0e28b1c637528a65"/></dir><dir name="etc"><file name="config.xml" hash="13911c0caf93dff2089d96f8bc859059"/><file name="system.xml" hash="049a03e9b93fe7c4d30bc171c93a956c"/></dir><dir name="sql"><dir name="paymillcc_setup"><file name="mysql4-install-2.1.2.php" hash="5a4fd9f053eebe81b1db9a62ab3e5c90"/><file name="mysql4-upgrade-2.1.1-2.1.2.php" hash="5a4fd9f053eebe81b1db9a62ab3e5c90"/></dir></dir></dir><dir name="Paymillelv"><dir name="Block"><dir name="Form"><file name="Paymill.php" hash="6dc2c36cbbbd9837c211cdfb2e266891"/></dir><dir name="Info"><file name="Paymill.php" hash="688faf632b0511f1f7551b85d6025ce8"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f245b99eaf05d7a4d8870eea95a4f3a2"/></dir><dir name="Model"><file name="Customerdata.php" hash="4c8b2c12fb3855a7c527c72cb61ea563"/><dir name="Mysql4"><dir name="Customerdata"><file name="Collection.php" hash="b8ad389912dde4201bdcd77757cc8b3f"/></dir><file name="Customerdata.php" hash="d7adacd7f5fd8fff667226db0a849e71"/></dir><file name="PaymentAbstract.php" hash="bbf1ecb31bcf6bef5614bad8ac4a9cc8"/><file name="PaymentMethod.php" hash="a74bd8e73439d789d29e1b40cb150ebb"/></dir><dir name="etc"><file name="config.xml" hash="a4fa5e1f8217aff5dd70c4ebbfd3feed"/><file name="system.xml" hash="193a984065342a7ec2621f9b3e3aa6f5"/></dir><dir name="sql"><dir name="paymillelv_setup"><file name="mysql4-install-2.1.2.php" hash="114ff4ff631bdea4a965d58d563c44b7"/><file name="mysql4-upgrade-2.1.1-2.1.2.php" hash="114ff4ff631bdea4a965d58d563c44b7"/></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="form"><file name="paymill.phtml" hash="a51c471c33a281335ff87715b4656fed"/><file name="paymill_elv.phtml" hash="1cd97b98a789cdd47e8edbf82f28f276"/></dir><dir name="payment"><dir name="form"><file name="creditcard.phtml" hash="923878f7aa6539880da3fe3586d55c00"/><file name="directdebit.phtml" hash="3f10d3a47c0709a06db7fcdb5fc455b5"/></dir><dir name="info"><file name="creditcard.phtml" hash="42f875eb1b6e3e6151ddf152ef0bf13a"/><file name="directdebit.phtml" hash="7117525384b82b84fbbbe1f42c52328c"/></dir></dir></dir></dir></dir><dir name="layout"><file name="paymill.xml" hash="ac314488d98573d5ce3695f9c7513084"/></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="b9815da02f77516b381b7cc566a7a707"/></dir><dir name="en_GB"><file name="Paymill_Paymill.csv" hash="f8b3768af168ea784abc70cf5932d5cd"/></dir><dir name="en_US"><file name="Paymill_Paymill.csv" hash="f8b3768af168ea784abc70cf5932d5cd"/></dir><dir name="es_ES"><file name="Paymill_Paymill.csv" hash="99c3b3cbf4ae61add7c174e55f350947"/></dir></target><target name="mage"><dir name="js"><dir name="paymill"><file name="BrandDetection.js" hash="398d4b916fbbce5e84e6788517a02064"/><file name="Iban.js" hash="c05a4791a0cc414f2f7cc720fcd665ec"/><file name="paymentForm.js" hash="bb6627fa8762b2f2a65bb8a22ae42210"/></dir></dir></target><target name="magelib"><dir name="Services"><dir><dir name="Paymill"><dir name="Apiclient"><file name="Curl.php" hash="cce77823a94425aaa2b421e63f130422"/><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="4ee5f6e16dfdefaa8dc6565cfce2d271"/><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="382c12f290752b7c50e2001cdf5cd4a8"/><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="a0597a469bd0e0354ac4e561621d6584"/></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_china-unionpay.png" hash="6c9d16d6c65c0da5ff11e8ae13b01d15"/><file name="icon_32x20_dankort.png" hash="938df2f2100d1182dfdd677eb6a0bded"/><file name="icon_32x20_diners-club.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_visa.png" hash="e6d54e5c0120202eb5757bcfe499d73b"/><file name="icon_paymill.png" hash="303983a288b45cc7ddc5b88ad2eedd51"/></dir></dir></dir></dir></dir></target></contents>
|
| 26 |
<compatible/>
|
| 27 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 28 |
</package>
|
skin/frontend/base/default/css/paymill/logo.css
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
background-image: url('../../images/paymill/icon_32x20_jcb.png') !important;
|
| 45 |
background-repeat: no-repeat !important;
|
| 46 |
background-position: right center !important;
|
| 47 |
-
|
| 48 |
}
|
| 49 |
|
| 50 |
.paymill-card-number-maestro
|
|
@@ -54,16 +54,16 @@
|
|
| 54 |
background-position: right center !important;
|
| 55 |
}
|
| 56 |
|
| 57 |
-
.paymill-card-number-unionpay
|
| 58 |
{
|
| 59 |
-
background-image: url('../../images/paymill/
|
| 60 |
background-repeat: no-repeat !important;
|
| 61 |
background-position: right center !important;
|
| 62 |
}
|
| 63 |
|
| 64 |
-
.paymill-card-number-diners
|
| 65 |
{
|
| 66 |
-
background-image: url('../../images/paymill/
|
| 67 |
background-repeat: no-repeat !important;
|
| 68 |
background-position: right center !important;
|
| 69 |
}
|
|
@@ -84,12 +84,19 @@
|
|
| 84 |
|
| 85 |
.paymill-card-number-carta-si
|
| 86 |
{
|
| 87 |
-
background-image: url('../../images/paymill/
|
| 88 |
background-repeat: no-repeat !important;
|
| 89 |
background-position: right center !important;
|
| 90 |
}
|
| 91 |
|
| 92 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
{
|
| 94 |
margin-left: 3px;
|
| 95 |
font-size: 11px;
|
|
@@ -110,5 +117,12 @@
|
|
| 110 |
left:0px;
|
| 111 |
width: 100%;
|
| 112 |
height: 100%;
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
}
|
| 44 |
background-image: url('../../images/paymill/icon_32x20_jcb.png') !important;
|
| 45 |
background-repeat: no-repeat !important;
|
| 46 |
background-position: right center !important;
|
| 47 |
+
|
| 48 |
}
|
| 49 |
|
| 50 |
.paymill-card-number-maestro
|
| 54 |
background-position: right center !important;
|
| 55 |
}
|
| 56 |
|
| 57 |
+
.paymill-card-number-china-unionpay
|
| 58 |
{
|
| 59 |
+
background-image: url('../../images/paymill/icon_32x20_china-unionpay.png') !important;
|
| 60 |
background-repeat: no-repeat !important;
|
| 61 |
background-position: right center !important;
|
| 62 |
}
|
| 63 |
|
| 64 |
+
.paymill-card-number-diners-club
|
| 65 |
{
|
| 66 |
+
background-image: url('../../images/paymill/icon_32x20_diners-club.png') !important;
|
| 67 |
background-repeat: no-repeat !important;
|
| 68 |
background-position: right center !important;
|
| 69 |
}
|
| 84 |
|
| 85 |
.paymill-card-number-carta-si
|
| 86 |
{
|
| 87 |
+
background-image: url('../../images/paymill/icon_32x20_carta-si.png') !important;
|
| 88 |
background-repeat: no-repeat !important;
|
| 89 |
background-position: right center !important;
|
| 90 |
}
|
| 91 |
|
| 92 |
+
.paymill-card-number-dankort
|
| 93 |
+
{
|
| 94 |
+
background-image: url('../../images/paymill/icon_32x20_dankort.png') !important;
|
| 95 |
+
background-repeat: no-repeat !important;
|
| 96 |
+
background-position: right center !important;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.tooltip
|
| 100 |
{
|
| 101 |
margin-left: 3px;
|
| 102 |
font-size: 11px;
|
| 117 |
left:0px;
|
| 118 |
width: 100%;
|
| 119 |
height: 100%;
|
| 120 |
+
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.paymill-card-number-grayscale
|
| 124 |
+
{
|
| 125 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
|
| 126 |
+
filter: gray; /* IE6-9 */
|
| 127 |
+
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
|
| 128 |
}
|
skin/frontend/base/default/images/paymill/{icon_32x20_unionpay.png → icon_32x20_china-unionpay.png}
RENAMED
|
File without changes
|
skin/frontend/base/default/images/paymill/icon_32x20_dankort.png
ADDED
|
Binary file
|
skin/frontend/base/default/images/paymill/{icon_32x20_dinersclub.png → icon_32x20_diners-club.png}
RENAMED
|
File without changes
|
