Version Notes
1.3.4 is now loaded with Iframe functionality

1.3 database table name is now fetched from system.1.2.9 the same as 1.2.7 only because Magento upload did not work correctly.1.2.8 the same as 1.2.7 only because Magento upload did not work correctly.1.2.7Bugfix:FC;r ELV DE, ELV AT und CC wurde die Währung fix als 'EUR' übergeben.



The parameter currency was passed over as fixed value 'EUR' for payment modules 'Direct Debit German', 'Direct Debit Austria' and 'Credir Card'.Allgemeine Bemerkung:Die Cache-Ordner var/cache und var/session müssen wie immer nach Aktualisierungen geleert werden.



Notice: the cache folders var/cache and var/session must be emptied after updates.
Release Info
Developer | Gabriel Dixon |
Extension | Novalnet |
Version | 1.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.3 to 1.3.4
- app/code/community/Mage/Novalnet/Block/Elvaustria/Form.php +15 -0
- app/code/community/Mage/Novalnet/Block/Elvgerman/Form.php +15 -0
- app/code/community/Mage/Novalnet/Block/Invoice/Form.php +15 -0
- app/code/community/Mage/Novalnet/Block/Secure/Info.php +2 -0
- app/code/community/Mage/Novalnet/Model/Novalnet/Source/Callbacktypes.php +1 -1
- app/code/community/Mage/Novalnet/Model/NovalnetElvaustria.php +97 -19
- app/code/community/Mage/Novalnet/Model/NovalnetElvgerman.php +99 -22
- app/code/community/Mage/Novalnet/Model/NovalnetInvoice.php +101 -19
- app/code/community/Mage/Novalnet/Model/NovalnetPciAbstract.php +2 -4
- app/code/community/Mage/Novalnet/controllers/PciController.php +0 -2
- app/code/community/Novalnet/NovalnetPaypal/Block/Form/Novalnetpaypal.php +23 -0
- app/code/community/Novalnet/NovalnetPaypal/Block/Info/Novalnetpaypal.php +70 -0
- app/code/community/Novalnet/NovalnetPaypal/Block/Infobox.php +9 -0
- app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypal.php +31 -0
- app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalerrornotice.php +9 -0
- app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalnotice.php +9 -0
- app/code/community/Novalnet/NovalnetPaypal/Helper/Data.php +5 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Order.php +16 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Quote.php +18 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/NovalnetPaypal/Collection.php +10 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Novalnetpaypal.php +10 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Setup.php +5 -0
- app/code/community/Novalnet/NovalnetPaypal/Model/Novalnetpaypal.php +322 -0
- app/code/community/Novalnet/NovalnetPaypal/controllers/NovalnetpaypalController.php +244 -0
- app/code/community/Novalnet/NovalnetPaypal/etc/config.xml +122 -0
- app/code/community/Novalnet/NovalnetPaypal/etc/system.xml +165 -0
- app/code/community/Novalnet/NovalnetPaypal/sql/novalnetpaypal_setup/mysql4-install-1.0.0.php +16 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung.php +12 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung/Edit.php +44 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung/Edit/Form.php +17 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung/Edit/Tab/Form.php +51 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung/Edit/Tabs.php +23 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Adminhtml/Sofortueberweisung/Grid.php +133 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Form/Sofortueberweisung.php +44 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Info/Sofortueberweisung.php +43 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Infobox.php +9 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Sofortueberweisung.php +33 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Sofortueberweisungerrornotice.php +9 -0
- app/code/community/Novalnet/Sofortueberweisung/Block/Sofortueberweisungnotice.php +9 -0
- app/code/community/Novalnet/Sofortueberweisung/Helper/Data.php +326 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Order.php +25 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Quote.php +26 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Data/Form/Element/Link.php +19 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Setup.php +5 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung.php +10 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung/Collection.php +10 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Params.php +2 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Paycode.php +207 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Sofortueberweisung.php +329 -0
- app/code/community/Novalnet/Sofortueberweisung/Model/Status.php +15 -0
- app/code/community/Novalnet/Sofortueberweisung/controllers/Adminhtml/SofortueberweisungController.php +88 -0
- app/code/community/Novalnet/Sofortueberweisung/controllers/PcsofortueberweisungController.php +154 -0
- app/code/community/Novalnet/Sofortueberweisung/controllers/SofortueberweisungController.php +290 -0
- app/code/community/Novalnet/Sofortueberweisung/etc/config.xml +247 -0
- app/code/community/Novalnet/Sofortueberweisung/etc/system.xml +189 -0
- app/code/community/Novalnet/Sofortueberweisung/sql/sofortueberweisung_setup/mysql4-install-1.0.0.php +10 -0
- app/design/adminhtml/default/default/template/novalnetpaypal/form/novalnetpaypal.phtml +1 -0
- app/design/adminhtml/default/default/template/novalnetpaypal/info/novalnetpaypal.phtml +34 -0
- app/design/adminhtml/default/default/template/novalnetpaypal/info/pdf/novalnetpaypal.phtml +4 -0
- app/design/adminhtml/default/default/template/sofortueberweisung/form/sofortueberweisung.phtml +1 -0
- app/design/adminhtml/default/default/template/sofortueberweisung/info/pdf/paycode.phtml +6 -0
- app/design/adminhtml/default/default/template/sofortueberweisung/info/pdf/sofortueberweisung.phtml +4 -0
- app/design/adminhtml/default/default/template/sofortueberweisung/info/sofortueberweisung.phtml +4 -0
- app/design/frontend/default/default/layout/sofortueberweisung.xml +27 -0
- app/design/frontend/default/default/template/novalnet/cc/pciiframe.phtml +43 -29
- app/design/frontend/default/default/template/novalnet/elvaustria/form.phtml +18 -8
- app/design/frontend/default/default/template/novalnet/elvgerman/form.phtml +13 -3
- app/design/frontend/default/default/template/novalnet/invoice/form.phtml +11 -2
- app/design/frontend/default/default/template/novalnet/pci/pciiframe.phtml +0 -98
- app/design/frontend/default/default/template/novalnet/secure/form.phtml +3 -2
- app/design/frontend/default/default/template/novalnetpaypal/errornotice.phtml +2 -0
- app/design/frontend/default/default/template/novalnetpaypal/form/novalnetpaypal.phtml +44 -0
- app/design/frontend/default/default/template/novalnetpaypal/info/novalnetpaypal.phtml +34 -0
- app/design/frontend/default/default/template/novalnetpaypal/infobox.phtml +7 -0
- app/design/frontend/default/default/template/novalnetpaypal/notice.phtml +2 -0
- app/design/frontend/default/default/template/sofortueberweisung/errornotice.phtml +2 -0
- app/design/frontend/default/default/template/sofortueberweisung/form/sofortueberweisung.phtml +12 -0
- app/design/frontend/default/default/template/sofortueberweisung/info/sofortueberweisung.phtml +16 -0
- app/design/frontend/default/default/template/sofortueberweisung/infobox.phtml +19 -0
- app/design/frontend/default/default/template/sofortueberweisung/notice.phtml +2 -0
- app/etc/modules/Novalnet_NovalnetPaypal.xml +11 -0
- app/etc/modules/Novalnet_Sofortueberweisung.xml +11 -0
- app/locale/de_AT/Novalnet_Sofortueberweisung.csv +46 -0
- app/locale/de_CH/Novalnet_Sofortueberweisung.csv +46 -0
- app/locale/de_DE/Novalnet_NovalnetPaypal.csv +140 -0
- app/locale/de_DE/Novalnet_Sofortueberweisung.csv +51 -0
- app/locale/en_US/Novalnet_NovalnetPaypal.csv +135 -0
- app/locale/en_US/Novalnet_Sofortueberweisung.csv +50 -0
- lib/Varien/Data/Form/Element/Linkpnso.php +117 -0
- package.xml +9 -9
- skin/adminhtml/{default → base}/default/images/novalnet/AE_Logo.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/ELV_Logo.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/MC_Logo.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/NN_Logo.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/NN_Logo_T.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/VI_Logo.png +0 -0
- skin/adminhtml/{default → base}/default/images/novalnet/acdc_info.png +0 -0
- skin/frontend/default/default/images/novalnet/novalnetpaypal/lockbox_150x47.gif +0 -0
- skin/frontend/default/default/images/novalnet/sofortueberweisung/Sofort_Logo_t.jpg +0 -0
@@ -49,6 +49,11 @@ class Mage_Novalnet_Block_Elvaustria_Form extends Mage_Payment_Block_Form
|
|
49 |
return $this->getMethod()->isCallbackTypeCall();
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
public function getCustomersTelephone()
|
53 |
{
|
54 |
$customer = Mage::getSingleton('customer/session')
|
@@ -59,6 +64,16 @@ class Mage_Novalnet_Block_Elvaustria_Form extends Mage_Payment_Block_Form
|
|
59 |
return $customer->getTelephone();
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
public function show_comment()
|
63 |
{
|
64 |
$method = $this->getMethod();
|
49 |
return $this->getMethod()->isCallbackTypeCall();
|
50 |
}
|
51 |
|
52 |
+
public function getCallbackConfigData(){
|
53 |
+
|
54 |
+
return $this->getMethod()->getCallbackConfigData();
|
55 |
+
}
|
56 |
+
|
57 |
public function getCustomersTelephone()
|
58 |
{
|
59 |
$customer = Mage::getSingleton('customer/session')
|
64 |
return $customer->getTelephone();
|
65 |
}
|
66 |
|
67 |
+
public function getCustomersEmail()
|
68 |
+
{
|
69 |
+
$customer = Mage::getSingleton('customer/session')
|
70 |
+
->getCustomer()
|
71 |
+
->getEmail();
|
72 |
+
|
73 |
+
if( $customer )
|
74 |
+
return $customer;
|
75 |
+
}
|
76 |
+
|
77 |
public function show_comment()
|
78 |
{
|
79 |
$method = $this->getMethod();
|
@@ -55,6 +55,11 @@ class Mage_Novalnet_Block_Elvgerman_Form extends Mage_Payment_Block_Form
|
|
55 |
return $this->getMethod()->isCallbackTypeCall();
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
public function getCustomersTelephone()
|
59 |
{
|
60 |
$customer = Mage::getSingleton('customer/session')
|
@@ -65,6 +70,16 @@ class Mage_Novalnet_Block_Elvgerman_Form extends Mage_Payment_Block_Form
|
|
65 |
return $customer->getTelephone();
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
public function show_comment()
|
69 |
{
|
70 |
$method = $this->getMethod();
|
55 |
return $this->getMethod()->isCallbackTypeCall();
|
56 |
}
|
57 |
|
58 |
+
public function getCallbackConfigData(){
|
59 |
+
|
60 |
+
return $this->getMethod()->getCallbackConfigData();
|
61 |
+
}
|
62 |
+
|
63 |
public function getCustomersTelephone()
|
64 |
{
|
65 |
$customer = Mage::getSingleton('customer/session')
|
70 |
return $customer->getTelephone();
|
71 |
}
|
72 |
|
73 |
+
public function getCustomersEmail()
|
74 |
+
{
|
75 |
+
$customer = Mage::getSingleton('customer/session')
|
76 |
+
->getCustomer()
|
77 |
+
->getEmail();
|
78 |
+
|
79 |
+
if( $customer )
|
80 |
+
return $customer;
|
81 |
+
}
|
82 |
+
|
83 |
public function show_comment()
|
84 |
{
|
85 |
$method = $this->getMethod();
|
@@ -71,6 +71,11 @@ class Mage_Novalnet_Block_Invoice_Form extends Mage_Payment_Block_Form
|
|
71 |
return $this->getMethod()->isCallbackTypeCall();
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
74 |
public function getCustomersTelephone()
|
75 |
{
|
76 |
$customer = Mage::getSingleton('customer/session')
|
@@ -81,4 +86,14 @@ class Mage_Novalnet_Block_Invoice_Form extends Mage_Payment_Block_Form
|
|
81 |
return $customer->getTelephone();
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
71 |
return $this->getMethod()->isCallbackTypeCall();
|
72 |
}
|
73 |
|
74 |
+
public function getCallbackConfigData(){
|
75 |
+
|
76 |
+
return $this->getMethod()->getCallbackConfigData();
|
77 |
+
}
|
78 |
+
|
79 |
public function getCustomersTelephone()
|
80 |
{
|
81 |
$customer = Mage::getSingleton('customer/session')
|
86 |
return $customer->getTelephone();
|
87 |
}
|
88 |
|
89 |
+
public function getCustomersEmail()
|
90 |
+
{
|
91 |
+
$customer = Mage::getSingleton('customer/session')
|
92 |
+
->getCustomer()
|
93 |
+
->getEmail();
|
94 |
+
|
95 |
+
if( $customer )
|
96 |
+
return $customer;
|
97 |
+
}
|
98 |
+
|
99 |
}
|
@@ -124,6 +124,8 @@ class Mage_Novalnet_Block_Secure_Info extends Mage_Payment_Block_Info
|
|
124 |
return $this;
|
125 |
}
|
126 |
|
|
|
|
|
127 |
public function getMethod()
|
128 |
{
|
129 |
return $this->getInfo()->getMethodInstance();
|
124 |
return $this;
|
125 |
}
|
126 |
|
127 |
+
|
128 |
+
|
129 |
public function getMethod()
|
130 |
{
|
131 |
return $this->getInfo()->getMethodInstance();
|
@@ -30,6 +30,6 @@ class Mage_Novalnet_Model_Novalnet_Source_Callbacktypes
|
|
30 |
{
|
31 |
public function toOptionArray()
|
32 |
{
|
33 |
-
return array( 0 => "No", 1 => "Callback ( Telefon / Handy )", 2 => 'SMS ( nur Handy )' );
|
34 |
}
|
35 |
}
|
30 |
{
|
31 |
public function toOptionArray()
|
32 |
{
|
33 |
+
return array( 0 => "No", 1 => "Callback ( Telefon / Handy )", 2 => 'SMS ( nur Handy )', 3 => 'Email' );
|
34 |
}
|
35 |
}
|
@@ -41,6 +41,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
41 |
const POST_CALLBACK = 'callback';
|
42 |
const POST_NEWPIN = 'newpin';
|
43 |
const POST_PINSTATUS = 'pinstatus';
|
|
|
44 |
|
45 |
const ISOCODE_FOR_GERMAN = 'DE';
|
46 |
|
@@ -110,11 +111,10 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
110 |
|
111 |
public function capture(Varien_Object $payment, $amount) {
|
112 |
$methodSession = $this->_getMethodSession();
|
113 |
-
if( $this->isCallbackTypeCall()
|
114 |
-
$
|
115 |
-
$
|
116 |
-
$result
|
117 |
-
$result->setTestMode( $methodSession->getNnTestMode() );
|
118 |
}else {
|
119 |
$request = $this->_buildRequest(self::POST_NORMAL);
|
120 |
$result = $this->_postRequest($request, self::POST_NORMAL);
|
@@ -180,7 +180,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
180 |
$billing = $this->_getBillingAddress();
|
181 |
|
182 |
$this->_assignNnAuthData($request, $amount);
|
183 |
-
|
184 |
->setCurrency($this->_getCurrencyCode())
|
185 |
->setfirstName($billing->getFirstname())
|
186 |
->setLastName($billing->getLastname())
|
@@ -210,9 +210,11 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
210 |
if($this->getConfigData('callback') == 1) {
|
211 |
$request->setTel($this->getInfoInstance()->getNnCallbackTel());
|
212 |
$request->setPinByCallback(1);
|
213 |
-
}else {
|
214 |
$request->setMobile($this->getInfoInstance()->getNnCallbackTel());
|
215 |
$request->setPinBySms(1);
|
|
|
|
|
216 |
}
|
217 |
}
|
218 |
$request->toLatin1();
|
@@ -236,6 +238,15 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
236 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
237 |
$request .= '</info_request></nnxml>';
|
238 |
return $request;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
}
|
241 |
|
@@ -267,7 +278,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
267 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
268 |
}
|
269 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
270 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
271 |
$client->setUri( self::XML_URL );
|
272 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
273 |
}else {
|
@@ -277,7 +288,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
277 |
if (!$response->isSuccessful()) {
|
278 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
279 |
}
|
280 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
281 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
282 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
283 |
}else {
|
@@ -286,6 +297,19 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
286 |
}
|
287 |
return $result;
|
288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
291 |
$array = array();
|
@@ -315,6 +339,10 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
315 |
;
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
318 |
public function assignData($data)
|
319 |
{
|
320 |
if (!($data instanceof Varien_Object)) {
|
@@ -328,9 +356,10 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
328 |
->setNnCallbackPin($data->getCallbackPinAt())
|
329 |
->setNnNewCallbackPin($data->getNewCallbackPinAt())
|
330 |
->setNnCallbackTel($data->getCallbackTelAt())
|
|
|
331 |
;
|
332 |
|
333 |
-
if( $this->isCallbackTypeCall() ) {
|
334 |
$infoInstance->setCallbackPinValidationFlag( true );
|
335 |
}
|
336 |
return $this;
|
@@ -363,7 +392,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
363 |
}
|
364 |
}
|
365 |
// Call for pin generation
|
366 |
-
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() ) {
|
367 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
368 |
if($infoInstance->getNnNewCallbackPin()) {
|
369 |
$this->_regenerateCallbackPin();
|
@@ -374,8 +403,13 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
374 |
}else {
|
375 |
$this->_generateCallbackPin();
|
376 |
}
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
|
|
|
379 |
return $this;
|
380 |
}
|
381 |
|
@@ -412,9 +446,29 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
412 |
->setNnTestMode($response->getTestMode())
|
413 |
->setNnCallbackTidTimeStamp(time())
|
414 |
->setOrderAmount($request->getAmount())
|
|
|
415 |
;
|
416 |
$this->getInfoInstance()->save();
|
417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
}else {
|
419 |
$text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
|
420 |
}
|
@@ -457,18 +511,45 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
457 |
if($methodSession->hasNnCallbackTid()) {
|
458 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
459 |
$this->_unsetMethodSession();
|
460 |
-
if (
|
461 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
462 |
}
|
463 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
464 |
$this->_unsetMethodSession();
|
465 |
-
if (
|
466 |
-
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please
|
467 |
}
|
468 |
}
|
469 |
}
|
470 |
}
|
471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
private function _getMethodSession() {
|
473 |
$checkoutSession = $this->_getCheckoutSession();
|
474 |
if( !$checkoutSession->hasData( $this->getCode() ) ) {
|
@@ -514,10 +595,7 @@ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_A
|
|
514 |
if ($this->_isPlaceOrder()) {
|
515 |
return $info->getOrder()->getIncrementId();
|
516 |
} else {
|
517 |
-
|
518 |
-
$info->getQuote()->reserveOrderId();
|
519 |
-
}
|
520 |
-
return $info->getQuote()->getReservedOrderId();
|
521 |
}
|
522 |
}
|
523 |
|
41 |
const POST_CALLBACK = 'callback';
|
42 |
const POST_NEWPIN = 'newpin';
|
43 |
const POST_PINSTATUS = 'pinstatus';
|
44 |
+
const POST_EMAILSTATUS = 'emailstatus';
|
45 |
|
46 |
const ISOCODE_FOR_GERMAN = 'DE';
|
47 |
|
111 |
|
112 |
public function capture(Varien_Object $payment, $amount) {
|
113 |
$methodSession = $this->_getMethodSession();
|
114 |
+
if( $this->isCallbackTypeCall()) {
|
115 |
+
$buildrequest = $this->_buildPostBackRequest();
|
116 |
+
$postrequest = $this->_postRequest($buildrequest, self::POST_NORMAL);
|
117 |
+
$result = $methodSession->getNnResponseData();
|
|
|
118 |
}else {
|
119 |
$request = $this->_buildRequest(self::POST_NORMAL);
|
120 |
$result = $this->_postRequest($request, self::POST_NORMAL);
|
180 |
$billing = $this->_getBillingAddress();
|
181 |
|
182 |
$this->_assignNnAuthData($request, $amount);
|
183 |
+
$request->setAmount($amount)
|
184 |
->setCurrency($this->_getCurrencyCode())
|
185 |
->setfirstName($billing->getFirstname())
|
186 |
->setLastName($billing->getLastname())
|
210 |
if($this->getConfigData('callback') == 1) {
|
211 |
$request->setTel($this->getInfoInstance()->getNnCallbackTel());
|
212 |
$request->setPinByCallback(1);
|
213 |
+
}else if($this->getConfigData('callback') == 2) {
|
214 |
$request->setMobile($this->getInfoInstance()->getNnCallbackTel());
|
215 |
$request->setPinBySms(1);
|
216 |
+
}else if($this->getConfigData('callback') == 3){
|
217 |
+
$request->setReplyEmailCheck(1);
|
218 |
}
|
219 |
}
|
220 |
$request->toLatin1();
|
238 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
239 |
$request .= '</info_request></nnxml>';
|
240 |
return $request;
|
241 |
+
}else if($type == self::POST_EMAILSTATUS) {
|
242 |
+
$request = '<?xml version="1.0" encoding="UTF-8"?>';
|
243 |
+
$request .= '<nnxml><info_request>';
|
244 |
+
$request .= '<vendor_id>' . $this->getConfigData( 'merchant_id' ) . '</vendor_id>';
|
245 |
+
$request .= '<vendor_authcode>' . $this->getConfigData( 'auth_code' ) . '</vendor_authcode>';
|
246 |
+
$request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
|
247 |
+
$request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
|
248 |
+
$request .= '</info_request></nnxml>';
|
249 |
+
return $request;
|
250 |
}
|
251 |
}
|
252 |
|
278 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
279 |
}
|
280 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
281 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
282 |
$client->setUri( self::XML_URL );
|
283 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
284 |
}else {
|
288 |
if (!$response->isSuccessful()) {
|
289 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
290 |
}
|
291 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
292 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
293 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
294 |
}else {
|
297 |
}
|
298 |
return $result;
|
299 |
}
|
300 |
+
|
301 |
+
|
302 |
+
protected function _buildPostBackRequest()
|
303 |
+
{
|
304 |
+
$methodSession = $this->_getMethodSession();
|
305 |
+
$request = Mage::getModel('novalnet/novalnet_request');
|
306 |
+
$amount = round($this->_getAmount(), 2) * 100;
|
307 |
+
$this->_assignNnAuthData($request, $amount);
|
308 |
+
$request->setTid($methodSession->getNnResponseData()->getTid())
|
309 |
+
->setOrderNo($this->_getOrderId())
|
310 |
+
->setStatus(100);
|
311 |
+
return $request;
|
312 |
+
}
|
313 |
|
314 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
315 |
$array = array();
|
339 |
;
|
340 |
}
|
341 |
|
342 |
+
public function getCallbackConfigData(){
|
343 |
+
return $this->getConfigData('callback') ;
|
344 |
+
}
|
345 |
+
|
346 |
public function assignData($data)
|
347 |
{
|
348 |
if (!($data instanceof Varien_Object)) {
|
356 |
->setNnCallbackPin($data->getCallbackPinAt())
|
357 |
->setNnNewCallbackPin($data->getNewCallbackPinAt())
|
358 |
->setNnCallbackTel($data->getCallbackTelAt())
|
359 |
+
->setNnCallbackEmail($data->getCallbackEmailAt())
|
360 |
;
|
361 |
|
362 |
+
if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
|
363 |
$infoInstance->setCallbackPinValidationFlag( true );
|
364 |
}
|
365 |
return $this;
|
392 |
}
|
393 |
}
|
394 |
// Call for pin generation
|
395 |
+
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
|
396 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
397 |
if($infoInstance->getNnNewCallbackPin()) {
|
398 |
$this->_regenerateCallbackPin();
|
403 |
}else {
|
404 |
$this->_generateCallbackPin();
|
405 |
}
|
406 |
+
}else if($this->getCallbackConfigData()==3){
|
407 |
+
if(!$this->_getMethodSession()->getNnCallbackTid()) {
|
408 |
+
$this->_generateCallbackEmail();
|
409 |
+
}
|
410 |
}
|
411 |
|
412 |
+
$this->_validateCallbackProcess();
|
413 |
return $this;
|
414 |
}
|
415 |
|
446 |
->setNnTestMode($response->getTestMode())
|
447 |
->setNnCallbackTidTimeStamp(time())
|
448 |
->setOrderAmount($request->getAmount())
|
449 |
+
->setNnCallbackSuccessState(true)
|
450 |
;
|
451 |
$this->getInfoInstance()->save();
|
452 |
+
$text = Mage::helper('novalnet')->__('Sie werden in kürze angerufen! Bitte geben Sie den erhaltenen PIN-Code in das Textfeld ein.');
|
453 |
+
}else {
|
454 |
+
$text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
|
455 |
+
}
|
456 |
+
Mage::throwException($text);
|
457 |
+
}
|
458 |
+
|
459 |
+
private function _generateCallbackEmail() {
|
460 |
+
$request = $this->_buildRequest(self::POST_CALLBACK);
|
461 |
+
$response = $this->_postRequest($request, self::POST_CALLBACK);
|
462 |
+
if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
|
463 |
+
$this->_getMethodSession()
|
464 |
+
->setNnCallbackTid($response->getTid())
|
465 |
+
->setNnTestMode($response->getTestMode())
|
466 |
+
->setNnCallbackTidTimeStamp(time())
|
467 |
+
->setOrderAmount($request->getAmount())
|
468 |
+
->setNnCallbackSuccessState(true)
|
469 |
+
;
|
470 |
+
$this->getInfoInstance()->save();
|
471 |
+
$text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
|
472 |
}else {
|
473 |
$text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
|
474 |
}
|
511 |
if($methodSession->hasNnCallbackTid()) {
|
512 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
513 |
$this->_unsetMethodSession();
|
514 |
+
if (!$this->_isPlaceOrder()) {
|
515 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
516 |
}
|
517 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
518 |
$this->_unsetMethodSession();
|
519 |
+
if (!$this->_isPlaceOrder()) {
|
520 |
+
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
|
521 |
}
|
522 |
}
|
523 |
}
|
524 |
}
|
525 |
|
526 |
+
private function _validateCallbackProcess() {
|
527 |
+
$methodSession = $this->_getMethodSession();
|
528 |
+
if($methodSession->getNnCallbackSuccessState()){
|
529 |
+
if($this->getCallbackConfigData()==3) {
|
530 |
+
$type=self::POST_EMAILSTATUS;
|
531 |
+
}elseif($this->getCallbackConfigData()!=3){
|
532 |
+
$type=self::POST_PINSTATUS;
|
533 |
+
}
|
534 |
+
$request = $this->_buildRequest($type);
|
535 |
+
$result = $this->_postRequest($request, $type);
|
536 |
+
$result->setTid( $methodSession->getNnCallbackTid() );
|
537 |
+
$result->setTestMode( $methodSession->getNnTestMode() );
|
538 |
+
|
539 |
+
// Analyze the response from Novalnet
|
540 |
+
if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
|
541 |
+
$methodSession->setNnResponseData($result);
|
542 |
+
$methodSession->setNnCallbackSuccessState(false);
|
543 |
+
} else {
|
544 |
+
$error = ($result->getStatusDesc()||$result->getStatusMessage())
|
545 |
+
? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
|
546 |
+
: Mage::helper('novalnet')->__('Error in capturing the payment')
|
547 |
+
;
|
548 |
+
Mage::throwException($error);
|
549 |
+
}
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
private function _getMethodSession() {
|
554 |
$checkoutSession = $this->_getCheckoutSession();
|
555 |
if( !$checkoutSession->hasData( $this->getCode() ) ) {
|
595 |
if ($this->_isPlaceOrder()) {
|
596 |
return $info->getOrder()->getIncrementId();
|
597 |
} else {
|
598 |
+
return true;
|
|
|
|
|
|
|
599 |
}
|
600 |
}
|
601 |
|
@@ -41,7 +41,8 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
41 |
const POST_CALLBACK = 'callback';
|
42 |
const POST_NEWPIN = 'newpin';
|
43 |
const POST_PINSTATUS = 'pinstatus';
|
44 |
-
|
|
|
45 |
const ISOCODE_FOR_GERMAN = 'DE';
|
46 |
|
47 |
private $_nnPaymentId = '2';
|
@@ -110,11 +111,10 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
110 |
|
111 |
public function capture(Varien_Object $payment, $amount) {
|
112 |
$methodSession = $this->_getMethodSession();
|
113 |
-
if( $this->isCallbackTypeCall()
|
114 |
-
$
|
115 |
-
$
|
116 |
-
$result
|
117 |
-
$result->setTestMode( $methodSession->getNnTestMode() );
|
118 |
}else {
|
119 |
$request = $this->_buildRequest(self::POST_NORMAL);
|
120 |
$result = $this->_postRequest($request, self::POST_NORMAL);
|
@@ -199,8 +199,8 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
199 |
->setBankCode($this->_getNnBankSortingCode())
|
200 |
->setAcdc($this->getConfigData('acdc_check'))
|
201 |
->setOrderNo($this->_getOrderId())
|
202 |
-
|
203 |
-
|
204 |
;
|
205 |
|
206 |
$infoInstance = $this->getInfoInstance();
|
@@ -211,9 +211,11 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
211 |
if($this->getConfigData('callback') == 1) {
|
212 |
$request->setTel($this->getInfoInstance()->getNnCallbackTel());
|
213 |
$request->setPinByCallback(1);
|
214 |
-
}else {
|
215 |
$request->setMobile($this->getInfoInstance()->getNnCallbackTel());
|
216 |
$request->setPinBySms(1);
|
|
|
|
|
217 |
}
|
218 |
}
|
219 |
$request->toLatin1();
|
@@ -237,6 +239,15 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
237 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
238 |
$request .= '</info_request></nnxml>';
|
239 |
return $request;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
}
|
242 |
|
@@ -268,7 +279,7 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
268 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
269 |
}
|
270 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
271 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
272 |
$client->setUri( self::XML_URL );
|
273 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
274 |
}else {
|
@@ -278,7 +289,7 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
278 |
if (!$response->isSuccessful()) {
|
279 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
280 |
}
|
281 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
282 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
283 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
284 |
}else {
|
@@ -288,6 +299,18 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
288 |
return $result;
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
292 |
$array = array();
|
293 |
if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
|
@@ -316,6 +339,10 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
316 |
;
|
317 |
}
|
318 |
|
|
|
|
|
|
|
|
|
319 |
public function assignData($data)
|
320 |
{
|
321 |
if (!($data instanceof Varien_Object)) {
|
@@ -330,11 +357,12 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
330 |
->setNnCallbackPin($data->getCallbackPin())
|
331 |
->setNnNewCallbackPin($data->getNewCallbackPin())
|
332 |
->setNnCallbackTel($data->getCallbackTel())
|
|
|
333 |
;
|
334 |
if( $this->getConfigData('acdc_check') ) {
|
335 |
$infoInstance->setAcdcValidationFlag( true );
|
336 |
}
|
337 |
-
if( $this->isCallbackTypeCall() ) {
|
338 |
$infoInstance->setCallbackPinValidationFlag( true );
|
339 |
}
|
340 |
return $this;
|
@@ -343,7 +371,6 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
343 |
public function validate() {
|
344 |
parent::validate();
|
345 |
$this->_validateCallbackSession();
|
346 |
-
|
347 |
$infoInstance = $this->getInfoInstance();
|
348 |
$nnAccountNumber = preg_replace('/[\-\s]+/', '', $infoInstance->getNnAccountNumber());
|
349 |
$nnBankSortingCode = preg_replace('/[\-\s]+/', '', $infoInstance->getNnBankSortingCode());
|
@@ -369,7 +396,7 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
369 |
}
|
370 |
}
|
371 |
// Call for pin generation
|
372 |
-
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() ) {
|
373 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
374 |
if($infoInstance->getNnNewCallbackPin()) {
|
375 |
$this->_regenerateCallbackPin();
|
@@ -380,8 +407,13 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
380 |
}else {
|
381 |
$this->_generateCallbackPin();
|
382 |
}
|
|
|
|
|
|
|
|
|
383 |
}
|
384 |
|
|
|
385 |
return $this;
|
386 |
}
|
387 |
|
@@ -418,6 +450,7 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
418 |
->setNnTestMode($response->getTestMode())
|
419 |
->setNnCallbackTidTimeStamp(time())
|
420 |
->setOrderAmount($request->getAmount())
|
|
|
421 |
;
|
422 |
$this->getInfoInstance()->save();
|
423 |
$text = Mage::helper('novalnet')->__('Sie werden in kürze angerufen! Bitte geben Sie den erhaltenen PIN-Code in das Textfeld ein.');
|
@@ -426,6 +459,25 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
426 |
}
|
427 |
Mage::throwException($text);
|
428 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
|
430 |
private function _regenerateCallbackPin() {
|
431 |
$request = $this->_buildRequest(self::POST_NEWPIN);
|
@@ -459,21 +511,49 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
459 |
}
|
460 |
|
461 |
private function _validateCallbackSession() {
|
|
|
462 |
$methodSession = $this->_getMethodSession();
|
463 |
if($methodSession->hasNnCallbackTid()) {
|
464 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
465 |
$this->_unsetMethodSession();
|
466 |
-
if (
|
467 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
468 |
}
|
469 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
470 |
$this->_unsetMethodSession();
|
471 |
-
if (
|
472 |
-
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please
|
473 |
}
|
474 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
}
|
476 |
-
}
|
477 |
|
478 |
private function _getMethodSession() {
|
479 |
$checkoutSession = $this->_getCheckoutSession();
|
@@ -529,10 +609,7 @@ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Ab
|
|
529 |
if ($this->_isPlaceOrder()) {
|
530 |
return $info->getOrder()->getIncrementId();
|
531 |
} else {
|
532 |
-
|
533 |
-
$info->getQuote()->reserveOrderId();
|
534 |
-
}
|
535 |
-
return $info->getQuote()->getReservedOrderId();
|
536 |
}
|
537 |
}
|
538 |
|
41 |
const POST_CALLBACK = 'callback';
|
42 |
const POST_NEWPIN = 'newpin';
|
43 |
const POST_PINSTATUS = 'pinstatus';
|
44 |
+
const POST_EMAILSTATUS = 'emailstatus';
|
45 |
+
|
46 |
const ISOCODE_FOR_GERMAN = 'DE';
|
47 |
|
48 |
private $_nnPaymentId = '2';
|
111 |
|
112 |
public function capture(Varien_Object $payment, $amount) {
|
113 |
$methodSession = $this->_getMethodSession();
|
114 |
+
if( $this->isCallbackTypeCall()) {
|
115 |
+
$buildrequest = $this->_buildPostBackRequest();
|
116 |
+
$postrequest = $this->_postRequest($buildrequest, self::POST_NORMAL);
|
117 |
+
$result = $methodSession->getNnResponseData();
|
|
|
118 |
}else {
|
119 |
$request = $this->_buildRequest(self::POST_NORMAL);
|
120 |
$result = $this->_postRequest($request, self::POST_NORMAL);
|
199 |
->setBankCode($this->_getNnBankSortingCode())
|
200 |
->setAcdc($this->getConfigData('acdc_check'))
|
201 |
->setOrderNo($this->_getOrderId())
|
202 |
+
->setInput1('order_id')
|
203 |
+
->setInputval1($this->_getOrderId())
|
204 |
;
|
205 |
|
206 |
$infoInstance = $this->getInfoInstance();
|
211 |
if($this->getConfigData('callback') == 1) {
|
212 |
$request->setTel($this->getInfoInstance()->getNnCallbackTel());
|
213 |
$request->setPinByCallback(1);
|
214 |
+
}else if($this->getConfigData('callback') == 2) {
|
215 |
$request->setMobile($this->getInfoInstance()->getNnCallbackTel());
|
216 |
$request->setPinBySms(1);
|
217 |
+
}else if($this->getConfigData('callback') == 3){
|
218 |
+
$request->setReplyEmailCheck(1);
|
219 |
}
|
220 |
}
|
221 |
$request->toLatin1();
|
239 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
240 |
$request .= '</info_request></nnxml>';
|
241 |
return $request;
|
242 |
+
}else if($type == self::POST_EMAILSTATUS) {
|
243 |
+
$request = '<?xml version="1.0" encoding="UTF-8"?>';
|
244 |
+
$request .= '<nnxml><info_request>';
|
245 |
+
$request .= '<vendor_id>' . $this->getConfigData( 'merchant_id' ) . '</vendor_id>';
|
246 |
+
$request .= '<vendor_authcode>' . $this->getConfigData( 'auth_code' ) . '</vendor_authcode>';
|
247 |
+
$request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
|
248 |
+
$request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
|
249 |
+
$request .= '</info_request></nnxml>';
|
250 |
+
return $request;
|
251 |
}
|
252 |
}
|
253 |
|
279 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
280 |
}
|
281 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
282 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
283 |
$client->setUri( self::XML_URL );
|
284 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
285 |
}else {
|
289 |
if (!$response->isSuccessful()) {
|
290 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
291 |
}
|
292 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
293 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
294 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
295 |
}else {
|
299 |
return $result;
|
300 |
}
|
301 |
|
302 |
+
protected function _buildPostBackRequest()
|
303 |
+
{
|
304 |
+
$methodSession = $this->_getMethodSession();
|
305 |
+
$request = Mage::getModel('novalnet/novalnet_request');
|
306 |
+
$amount = round($this->_getAmount(), 2) * 100;
|
307 |
+
$this->_assignNnAuthData($request, $amount);
|
308 |
+
$request->setTid($methodSession->getNnResponseData()->getTid())
|
309 |
+
->setOrderNo($this->_getOrderId())
|
310 |
+
->setStatus(100);
|
311 |
+
return $request;
|
312 |
+
}
|
313 |
+
|
314 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
315 |
$array = array();
|
316 |
if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
|
339 |
;
|
340 |
}
|
341 |
|
342 |
+
public function getCallbackConfigData(){
|
343 |
+
return $this->getConfigData('callback') ;
|
344 |
+
}
|
345 |
+
|
346 |
public function assignData($data)
|
347 |
{
|
348 |
if (!($data instanceof Varien_Object)) {
|
357 |
->setNnCallbackPin($data->getCallbackPin())
|
358 |
->setNnNewCallbackPin($data->getNewCallbackPin())
|
359 |
->setNnCallbackTel($data->getCallbackTel())
|
360 |
+
->setNnCallbackEmailDE($data->getCallbackEmail())
|
361 |
;
|
362 |
if( $this->getConfigData('acdc_check') ) {
|
363 |
$infoInstance->setAcdcValidationFlag( true );
|
364 |
}
|
365 |
+
if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
|
366 |
$infoInstance->setCallbackPinValidationFlag( true );
|
367 |
}
|
368 |
return $this;
|
371 |
public function validate() {
|
372 |
parent::validate();
|
373 |
$this->_validateCallbackSession();
|
|
|
374 |
$infoInstance = $this->getInfoInstance();
|
375 |
$nnAccountNumber = preg_replace('/[\-\s]+/', '', $infoInstance->getNnAccountNumber());
|
376 |
$nnBankSortingCode = preg_replace('/[\-\s]+/', '', $infoInstance->getNnBankSortingCode());
|
396 |
}
|
397 |
}
|
398 |
// Call for pin generation
|
399 |
+
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
|
400 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
401 |
if($infoInstance->getNnNewCallbackPin()) {
|
402 |
$this->_regenerateCallbackPin();
|
407 |
}else {
|
408 |
$this->_generateCallbackPin();
|
409 |
}
|
410 |
+
}else if($this->getCallbackConfigData()==3){
|
411 |
+
if(!$this->_getMethodSession()->getNnCallbackTid()) {
|
412 |
+
$this->_generateCallbackEmail();
|
413 |
+
}
|
414 |
}
|
415 |
|
416 |
+
$this->_validateCallbackProcess();
|
417 |
return $this;
|
418 |
}
|
419 |
|
450 |
->setNnTestMode($response->getTestMode())
|
451 |
->setNnCallbackTidTimeStamp(time())
|
452 |
->setOrderAmount($request->getAmount())
|
453 |
+
->setNnCallbackSuccessState(true)
|
454 |
;
|
455 |
$this->getInfoInstance()->save();
|
456 |
$text = Mage::helper('novalnet')->__('Sie werden in kürze angerufen! Bitte geben Sie den erhaltenen PIN-Code in das Textfeld ein.');
|
459 |
}
|
460 |
Mage::throwException($text);
|
461 |
}
|
462 |
+
|
463 |
+
private function _generateCallbackEmail() {
|
464 |
+
$request = $this->_buildRequest(self::POST_CALLBACK);
|
465 |
+
$response = $this->_postRequest($request, self::POST_CALLBACK);
|
466 |
+
if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
|
467 |
+
$this->_getMethodSession()
|
468 |
+
->setNnCallbackTid($response->getTid())
|
469 |
+
->setNnTestMode($response->getTestMode())
|
470 |
+
->setNnCallbackTidTimeStamp(time())
|
471 |
+
->setOrderAmount($request->getAmount())
|
472 |
+
->setNnCallbackSuccessState(true)
|
473 |
+
;
|
474 |
+
$this->getInfoInstance()->save();
|
475 |
+
$text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
|
476 |
+
}else {
|
477 |
+
$text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
|
478 |
+
}
|
479 |
+
Mage::throwException($text);
|
480 |
+
}
|
481 |
|
482 |
private function _regenerateCallbackPin() {
|
483 |
$request = $this->_buildRequest(self::POST_NEWPIN);
|
511 |
}
|
512 |
|
513 |
private function _validateCallbackSession() {
|
514 |
+
|
515 |
$methodSession = $this->_getMethodSession();
|
516 |
if($methodSession->hasNnCallbackTid()) {
|
517 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
518 |
$this->_unsetMethodSession();
|
519 |
+
if (!$this->_isPlaceOrder()) {
|
520 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
521 |
}
|
522 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
523 |
$this->_unsetMethodSession();
|
524 |
+
if (!$this->_isPlaceOrder()) {
|
525 |
+
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
|
526 |
}
|
527 |
}
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
private function _validateCallbackProcess() {
|
532 |
+
$methodSession = $this->_getMethodSession();
|
533 |
+
if($methodSession->getNnCallbackSuccessState()){
|
534 |
+
if($this->getCallbackConfigData()==3) {
|
535 |
+
$type=self::POST_EMAILSTATUS;
|
536 |
+
}elseif($this->getCallbackConfigData()!=3){
|
537 |
+
$type=self::POST_PINSTATUS;
|
538 |
+
}
|
539 |
+
$request = $this->_buildRequest($type);
|
540 |
+
$result = $this->_postRequest($request, $type);
|
541 |
+
$result->setTid( $methodSession->getNnCallbackTid() );
|
542 |
+
$result->setTestMode( $methodSession->getNnTestMode() );
|
543 |
+
|
544 |
+
// Analyze the response from Novalnet
|
545 |
+
if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
|
546 |
+
$methodSession->setNnResponseData($result);
|
547 |
+
$methodSession->setNnCallbackSuccessState(false);
|
548 |
+
} else {
|
549 |
+
$error = ($result->getStatusDesc()||$result->getStatusMessage())
|
550 |
+
? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
|
551 |
+
: Mage::helper('novalnet')->__('Error in capturing the payment')
|
552 |
+
;
|
553 |
+
Mage::throwException($error);
|
554 |
+
}
|
555 |
+
}
|
556 |
}
|
|
|
557 |
|
558 |
private function _getMethodSession() {
|
559 |
$checkoutSession = $this->_getCheckoutSession();
|
609 |
if ($this->_isPlaceOrder()) {
|
610 |
return $info->getOrder()->getIncrementId();
|
611 |
} else {
|
612 |
+
return true;
|
|
|
|
|
|
|
613 |
}
|
614 |
}
|
615 |
|
@@ -40,6 +40,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
40 |
const POST_CALLBACK = 'callback';
|
41 |
const POST_NEWPIN = 'newpin';
|
42 |
const POST_PINSTATUS = 'pinstatus';
|
|
|
43 |
|
44 |
const ISOCODE_FOR_GERMAN = 'DE';
|
45 |
|
@@ -113,8 +114,9 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
113 |
{
|
114 |
$methodSession = $this->_getMethodSession();
|
115 |
if( $this->isCallbackTypeCall() ) {
|
116 |
-
$
|
117 |
-
$
|
|
|
118 |
|
119 |
$result->setTid( $methodSession->getNnCallbackTid() )
|
120 |
->setTestMode( $methodSession->getNnTestMode() )
|
@@ -213,20 +215,24 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
213 |
->setGender('u')
|
214 |
->setEmail($this->_getCustomerEmail())
|
215 |
->setOrderNo($this->_getOrderId())
|
216 |
-
|
217 |
-
|
218 |
-
->setInputval1($this->_getOrderId())
|
219 |
->setInvoiceType(self::PAYMENT_METHOD)
|
220 |
->setDueDate($dueDate)
|
221 |
;
|
|
|
222 |
if( $type == self::POST_CALLBACK ) {
|
223 |
if($this->getConfigData('callback') == 1) {
|
224 |
-
$request->setTel($
|
225 |
$request->setPinByCallback(1);
|
226 |
-
}else {
|
227 |
-
$request->setMobile($
|
228 |
$request->setPinBySms(1);
|
|
|
|
|
229 |
}
|
|
|
|
|
230 |
}
|
231 |
$request->toLatin1();
|
232 |
return $request;
|
@@ -249,6 +255,15 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
249 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
250 |
$request .= '</info_request></nnxml>';
|
251 |
return $request;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
}
|
253 |
}
|
254 |
|
@@ -280,7 +295,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
280 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
281 |
}
|
282 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
283 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
284 |
$client->setUri( self::XML_URL );
|
285 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
286 |
}else {
|
@@ -290,7 +305,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
290 |
if (!$response->isSuccessful()) {
|
291 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
292 |
}
|
293 |
-
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS ) {
|
294 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
295 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
296 |
}else {
|
@@ -300,6 +315,19 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
300 |
return $result;
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
304 |
$array = array();
|
305 |
if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
|
@@ -328,6 +356,10 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
328 |
;
|
329 |
}
|
330 |
|
|
|
|
|
|
|
|
|
331 |
public function assignData($data)
|
332 |
{
|
333 |
if (!($data instanceof Varien_Object)) {
|
@@ -338,7 +370,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
338 |
->setNnNewCallbackPin($data->getNewCallbackPin())
|
339 |
->setNnCallbackTel($data->getCallbackTel())
|
340 |
;
|
341 |
-
if( $this->isCallbackTypeCall() ) {
|
342 |
$infoInstance->setCallbackPinValidationFlag( true );
|
343 |
}
|
344 |
return $this;
|
@@ -357,7 +389,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
357 |
}
|
358 |
}
|
359 |
// Call for pin generation
|
360 |
-
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() ) {
|
361 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
362 |
if($infoInstance->getNnNewCallbackPin()) {
|
363 |
$this->_regenerateCallbackPin();
|
@@ -368,8 +400,13 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
368 |
}else {
|
369 |
$this->_generateCallbackPin();
|
370 |
}
|
|
|
|
|
|
|
|
|
371 |
}
|
372 |
|
|
|
373 |
return $this;
|
374 |
}
|
375 |
|
@@ -396,6 +433,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
396 |
->setNnCallbackTidTimeStamp(time())
|
397 |
->setNote($this->_getNote($response))
|
398 |
->setOrderAmount($request->getAmount())
|
|
|
399 |
;
|
400 |
$this->getInfoInstance()->save();
|
401 |
$text = Mage::helper('novalnet')->__('Sie werden in kürze angerufen! Bitte geben Sie den erhaltenen PIN-Code in das Textfeld ein.');
|
@@ -404,6 +442,26 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
404 |
}
|
405 |
Mage::throwException($text);
|
406 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
|
408 |
private function _regenerateCallbackPin() {
|
409 |
$request = $this->_buildRequest(self::POST_NEWPIN);
|
@@ -437,17 +495,44 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
437 |
if($methodSession->hasNnCallbackTid()) {
|
438 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
439 |
$this->_unsetMethodSession();
|
440 |
-
if (
|
441 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
442 |
}
|
443 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
444 |
$this->_unsetMethodSession();
|
445 |
-
if (
|
446 |
-
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please
|
447 |
}
|
448 |
}
|
449 |
}
|
450 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
|
452 |
private function _getCheckoutSession() {
|
453 |
return Mage::getSingleton('checkout/session');
|
@@ -493,10 +578,7 @@ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abst
|
|
493 |
if ($this->_isPlaceOrder()) {
|
494 |
return $info->getOrder()->getIncrementId();
|
495 |
} else {
|
496 |
-
|
497 |
-
$info->getQuote()->reserveOrderId();
|
498 |
-
}
|
499 |
-
return $info->getQuote()->getReservedOrderId();
|
500 |
}
|
501 |
}
|
502 |
|
40 |
const POST_CALLBACK = 'callback';
|
41 |
const POST_NEWPIN = 'newpin';
|
42 |
const POST_PINSTATUS = 'pinstatus';
|
43 |
+
const POST_EMAILSTATUS = 'emailstatus';
|
44 |
|
45 |
const ISOCODE_FOR_GERMAN = 'DE';
|
46 |
|
114 |
{
|
115 |
$methodSession = $this->_getMethodSession();
|
116 |
if( $this->isCallbackTypeCall() ) {
|
117 |
+
$buildrequest = $this->_buildPostBackRequest();
|
118 |
+
$postrequest = $this->_postRequest($buildrequest, self::POST_NORMAL);
|
119 |
+
$result = $methodSession->getNnResponseData();
|
120 |
|
121 |
$result->setTid( $methodSession->getNnCallbackTid() )
|
122 |
->setTestMode( $methodSession->getNnTestMode() )
|
215 |
->setGender('u')
|
216 |
->setEmail($this->_getCustomerEmail())
|
217 |
->setOrderNo($this->_getOrderId())
|
218 |
+
->setInput1('order_id')
|
219 |
+
->setInputval1($this->_getOrderId())
|
|
|
220 |
->setInvoiceType(self::PAYMENT_METHOD)
|
221 |
->setDueDate($dueDate)
|
222 |
;
|
223 |
+
|
224 |
if( $type == self::POST_CALLBACK ) {
|
225 |
if($this->getConfigData('callback') == 1) {
|
226 |
+
$request->setTel($billing->getTelephone());
|
227 |
$request->setPinByCallback(1);
|
228 |
+
}else if($this->getConfigData('callback') == 2) {
|
229 |
+
$request->setMobile($billing->getTelephone());
|
230 |
$request->setPinBySms(1);
|
231 |
+
}else if($this->getConfigData('callback') == 3){
|
232 |
+
$request->setReplyEmailCheck(1);
|
233 |
}
|
234 |
+
}else{
|
235 |
+
$request->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $this->_getOrderId());
|
236 |
}
|
237 |
$request->toLatin1();
|
238 |
return $request;
|
255 |
$request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
|
256 |
$request .= '</info_request></nnxml>';
|
257 |
return $request;
|
258 |
+
}else if($type == self::POST_EMAILSTATUS) {
|
259 |
+
$request = '<?xml version="1.0" encoding="UTF-8"?>';
|
260 |
+
$request .= '<nnxml><info_request>';
|
261 |
+
$request .= '<vendor_id>' . $this->getConfigData( 'merchant_id' ) . '</vendor_id>';
|
262 |
+
$request .= '<vendor_authcode>' . $this->getConfigData( 'auth_code' ) . '</vendor_authcode>';
|
263 |
+
$request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
|
264 |
+
$request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
|
265 |
+
$request .= '</info_request></nnxml>';
|
266 |
+
return $request;
|
267 |
}
|
268 |
}
|
269 |
|
295 |
$httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
|
296 |
}
|
297 |
$client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
|
298 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
299 |
$client->setUri( self::XML_URL );
|
300 |
$client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
|
301 |
}else {
|
305 |
if (!$response->isSuccessful()) {
|
306 |
Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
|
307 |
}
|
308 |
+
if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
|
309 |
$result = new Varien_Simplexml_Element( $response->getRawBody() );
|
310 |
$result = new Varien_Object( $this->_xmlToArray( $result ) );
|
311 |
}else {
|
315 |
return $result;
|
316 |
}
|
317 |
|
318 |
+
protected function _buildPostBackRequest()
|
319 |
+
{
|
320 |
+
$methodSession = $this->_getMethodSession();
|
321 |
+
$request = Mage::getModel('novalnet/novalnet_request');
|
322 |
+
$amount = round($this->_getAmount(), 2) * 100;
|
323 |
+
$this->_assignNnAuthData($request, $amount);
|
324 |
+
$request->setTid($methodSession->getNnResponseData()->getTid())
|
325 |
+
->setOrderNo($this->_getOrderId())
|
326 |
+
->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $this->_getOrderId())
|
327 |
+
->setStatus(100);
|
328 |
+
return $request;
|
329 |
+
}
|
330 |
+
|
331 |
private function _xmlToArray( SimpleXMLElement $xml ) {
|
332 |
$array = array();
|
333 |
if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
|
356 |
;
|
357 |
}
|
358 |
|
359 |
+
public function getCallbackConfigData(){
|
360 |
+
return $this->getConfigData('callback') ;
|
361 |
+
}
|
362 |
+
|
363 |
public function assignData($data)
|
364 |
{
|
365 |
if (!($data instanceof Varien_Object)) {
|
370 |
->setNnNewCallbackPin($data->getNewCallbackPin())
|
371 |
->setNnCallbackTel($data->getCallbackTel())
|
372 |
;
|
373 |
+
if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
|
374 |
$infoInstance->setCallbackPinValidationFlag( true );
|
375 |
}
|
376 |
return $this;
|
389 |
}
|
390 |
}
|
391 |
// Call for pin generation
|
392 |
+
if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
|
393 |
if( $this->_getMethodSession()->getNnCallbackTid() ) {
|
394 |
if($infoInstance->getNnNewCallbackPin()) {
|
395 |
$this->_regenerateCallbackPin();
|
400 |
}else {
|
401 |
$this->_generateCallbackPin();
|
402 |
}
|
403 |
+
}else if($this->getCallbackConfigData()==3){
|
404 |
+
if(!$this->_getMethodSession()->getNnCallbackTid()) {
|
405 |
+
$this->_generateCallbackEmail();
|
406 |
+
}
|
407 |
}
|
408 |
|
409 |
+
$this->_validateCallbackProcess();
|
410 |
return $this;
|
411 |
}
|
412 |
|
433 |
->setNnCallbackTidTimeStamp(time())
|
434 |
->setNote($this->_getNote($response))
|
435 |
->setOrderAmount($request->getAmount())
|
436 |
+
->setNnCallbackSuccessState(true)
|
437 |
;
|
438 |
$this->getInfoInstance()->save();
|
439 |
$text = Mage::helper('novalnet')->__('Sie werden in kürze angerufen! Bitte geben Sie den erhaltenen PIN-Code in das Textfeld ein.');
|
442 |
}
|
443 |
Mage::throwException($text);
|
444 |
}
|
445 |
+
|
446 |
+
private function _generateCallbackEmail() {
|
447 |
+
$request = $this->_buildRequest(self::POST_CALLBACK);
|
448 |
+
$response = $this->_postRequest($request, self::POST_CALLBACK);
|
449 |
+
if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
|
450 |
+
$this->_getMethodSession()
|
451 |
+
->setNnCallbackTid($response->getTid())
|
452 |
+
->setNnTestMode($response->getTestMode())
|
453 |
+
->setNnCallbackTidTimeStamp(time())
|
454 |
+
->setNote($this->_getNote($response))
|
455 |
+
->setOrderAmount($request->getAmount())
|
456 |
+
->setNnCallbackSuccessState(true)
|
457 |
+
;
|
458 |
+
$this->getInfoInstance()->save();
|
459 |
+
$text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
|
460 |
+
}else {
|
461 |
+
$text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
|
462 |
+
}
|
463 |
+
Mage::throwException($text);
|
464 |
+
}
|
465 |
|
466 |
private function _regenerateCallbackPin() {
|
467 |
$request = $this->_buildRequest(self::POST_NEWPIN);
|
495 |
if($methodSession->hasNnCallbackTid()) {
|
496 |
if(time()>($methodSession->getNnCallbackTidTimeStamp()+(30*60))){
|
497 |
$this->_unsetMethodSession();
|
498 |
+
if (!$this->_isPlaceOrder()) {
|
499 |
Mage::throwException(Mage::helper('payment')->__('Callback session has expired. Please resubmit payment method'));
|
500 |
}
|
501 |
}elseif( $methodSession->getOrderAmount() != ($this->_getAmount()*100) ) {
|
502 |
$this->_unsetMethodSession();
|
503 |
+
if (!$this->_isPlaceOrder()) {
|
504 |
+
Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
|
505 |
}
|
506 |
}
|
507 |
}
|
508 |
}
|
509 |
+
|
510 |
+
private function _validateCallbackProcess() {
|
511 |
+
$methodSession = $this->_getMethodSession();
|
512 |
+
if($methodSession->getNnCallbackSuccessState()){
|
513 |
+
if($this->getCallbackConfigData()==3) {
|
514 |
+
$type=self::POST_EMAILSTATUS;
|
515 |
+
}elseif($this->getCallbackConfigData()!=3){
|
516 |
+
$type=self::POST_PINSTATUS;
|
517 |
+
}
|
518 |
+
$request = $this->_buildRequest($type);
|
519 |
+
$result = $this->_postRequest($request, $type);
|
520 |
+
$result->setTid( $methodSession->getNnCallbackTid() );
|
521 |
+
$result->setTestMode( $methodSession->getNnTestMode() );
|
522 |
+
|
523 |
+
// Analyze the response from Novalnet
|
524 |
+
if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
|
525 |
+
$methodSession->setNnResponseData($result);
|
526 |
+
$methodSession->setNnCallbackSuccessState(false);
|
527 |
+
} else {
|
528 |
+
$error = ($result->getStatusDesc()||$result->getStatusMessage())
|
529 |
+
? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
|
530 |
+
: Mage::helper('novalnet')->__('Error in capturing the payment')
|
531 |
+
;
|
532 |
+
Mage::throwException($error);
|
533 |
+
}
|
534 |
+
}
|
535 |
+
}
|
536 |
|
537 |
private function _getCheckoutSession() {
|
538 |
return Mage::getSingleton('checkout/session');
|
578 |
if ($this->_isPlaceOrder()) {
|
579 |
return $info->getOrder()->getIncrementId();
|
580 |
} else {
|
581 |
+
return true;
|
|
|
|
|
|
|
582 |
}
|
583 |
}
|
584 |
|
@@ -260,7 +260,7 @@ class Mage_Novalnet_Model_NovalnetPciAbstract extends Mage_Payment_Model_Method_
|
|
260 |
if ($response['status'] == Mage_Novalnet_Model_NovalnetCcpci::RESPONSE_CODE_APPROVED) {
|
261 |
$status = $this->onSucess($dataObj,$order,$payment,$session);
|
262 |
} else {
|
263 |
-
|
264 |
$status = $this->onFailure($dataObj,$order,$payment,$session);
|
265 |
}
|
266 |
}
|
@@ -281,13 +281,12 @@ class Mage_Novalnet_Model_NovalnetPciAbstract extends Mage_Payment_Model_Method_
|
|
281 |
$order->setPayment($payment);
|
282 |
|
283 |
if( $dataObj->hasTestMode() ) {
|
284 |
-
|
285 |
Mage::getModel( 'sales/quote' )
|
286 |
->load($session->getNovalnetQuoteId())
|
287 |
->getPayment()
|
|
|
288 |
->setNnTestorder($this->decode($dataObj->getTestMode(), $this->getConfigData('password')))
|
289 |
->save();
|
290 |
-
|
291 |
}
|
292 |
|
293 |
if($this->getConfigData('createinvoice') == 1){
|
@@ -369,7 +368,6 @@ class Mage_Novalnet_Model_NovalnetPciAbstract extends Mage_Payment_Model_Method_
|
|
369 |
public function decode($data,$pwd)
|
370 |
{
|
371 |
$data = trim($data);
|
372 |
-
|
373 |
if ($data == '') {return'Error: no data';}
|
374 |
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
375 |
|
260 |
if ($response['status'] == Mage_Novalnet_Model_NovalnetCcpci::RESPONSE_CODE_APPROVED) {
|
261 |
$status = $this->onSucess($dataObj,$order,$payment,$session);
|
262 |
} else {
|
263 |
+
//echo "ashok aasdfsa "; exit;
|
264 |
$status = $this->onFailure($dataObj,$order,$payment,$session);
|
265 |
}
|
266 |
}
|
281 |
$order->setPayment($payment);
|
282 |
|
283 |
if( $dataObj->hasTestMode() ) {
|
|
|
284 |
Mage::getModel( 'sales/quote' )
|
285 |
->load($session->getNovalnetQuoteId())
|
286 |
->getPayment()
|
287 |
+
->setNnComments()
|
288 |
->setNnTestorder($this->decode($dataObj->getTestMode(), $this->getConfigData('password')))
|
289 |
->save();
|
|
|
290 |
}
|
291 |
|
292 |
if($this->getConfigData('createinvoice') == 1){
|
368 |
public function decode($data,$pwd)
|
369 |
{
|
370 |
$data = trim($data);
|
|
|
371 |
if ($data == '') {return'Error: no data';}
|
372 |
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
373 |
|
@@ -83,8 +83,6 @@ class Mage_Novalnet_PciController extends Mage_Core_Controller_Front_Action
|
|
83 |
$status=$order->getPayment()->getMethodInstance()->statusCheck($response,$session);
|
84 |
$this->_responseText = $response['status_desc'];
|
85 |
}
|
86 |
-
$session=Mage::getSingleton('checkout/session')->unsNnDataValue();
|
87 |
-
$session->unsOrderId();
|
88 |
return $status;
|
89 |
}
|
90 |
}
|
83 |
$status=$order->getPayment()->getMethodInstance()->statusCheck($response,$session);
|
84 |
$this->_responseText = $response['status_desc'];
|
85 |
}
|
|
|
|
|
86 |
return $status;
|
87 |
}
|
88 |
}
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Block_Form_NovalnetPaypal extends Mage_Payment_Block_Form
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Init default template for block
|
6 |
+
*/
|
7 |
+
protected function _construct()
|
8 |
+
{
|
9 |
+
|
10 |
+
parent::_construct();
|
11 |
+
$this->setTemplate('novalnetpaypal/form/novalnetpaypal.phtml');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Retrieve payment configuration object
|
16 |
+
*
|
17 |
+
* @return Mage_Payment_Model_Config
|
18 |
+
*/
|
19 |
+
protected function _getConfig()
|
20 |
+
{
|
21 |
+
return Mage::getSingleton('payment/config');
|
22 |
+
}
|
23 |
+
}
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Block_Info_NovalnetPaypal extends Mage_Payment_Block_Info
|
3 |
+
{
|
4 |
+
|
5 |
+
protected $_localInfo = NULL;
|
6 |
+
/**
|
7 |
+
* Init default template for block
|
8 |
+
*/
|
9 |
+
protected function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->setTemplate('novalnetpaypal/info/novalnetpaypal.phtml');
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Retrieve info model
|
17 |
+
*
|
18 |
+
* @return Mage_Sofortueberweisung_Model_Info
|
19 |
+
*/
|
20 |
+
|
21 |
+
public function getInfo()
|
22 |
+
{
|
23 |
+
if (!$this->_localInfo) {
|
24 |
+
$this->_localInfo = $this->getData('info');
|
25 |
+
$this->loadNovalnetData();
|
26 |
+
}
|
27 |
+
if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
|
28 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
29 |
+
}
|
30 |
+
return $this->_localInfo;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Retrieve payment method model
|
35 |
+
*
|
36 |
+
* @return Mage_Payment_Model_Method_Abstract
|
37 |
+
*/
|
38 |
+
public function getMethod()
|
39 |
+
{
|
40 |
+
return $this->getInfo()->getMethodInstance();
|
41 |
+
}
|
42 |
+
|
43 |
+
public function toPdf()
|
44 |
+
{
|
45 |
+
$this->setTemplate('novalnetpaypal/info/pdf/novalnetpaypal.phtml');
|
46 |
+
return $this->toHtml();
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getPaymentMethod()
|
50 |
+
{
|
51 |
+
return $this->getMethod()->getConfigData('title');
|
52 |
+
}
|
53 |
+
|
54 |
+
public function loadNovalnetData() {
|
55 |
+
$order_id = $this->getRequest()->getParam('order_id');
|
56 |
+
$obj = NULL;
|
57 |
+
if( $order_id ) {
|
58 |
+
$objOrder = Mage::getModel('sales/order')->load($order_id);
|
59 |
+
$objQuote = Mage::getModel( 'sales/quote' );
|
60 |
+
$obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())
|
61 |
+
->load($objOrder->getQuoteId())
|
62 |
+
->getPayment();
|
63 |
+
}else {
|
64 |
+
$obj = $this->_localInfo;
|
65 |
+
}
|
66 |
+
$this->setNnTestorder($obj->getNnTestorder());
|
67 |
+
$this->setNnComments($obj->getNnComments());
|
68 |
+
return $this;
|
69 |
+
}
|
70 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_novalnetpaypal_Block_Infobox extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('novalnetpaypal/infobox.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Block_NovalnetPaypal extends Mage_Core_Block_Abstract
|
3 |
+
{
|
4 |
+
protected function _toHtml()
|
5 |
+
{
|
6 |
+
$payment = $this->getOrder()->getPayment()->getMethodInstance();
|
7 |
+
|
8 |
+
if($payment->getConfigData('password')) {
|
9 |
+
$form = new Varien_Data_Form();
|
10 |
+
$form->setAction($payment->getUrl())
|
11 |
+
->setId('novalnetpaypal')
|
12 |
+
->setName('novalnetpaypal')
|
13 |
+
->setMethod('POST')
|
14 |
+
->setUseContainer(true);
|
15 |
+
foreach ($payment->getFormFields() as $field=>$value) {
|
16 |
+
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
17 |
+
}
|
18 |
+
// IE & Firefox will not submit form if the form is full of hidden fileds.
|
19 |
+
$form->addField( 'continue', 'submit', array( 'name'=>'continue', 'value'=>$this->__('You will be redirected to Novalnet AG website when you place an order.') ) );
|
20 |
+
$html = '<html><body>';
|
21 |
+
$html.= $form->toHtml();
|
22 |
+
$html.= '<script type="text/javascript">document.getElementById("novalnetpaypal").submit();</script>';
|
23 |
+
$html.= '</body></html>';
|
24 |
+
|
25 |
+
return $html;
|
26 |
+
}else{
|
27 |
+
$html = $this->__('Parameter missing');
|
28 |
+
return $html;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NovalnetPaypal_NovalnetPaypal_Block_NovalnetPaypalerrornotice extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('novalnetpaypal/errornotice.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NovalnetPaypal_NovalnetPaypal_Block_NovalnetPaypalnotice extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('novalnetpaypal/notice.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Model_Convert_Order extends Mage_Sales_Model_Convert_Order
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Convert order payment to quote payment
|
6 |
+
*
|
7 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
8 |
+
* @return Mage_Sales_Model_Quote_Payment
|
9 |
+
*/
|
10 |
+
public function paymentToQuotePayment(Mage_Sales_Model_Order_Payment $payment, $quotePayment=null)
|
11 |
+
{
|
12 |
+
$quotePayment = parent::paymentToQuotePayment($payment, $quotePayment);
|
13 |
+
|
14 |
+
return $quotePayment;
|
15 |
+
}
|
16 |
+
}
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Model_Convert_Quote extends Mage_Sales_Model_Convert_Quote
|
3 |
+
{
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Convert quote payment to order payment
|
7 |
+
*
|
8 |
+
* @param Mage_Sales_Model_Quote_Payment $payment
|
9 |
+
* @return Mage_Sales_Model_Quote_Payment
|
10 |
+
*/
|
11 |
+
public function paymentToOrderPayment(Mage_Sales_Model_Quote_Payment $payment)
|
12 |
+
{
|
13 |
+
$orderPayment = parent::paymentToOrderPayment($payment);
|
14 |
+
|
15 |
+
return $orderPayment;
|
16 |
+
}
|
17 |
+
|
18 |
+
}
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Novalnet_NovalnetPaypal_Model_Mysql4_NovalnetPaypal_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('novalnetpaypal/novalnetpaypal');
|
9 |
+
}
|
10 |
+
}
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Novalnet_NovalnetPaypal_Model_Mysql4_NovalnetPaypal extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
// Note that the novalnetpaypal_id refers to the key field in your database table.
|
8 |
+
$this->_init('novalnetpaypal/novalnetpaypal', 'novalnetpaypal_id');
|
9 |
+
}
|
10 |
+
}
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_Model_NovalnetPaypal extends Mage_Payment_Model_Method_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Availability options
|
6 |
+
*/
|
7 |
+
protected $_code = 'novalnetpaypal';
|
8 |
+
protected $_paymentMethod = 'novalnetpaypal';
|
9 |
+
protected $_formBlockType = 'novalnetpaypal/form_novalnetpaypal';
|
10 |
+
protected $_infoBlockType = 'novalnetpaypal/info_novalnetpaypal';
|
11 |
+
protected $_isGateway = false;
|
12 |
+
protected $_canAuthorize = true;
|
13 |
+
protected $_canCapture = true;#important; default: false
|
14 |
+
protected $_canCapturePartial = false;
|
15 |
+
protected $_canRefund = false;
|
16 |
+
protected $_canVoid = false;
|
17 |
+
protected $_canUseInternal = false;
|
18 |
+
protected $_canUseCheckout = true;
|
19 |
+
protected $_canUseForMultishipping = true;
|
20 |
+
protected $_isInitializeNeeded = true;
|
21 |
+
protected $password = '';
|
22 |
+
const KEY = 34;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Instantiate state and set it to state object
|
26 |
+
* @param string $paymentAction
|
27 |
+
* @param Varien_Object
|
28 |
+
*/
|
29 |
+
public function initialize($paymentAction, $stateObject)
|
30 |
+
{
|
31 |
+
}
|
32 |
+
|
33 |
+
public function _construct()
|
34 |
+
{
|
35 |
+
parent::_construct();
|
36 |
+
$this->_init('novalnetpaypal/novalnetpaypal');
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getUrl(){
|
40 |
+
return $this->getConfigData('url');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Return redirect block type
|
45 |
+
*
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
public function getRedirectBlockType()
|
49 |
+
{
|
50 |
+
return $this->_redirectBlockType;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Return payment method type string
|
55 |
+
*
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
public function getPaymentMethodType()
|
59 |
+
{
|
60 |
+
return $this->_paymentMethod;
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get redirect URL
|
66 |
+
*
|
67 |
+
* @return Mage_Payment_Helper_Data
|
68 |
+
*/
|
69 |
+
public function getOrderPlaceRedirectUrl()
|
70 |
+
{
|
71 |
+
$return_url = Mage::getUrl('novalnetpaypal/novalnetpaypal/redirect');
|
72 |
+
//file_put_contents(__FILE__.'assignData.txt','I am in getOrderPlaceRedirectUrl function'.print_r($return_url, true));
|
73 |
+
return Mage::getUrl('novalnetpaypal/novalnetpaypal/redirect');
|
74 |
+
}
|
75 |
+
|
76 |
+
public function assignData($data)
|
77 |
+
{
|
78 |
+
if (!($data instanceof Varien_Object)) {
|
79 |
+
$data = new Varien_Object($data);
|
80 |
+
}
|
81 |
+
$info = $this->getInfoInstance();
|
82 |
+
//$temp = $info->getData();
|
83 |
+
//unset($temp['method_instance']);
|
84 |
+
//file_put_contents(__FILE__.'assignData.txt','I am in assignData function'.print_r($temp, true));
|
85 |
+
return $this;
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getSecurityKey(){
|
89 |
+
return uniqid(rand(), true);
|
90 |
+
}
|
91 |
+
|
92 |
+
public function validate()
|
93 |
+
{
|
94 |
+
parent::validate();
|
95 |
+
|
96 |
+
return $this;
|
97 |
+
}
|
98 |
+
|
99 |
+
public function getFormFields()
|
100 |
+
{
|
101 |
+
$billing = $this->getOrder()->getBillingAddress();
|
102 |
+
$security = $this->getSecurityKey();
|
103 |
+
$this->getOrder()->getPayment()->setSuSecurity($security)->save();
|
104 |
+
$order = $this->getOrder();
|
105 |
+
$this->password = $this->getConfigData('password');
|
106 |
+
#$_SESSION['mima'] = $this->password;#todo: ?????
|
107 |
+
$session = Mage::getSingleton('checkout/session');
|
108 |
+
$session->setNovalnetPassword($this->password);
|
109 |
+
$paymentInfo = $this->getInfoInstance();
|
110 |
+
|
111 |
+
$fieldsArr = array();
|
112 |
+
$note = $order->getCustomerNote();
|
113 |
+
if ($note){
|
114 |
+
$note = '<br />'.Mage::helper('novalnetpaypal')->__('Comment').': '.$note;
|
115 |
+
}
|
116 |
+
if ( !$this->getConfigData('live_mode') ){
|
117 |
+
$note .= '<br /><b><font color="red">'.strtoupper(Mage::helper('novalnetpaypal')->__('Testorder')).'</font></b>';
|
118 |
+
}
|
119 |
+
$order->setComment($note);
|
120 |
+
$order->setCustomerNote($note);
|
121 |
+
$order->setCustomerNoteNotify(true);
|
122 |
+
$fieldsArr['key'] = self::KEY;
|
123 |
+
$fieldsArr['vendor'] = $this->getConfigData('merchant_id');
|
124 |
+
$fieldsArr['auth_code'] = $this->encode($this->getConfigData('auth_code'), $this->password);
|
125 |
+
$fieldsArr['product'] = $this->encode($this->getConfigData('product_id'), $this->password);
|
126 |
+
$fieldsArr['tariff'] = $this->encode($this->getConfigData('tariff_id'), $this->password);
|
127 |
+
$fieldsArr['amount'] = $this->encode(( round($order->getBaseGrandTotal(), 2) * 100), $this->password);
|
128 |
+
$fieldsArr['test_mode'] = $this->encode((!$this->getConfigData('live_mode'))? 1: 0, $this->password);
|
129 |
+
$fieldsArr['uniqid'] = $this->encode(uniqid(), $this->password);
|
130 |
+
|
131 |
+
$hParams['auth_code'] = $fieldsArr['auth_code'];
|
132 |
+
$hParams['product_id'] = $fieldsArr['product'];
|
133 |
+
$hParams['tariff'] = $fieldsArr['tariff'];
|
134 |
+
$hParams['amount'] = $fieldsArr['amount'];
|
135 |
+
$hParams['test_mode'] = $fieldsArr['test_mode'];
|
136 |
+
$hParams['uniqid'] = $fieldsArr['uniqid'];
|
137 |
+
|
138 |
+
$fieldsArr['hash'] = $this->hash($hParams, $this->password);
|
139 |
+
$fieldsArr['currency'] = $order->getOrderCurrencyCode();
|
140 |
+
$fieldsArr['first_name'] = $billing->getFirstname();
|
141 |
+
$fieldsArr['last_name'] = $billing->getLastname();
|
142 |
+
$fieldsArr['email'] = $this->getOrder()->getCustomerEmail();
|
143 |
+
$fieldsArr['street'] = $billing->getStreet(1);
|
144 |
+
$fieldsArr['search_in_street'] = 1;
|
145 |
+
$fieldsArr['city'] = $billing->getCity();
|
146 |
+
$fieldsArr['zip'] = $billing->getPostcode();
|
147 |
+
$fieldsArr['country_code'] = $billing->getCountry();
|
148 |
+
$fieldsArr['lang'] = $billing->getLang();
|
149 |
+
$fieldsArr['remote_ip'] = $this->getRealIpAddr();
|
150 |
+
$fieldsArr['tel'] = $billing->getTelephone();
|
151 |
+
$fieldsArr['fax'] = $billing->getFax();
|
152 |
+
//$fieldsArr['birth_date'] = $order->getRemoteIp();
|
153 |
+
$fieldsArr['session'] = session_id();
|
154 |
+
$fieldsArr['return_url'] = Mage::getUrl('novalnetpaypal/novalnetpaypal/return', array('_novalnetpaypal' => true));
|
155 |
+
$fieldsArr['return_method'] = 'POST';
|
156 |
+
$fieldsArr['error_return_url'] = Mage::getUrl('novalnetpaypal/novalnetpaypal/error', array('_novalnetpaypal' => true));
|
157 |
+
$fieldsArr['error_return_method'] = 'POST';
|
158 |
+
$fieldsArr['order_no'] = $paymentInfo->getOrder()->getRealOrderId();
|
159 |
+
$fieldsArr['input1'] = 'order_id';
|
160 |
+
$fieldsArr['inputval1'] = $paymentInfo->getOrder()->getRealOrderId();
|
161 |
+
$fieldsArr['user_variable_0'] = str_replace(array('https://', 'http://'), array('',''), Mage::getBaseUrl());
|
162 |
+
$fieldsArr['api_signature'] = $this->encode($this->getConfigData('paypal_api_signature'), $this->password);
|
163 |
+
$fieldsArr['api_user'] = $this->encode($this->getConfigData('paypal_api_username'), $this->password);
|
164 |
+
$fieldsArr['api_pw'] = $this->encode($this->getConfigData('paypal_api_password'), $this->password);
|
165 |
+
|
166 |
+
$request = '';
|
167 |
+
foreach ($fieldsArr as $k => $v) {
|
168 |
+
$request .= '<' . $k . '>' . $v . '</' . $k . '>';
|
169 |
+
}
|
170 |
+
//echo '<pre>';
|
171 |
+
//print_r($fieldsArr); exit;
|
172 |
+
return $fieldsArr;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Get quote
|
177 |
+
*
|
178 |
+
* @return Mage_Sales_Model_Order
|
179 |
+
*/
|
180 |
+
public function getQuote()
|
181 |
+
{
|
182 |
+
if (empty($this->_quote)) {
|
183 |
+
$this->_quote = $this->getCheckout()->getQuote();
|
184 |
+
}
|
185 |
+
return $this->_quote;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Get checkout
|
190 |
+
*
|
191 |
+
* @return Mage_Sales_Model_Order
|
192 |
+
*/
|
193 |
+
public function getCheckout()
|
194 |
+
{
|
195 |
+
if (empty($this->_checkout)) {
|
196 |
+
$this->_checkout = Mage::getSingleton('checkout/session');
|
197 |
+
}
|
198 |
+
return $this->_checkout;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Get order model
|
203 |
+
*
|
204 |
+
* @return Mage_Sales_Model_Order
|
205 |
+
*/
|
206 |
+
public function getOrder()
|
207 |
+
{
|
208 |
+
if (!$this->_order) {
|
209 |
+
$paymentInfo = $this->getInfoInstance();
|
210 |
+
$this->_order = Mage::getModel('sales/order')
|
211 |
+
->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
|
212 |
+
}
|
213 |
+
return $this->_order;
|
214 |
+
}
|
215 |
+
public function isPublicIP($value)
|
216 |
+
{
|
217 |
+
if(!$value || count(explode('.',$value))!=4)
|
218 |
+
{
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
|
222 |
+
}
|
223 |
+
public function getRealIpAddr()
|
224 |
+
{
|
225 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
|
226 |
+
{
|
227 |
+
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
228 |
+
}
|
229 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
|
230 |
+
{
|
231 |
+
if($this->isPublicIP($iplist[0])) return $iplist[0];
|
232 |
+
}
|
233 |
+
if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
|
234 |
+
{
|
235 |
+
return $_SERVER['HTTP_CLIENT_IP'];
|
236 |
+
}
|
237 |
+
if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
|
238 |
+
{
|
239 |
+
return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
|
240 |
+
}
|
241 |
+
if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
|
242 |
+
{
|
243 |
+
return $_SERVER['HTTP_FORWARDED_FOR'];
|
244 |
+
}
|
245 |
+
return $_SERVER['REMOTE_ADDR'];
|
246 |
+
}
|
247 |
+
|
248 |
+
private function debug2($object, $filename, $debug = false)
|
249 |
+
{
|
250 |
+
if (!$this->debug and !$debug){return;}
|
251 |
+
$fh = fopen("/tmp/$filename", 'a+');
|
252 |
+
if (gettype($object) == 'object' or gettype($object) == 'array'){
|
253 |
+
fwrite($fh, serialize($object));
|
254 |
+
}else{
|
255 |
+
fwrite($fh, date('H:i:s').' '.$object);
|
256 |
+
}
|
257 |
+
fwrite($fh, "<hr />\n");
|
258 |
+
fclose($fh);
|
259 |
+
}
|
260 |
+
function encode($data, $key)
|
261 |
+
{
|
262 |
+
$data = trim($data);
|
263 |
+
if ($data == '') return'Error: no data';
|
264 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
265 |
+
|
266 |
+
try {
|
267 |
+
$crc = sprintf('%u', crc32($data));# %u is a must for ccrc32 returns a signed value
|
268 |
+
$data = $crc."|".$data;
|
269 |
+
$data = bin2hex($data.$key);
|
270 |
+
$data = strrev(base64_encode($data));
|
271 |
+
}catch (Exception $e){
|
272 |
+
echo('Error: '.$e);
|
273 |
+
}
|
274 |
+
return $data;
|
275 |
+
}
|
276 |
+
function decode($data, $key)
|
277 |
+
{
|
278 |
+
$data = trim($data);
|
279 |
+
if ($data == '') {return'Error: no data';}
|
280 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
281 |
+
|
282 |
+
try {
|
283 |
+
$data = base64_decode(strrev($data));
|
284 |
+
$data = pack("H".strlen($data), $data);
|
285 |
+
$data = substr($data, 0, stripos($data, $key));
|
286 |
+
$pos = strpos($data, "|");
|
287 |
+
if ($pos === false){
|
288 |
+
return("Error: CKSum not found!");
|
289 |
+
}
|
290 |
+
$crc = substr($data, 0, $pos);
|
291 |
+
$value = trim(substr($data, $pos+1));
|
292 |
+
if ($crc != sprintf('%u', crc32($value))){
|
293 |
+
return("Error; CKSum invalid!");
|
294 |
+
}
|
295 |
+
return $value;
|
296 |
+
}catch (Exception $e){
|
297 |
+
echo('Error: '.$e);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
function hash($h, $key)#$h contains encoded data
|
301 |
+
{
|
302 |
+
if (!$h) return'Error: no data';
|
303 |
+
if (!function_exists('md5')){return'Error: func n/a';}
|
304 |
+
#Mage::throwException(Mage::helper('novalnet')->__("$h[auth_code].$h[product_id].$h[tariff].$h[amount].$h[test_mode].$h[uniqid].strrev($key)").'!');
|
305 |
+
return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
|
306 |
+
}
|
307 |
+
function checkHash($request, $key)
|
308 |
+
{
|
309 |
+
if (!$request) return false; #'Error: no data';
|
310 |
+
$h['auth_code'] = $request['auth_code'];#encoded
|
311 |
+
$h['product_id'] = $request['product'];#encoded
|
312 |
+
$h['tariff'] = $request['tariff'];#encoded
|
313 |
+
$h['amount'] = $request['amount'];#encoded
|
314 |
+
$h['test_mode'] = $request['test_mode'];#encoded
|
315 |
+
$h['uniqid'] = $request['uniqid'];#encoded
|
316 |
+
|
317 |
+
if ($request['hash2'] != $this->hash($h, $key)){
|
318 |
+
return false;
|
319 |
+
}
|
320 |
+
return true;
|
321 |
+
}
|
322 |
+
}
|
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_NovalnetPaypal_NovalnetPaypalController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
protected $_redirectBlockType = 'novalnetpaypal/novalnetpaypal';
|
6 |
+
protected $_status = '100';
|
7 |
+
|
8 |
+
/**
|
9 |
+
* when customer select payment method
|
10 |
+
*/
|
11 |
+
public function redirectAction() {
|
12 |
+
$session = $this->getCheckout();
|
13 |
+
$session->setNovalnetQuoteId($session->getQuoteId())
|
14 |
+
->setNovalnetRealOrderId($session->getLastRealOrderId());
|
15 |
+
$order = Mage::getModel('sales/order');
|
16 |
+
$order->loadByIncrementId($session->getLastRealOrderId());
|
17 |
+
$order->addStatusToHistory(Mage_Sales_Model_Order::STATE_HOLDED, Mage::helper('novalnetpaypal')->__('Customer was redirected to Novalnet'));
|
18 |
+
$order->save();
|
19 |
+
|
20 |
+
$this->getResponse()->setBody(
|
21 |
+
$this->getLayout()
|
22 |
+
->createBlock($this->_redirectBlockType)
|
23 |
+
->setOrder($order)
|
24 |
+
->toHtml()
|
25 |
+
);
|
26 |
+
$session->unsQuoteId();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function returnAction() {
|
30 |
+
$response = $this->getRequest()->getParams();
|
31 |
+
$response['orderId'] = $response['inputval1'];#order_id;
|
32 |
+
$status = $this->_checkReturnedData();
|
33 |
+
if(!$response['orderId'] or !$status) {
|
34 |
+
#Mage::log('orderId='.$response['orderId'].'; status:'.$status);
|
35 |
+
$session = $this->getCheckout();
|
36 |
+
$session->getQuote()->setIsActive(false)->save();
|
37 |
+
Mage::getSingleton('checkout/session')->addError(Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));#new
|
38 |
+
$this->_redirect('checkout/cart');#new; ok
|
39 |
+
} else {
|
40 |
+
//load order and send mail
|
41 |
+
$order = Mage::getModel('sales/order');
|
42 |
+
$order->loadByIncrementId($response['orderId']);
|
43 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
44 |
+
$payment = $order->getPayment();
|
45 |
+
if($order->getId()) {
|
46 |
+
#Mage::log('sendNewOrderEmail');
|
47 |
+
$order->sendNewOrderEmail();
|
48 |
+
}
|
49 |
+
$session = $this->getCheckout();
|
50 |
+
$session->getQuote()->setIsActive(false)->save();
|
51 |
+
$this->_redirect('checkout/onepage/success');
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
public function errorAction() {
|
56 |
+
$session = $this->getCheckout();
|
57 |
+
$session->getQuote()->setIsActive(false)->save();
|
58 |
+
//Get response
|
59 |
+
$response = $this->getRequest()->getParams();
|
60 |
+
#print_r($response); exit;
|
61 |
+
$order = Mage::getModel('sales/order');
|
62 |
+
$order->load($this->getCheckout()->getLastOrderId());
|
63 |
+
$order->cancel();
|
64 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));
|
65 |
+
$order->save();
|
66 |
+
Mage::getSingleton('checkout/session')->addError(Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));#new
|
67 |
+
$this->_redirect('checkout/cart');#new; ok
|
68 |
+
}
|
69 |
+
|
70 |
+
public function errornoticeAction() {
|
71 |
+
$session = $this->getCheckout();
|
72 |
+
$session->getQuote()->setIsActive(false)->save();
|
73 |
+
$order = Mage::getModel('sales/order');
|
74 |
+
$order->load($this->getCheckout()->getLastOrderId());
|
75 |
+
$order->cancel();
|
76 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));
|
77 |
+
$order->save();
|
78 |
+
|
79 |
+
Mage::getSingleton('checkout/session')->addError(Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));#new
|
80 |
+
$this->_redirect('checkout/cart');#new
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Checking Post variables.
|
85 |
+
*
|
86 |
+
*/
|
87 |
+
protected function _checkReturnedData() {
|
88 |
+
$status = false;
|
89 |
+
if (!$this->getRequest()->isPost()) {
|
90 |
+
$this->norouteAction();
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
$session = $this->getCheckout();
|
94 |
+
//Get response
|
95 |
+
$response = $this->getRequest()->getParams();
|
96 |
+
$dataObj = new Varien_Object($this->getRequest()->getPost());
|
97 |
+
//print_r($response); exit;
|
98 |
+
$response['orderId'] = $response['inputval1'];#order_id;
|
99 |
+
if ($response['status'] == 100) {
|
100 |
+
$response['status'] = $this->checkParams($response);
|
101 |
+
}
|
102 |
+
$order = Mage::getModel('sales/order');
|
103 |
+
$order->loadByIncrementId($response['orderId']);
|
104 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
105 |
+
if ($response['status'] == 100 ) {
|
106 |
+
$payment = $order->getPayment();
|
107 |
+
$payment->setStatus(Novalnet_NovalnetPaypal_Model_NovalnetPaypal::STATUS_SUCCESS);
|
108 |
+
$payment->setStatusDescription(Mage::helper('novalnetpaypal')->__('Customer successfully returned from Novalnet'));
|
109 |
+
$payment->setLastTransId($response["tid"]);# to set TID in the payment info
|
110 |
+
$payment->setTransactionId($dataObj->getTid());
|
111 |
+
$payment->setSuTransactionId($dataObj->getTid());
|
112 |
+
$order->addStatusToHistory($paymentObj->getConfigData('order_status'), Mage::helper('novalnetpaypal')->__('Customer successfully returned from Novalnet'));
|
113 |
+
if( $dataObj->hasTestMode() ) {
|
114 |
+
Mage::getModel( 'sales/quote' )
|
115 |
+
->load($session->getNovalnetQuoteId())
|
116 |
+
->getPayment()
|
117 |
+
->setNnTestorder($this->decode($response['test_mode'], $session->getNovalnetPassword()))
|
118 |
+
->save();
|
119 |
+
}
|
120 |
+
$order->setPayment($payment);
|
121 |
+
if($paymentObj->getConfigData('createinvoice') == 1){
|
122 |
+
if ($this->saveInvoice($order)) {
|
123 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
$status = true;
|
127 |
+
} else {
|
128 |
+
$payment = $order->getPayment();
|
129 |
+
$payment->setLastTransId($response["tid"]);# to set TID in the payment info
|
130 |
+
$payment->setStatus(Novalnet_NovalnetPaypal_Model_NovalnetPaypal::STATUS_DECLINED);
|
131 |
+
$order->setPayment($payment);
|
132 |
+
$order->cancel();
|
133 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Customer aborted payment process'));
|
134 |
+
$status = false;
|
135 |
+
}
|
136 |
+
$order->save();
|
137 |
+
return $status;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Save invoice for order
|
142 |
+
*
|
143 |
+
* @param Mage_Sales_Model_Order $order
|
144 |
+
* @return boolean Can save invoice or not
|
145 |
+
*/
|
146 |
+
protected function saveInvoice (Mage_Sales_Model_Order $order) {
|
147 |
+
if ($order->canInvoice()) {
|
148 |
+
$invoice = $order->prepareInvoice();
|
149 |
+
|
150 |
+
$invoice->register();
|
151 |
+
Mage::getModel('core/resource_transaction')
|
152 |
+
->addObject($invoice)
|
153 |
+
->addObject($invoice->getOrder())
|
154 |
+
->save();
|
155 |
+
$invoice->sendEmail(true, '');
|
156 |
+
return true;
|
157 |
+
}
|
158 |
+
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get singleton of Checkout Session Model
|
164 |
+
*
|
165 |
+
* @return Mage_Checkout_Model_Session
|
166 |
+
*/
|
167 |
+
public function getCheckout()
|
168 |
+
{
|
169 |
+
return Mage::getSingleton('checkout/session');
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* checks server response and gets parameters
|
174 |
+
* @return $data array|string response parameters or ERROR_WRONG_HASH|ERROR_NO_ORDER_DETAILS if error
|
175 |
+
*
|
176 |
+
*/
|
177 |
+
public function getNotification($pwd){
|
178 |
+
$pnSu = Mage::helper('novalnetpaypal');
|
179 |
+
$pnSu->classSofortueberweisung($pwd);
|
180 |
+
return $pnSu->getNotification();
|
181 |
+
}
|
182 |
+
private function checkParams($response) {
|
183 |
+
$session = $this->getCheckout();
|
184 |
+
$status = '100';
|
185 |
+
if (!$response['hash2']){
|
186 |
+
$status = '90';
|
187 |
+
}
|
188 |
+
if (!$this->checkHash($response, $session->getNovalnetPassword())){
|
189 |
+
$status = '91';
|
190 |
+
}
|
191 |
+
$response['amount'] = $this->decode($response['amount'], $session->getNovalnetPassword());
|
192 |
+
if (preg_match('/\D/', $response['amount'], $aMatch)){
|
193 |
+
$status = '92';
|
194 |
+
}
|
195 |
+
#Mage::log(__FUNCTION__.': status='.$status);
|
196 |
+
$this->_status = $status;
|
197 |
+
return$status;
|
198 |
+
}
|
199 |
+
function hash($h, $key)#$h contains encoded data
|
200 |
+
{
|
201 |
+
if (!$h) return'Error: no data';
|
202 |
+
if (!function_exists('md5')){return'Error: func n/a';}
|
203 |
+
return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
|
204 |
+
}
|
205 |
+
function checkHash($request, $key)
|
206 |
+
{
|
207 |
+
if (!$request) return false; #'Error: no data';
|
208 |
+
$h['auth_code'] = $request['auth_code'];#encoded
|
209 |
+
$h['product_id'] = $request['product']; #encoded
|
210 |
+
$h['tariff'] = $request['tariff']; #encoded
|
211 |
+
$h['amount'] = $request['amount']; #encoded
|
212 |
+
$h['test_mode'] = $request['test_mode'];#encoded
|
213 |
+
$h['uniqid'] = $request['uniqid']; #encoded
|
214 |
+
|
215 |
+
if ($request['hash2'] != $this->hash($h, $key)){
|
216 |
+
return false;
|
217 |
+
}
|
218 |
+
return true;
|
219 |
+
}
|
220 |
+
function decode($data, $key)
|
221 |
+
{
|
222 |
+
$data = trim($data);
|
223 |
+
if ($data == '') {return'Error: no data';}
|
224 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
225 |
+
|
226 |
+
try {
|
227 |
+
$data = base64_decode(strrev($data));
|
228 |
+
$data = pack("H".strlen($data), $data);
|
229 |
+
$data = substr($data, 0, stripos($data, $key));
|
230 |
+
$pos = strpos($data, "|");
|
231 |
+
if ($pos === false){
|
232 |
+
return("Error: CKSum not found!");
|
233 |
+
}
|
234 |
+
$crc = substr($data, 0, $pos);
|
235 |
+
$value = trim(substr($data, $pos+1));
|
236 |
+
if ($crc != sprintf('%u', crc32($value))){
|
237 |
+
return("Error; CKSum invalid!");
|
238 |
+
}
|
239 |
+
return $value;
|
240 |
+
}catch (Exception $e){
|
241 |
+
echo('Error: '.$e);
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Novalnet_NovalnetPaypal>
|
5 |
+
<!-- declare module's version information for database updates -->
|
6 |
+
<version>1.0.0</version>
|
7 |
+
</Novalnet_NovalnetPaypal>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<frontend>
|
11 |
+
<routers>
|
12 |
+
<novalnetpaypal>
|
13 |
+
<use>standard</use>
|
14 |
+
<args>
|
15 |
+
<module>Novalnet_NovalnetPaypal</module>
|
16 |
+
<frontName>novalnetpaypal</frontName>
|
17 |
+
</args>
|
18 |
+
</novalnetpaypal>
|
19 |
+
</routers>
|
20 |
+
<layout>
|
21 |
+
<updates>
|
22 |
+
<novalnetpaypal>
|
23 |
+
<file>novalnetpaypal.xml</file>
|
24 |
+
</novalnetpaypal>
|
25 |
+
</updates>
|
26 |
+
</layout>
|
27 |
+
<translate>
|
28 |
+
<modules>
|
29 |
+
<Novalnet_NovalnetPaypal>
|
30 |
+
<files>
|
31 |
+
<default>Novalnet_NovalnetPaypal.csv</default>
|
32 |
+
</files>
|
33 |
+
</Novalnet_NovalnetPaypal>
|
34 |
+
</modules>
|
35 |
+
</translate>
|
36 |
+
<secure_url>
|
37 |
+
<novalnetpaypal_novalnetpaypal>/novalnetpaypal/novalnetpaypal/</novalnetpaypal_novalnetpaypal>
|
38 |
+
</secure_url>
|
39 |
+
</frontend>
|
40 |
+
|
41 |
+
<global>
|
42 |
+
<blocks>
|
43 |
+
<novalnetpaypal>
|
44 |
+
<class>Novalnet_NovalnetPaypal_Block</class>
|
45 |
+
</novalnetpaypal>
|
46 |
+
</blocks>
|
47 |
+
|
48 |
+
<models>
|
49 |
+
<novalnetpaypal>
|
50 |
+
<class>Novalnet_NovalnetPaypal_Model</class>
|
51 |
+
<resourceModel>novalnetpaypal_mysql4</resourceModel>
|
52 |
+
</novalnetpaypal>
|
53 |
+
<sales>
|
54 |
+
<rewrite>
|
55 |
+
<convert_order>Novalnet_NovalnetPaypal_Model_Convert_Order</convert_order>
|
56 |
+
<convert_quote>Novalnet_NovalnetPaypal_Model_Convert_Quote</convert_quote>
|
57 |
+
</rewrite>
|
58 |
+
</sales>
|
59 |
+
<novalnetpaypal_mysql4>
|
60 |
+
<class>Novalnet_NovalnetPaypal_Model_Mysql4</class>
|
61 |
+
<entities>
|
62 |
+
<novalnetpaypal>
|
63 |
+
<table>novalnetpaypal</table>
|
64 |
+
</novalnetpaypal>
|
65 |
+
</entities>
|
66 |
+
</novalnetpaypal_mysql4>
|
67 |
+
</models>
|
68 |
+
|
69 |
+
<resources>
|
70 |
+
<!-- resource identifier -->
|
71 |
+
<novalnetpaypal_setup>
|
72 |
+
<!-- specify that this resource is a setup resource and used for upgrades -->
|
73 |
+
<setup>
|
74 |
+
<module>Novalnet_NovalnetPaypal</module>
|
75 |
+
<class>Novalnet_NovalnetPaypal_Model_Mysql4_Setup</class>
|
76 |
+
</setup>
|
77 |
+
<!-- specify database connection for this resource -->
|
78 |
+
<connection>
|
79 |
+
<use>core_setup</use>
|
80 |
+
</connection>
|
81 |
+
</novalnetpaypal_setup>
|
82 |
+
<novalnetpaypal_write>
|
83 |
+
<connection>
|
84 |
+
<use>core_write</use>
|
85 |
+
</connection>
|
86 |
+
</novalnetpaypal_write>
|
87 |
+
<novalnetpaypal_read>
|
88 |
+
<connection>
|
89 |
+
<use>core_read</use>
|
90 |
+
</connection>
|
91 |
+
</novalnetpaypal_read>
|
92 |
+
</resources>
|
93 |
+
<helpers>
|
94 |
+
<novalnetpaypal>
|
95 |
+
<class>Novalnet_NovalnetPaypal_Helper</class>
|
96 |
+
</novalnetpaypal>
|
97 |
+
</helpers>
|
98 |
+
</global>
|
99 |
+
|
100 |
+
<!-- declare default configuration values for this module -->
|
101 |
+
<default>
|
102 |
+
<payment>
|
103 |
+
<novalnetpaypal>
|
104 |
+
<active>1</active>
|
105 |
+
<model>novalnetpaypal/novalnetpaypal</model>
|
106 |
+
<order_status>1</order_status>
|
107 |
+
<title>Novalnet-novalnetpaypal</title>
|
108 |
+
<allowspecific>0</allowspecific>
|
109 |
+
<url>https://payport.novalnet.de/paypal_payport</url>
|
110 |
+
<customer></customer>
|
111 |
+
<project></project>
|
112 |
+
<project_pswd></project_pswd>
|
113 |
+
<notification_pswd></notification_pswd>
|
114 |
+
<check_input_yesno>1</check_input_yesno>
|
115 |
+
<createinvoice>0</createinvoice>
|
116 |
+
<fast><![CDATA[<a href="%s">Zum automatischen Einrichten hier klicken.</a>]]></fast>
|
117 |
+
<url_new></url_new>
|
118 |
+
<netherlands>0</netherlands>
|
119 |
+
</novalnetpaypal>
|
120 |
+
</payment>
|
121 |
+
</default>
|
122 |
+
</config>
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<payment>
|
5 |
+
<groups>
|
6 |
+
<novalnetpaypal translate="label" module="paygate">
|
7 |
+
<label>Novalnet-Paypal</label>
|
8 |
+
<comment>Das Passwort ist auf admin.novalnet.de: Stammdaten - Paymentzugriffsschluessel einzusehen. The password is available at admin.novalnet.de: Stammdaten - Paymentzugriffsschluessel.<br><b>Bitte unbedingt beachten</b> auch wenn der Livemodus=0 ist, wird der Bestellbetrag abgebucht, wenn echte Kontodaten eingegeben werden. Das ist durch die Implementierung durch den Anbieter Payment Network AG bedingt.</comment>
|
9 |
+
<frontend_type>text</frontend_type>
|
10 |
+
<sort_order>0</sort_order>
|
11 |
+
<show_in_default>1</show_in_default>
|
12 |
+
<show_in_website>1</show_in_website>
|
13 |
+
<show_in_store>1</show_in_store>
|
14 |
+
<fields>
|
15 |
+
<active translate="label">
|
16 |
+
<label>Enabled</label>
|
17 |
+
<frontend_type>select</frontend_type>
|
18 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
19 |
+
<sort_order>1</sort_order>
|
20 |
+
<show_in_default>1</show_in_default>
|
21 |
+
<show_in_website>1</show_in_website>
|
22 |
+
<show_in_store>1</show_in_store>
|
23 |
+
</active>
|
24 |
+
<order_status translate="label">
|
25 |
+
<label>New order status</label>
|
26 |
+
<frontend_type>select</frontend_type>
|
27 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
28 |
+
<sort_order>2</sort_order>
|
29 |
+
<show_in_default>1</show_in_default>
|
30 |
+
<show_in_website>1</show_in_website>
|
31 |
+
<show_in_store>1</show_in_store>
|
32 |
+
</order_status>
|
33 |
+
<merchant_id translate="label">
|
34 |
+
<label>Novalnet Merchant ID</label>
|
35 |
+
<frontend_type>text</frontend_type>
|
36 |
+
<sort_order>3</sort_order>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>0</show_in_store>
|
40 |
+
</merchant_id>
|
41 |
+
<auth_code translate="label">
|
42 |
+
<label>Novalnet Auth Code</label>
|
43 |
+
<frontend_type>text</frontend_type>
|
44 |
+
<sort_order>4</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>0</show_in_store>
|
48 |
+
</auth_code>
|
49 |
+
<product_id translate="label">
|
50 |
+
<label>Novalnet Product ID</label>
|
51 |
+
<frontend_type>text</frontend_type>
|
52 |
+
<sort_order>5</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>0</show_in_store>
|
56 |
+
</product_id>
|
57 |
+
<tariff_id translate="label">
|
58 |
+
<label>Novalnet Tariff ID</label>
|
59 |
+
<frontend_type>text</frontend_type>
|
60 |
+
<sort_order>6</sort_order>
|
61 |
+
<show_in_default>1</show_in_default>
|
62 |
+
<show_in_website>1</show_in_website>
|
63 |
+
<show_in_store>0</show_in_store>
|
64 |
+
</tariff_id>
|
65 |
+
<live_mode translate="label">
|
66 |
+
<label>Live Mode</label>
|
67 |
+
<frontend_type>select</frontend_type>
|
68 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
69 |
+
<sort_order>8</sort_order>
|
70 |
+
<show_in_default>1</show_in_default>
|
71 |
+
<show_in_website>1</show_in_website>
|
72 |
+
<show_in_store>0</show_in_store>
|
73 |
+
</live_mode>
|
74 |
+
<gateway_timeout translate="label">
|
75 |
+
<comment>Gateway Timeout in seconds</comment>
|
76 |
+
<label>Gateway Timeout</label>
|
77 |
+
<frontend_type>text</frontend_type>
|
78 |
+
<sort_order>17</sort_order>
|
79 |
+
<show_in_default>1</show_in_default>
|
80 |
+
<show_in_website>1</show_in_website>
|
81 |
+
<show_in_store>0</show_in_store>
|
82 |
+
</gateway_timeout>
|
83 |
+
<password translate="label">
|
84 |
+
<label>Password</label>
|
85 |
+
<frontend_type>text</frontend_type>
|
86 |
+
<sort_order>9</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>0</show_in_store>
|
90 |
+
</password>
|
91 |
+
<sort_order translate="label">
|
92 |
+
<label>Sort order</label>
|
93 |
+
<frontend_type>text</frontend_type>
|
94 |
+
<sort_order>10</sort_order>
|
95 |
+
<show_in_default>1</show_in_default>
|
96 |
+
<show_in_website>1</show_in_website>
|
97 |
+
<show_in_store>1</show_in_store>
|
98 |
+
</sort_order>
|
99 |
+
<title translate="label">
|
100 |
+
<label>Title</label>
|
101 |
+
<frontend_type>text</frontend_type>
|
102 |
+
<sort_order>11</sort_order>
|
103 |
+
<show_in_default>1</show_in_default>
|
104 |
+
<show_in_website>1</show_in_website>
|
105 |
+
<show_in_store>1</show_in_store>
|
106 |
+
</title>
|
107 |
+
<allowspecific translate="label">
|
108 |
+
<label>Payment from applicable countries</label>
|
109 |
+
<frontend_type>allowspecific</frontend_type>
|
110 |
+
<sort_order>12</sort_order>
|
111 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
112 |
+
<show_in_default>1</show_in_default>
|
113 |
+
<show_in_website>1</show_in_website>
|
114 |
+
<show_in_store>1</show_in_store>
|
115 |
+
</allowspecific>
|
116 |
+
<specificcountry translate="label">
|
117 |
+
<label>Payment from Specific countries</label>
|
118 |
+
<frontend_type>multiselect</frontend_type>
|
119 |
+
<sort_order>13</sort_order>
|
120 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
121 |
+
<show_in_default>1</show_in_default>
|
122 |
+
<show_in_website>1</show_in_website>
|
123 |
+
<show_in_store>1</show_in_store>
|
124 |
+
</specificcountry>
|
125 |
+
<createinvoice translate="label">
|
126 |
+
<label>Create Invoice</label>
|
127 |
+
<frontend_type>select</frontend_type>
|
128 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
129 |
+
<sort_order>18</sort_order>
|
130 |
+
<show_in_default>1</show_in_default>
|
131 |
+
<show_in_website>1</show_in_website>
|
132 |
+
<show_in_store>1</show_in_store>
|
133 |
+
</createinvoice>
|
134 |
+
<paypal_api_username translate='label'>
|
135 |
+
<label>PAYPAL API User Name</label>
|
136 |
+
<frontend_type>text</frontend_type>
|
137 |
+
<sort_order>19</sort_order>
|
138 |
+
<show_in_default>1</show_in_default>
|
139 |
+
<show_in_website>1</show_in_website>
|
140 |
+
<show_in_store>1</show_in_store>
|
141 |
+
</paypal_api_username>
|
142 |
+
<paypal_api_password translate='label'>
|
143 |
+
<label>PAYPAL API Password</label>
|
144 |
+
<frontend_type>text</frontend_type>
|
145 |
+
<sort_order>20</sort_order>
|
146 |
+
<show_in_default>1</show_in_default>
|
147 |
+
<show_in_website>1</show_in_website>
|
148 |
+
<show_in_store>1</show_in_store>
|
149 |
+
</paypal_api_password>
|
150 |
+
<paypal_api_signature translate='label'>
|
151 |
+
<label>PAYPAL API Signature</label>
|
152 |
+
<frontend_type>text</frontend_type>
|
153 |
+
<sort_order>21</sort_order>
|
154 |
+
<show_in_default>1</show_in_default>
|
155 |
+
<show_in_website>1</show_in_website>
|
156 |
+
<show_in_store>1</show_in_store>
|
157 |
+
</paypal_api_signature>
|
158 |
+
<model>
|
159 |
+
</model>
|
160 |
+
</fields>
|
161 |
+
</novalnetpaypal>
|
162 |
+
</groups>
|
163 |
+
</payment>
|
164 |
+
</sections>
|
165 |
+
</config>
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$setup = new Mage_Sales_Model_Mysql4_Setup('core_setup');
|
4 |
+
$installer->startSetup();
|
5 |
+
$setup->addAttribute('order_payment', 'pn_su_transaction_id', array('type'=>'varchar'));
|
6 |
+
$setup->addAttribute('quote_payment', 'nn_testorder', array('type'=>'tinyint'));
|
7 |
+
$installer->endSetup();
|
8 |
+
|
9 |
+
if (Mage::getVersion() >= 1.1) {
|
10 |
+
$installer->startSetup();
|
11 |
+
$setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_testorder', 'TINYINT NULL DEFAULT NULL');
|
12 |
+
$setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'pn_su_transaction_id', 'VARCHAR(255) NOT NULL');
|
13 |
+
$installer->endSetup();
|
14 |
+
}
|
15 |
+
|
16 |
+
?>
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_sofortueberweisung';
|
7 |
+
$this->_blockGroup = 'sofortueberweisung';
|
8 |
+
$this->_headerText = Mage::helper('sofortueberweisung')->__('Item Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('sofortueberweisung')->__('Add Item');
|
10 |
+
parent::__construct();
|
11 |
+
}
|
12 |
+
}
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
|
8 |
+
$this->_objectId = 'id';
|
9 |
+
$this->_blockGroup = 'sofortueberweisung';
|
10 |
+
$this->_controller = 'adminhtml_sofortueberweisung';
|
11 |
+
|
12 |
+
$this->_updateButton('save', 'label', Mage::helper('sofortueberweisung')->__('Save Item'));
|
13 |
+
$this->_updateButton('delete', 'label', Mage::helper('sofortueberweisung')->__('Delete Item'));
|
14 |
+
|
15 |
+
$this->_addButton('saveandcontinue', array(
|
16 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
17 |
+
'onclick' => 'saveAndContinueEdit()',
|
18 |
+
'class' => 'save',
|
19 |
+
), -100);
|
20 |
+
|
21 |
+
$this->_formScripts[] = "
|
22 |
+
function toggleEditor() {
|
23 |
+
if (tinyMCE.getInstanceById('sofortueberweisung_content') == null) {
|
24 |
+
tinyMCE.execCommand('mceAddControl', false, 'sofortueberweisung_content');
|
25 |
+
} else {
|
26 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'sofortueberweisung_content');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
function saveAndContinueEdit(){
|
31 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
32 |
+
}
|
33 |
+
";
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getHeaderText()
|
37 |
+
{
|
38 |
+
if( Mage::registry('sofortueberweisung_data') && Mage::registry('sofortueberweisung_data')->getId() ) {
|
39 |
+
return Mage::helper('sofortueberweisung')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('sofortueberweisung_data')->getTitle()));
|
40 |
+
} else {
|
41 |
+
return Mage::helper('sofortueberweisung')->__('Add Item');
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
+
'method' => 'post',
|
10 |
+
)
|
11 |
+
);
|
12 |
+
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
}
|
17 |
+
}
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('sofortueberweisung_form', array('legend'=>Mage::helper('sofortueberweisung')->__('Item information')));
|
9 |
+
|
10 |
+
$fieldset->addField('title', 'text', array(
|
11 |
+
'label' => Mage::helper('sofortueberweisung')->__('Title'),
|
12 |
+
'class' => 'required-entry',
|
13 |
+
'required' => true,
|
14 |
+
'name' => 'title',
|
15 |
+
));
|
16 |
+
|
17 |
+
$fieldset->addField('status', 'select', array(
|
18 |
+
'label' => Mage::helper('sofortueberweisung')->__('Status'),
|
19 |
+
'name' => 'status',
|
20 |
+
'values' => array(
|
21 |
+
array(
|
22 |
+
'value' => 1,
|
23 |
+
'label' => Mage::helper('sofortueberweisung')->__('Enabled'),
|
24 |
+
),
|
25 |
+
|
26 |
+
array(
|
27 |
+
'value' => 2,
|
28 |
+
'label' => Mage::helper('sofortueberweisung')->__('Disabled'),
|
29 |
+
),
|
30 |
+
),
|
31 |
+
));
|
32 |
+
|
33 |
+
$fieldset->addField('content', 'editor', array(
|
34 |
+
'name' => 'content',
|
35 |
+
'label' => Mage::helper('sofortueberweisung')->__('Content'),
|
36 |
+
'title' => Mage::helper('sofortueberweisung')->__('Content'),
|
37 |
+
'style' => 'width:700px; height:500px;',
|
38 |
+
'wysiwyg' => false,
|
39 |
+
'required' => true,
|
40 |
+
));
|
41 |
+
|
42 |
+
if ( Mage::getSingleton('adminhtml/session')->getSofortueberweisungData() )
|
43 |
+
{
|
44 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getSofortueberweisungData());
|
45 |
+
Mage::getSingleton('adminhtml/session')->setSofortueberweisungData(null);
|
46 |
+
} elseif ( Mage::registry('sofortueberweisung_data') ) {
|
47 |
+
$form->setValues(Mage::registry('sofortueberweisung_data')->getData());
|
48 |
+
}
|
49 |
+
return parent::_prepareForm();
|
50 |
+
}
|
51 |
+
}
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('sofortueberweisung_tabs');
|
9 |
+
$this->setDestElementId('edit_form');
|
10 |
+
$this->setTitle(Mage::helper('sofortueberweisung')->__('Item Information'));
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _beforeToHtml()
|
14 |
+
{
|
15 |
+
$this->addTab('form_section', array(
|
16 |
+
'label' => Mage::helper('sofortueberweisung')->__('Item Information'),
|
17 |
+
'title' => Mage::helper('sofortueberweisung')->__('Item Information'),
|
18 |
+
'content' => $this->getLayout()->createBlock('sofortueberweisung/adminhtml_sofortueberweisung_edit_tab_form')->toHtml(),
|
19 |
+
));
|
20 |
+
|
21 |
+
return parent::_beforeToHtml();
|
22 |
+
}
|
23 |
+
}
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Adminhtml_Sofortueberweisung_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('sofortueberweisungGrid');
|
8 |
+
$this->setDefaultSort('sofortueberweisung_id');
|
9 |
+
$this->setDefaultDir('ASC');
|
10 |
+
$this->setSaveParametersInSession(true);
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _prepareCollection()
|
14 |
+
{
|
15 |
+
$collection = Mage::getModel('sofortueberweisung/sofortueberweisung')->getCollection();
|
16 |
+
$this->setCollection($collection);
|
17 |
+
return parent::_prepareCollection();
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _prepareColumns()
|
21 |
+
{
|
22 |
+
$this->addColumn('sofortueberweisung_id', array(
|
23 |
+
'header' => Mage::helper('sofortueberweisung')->__('ID'),
|
24 |
+
'align' =>'right',
|
25 |
+
'width' => '50px',
|
26 |
+
'index' => 'sofortueberweisung_id',
|
27 |
+
));
|
28 |
+
|
29 |
+
$this->addColumn('title', array(
|
30 |
+
'header' => Mage::helper('sofortueberweisung')->__('Title'),
|
31 |
+
'align' =>'left',
|
32 |
+
'index' => 'title',
|
33 |
+
));
|
34 |
+
|
35 |
+
/*
|
36 |
+
$this->addColumn('content', array(
|
37 |
+
'header' => Mage::helper('sofortueberweisung')->__('Item Content'),
|
38 |
+
'width' => '150px',
|
39 |
+
'index' => 'content',
|
40 |
+
));
|
41 |
+
*/
|
42 |
+
|
43 |
+
$this->addColumn('created_time', array(
|
44 |
+
'header' => Mage::helper('sofortueberweisung')->__('Creation Time'),
|
45 |
+
'align' => 'left',
|
46 |
+
'width' => '120px',
|
47 |
+
'type' => 'date',
|
48 |
+
'default' => '--',
|
49 |
+
'index' => 'created_time',
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('update_time', array(
|
53 |
+
'header' => Mage::helper('sofortueberweisung')->__('Update Time'),
|
54 |
+
'align' => 'left',
|
55 |
+
'width' => '120px',
|
56 |
+
'type' => 'date',
|
57 |
+
'default' => '--',
|
58 |
+
'index' => 'update_time',
|
59 |
+
));
|
60 |
+
|
61 |
+
$this->addColumn('status', array(
|
62 |
+
'header' => Mage::helper('sofortueberweisung')->__('Status'),
|
63 |
+
'align' => 'left',
|
64 |
+
'width' => '80px',
|
65 |
+
'index' => 'status',
|
66 |
+
'type' => 'options',
|
67 |
+
'options' => array(
|
68 |
+
1 => 'Enabled',
|
69 |
+
2 => 'Disabled',
|
70 |
+
),
|
71 |
+
));
|
72 |
+
|
73 |
+
$this->addColumn('action',
|
74 |
+
array(
|
75 |
+
'header' => Mage::helper('sofortueberweisung')->__('Action'),
|
76 |
+
'width' => '100',
|
77 |
+
'type' => 'action',
|
78 |
+
'getter' => 'getId',
|
79 |
+
'actions' => array(
|
80 |
+
array(
|
81 |
+
'caption' => Mage::helper('sofortueberweisung')->__('Edit'),
|
82 |
+
'url' => array('base'=> '*/*/edit'),
|
83 |
+
'field' => 'id'
|
84 |
+
)
|
85 |
+
),
|
86 |
+
'filter' => false,
|
87 |
+
'sortable' => false,
|
88 |
+
'index' => 'stores',
|
89 |
+
'is_system' => true,
|
90 |
+
));
|
91 |
+
|
92 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('sofortueberweisung')->__('CSV'));
|
93 |
+
$this->addExportType('*/*/exportXml', Mage::helper('sofortueberweisung')->__('XML'));
|
94 |
+
|
95 |
+
return parent::_prepareColumns();
|
96 |
+
}
|
97 |
+
|
98 |
+
protected function _prepareMassaction()
|
99 |
+
{
|
100 |
+
$this->setMassactionIdField('sofortueberweisung_id');
|
101 |
+
$this->getMassactionBlock()->setFormFieldName('sofortueberweisung');
|
102 |
+
|
103 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
104 |
+
'label' => Mage::helper('sofortueberweisung')->__('Delete'),
|
105 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
106 |
+
'confirm' => Mage::helper('sofortueberweisung')->__('Are you sure?')
|
107 |
+
));
|
108 |
+
|
109 |
+
$statuses = Mage::getSingleton('sofortueberweisung/status')->getOptionArray();
|
110 |
+
|
111 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
112 |
+
$this->getMassactionBlock()->addItem('status', array(
|
113 |
+
'label'=> Mage::helper('sofortueberweisung')->__('Change status'),
|
114 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
115 |
+
'additional' => array(
|
116 |
+
'visibility' => array(
|
117 |
+
'name' => 'status',
|
118 |
+
'type' => 'select',
|
119 |
+
'class' => 'required-entry',
|
120 |
+
'label' => Mage::helper('sofortueberweisung')->__('Status'),
|
121 |
+
'values' => $statuses
|
122 |
+
)
|
123 |
+
)
|
124 |
+
));
|
125 |
+
return $this;
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getRowUrl($row)
|
129 |
+
{
|
130 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Form_Sofortueberweisung extends Mage_Payment_Block_Form
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Init default template for block
|
6 |
+
*/
|
7 |
+
protected function _construct()
|
8 |
+
{
|
9 |
+
parent::_construct();
|
10 |
+
$this->setTemplate('sofortueberweisung/form/sofortueberweisung.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Retrieve payment configuration object
|
15 |
+
*
|
16 |
+
* @return Mage_Payment_Model_Config
|
17 |
+
*/
|
18 |
+
protected function _getConfig()
|
19 |
+
{
|
20 |
+
return Mage::getSingleton('payment/config');
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getNetherlandBanks($selected)
|
24 |
+
{
|
25 |
+
$bankArray = Array(
|
26 |
+
'NL_101' => 'ING Calculator',
|
27 |
+
'NL_102' => 'Fortis Bank',
|
28 |
+
'NL_103' => 'ABN Amro Bank',
|
29 |
+
'NL_104' => 'SNS Bank',
|
30 |
+
'NL_105' => 'Rabobank',
|
31 |
+
'NL_106' => 'ING Wachtwoord',
|
32 |
+
'NL_109' => 'SNS Regio Bank',
|
33 |
+
);
|
34 |
+
|
35 |
+
foreach($bankArray AS $key => $val){
|
36 |
+
$selectArray[$key] = Array('value' => $val,'selected' => 0);
|
37 |
+
if($key == $selected){
|
38 |
+
$selectArray[$key]['selected'] = 1;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
return $selectArray;
|
43 |
+
}
|
44 |
+
}
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Info_Sofortueberweisung extends Mage_Payment_Block_Info
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Init default template for block
|
6 |
+
*/
|
7 |
+
protected function _construct()
|
8 |
+
{
|
9 |
+
parent::_construct();
|
10 |
+
$this->setTemplate('sofortueberweisung/info/sofortueberweisung.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Retrieve info model
|
15 |
+
*
|
16 |
+
* @return Mage_Sofortueberweisung_Model_Info
|
17 |
+
*/
|
18 |
+
public function getInfo()
|
19 |
+
{
|
20 |
+
$info = $this->getData('info');
|
21 |
+
|
22 |
+
if (!($info instanceof Mage_Payment_Model_Info)) {
|
23 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
24 |
+
}
|
25 |
+
return $info;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment method model
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Method_Abstract
|
32 |
+
*/
|
33 |
+
public function getMethod()
|
34 |
+
{
|
35 |
+
return $this->getInfo()->getMethodInstance();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function toPdf()
|
39 |
+
{
|
40 |
+
$this->setTemplate('sofortueberweisung/info/pdf/sofortueberweisung.phtml');
|
41 |
+
return $this->toHtml();
|
42 |
+
}
|
43 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Infobox extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('sofortueberweisung/infobox.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Sofortueberweisung extends Mage_Core_Block_Abstract
|
3 |
+
{
|
4 |
+
protected function _toHtml()
|
5 |
+
{
|
6 |
+
$payment = $this->getOrder()->getPayment()->getMethodInstance();
|
7 |
+
|
8 |
+
if($payment->getConfigData('password')) {
|
9 |
+
$form = new Varien_Data_Form();
|
10 |
+
$form->setAction($payment->getUrl())
|
11 |
+
->setId('sofortueberweisung')
|
12 |
+
->setName('sofortueberweisung')
|
13 |
+
->setMethod('POST')
|
14 |
+
->setUseContainer(true);
|
15 |
+
|
16 |
+
foreach ($payment->getFormFields() as $field=>$value) {
|
17 |
+
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
18 |
+
}
|
19 |
+
// IE & Firefox will not submit form if the form is full of hidden fileds.
|
20 |
+
$form->addField( 'continue', 'submit', array( 'name'=>'continue', 'value'=>$this->__('You will be redirected to Novalnet AG Instant Bank Transfer in a few seconds.') ) );
|
21 |
+
$html = '<html><body>';
|
22 |
+
// $html.= $this->__('You will be redirected to Novalnet AG Instant Bank Transfer in a few seconds.');
|
23 |
+
$html.= $form->toHtml();
|
24 |
+
$html.= '<script type="text/javascript">document.getElementById("sofortueberweisung").submit();</script>';
|
25 |
+
$html.= '</body></html>';
|
26 |
+
|
27 |
+
return $html;
|
28 |
+
}else{
|
29 |
+
$html = $this->__('Theres no password defined');
|
30 |
+
return $html;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Sofortueberweisungerrornotice extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('sofortueberweisung/errornotice.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Block_Sofortueberweisungnotice extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('sofortueberweisung/notice.phtml');
|
8 |
+
}
|
9 |
+
}
|
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
var $hashfunction;
|
5 |
+
var $password;
|
6 |
+
var $password2;
|
7 |
+
var $formActionUrl;
|
8 |
+
var $version;
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
function classSofortueberweisung($password = '', $hashfunction = 'sha1') {
|
13 |
+
|
14 |
+
$this->password = $password;
|
15 |
+
$this->password2 = '';
|
16 |
+
$this->hashfunction = $hashfunction;
|
17 |
+
$this->version = 'pn_mag_1.1.0';
|
18 |
+
$this->formActionUrl = 'https://www.sofortueberweisung.de/payment/start?';
|
19 |
+
|
20 |
+
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param int $userId
|
26 |
+
* @param int $projectId
|
27 |
+
* @param string $amount
|
28 |
+
* @param string $currency EUR|CHF
|
29 |
+
* @param string [optional] $reason1
|
30 |
+
* @param string [optional] $reason2
|
31 |
+
* @param string [optional] $userVariable0
|
32 |
+
* @param string [optional] $userVariable1
|
33 |
+
* @param string [optional] $userVariable2
|
34 |
+
* @param string [optional] $userVariable3
|
35 |
+
* @param string [optional] $userVariable4
|
36 |
+
* @param string [optional] $userVariable5
|
37 |
+
* @param string [optional] $senderHolder
|
38 |
+
* @param string [optional] $senderAccountNumber
|
39 |
+
* @param string [optional] $senderBankCode
|
40 |
+
* @param string [optional] $senderCountryId
|
41 |
+
* @return string url with urlencoded variables
|
42 |
+
*/
|
43 |
+
function getPaymentUrl($userId, $projectId, $amount, $currency,
|
44 |
+
$reason1 = '' , $reason2 = '' , $userVariable0 = '' , $userVariable1 = '' , $userVariable2 = '' ,
|
45 |
+
$userVariable3 = '' , $userVariable4 = '' , $userVariable5 = '',
|
46 |
+
$senderHolder = '', $senderAccountNumber = '', $senderBankCode = '', $senderCountryId = ''){
|
47 |
+
|
48 |
+
|
49 |
+
$data = $this->getPaymentParameters($userId, $projectId, $amount, $currency,
|
50 |
+
$reason1, $reason2, $userVariable0, $userVariable1, $userVariable2,
|
51 |
+
$userVariable3, $userVariable4, $userVariable5,
|
52 |
+
$senderHolder, $senderAccountNumber, $senderBankCode, $senderCountryId);
|
53 |
+
|
54 |
+
$dataString = '';
|
55 |
+
foreach ($data as $key => $value) {
|
56 |
+
$dataString .= $key.'='.urlencode($value).'&';
|
57 |
+
}
|
58 |
+
$dataString = substr($dataString, 0, -1); //remove last &
|
59 |
+
|
60 |
+
return $this->formActionUrl.$dataString;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @param int $userId
|
65 |
+
* @param int $projectId
|
66 |
+
* @param string $amount
|
67 |
+
* @param string $currency EUR|CHF
|
68 |
+
* @param string [optional] $reason1
|
69 |
+
* @param string [optional] $reason2
|
70 |
+
* @param string [optional] $userVariable0
|
71 |
+
* @param string [optional] $userVariable1
|
72 |
+
* @param string [optional] $userVariable2
|
73 |
+
* @param string [optional] $userVariable3
|
74 |
+
* @param string [optional] $userVariable4
|
75 |
+
* @param string [optional] $userVariable5
|
76 |
+
* @param string [optional] $senderHolder
|
77 |
+
* @param string [optional] $senderAccountNumber
|
78 |
+
* @param string [optional] $senderBankCode
|
79 |
+
* @param string [optional] $senderCountryId
|
80 |
+
* @return array array with parameters for payment message
|
81 |
+
*/
|
82 |
+
function getPaymentParameters($userId, $projectId, $amount, $currency,
|
83 |
+
$reason1 = '' , $reason2 = '' , $userVariable0 = '' , $userVariable1 = '' , $userVariable2 = '' ,
|
84 |
+
$userVariable3 = '' , $userVariable4 = '' , $userVariable5 = '',
|
85 |
+
$senderHolder = '', $senderAccountNumber = '', $senderBankCode = '', $senderCountryId = '') {
|
86 |
+
|
87 |
+
$tmparray = array(
|
88 |
+
$userId,
|
89 |
+
$projectId,
|
90 |
+
$senderHolder,
|
91 |
+
$senderAccountNumber,
|
92 |
+
$senderBankCode,
|
93 |
+
$senderCountryId,
|
94 |
+
$amount,
|
95 |
+
$currency,
|
96 |
+
$reason1,
|
97 |
+
$reason2,
|
98 |
+
$userVariable0,
|
99 |
+
$userVariable1,
|
100 |
+
$userVariable2,
|
101 |
+
$userVariable3,
|
102 |
+
$userVariable4,
|
103 |
+
$userVariable5,
|
104 |
+
$this->password);
|
105 |
+
|
106 |
+
$hash = $this->generateHash(implode("|", $tmparray));
|
107 |
+
|
108 |
+
$data['user_id'] = $userId;
|
109 |
+
$data['project_id'] = $projectId;
|
110 |
+
$data['amount'] = $amount;
|
111 |
+
$data['currency_id'] = $currency;
|
112 |
+
$data['reason_1'] = $reason1;
|
113 |
+
$data['reason_2'] = $reason2;
|
114 |
+
$data['user_variable_0'] = $userVariable0;
|
115 |
+
$data['user_variable_1'] = $userVariable1;
|
116 |
+
$data['user_variable_2'] = $userVariable2;
|
117 |
+
$data['user_variable_3'] = $userVariable3;
|
118 |
+
$data['user_variable_4'] = $userVariable4;
|
119 |
+
$data['user_variable_5'] = $userVariable5;
|
120 |
+
$data['hash'] = $hash;
|
121 |
+
$data['encoding'] = 'UTF-8';
|
122 |
+
$data['payment_module'] = $this->version;
|
123 |
+
$data['interface_version'] = $this->version;
|
124 |
+
|
125 |
+
return $data;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* checks server response and gets parameters
|
130 |
+
* @return $data array|string response parameters or ERROR_WRONG_HASH|ERROR_NO_ORDER_DETAILS if error
|
131 |
+
*
|
132 |
+
*/
|
133 |
+
function getNotification(){
|
134 |
+
|
135 |
+
$fields = array(
|
136 |
+
'transaction', 'user_id', 'project_id',
|
137 |
+
'sender_holder', 'sender_account_number', 'sender_bank_code', 'sender_bank_name', 'sender_bank_bic', 'sender_iban', 'sender_country_id',
|
138 |
+
'recipient_holder', 'recipient_account_number', 'recipient_bank_code', 'recipient_bank_name', 'recipient_bank_bic', 'recipient_iban', 'recipient_country_id',
|
139 |
+
'international_transaction', 'amount', 'currency_id',
|
140 |
+
'reason_1', 'reason_2',
|
141 |
+
'security_criteria',
|
142 |
+
'user_variable_0', 'user_variable_1', 'user_variable_2', 'user_variable_3', 'user_variable_4', 'user_variable_5',
|
143 |
+
'created'
|
144 |
+
);
|
145 |
+
|
146 |
+
$data = array();
|
147 |
+
foreach($fields as $key) {
|
148 |
+
$data[$key] = $_POST[$key];
|
149 |
+
}
|
150 |
+
|
151 |
+
//sanitize input
|
152 |
+
$data['amount'] = number_format($data['amount'], 2, '.', '');
|
153 |
+
$data['transaction'] = preg_replace('#[^A-Za-z0-9_-]+#', '', $data['transaction']);
|
154 |
+
$data['user_id'] = preg_replace('#[^0-9]+#', '', $data['user_id']);
|
155 |
+
$data['project_id'] = preg_replace('#[^0-9]+#', '', $data['project_id']);
|
156 |
+
|
157 |
+
if (empty($data['user_id']) || empty($data['project_id']) || empty($data['amount']) || empty($_POST['hash'])) {
|
158 |
+
return 'ERROR_NOTIFICATION_INCOMPLETE';
|
159 |
+
}
|
160 |
+
|
161 |
+
if(empty($this->password)) {
|
162 |
+
return 'ERROR_NO_PASSWORD';
|
163 |
+
}
|
164 |
+
$data['project_password'] = $this->password;
|
165 |
+
|
166 |
+
$validationhash = $this->generateHash(implode('|', $data));
|
167 |
+
$messagehash = $_POST['hash'];
|
168 |
+
|
169 |
+
if ($validationhash != $messagehash) {
|
170 |
+
return 'ERROR_WRONG_HASH';
|
171 |
+
}
|
172 |
+
|
173 |
+
return $data;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* checks wich hash algorithms are supported by the server
|
178 |
+
* and returns the best one
|
179 |
+
*
|
180 |
+
* @return sha512|sha256|sha1|md5|empty string
|
181 |
+
*/
|
182 |
+
function getSupportedHashAlgorithm() {
|
183 |
+
|
184 |
+
$algorithms = $this->getSupportedHashAlgorithms();
|
185 |
+
|
186 |
+
if(is_array($algorithms))
|
187 |
+
return $algorithms[0];
|
188 |
+
else
|
189 |
+
return ''; //no hash function found
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* checks wich hash algorithms are supported by the server
|
194 |
+
*
|
195 |
+
* @return array with all supported algorithms, preferred as first one (index 0)
|
196 |
+
*/
|
197 |
+
function getSupportedHashAlgorithms() {
|
198 |
+
|
199 |
+
$algorithms = array();
|
200 |
+
|
201 |
+
if(function_exists('hash') && in_array('sha512', hash_algos()))
|
202 |
+
$algorithms[] = 'sha512';
|
203 |
+
|
204 |
+
if(function_exists('hash') && in_array('sha256', hash_algos()))
|
205 |
+
$algorithms[] = 'sha256';
|
206 |
+
|
207 |
+
if(function_exists('sha1')) //deprecated
|
208 |
+
$algorithms[] = 'sha1';
|
209 |
+
|
210 |
+
if(function_exists('md5')) //deprecated
|
211 |
+
$algorithms[] = 'md5';
|
212 |
+
|
213 |
+
return $algorithms;
|
214 |
+
}
|
215 |
+
|
216 |
+
|
217 |
+
/**
|
218 |
+
* generates a html-page that sets post-parameters and redirects to the SU-autoinstaller
|
219 |
+
* sets password, password2 and hashfunction
|
220 |
+
*
|
221 |
+
* @param unknown_type $projectName
|
222 |
+
* @param unknown_type $projectHomepage
|
223 |
+
* @param unknown_type $projectEmail
|
224 |
+
* @param unknown_type $projectLanguage
|
225 |
+
* @param unknown_type $currency
|
226 |
+
* @param unknown_type $cancelLink
|
227 |
+
* @param unknown_type $successLink
|
228 |
+
* @param unknown_type $notificationLink
|
229 |
+
* @param unknown_type $backLink
|
230 |
+
* @return string
|
231 |
+
*/
|
232 |
+
function getAutoInstallPage($projectName, $projectHomepage, $projectEmail, $projectLanguage, $currency,
|
233 |
+
$cancelLink, $successLink, $notificationLink, $backLink, $shopSystemId){
|
234 |
+
|
235 |
+
$this->password = $this->generateRandomValue();
|
236 |
+
$this->password2 = $this->generateRandomValue();
|
237 |
+
$this->hashfunction = $this->getSupportedHashAlgorithm();
|
238 |
+
|
239 |
+
$html = '
|
240 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
241 |
+
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
|
242 |
+
<head>
|
243 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
244 |
+
<title>Schnellregistrierung | sofortueberweisung.de</title>
|
245 |
+
</head>
|
246 |
+
<body onload="document.getElementById(\'form\').submit()">
|
247 |
+
<form method="post" action="https://www.sofortueberweisung.de/payment/createNew/" id="form">
|
248 |
+
<input type="hidden" name="project_name" value="'.$projectName.'">
|
249 |
+
<input type="hidden" name="project_homepage" value="'.$projectHomepage.'">
|
250 |
+
<input type="hidden" name="projectsnotification_email_email" value="'.$projectEmail.'">
|
251 |
+
<input type="hidden" name="projectsnotification_email_activated" value="1">
|
252 |
+
<input type="hidden" name="projectsnotification_email_language_id" value="'.$projectLanguage.'">
|
253 |
+
<input type="hidden" name="projectssetting_interface_cancel_link" value="'.$cancelLink.'">
|
254 |
+
<input type="hidden" name="projectssetting_interface_success_link_redirect" value="1">
|
255 |
+
<input type="hidden" name="projectssetting_interface_success_link" value="'.$successLink.'">
|
256 |
+
<input type="hidden" name="projectssetting_currency_id" value="'.$currency.'">
|
257 |
+
<input type="hidden" name="projectssetting_locked_amount" value="1">
|
258 |
+
<input type="hidden" name="projectssetting_locked_reason_1" value="1">
|
259 |
+
<input type="hidden" name="projectssetting_locked_reason_2" value="1">
|
260 |
+
<input type="hidden" name="projectssetting_interface_input_hash_check_enabled" value="1">
|
261 |
+
<input type="hidden" name="projectssetting_project_password" value="'.$this->password.'">
|
262 |
+
<input type="hidden" name="project_notification_password" value="'.$this->password2.'">
|
263 |
+
<input type="hidden" name="project_shop_system_id" value="'.$shopSystemId.'">
|
264 |
+
<input type="hidden" name="project_hash_algorithm" value="'.$this->hashfunction.'">
|
265 |
+
<input type="hidden" name="user_shop_system_id" value="'.$shopSystemId.'">
|
266 |
+
<input type="hidden" name="projectsnotification_http_activated" value="1">
|
267 |
+
<input type="hidden" name="projectsnotification_http_url" value="'.$notificationLink.'">
|
268 |
+
<input type="hidden" name="projectsnotification_http_method" value="1">
|
269 |
+
<input type="hidden" name="backlink" value="'.$backLink.'">
|
270 |
+
<input type="hidden" name="debug" value="0">
|
271 |
+
<noscript><input type="submit"></noscript>
|
272 |
+
</form>
|
273 |
+
</body>
|
274 |
+
</html>
|
275 |
+
';
|
276 |
+
return $html;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* @param string $data string to be hashed
|
281 |
+
* @return string the hash
|
282 |
+
*/
|
283 |
+
function generateHash($data){
|
284 |
+
|
285 |
+
if($this->hashfunction == 'sha1')
|
286 |
+
return sha1($data);
|
287 |
+
|
288 |
+
//mcrypt installed?
|
289 |
+
if(function_exists('hash') && in_array($this->hashfunction, hash_algos()))
|
290 |
+
return hash($this->hashfunction, $data);
|
291 |
+
|
292 |
+
return md5($data); //fallback to md5
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* @param int [optional] $length length of return value, default 24
|
297 |
+
* @return string
|
298 |
+
*/
|
299 |
+
function generateRandomValue($length = 24) {
|
300 |
+
$randomValue = '';
|
301 |
+
|
302 |
+
//if php >= 5.3 and openssl installed we will use its more secure random generator
|
303 |
+
if(function_exists('openssl_random_pseudo_bytes')) {
|
304 |
+
$p = base64_encode(openssl_random_pseudo_bytes($length, $strong)); //output is base64: a-zA-Z0-9/+
|
305 |
+
if($strong === TRUE)
|
306 |
+
{
|
307 |
+
$randomValue = preg_replace('#[^A-Za-z0-9]#', '', $p); //remove all special chars
|
308 |
+
$randomValue = substr($randomValue, 0, $length); //base64 is about 33% longer, so needs to get truncated
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
//fallback to mt_rand for php < 5.3
|
313 |
+
if(strlen($randomValue) < $length)
|
314 |
+
{
|
315 |
+
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; //62 chars 0-9A-Za-z
|
316 |
+
$charactersLength = strlen($characters)-1;
|
317 |
+
|
318 |
+
//select some random characters from all characters
|
319 |
+
for ($i = 0; $i < $length; $i++) {
|
320 |
+
$randomValue .= $characters[mt_rand(0, $charactersLength)];
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
return $randomValue;
|
325 |
+
}
|
326 |
+
}
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Convert_Order extends Mage_Sales_Model_Convert_Order
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Convert order payment to quote payment
|
6 |
+
*
|
7 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
8 |
+
* @return Mage_Sales_Model_Quote_Payment
|
9 |
+
*/
|
10 |
+
public function paymentToQuotePayment(Mage_Sales_Model_Order_Payment $payment, $quotePayment=null)
|
11 |
+
{
|
12 |
+
$quotePayment = parent::paymentToQuotePayment($payment, $quotePayment);
|
13 |
+
|
14 |
+
$quotePayment->setSuAccountNumber($payment->getSuAccountNumber())
|
15 |
+
->setSuBankCode($payment->getSuBankCode())
|
16 |
+
->setSuNlBankCode($payment->getSuNlBankCode())
|
17 |
+
->setSuPaycode($payment->getSuPaycode())
|
18 |
+
->setSuSecurity($payment->getSuSecurity())
|
19 |
+
->setSuIban($payment->getSuIban())
|
20 |
+
->setSuBic($payment->getSuBic())
|
21 |
+
->setSuHolder($payment->getSuHolder());
|
22 |
+
|
23 |
+
return $quotePayment;
|
24 |
+
}
|
25 |
+
}
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Convert_Quote extends Mage_Sales_Model_Convert_Quote
|
3 |
+
{
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Convert quote payment to order payment
|
7 |
+
*
|
8 |
+
* @param Mage_Sales_Model_Quote_Payment $payment
|
9 |
+
* @return Mage_Sales_Model_Quote_Payment
|
10 |
+
*/
|
11 |
+
public function paymentToOrderPayment(Mage_Sales_Model_Quote_Payment $payment)
|
12 |
+
{
|
13 |
+
$orderPayment = parent::paymentToOrderPayment($payment);
|
14 |
+
$orderPayment->setSuAccountNumber($payment->getSuAccountNumber())
|
15 |
+
->setSuBankCode($payment->getSuBankCode())
|
16 |
+
->setSuNlBankCode($payment->getSuNlBankCode())
|
17 |
+
->setSuPaycode($payment->getSuPaycode())
|
18 |
+
->setSuSecurity($payment->getSuSecurity())
|
19 |
+
->setSuIban($payment->getSuIban())
|
20 |
+
->setSuBic($payment->getSuBic())
|
21 |
+
->setSuHolder($payment->getSuHolder());
|
22 |
+
|
23 |
+
return $orderPayment;
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Varien_Data_Form_Element_Label extends Varien_Data_Form_Element_Abstract
|
3 |
+
{
|
4 |
+
public function __construct($attributes=array())
|
5 |
+
{
|
6 |
+
parent::__construct($attributes);
|
7 |
+
$this->setType('label');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getElementHtml()
|
11 |
+
{
|
12 |
+
$html = $this->getBold() ? '<strong>' : '';
|
13 |
+
$html.= $this->getValue();
|
14 |
+
$html.= $this->getBold() ? '</strong>' : '';
|
15 |
+
$html.= $this->getAfterElementHtml();
|
16 |
+
return $html;
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Novalnet_Sofortueberweisung_Model_Mysql4_Sofortueberweisung extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
// Note that the sofortueberweisung_id refers to the key field in your database table.
|
8 |
+
$this->_init('sofortueberweisung/sofortueberweisung', 'sofortueberweisung_id');
|
9 |
+
}
|
10 |
+
}
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Novalnet_Sofortueberweisung_Model_Mysql4_Sofortueberweisung_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('sofortueberweisung/sofortueberweisung');
|
9 |
+
}
|
10 |
+
}
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Params extends Varien_Object{}
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Paycode extends Mage_Payment_Model_Method_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Availability options
|
6 |
+
*/
|
7 |
+
protected $_code = 'paycode';
|
8 |
+
protected $_paymentMethod = 'paycode';
|
9 |
+
|
10 |
+
protected $_formBlockType = 'sofortueberweisung/form_paycode';
|
11 |
+
protected $_infoBlockType = 'sofortueberweisung/info_paycode';
|
12 |
+
|
13 |
+
const STATUS_UNKNOWN = 'UNKNOWN';
|
14 |
+
const STATUS_APPROVED = 'APPROVED';
|
15 |
+
const STATUS_ERROR = 'ERROR';
|
16 |
+
const STATUS_DECLINED = 'DECLINED';
|
17 |
+
const STATUS_VOID = 'VOID';
|
18 |
+
const STATUS_SUCCESS = 'SUCCESS';
|
19 |
+
|
20 |
+
protected $_isGateway = false;
|
21 |
+
protected $_canAuthorize = true;
|
22 |
+
protected $_canCapture = false;
|
23 |
+
protected $_canCapturePartial = false;
|
24 |
+
protected $_canRefund = false;
|
25 |
+
protected $_canVoid = false;
|
26 |
+
protected $_canUseInternal = false;
|
27 |
+
protected $_canUseCheckout = true;
|
28 |
+
protected $_canUseForMultishipping = true;
|
29 |
+
protected $_supportedLocales = array('en', 'de', 'fr');
|
30 |
+
|
31 |
+
public function _construct()
|
32 |
+
{
|
33 |
+
parent::_construct();
|
34 |
+
$this->_init('sofortueberweisung/paycode');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getUrl(){
|
38 |
+
return $this->getConfigData('url');
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Return payment method type string
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getPaymentMethodType()
|
47 |
+
{
|
48 |
+
return $this->_paymentMethod;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getSecurityKey(){
|
52 |
+
return uniqid(rand(), true);
|
53 |
+
}
|
54 |
+
|
55 |
+
public function assignData($data)
|
56 |
+
{
|
57 |
+
if (!($data instanceof Varien_Object)) {
|
58 |
+
$data = new Varien_Object($data);
|
59 |
+
}
|
60 |
+
$info = $this->getInfoInstance();
|
61 |
+
$info->setSuAccountNumber($data->getSuAccountNumber())
|
62 |
+
->setSuBankCode($data->getSuBankCode())
|
63 |
+
->setSuPaycode($data->getSuPaycode())
|
64 |
+
->setSuIban($data->getSuIban())
|
65 |
+
->setSuBic($data->getSuBic())
|
66 |
+
->setSuHolder($data->getSuHolder());
|
67 |
+
|
68 |
+
return $this;
|
69 |
+
}
|
70 |
+
|
71 |
+
public function validate()
|
72 |
+
{
|
73 |
+
parent::validate();
|
74 |
+
|
75 |
+
if (!$this->getQuote()->getPayment()->getSuHolder()) {
|
76 |
+
Mage::throwException(Mage::helper('sofortueberweisung')->__('Please fill out the account holder'));
|
77 |
+
}
|
78 |
+
if (!$this->getQuote()->getPayment()->getSuBankCode()) {
|
79 |
+
Mage::throwException(Mage::helper('sofortueberweisung')->__('Please fill out the account number'));
|
80 |
+
}
|
81 |
+
if (!$this->getQuote()->getPayment()->getSuBankCode()) {
|
82 |
+
Mage::throwException(Mage::helper('sofortueberweisung')->__('Please fill out the bank code'));
|
83 |
+
}
|
84 |
+
return $this;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Send authorize request to gateway
|
89 |
+
*
|
90 |
+
* @param Varien_Object $payment
|
91 |
+
* @param decimal $amount
|
92 |
+
* @return Mage_Paygate_Model_Authorizenet
|
93 |
+
*/
|
94 |
+
public function authorize(Varien_Object $payment, $amount)
|
95 |
+
{/*
|
96 |
+
$payment->setAmount($this->getQuote()->getGrandTotal());
|
97 |
+
$error = false;
|
98 |
+
$security = $this->getSecurityKey();
|
99 |
+
$payment->setSuSecurity($security);
|
100 |
+
|
101 |
+
if($payment->getAmount()){
|
102 |
+
|
103 |
+
$amount = number_format($this->getQuote()->getGrandTotal(),2,'.','');
|
104 |
+
$billing = $this->getQuote()->getBillingAddress();
|
105 |
+
|
106 |
+
$locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
|
107 |
+
if (is_array($locale) && !empty($locale) && in_array($locale[0], $this->_supportedLocales))
|
108 |
+
$locale = strtoupper($locale[0]);
|
109 |
+
else
|
110 |
+
$locale = strtoupper($this->getDefaultLocale());
|
111 |
+
|
112 |
+
$params = Array(
|
113 |
+
'user_id' => $this->getConfigData('customer'),
|
114 |
+
'project_id' => $this->getConfigData('project'),
|
115 |
+
'amount' => $amount,
|
116 |
+
'reason_1' => Mage::helper('sofortueberweisung')->__('Order: ').$this->getQuote()->getReservedOrderId(),
|
117 |
+
'reason_2' => '',
|
118 |
+
'sender_holder' => $payment->getSuHolder(),
|
119 |
+
'sender_account_number' => $payment->getSuAccountNumber(),
|
120 |
+
'sender_bank_code' => $payment->getSuBankCode(),
|
121 |
+
'sender_bank_bic' => $payment->getSuBic(),
|
122 |
+
'sender_iban' => $payment->getSuIban(),
|
123 |
+
'sender_country_id' => $billing->getCountry(),
|
124 |
+
'user_variable_0' => $this->getQuote()->getReservedOrderId(),
|
125 |
+
'user_variable_1' => $payment->getSuSecurity(),
|
126 |
+
'user_variable_2' => '',
|
127 |
+
'user_variable_3' => '',
|
128 |
+
'user_variable_4' => '',
|
129 |
+
'user_variable_5' => '',
|
130 |
+
'expires' => $this->getConfigData('expires'),
|
131 |
+
'language_id' => $locale,
|
132 |
+
);
|
133 |
+
|
134 |
+
if($this->getConfigData('check_input_yesno') == 1)
|
135 |
+
$params['hash'] = md5(implode('|',$params).'|'.$this->getConfigData('project_pswd'));
|
136 |
+
|
137 |
+
$result = $this->_postRequest($params);
|
138 |
+
|
139 |
+
if(strstr($result,'Errors') === false){
|
140 |
+
$payment->setSuPaycode($result);
|
141 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
142 |
+
}else{
|
143 |
+
$error = Mage::helper('sofortueberweisung')->__('Please check your account data.');
|
144 |
+
}
|
145 |
+
}else{
|
146 |
+
$error = Mage::helper('sofortueberweisung')->__('Invalid amount for authorization.');
|
147 |
+
}
|
148 |
+
|
149 |
+
if ($error !== false) {
|
150 |
+
Mage::throwException($error);
|
151 |
+
}*/
|
152 |
+
|
153 |
+
return $this;
|
154 |
+
}
|
155 |
+
|
156 |
+
protected function _postRequest($request)
|
157 |
+
{
|
158 |
+
$client = new Varien_Http_Client();
|
159 |
+
|
160 |
+
$client->setUri($this->getUrl());
|
161 |
+
$client->setConfig(array(
|
162 |
+
'maxredirects'=>2,
|
163 |
+
'timeout'=>60,
|
164 |
+
));
|
165 |
+
|
166 |
+
$client->setParameterGet($request);
|
167 |
+
$client->setMethod(Zend_Http_Client::GET);
|
168 |
+
try {
|
169 |
+
$response = $client->request();
|
170 |
+
} catch (Exception $e) {
|
171 |
+
Mage::throwException(
|
172 |
+
Mage::helper('sofortueberweisung')->__('Gateway request error: %s', $e->getMessage())
|
173 |
+
);
|
174 |
+
}
|
175 |
+
|
176 |
+
$responseBody = $response->getBody();
|
177 |
+
|
178 |
+
return $responseBody;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get quote
|
183 |
+
*
|
184 |
+
* @return Mage_Sales_Model_Order
|
185 |
+
*/
|
186 |
+
public function getQuote()
|
187 |
+
{
|
188 |
+
if (empty($this->_quote)) {
|
189 |
+
$this->_quote = $this->getCheckout()->getQuote();
|
190 |
+
}
|
191 |
+
return $this->_quote;
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Get checkout
|
196 |
+
*
|
197 |
+
* @return Mage_Sales_Model_Order
|
198 |
+
*/
|
199 |
+
public function getCheckout()
|
200 |
+
{
|
201 |
+
if (empty($this->_checkout)) {
|
202 |
+
$this->_checkout = Mage::getSingleton('checkout/session');
|
203 |
+
}
|
204 |
+
return $this->_checkout;
|
205 |
+
}
|
206 |
+
|
207 |
+
}
|
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Model_Sofortueberweisung extends Mage_Payment_Model_Method_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Availability options
|
6 |
+
*/
|
7 |
+
protected $_code = 'sofortueberweisung';
|
8 |
+
protected $_paymentMethod = 'sofortueberweisung';
|
9 |
+
|
10 |
+
protected $_formBlockType = 'sofortueberweisung/form_sofortueberweisung';
|
11 |
+
protected $_infoBlockType = 'sofortueberweisung/info_sofortueberweisung';
|
12 |
+
|
13 |
+
protected $_isGateway = false;
|
14 |
+
protected $_canAuthorize = true;
|
15 |
+
protected $_canCapture = false;
|
16 |
+
protected $_canCapturePartial = false;
|
17 |
+
protected $_canRefund = false;
|
18 |
+
protected $_canVoid = false;
|
19 |
+
protected $_canUseInternal = false;
|
20 |
+
protected $_canUseCheckout = true;
|
21 |
+
protected $_canUseForMultishipping = true;
|
22 |
+
|
23 |
+
protected $password = '';
|
24 |
+
const KEY = 33;
|
25 |
+
|
26 |
+
public function _construct()
|
27 |
+
{
|
28 |
+
parent::_construct();
|
29 |
+
$this->_init('sofortueberweisung/sofortueberweisung');
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getUrl(){
|
33 |
+
return $this->getConfigData('url');
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Return redirect block type
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getRedirectBlockType()
|
42 |
+
{
|
43 |
+
return $this->_redirectBlockType;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Return payment method type string
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public function getPaymentMethodType()
|
52 |
+
{
|
53 |
+
return $this->_paymentMethod;
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get redirect URL
|
59 |
+
*
|
60 |
+
* @return Mage_Payment_Helper_Data
|
61 |
+
*/
|
62 |
+
public function getOrderPlaceRedirectUrl()
|
63 |
+
{
|
64 |
+
return Mage::getUrl('sofortueberweisung/sofortueberweisung/redirect');
|
65 |
+
}
|
66 |
+
|
67 |
+
public function assignData($data)
|
68 |
+
{
|
69 |
+
if (!($data instanceof Varien_Object)) {
|
70 |
+
$data = new Varien_Object($data);
|
71 |
+
}
|
72 |
+
$info = $this->getInfoInstance();
|
73 |
+
$info->setSuAccountNumber($data->getSuAccountNumber())
|
74 |
+
->setSuBankCode($data->getSuBankCode())
|
75 |
+
->setSuNlBankCode($data->getSuNlBankCode())
|
76 |
+
->setSuHolder($data->getSuHolder());
|
77 |
+
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
|
81 |
+
public function getSecurityKey(){
|
82 |
+
return uniqid(rand(), true);
|
83 |
+
}
|
84 |
+
|
85 |
+
public function validate()
|
86 |
+
{
|
87 |
+
parent::validate();
|
88 |
+
|
89 |
+
return $this;
|
90 |
+
}
|
91 |
+
|
92 |
+
public function getFormFields()
|
93 |
+
{
|
94 |
+
#$amount = number_format($this->getOrder()->getGrandTotal(),2,'.','');
|
95 |
+
$billing = $this->getOrder()->getBillingAddress();
|
96 |
+
$security = $this->getSecurityKey();
|
97 |
+
|
98 |
+
$this->getOrder()->getPayment()->setSuSecurity($security)->save();
|
99 |
+
|
100 |
+
$pnSu = Mage::helper('sofortueberweisung');
|
101 |
+
$pnSu->classSofortueberweisung($this->getConfigData('project_pswd'));
|
102 |
+
|
103 |
+
/*return $pnSu->getPaymentParameters(
|
104 |
+
$this->getConfigData('customer'),
|
105 |
+
$this->getConfigData('project'),
|
106 |
+
$amount,
|
107 |
+
$this->getOrder()->getOrderCurrencyCode(),
|
108 |
+
Mage::helper('sofortueberweisung')->__('Order No.: ').$this->getOrder()->getRealOrderId(),
|
109 |
+
'' ,
|
110 |
+
$this->getOrder()->getRealOrderId(),
|
111 |
+
$this->getOrder()->getPayment()->getSuSecurity());
|
112 |
+
*/
|
113 |
+
$order = $this->getOrder();
|
114 |
+
$payment = $this->getOrder()->getPayment();
|
115 |
+
$this->password = $this->getConfigData('password');
|
116 |
+
$_SESSION['mima'] = $this->password;#todo: ?????
|
117 |
+
$session = Mage::getSingleton('checkout/session');
|
118 |
+
$paymentInfo = $this->getInfoInstance();
|
119 |
+
|
120 |
+
|
121 |
+
$fieldsArr = array();
|
122 |
+
$note = $order->getCustomerNote();
|
123 |
+
if ($note){
|
124 |
+
$note = '<br />'.Mage::helper('sofortueberweisung')->__('Comment').': '.$note;
|
125 |
+
}
|
126 |
+
if ( !$this->getConfigData('live_mode') ){
|
127 |
+
$note .= '<br /><b><font color="red">'.strtoupper(Mage::helper('sofortueberweisung')->__('Testorder')).'</font></b>';
|
128 |
+
}
|
129 |
+
$order->setComment($note);
|
130 |
+
$order->setCustomerNote($note);
|
131 |
+
$order->setCustomerNoteNotify(true);
|
132 |
+
|
133 |
+
$fieldsArr['key'] = self::KEY;
|
134 |
+
$fieldsArr['vendor'] = $this->getConfigData('merchant_id');
|
135 |
+
$fieldsArr['auth_code'] = $this->encode($this->getConfigData('auth_code'), $this->password);
|
136 |
+
$fieldsArr['product'] = $this->encode($this->getConfigData('product_id'), $this->password);
|
137 |
+
$fieldsArr['tariff'] = $this->encode($this->getConfigData('tariff_id'), $this->password);
|
138 |
+
$fieldsArr['amount'] = $this->encode( ( round($order->getBaseGrandTotal(), 2) * 100), $this->password);
|
139 |
+
$fieldsArr['test_mode'] = $this->encode((!$this->getConfigData('live_mode'))? 1: 0, $this->password);
|
140 |
+
$fieldsArr['uniqid'] = $this->encode(uniqid(), $this->password);
|
141 |
+
|
142 |
+
$hParams['auth_code'] = $fieldsArr['auth_code'];
|
143 |
+
$hParams['product_id']= $fieldsArr['product'];
|
144 |
+
$hParams['tariff'] = $fieldsArr['tariff'];
|
145 |
+
$hParams['amount'] = $fieldsArr['amount'];
|
146 |
+
$hParams['test_mode'] = $fieldsArr['test_mode'];
|
147 |
+
$hParams['uniqid'] = $fieldsArr['uniqid'];
|
148 |
+
|
149 |
+
$fieldsArr['hash'] = $this->hash($hParams, $this->password);
|
150 |
+
$fieldsArr['currency'] = $order->getOrderCurrencyCode();
|
151 |
+
$fieldsArr['first_name'] = $billing->getFirstname();
|
152 |
+
$fieldsArr['last_name'] = $billing->getLastname();
|
153 |
+
$fieldsArr['email'] = $this->getOrder()->getCustomerEmail();
|
154 |
+
$fieldsArr['street'] = $billing->getStreet(1);
|
155 |
+
$fieldsArr['search_in_street'] = 1;
|
156 |
+
$fieldsArr['city'] = $billing->getCity();
|
157 |
+
$fieldsArr['zip'] = $billing->getPostcode();
|
158 |
+
$fieldsArr['country_code'] = $billing->getCountry();
|
159 |
+
$fieldsArr['lang'] = $billing->getLang();
|
160 |
+
$fieldsArr['remote_ip'] = $this->getRealIpAddr();
|
161 |
+
$fieldsArr['tel'] = $billing->getTelephone();
|
162 |
+
$fieldsArr['fax'] = $billing->getFax();
|
163 |
+
$fieldsArr['birth_date'] = $order->getRemoteIp();
|
164 |
+
$fieldsArr['session'] = session_id();
|
165 |
+
$fieldsArr['return_url'] = Mage::getUrl('sofortueberweisung/sofortueberweisung/return', array('_instantbanktransfer' => true));
|
166 |
+
$fieldsArr['return_method'] = 'POST';
|
167 |
+
$fieldsArr['error_return_url'] = Mage::getUrl('sofortueberweisung/sofortueberweisung/error', array('_instantbanktransfer' => true));
|
168 |
+
#http://magento.gsoftpro.de/index.php/sofortueberweisung/sofortueberweisung/error/orderId/-USER_VARIABLE_0-
|
169 |
+
$fieldsArr['error_return_method'] = 'POST';
|
170 |
+
$fieldsArr['input1'] = 'order_id';
|
171 |
+
$fieldsArr['order_no'] = $paymentInfo->getOrder()->getRealOrderId();
|
172 |
+
$fieldsArr['inputval1'] = $paymentInfo->getOrder()->getRealOrderId();
|
173 |
+
$fieldsArr['user_variable_0'] = str_replace(array('https://', 'http://'), array('',''), Mage::getBaseUrl());
|
174 |
+
|
175 |
+
$request = '';
|
176 |
+
foreach ($fieldsArr as $k => $v) {
|
177 |
+
$request .= '<' . $k . '>' . $v . '</' . $k . '>';
|
178 |
+
}
|
179 |
+
return $fieldsArr;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Get quote
|
184 |
+
*
|
185 |
+
* @return Mage_Sales_Model_Order
|
186 |
+
*/
|
187 |
+
public function getQuote()
|
188 |
+
{
|
189 |
+
if (empty($this->_quote)) {
|
190 |
+
$this->_quote = $this->getCheckout()->getQuote();
|
191 |
+
}
|
192 |
+
return $this->_quote;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Get checkout
|
197 |
+
*
|
198 |
+
* @return Mage_Sales_Model_Order
|
199 |
+
*/
|
200 |
+
public function getCheckout()
|
201 |
+
{
|
202 |
+
if (empty($this->_checkout)) {
|
203 |
+
$this->_checkout = Mage::getSingleton('checkout/session');
|
204 |
+
}
|
205 |
+
return $this->_checkout;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Get order model
|
210 |
+
*
|
211 |
+
* @return Mage_Sales_Model_Order
|
212 |
+
*/
|
213 |
+
public function getOrder()
|
214 |
+
{
|
215 |
+
if (!$this->_order) {
|
216 |
+
$paymentInfo = $this->getInfoInstance();
|
217 |
+
$this->_order = Mage::getModel('sales/order')
|
218 |
+
->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
|
219 |
+
}
|
220 |
+
return $this->_order;
|
221 |
+
}
|
222 |
+
public function isPublicIP($value)
|
223 |
+
{
|
224 |
+
if(!$value || count(explode('.',$value))!=4)
|
225 |
+
{
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
|
229 |
+
}
|
230 |
+
public function getRealIpAddr()
|
231 |
+
{
|
232 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
|
233 |
+
{
|
234 |
+
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
235 |
+
}
|
236 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
|
237 |
+
{
|
238 |
+
if($this->isPublicIP($iplist[0])) return $iplist[0];
|
239 |
+
}
|
240 |
+
if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
|
241 |
+
{
|
242 |
+
return $_SERVER['HTTP_CLIENT_IP'];
|
243 |
+
}
|
244 |
+
if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
|
245 |
+
{
|
246 |
+
return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
|
247 |
+
}
|
248 |
+
if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
|
249 |
+
{
|
250 |
+
return $_SERVER['HTTP_FORWARDED_FOR'];
|
251 |
+
}
|
252 |
+
return $_SERVER['REMOTE_ADDR'];
|
253 |
+
}
|
254 |
+
|
255 |
+
private function debug2($object, $filename, $debug = false)
|
256 |
+
{
|
257 |
+
if (!$this->debug and !$debug){return;}
|
258 |
+
$fh = fopen("/tmp/$filename", 'a+');
|
259 |
+
if (gettype($object) == 'object' or gettype($object) == 'array'){
|
260 |
+
fwrite($fh, serialize($object));
|
261 |
+
}else{
|
262 |
+
fwrite($fh, date('H:i:s').' '.$object);
|
263 |
+
}
|
264 |
+
fwrite($fh, "<hr />\n");
|
265 |
+
fclose($fh);
|
266 |
+
}
|
267 |
+
function encode($data, $key)
|
268 |
+
{
|
269 |
+
$data = trim($data);
|
270 |
+
if ($data == '') return'Error: no data';
|
271 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
272 |
+
|
273 |
+
try {
|
274 |
+
$crc = sprintf('%u', crc32($data));# %u is a must for ccrc32 returns a signed value
|
275 |
+
$data = $crc."|".$data;
|
276 |
+
$data = bin2hex($data.$key);
|
277 |
+
$data = strrev(base64_encode($data));
|
278 |
+
}catch (Exception $e){
|
279 |
+
echo('Error: '.$e);
|
280 |
+
}
|
281 |
+
return $data;
|
282 |
+
}
|
283 |
+
function decode($data, $key)
|
284 |
+
{
|
285 |
+
$data = trim($data);
|
286 |
+
if ($data == '') {return'Error: no data';}
|
287 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
288 |
+
|
289 |
+
try {
|
290 |
+
$data = base64_decode(strrev($data));
|
291 |
+
$data = pack("H".strlen($data), $data);
|
292 |
+
$data = substr($data, 0, stripos($data, $key));
|
293 |
+
$pos = strpos($data, "|");
|
294 |
+
if ($pos === false){
|
295 |
+
return("Error: CKSum not found!");
|
296 |
+
}
|
297 |
+
$crc = substr($data, 0, $pos);
|
298 |
+
$value = trim(substr($data, $pos+1));
|
299 |
+
if ($crc != sprintf('%u', crc32($value))){
|
300 |
+
return("Error; CKSum invalid!");
|
301 |
+
}
|
302 |
+
return $value;
|
303 |
+
}catch (Exception $e){
|
304 |
+
echo('Error: '.$e);
|
305 |
+
}
|
306 |
+
}
|
307 |
+
function hash($h, $key)#$h contains encoded data
|
308 |
+
{
|
309 |
+
if (!$h) return'Error: no data';
|
310 |
+
if (!function_exists('md5')){return'Error: func n/a';}
|
311 |
+
#Mage::throwException(Mage::helper('novalnet')->__("$h[auth_code].$h[product_id].$h[tariff].$h[amount].$h[test_mode].$h[uniqid].strrev($key)").'!');
|
312 |
+
return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
|
313 |
+
}
|
314 |
+
function checkHash($request, $key)
|
315 |
+
{
|
316 |
+
if (!$request) return false; #'Error: no data';
|
317 |
+
$h['auth_code'] = $request['auth_code'];#encoded
|
318 |
+
$h['product_id'] = $request['product'];#encoded
|
319 |
+
$h['tariff'] = $request['tariff'];#encoded
|
320 |
+
$h['amount'] = $request['amount'];#encoded
|
321 |
+
$h['test_mode'] = $request['test_mode'];#encoded
|
322 |
+
$h['uniqid'] = $request['uniqid'];#encoded
|
323 |
+
|
324 |
+
if ($request['hash2'] != $this->hash($h, $key)){
|
325 |
+
return false;
|
326 |
+
}
|
327 |
+
return true;
|
328 |
+
}
|
329 |
+
}
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Novalnet_Sofortueberweisung_Model_Status extends Varien_Object
|
4 |
+
{
|
5 |
+
const STATUS_ENABLED = 1;
|
6 |
+
const STATUS_DISABLED = 2;
|
7 |
+
|
8 |
+
static public function getOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
self::STATUS_ENABLED => Mage::helper('sofortueberweisung')->__('Enabled'),
|
12 |
+
self::STATUS_DISABLED => Mage::helper('sofortueberweisung')->__('Disabled')
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_Adminhtml_SofortueberweisungController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
protected function _initAction() {
|
6 |
+
$this->loadLayout()
|
7 |
+
->_setActiveMenu('sofortueberweisung/items')
|
8 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
9 |
+
|
10 |
+
return $this;
|
11 |
+
}
|
12 |
+
|
13 |
+
public function indexAction() {
|
14 |
+
$this->_initAction()
|
15 |
+
->renderLayout();
|
16 |
+
}
|
17 |
+
|
18 |
+
public function saveConfigAction() {
|
19 |
+
$params = $this->getRequest()->getParams();
|
20 |
+
$session = Mage::getSingleton('adminhtml/session');
|
21 |
+
if($this->getRequest()->getParams()){
|
22 |
+
$groups = Array();
|
23 |
+
$groups['sofortueberweisung']['fields']['customer']['value'] = $params["user_id"];
|
24 |
+
$groups['sofortueberweisung']['fields']['project']['value'] = $params["project_id"];
|
25 |
+
$groups['sofortueberweisung']['fields']['check_input_yesno']['value'] = 1;
|
26 |
+
$groups['sofortueberweisung']['fields']['project_pswd']['value'] = $session->getData('projectssetting_project_password');
|
27 |
+
$session->unsetData('projectssetting_project_password');
|
28 |
+
$groups['sofortueberweisung']['fields']['notification_pswd']['value'] = $session->getData('project_notification_password');
|
29 |
+
$session->unsetData('project_notification_password');
|
30 |
+
|
31 |
+
try {
|
32 |
+
Mage::getModel('adminhtml/config_data')
|
33 |
+
->setSection('payment')
|
34 |
+
->setWebsite($this->getRequest()->getParam('website'))
|
35 |
+
->setStore($this->getRequest()->getParam('store'))
|
36 |
+
->setGroups($groups)
|
37 |
+
->save();
|
38 |
+
}catch (Mage_Core_Exception $e) {
|
39 |
+
foreach(split("\n", $e->getMessage()) as $message) {
|
40 |
+
$session->addError($message);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
catch (Exception $e) {
|
44 |
+
$session->addException($e, Mage::helper('adminhtml')->__('Error while saving this configuration: '.$e->getMessage()));
|
45 |
+
}
|
46 |
+
|
47 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sofortueberweisung')->__('Item was successfully saved'));
|
48 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
49 |
+
}
|
50 |
+
|
51 |
+
$this->_redirect('adminhtml/system_config/edit', array('section'=>'payment'));
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function saveConfigPcAction() {
|
56 |
+
|
57 |
+
$params = $this->getRequest()->getParams();
|
58 |
+
$session = Mage::getSingleton('adminhtml/session');
|
59 |
+
if($this->getRequest()->getParams()){
|
60 |
+
$groups = Array();
|
61 |
+
$groups['paycode']['fields']['customer']['value'] = $params["user_id"];
|
62 |
+
$groups['paycode']['fields']['project']['value'] = $params["project_id"];
|
63 |
+
$groups['paycode']['fields']['check_input_yesno']['value'] = 1;
|
64 |
+
|
65 |
+
try {
|
66 |
+
Mage::getModel('adminhtml/config_data')
|
67 |
+
->setSection('payment')
|
68 |
+
->setWebsite($this->getRequest()->getParam('website'))
|
69 |
+
->setStore($this->getRequest()->getParam('store'))
|
70 |
+
->setGroups($groups)
|
71 |
+
->save();
|
72 |
+
}catch (Mage_Core_Exception $e) {
|
73 |
+
foreach(split("\n", $e->getMessage()) as $message) {
|
74 |
+
$session->addError($message);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
catch (Exception $e) {
|
78 |
+
$session->addException($e, Mage::helper('adminhtml')->__('Error while saving this configuration: '.$e->getMessage()));
|
79 |
+
}
|
80 |
+
|
81 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sofortueberweisung')->__('Item was successfully saved'));
|
82 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
83 |
+
}
|
84 |
+
|
85 |
+
$this->_redirectUrl('/index.php/admin/system_config/edit/section/payment');
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
}
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_PaycodeController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function returnAction() {
|
5 |
+
$response = $this->getRequest()->getParams();
|
6 |
+
$order = Mage::getModel('sales/order');
|
7 |
+
$order->loadByIncrementId($response['orderId']);
|
8 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
9 |
+
$payment = $order->getPayment();
|
10 |
+
|
11 |
+
if(!$payment->getSuTransactionId() && md5($payment->getSuSecurity().$paymentObj->getConfigData('project_pswd')) == $response['var1']){
|
12 |
+
$status = $this->_checkReturnedData();
|
13 |
+
if ($status && $response['orderId']) {
|
14 |
+
$order = Mage::getModel('sales/order');
|
15 |
+
$order->loadByIncrementId($response['orderId']);
|
16 |
+
if($order->getId()) {
|
17 |
+
$order->sendNewOrderEmail();
|
18 |
+
}
|
19 |
+
$this->_redirect('checkout/onepage/success');
|
20 |
+
} else {
|
21 |
+
$order = Mage::getModel('sales/order');
|
22 |
+
$order->loadByIncrementId($response['orderId']);
|
23 |
+
|
24 |
+
$order->cancel();
|
25 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Customer cancled payment or payment error'));
|
26 |
+
$order->save();
|
27 |
+
|
28 |
+
$this->_redirect('sofortueberweisung/sofortueberweisung/errornotice');
|
29 |
+
}
|
30 |
+
}else{
|
31 |
+
$session = $this->getCheckout();
|
32 |
+
$session->getQuote()->setIsActive(false)->save();
|
33 |
+
$this->_redirect('checkout/onepage/success');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
public function returnhttpAction() {
|
38 |
+
if (!$this->getRequest()->isGet()) {
|
39 |
+
$this->norouteAction();
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
$response = $this->getRequest()->getParams();
|
44 |
+
$order = Mage::getModel('sales/order');
|
45 |
+
$order->loadByIncrementId($response['orderId']);
|
46 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
47 |
+
$payment = $order->getPayment();
|
48 |
+
|
49 |
+
if(!$payment->getSuTransactionId() && md5($payment->getSuSecurity().$paymentObj->getConfigData('project_pswd')) == $response['var1']){
|
50 |
+
$status = $this->_checkReturnedData();
|
51 |
+
if ($status) {
|
52 |
+
$order = Mage::getModel('sales/order');
|
53 |
+
$order->loadByIncrementId($response['orderId']);
|
54 |
+
if($order->getId()) {
|
55 |
+
$order->sendNewOrderEmail();
|
56 |
+
}
|
57 |
+
} else {
|
58 |
+
$order = Mage::getModel('sales/order');
|
59 |
+
$order->loadByIncrementId($response['orderId']);
|
60 |
+
$order->cancel();
|
61 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Customer cancled payment or payment error'));
|
62 |
+
$order->save();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
public function errorAction() {
|
68 |
+
$session = $this->getCheckout();
|
69 |
+
$session->getQuote()->setIsActive(false)->save();
|
70 |
+
|
71 |
+
$order = Mage::getModel('sales/order');
|
72 |
+
$order->load($this->getCheckout()->getLastOrderId());
|
73 |
+
$order->cancel();
|
74 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Customer cancled payment'));
|
75 |
+
$order->save();
|
76 |
+
|
77 |
+
$this->loadLayout();
|
78 |
+
$this->getLayout()->getBlock('sofortueberweisungnotice');
|
79 |
+
$this->renderLayout();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Checking Get variables.
|
84 |
+
*
|
85 |
+
*/
|
86 |
+
protected function _checkReturnedData() {
|
87 |
+
$status = false;
|
88 |
+
if (!$this->getRequest()->isGet()) {
|
89 |
+
$this->norouteAction();
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
//Get response
|
93 |
+
$response = $this->getRequest()->getParams();
|
94 |
+
$order = Mage::getModel('sales/order');
|
95 |
+
$order->loadByIncrementId($response['orderId']);
|
96 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
97 |
+
|
98 |
+
if($response["transId"] && $response['orderId'] && md5($order->getPayment()->getSuSecurity().$paymentObj->getConfigData('project_pswd')) == $response['var1']) {
|
99 |
+
$payment = $order->getPayment();
|
100 |
+
$payment->setStatus(Novalnet_Sofortueberweisung_Model_Sofortueberweisung::STATUS_SUCCESS);
|
101 |
+
$payment->setStatusDescription(Mage::helper('sofortueberweisung')->__('Payment was successful.'));
|
102 |
+
$order->addStatusToHistory($paymentObj->getConfigData('order_status'), Mage::helper('sofortueberweisung')->__('Payment was successful.'));
|
103 |
+
$payment->setSuTransactionId($response["transId"]);
|
104 |
+
$order->setPayment($payment);
|
105 |
+
|
106 |
+
if($paymentObj->getConfigData('createinvoice') == 1) {
|
107 |
+
if ($this->saveInvoice($order)) {
|
108 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
$status = true;
|
112 |
+
} else {
|
113 |
+
$payment = $order->getPayment();
|
114 |
+
$payment->setStatus(Novalnet_Sofortueberweisung_Model_Sofortueberweisung::STATUS_DECLINED);
|
115 |
+
$order->setPayment($payment);
|
116 |
+
$order->cancel();
|
117 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Payment was not successfull'));
|
118 |
+
$status = false;
|
119 |
+
}
|
120 |
+
|
121 |
+
$order->save();
|
122 |
+
return $status;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Save invoice for order
|
127 |
+
*
|
128 |
+
* @param Mage_Sales_Model_Order $order
|
129 |
+
* @return boolean Can save invoice or not
|
130 |
+
*/
|
131 |
+
protected function saveInvoice (Mage_Sales_Model_Order $order)
|
132 |
+
{
|
133 |
+
if ($order->canInvoice()) {
|
134 |
+
$invoice = $order->prepareInvoice();
|
135 |
+
$invoice->register();
|
136 |
+
Mage::getModel('core/resource_transaction')
|
137 |
+
->addObject($invoice)
|
138 |
+
->addObject($invoice->getOrder())
|
139 |
+
->save();
|
140 |
+
$invoice->sendEmail(true, '');
|
141 |
+
return true;
|
142 |
+
}
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Get singleton of Checkout Session Model
|
148 |
+
*
|
149 |
+
* @return Mage_Checkout_Model_Session
|
150 |
+
*/
|
151 |
+
public function getCheckout() {
|
152 |
+
return Mage::getSingleton('checkout/session');
|
153 |
+
}
|
154 |
+
}
|
@@ -0,0 +1,290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Novalnet_Sofortueberweisung_SofortueberweisungController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
protected $_redirectBlockType = 'sofortueberweisung/sofortueberweisung';
|
6 |
+
protected $_status = '100';
|
7 |
+
|
8 |
+
/**
|
9 |
+
* when customer select payment method
|
10 |
+
*/
|
11 |
+
public function redirectAction() {
|
12 |
+
$session = $this->getCheckout();
|
13 |
+
$session->setNovalnetQuoteId($session->getQuoteId())
|
14 |
+
->setNovalnetRealOrderId($session->getLastRealOrderId());
|
15 |
+
$order = Mage::getModel('sales/order');
|
16 |
+
$order->loadByIncrementId($session->getLastRealOrderId());
|
17 |
+
$order->addStatusToHistory(Mage_Sales_Model_Order::STATE_HOLDED, Mage::helper('sofortueberweisung')->__('Novalnet payment loaded'));
|
18 |
+
$order->save();
|
19 |
+
|
20 |
+
$this->getResponse()->setBody(
|
21 |
+
$this->getLayout()
|
22 |
+
->createBlock($this->_redirectBlockType)
|
23 |
+
->setOrder($order)
|
24 |
+
->toHtml()
|
25 |
+
);
|
26 |
+
$session->unsQuoteId();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function returnAction() {
|
30 |
+
|
31 |
+
$response = $this->getRequest()->getParams();
|
32 |
+
$response['orderId'] = $response['inputval1'];#order_id;
|
33 |
+
|
34 |
+
|
35 |
+
$status = $this->_checkReturnedData();
|
36 |
+
|
37 |
+
|
38 |
+
if(!$response['orderId'] or !$status) {
|
39 |
+
$session = $this->getCheckout();
|
40 |
+
$session->getQuote()->setIsActive(false)->save();
|
41 |
+
Mage::getSingleton('checkout/session')->addError("Payment error");#new
|
42 |
+
$this->_redirect('checkout/cart');#new; ok
|
43 |
+
} else {
|
44 |
+
//load order and send mail
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$order->loadByIncrementId($response['orderId']);
|
47 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
48 |
+
$payment = $order->getPayment();
|
49 |
+
|
50 |
+
#if($order->getId()) {
|
51 |
+
#Mage::log('sendNewOrderEmail');
|
52 |
+
$order->sendNewOrderEmail();
|
53 |
+
#}
|
54 |
+
|
55 |
+
$session = $this->getCheckout();
|
56 |
+
$session->getQuote()->setIsActive(false)->save();
|
57 |
+
|
58 |
+
$this->_redirect('checkout/onepage/success');
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
public function returnhttpAction() {
|
63 |
+
if (!$this->getRequest()->isPost()) {
|
64 |
+
$this->norouteAction();
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
$response = $this->getRequest()->getParams();
|
69 |
+
|
70 |
+
$order = Mage::getModel('sales/order');
|
71 |
+
$order->loadByIncrementId($response['orderId']);
|
72 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
73 |
+
$payment = $order->getPayment();
|
74 |
+
|
75 |
+
|
76 |
+
$status = $this->_checkReturnedData();
|
77 |
+
if ($status) {
|
78 |
+
$order = Mage::getModel('sales/order');
|
79 |
+
$order->loadByIncrementId($response['orderId']);
|
80 |
+
if($order->getId()) {
|
81 |
+
$order->sendNewOrderEmail();
|
82 |
+
}
|
83 |
+
} else {
|
84 |
+
$order = Mage::getModel('sales/order');
|
85 |
+
$order->loadByIncrementId($response['orderId']);
|
86 |
+
$order->cancel();
|
87 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Customer cancled payment or payment error'));
|
88 |
+
$order->save();
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
public function errorAction() {
|
93 |
+
$session = $this->getCheckout();
|
94 |
+
$session->getQuote()->setIsActive(false)->save();
|
95 |
+
|
96 |
+
$order = Mage::getModel('sales/order');
|
97 |
+
$order->load($this->getCheckout()->getLastOrderId());
|
98 |
+
$order->cancel();
|
99 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Customer cancled payment'));
|
100 |
+
$order->save();
|
101 |
+
|
102 |
+
Mage::getSingleton('checkout/session')->addError("Customer cancled payment");#new
|
103 |
+
$this->_redirect('checkout/cart');#new; ok
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
public function errornoticeAction() {
|
108 |
+
$session = $this->getCheckout();
|
109 |
+
$session->getQuote()->setIsActive(false)->save();
|
110 |
+
|
111 |
+
$order = Mage::getModel('sales/order');
|
112 |
+
$order->load($this->getCheckout()->getLastOrderId());
|
113 |
+
$order->cancel();
|
114 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Payment error'));
|
115 |
+
$order->save();
|
116 |
+
|
117 |
+
Mage::getSingleton('checkout/session')->addError("Payment error");#new
|
118 |
+
$this->_redirect('checkout/cart');#new
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Checking Post variables.
|
123 |
+
*
|
124 |
+
*/
|
125 |
+
protected function _checkReturnedData() {
|
126 |
+
$status = false;
|
127 |
+
if (!$this->getRequest()->isPost()) {
|
128 |
+
$this->norouteAction();
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
//Get response
|
133 |
+
$response = $this->getRequest()->getParams();
|
134 |
+
$response['orderId'] = $response['inputval1'];#order_id;
|
135 |
+
|
136 |
+
if ($response['status'] == 100) {
|
137 |
+
$response['status'] = $this->checkParams($response);
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
$order = Mage::getModel('sales/order');
|
142 |
+
$order->loadByIncrementId($response['orderId']);
|
143 |
+
$paymentObj = $order->getPayment()->getMethodInstance();
|
144 |
+
|
145 |
+
if ($response['status'] == 100 ) {
|
146 |
+
$payment = $order->getPayment();
|
147 |
+
$session = $this->getCheckout();
|
148 |
+
$payment->setStatus(Novalnet_Sofortueberweisung_Model_Sofortueberweisung::STATUS_SUCCESS);
|
149 |
+
$payment->setStatusDescription(Mage::helper('sofortueberweisung')->__('Payment was successful.'));
|
150 |
+
$payment->setLastTransId($response["tid"]);# to set TID in the payment info
|
151 |
+
$payment->setNnTestorder($this->decode($response['test_mode'], $_SESSION['mima']));# to set Test order in the payment info
|
152 |
+
$order->addStatusToHistory($paymentObj->getConfigData('order_status'), Mage::helper('sofortueberweisung')->__('Payment was successful.'));
|
153 |
+
|
154 |
+
if( $response['test_mode'] ) {
|
155 |
+
Mage::getModel( 'sales/quote' )
|
156 |
+
->load($session->getNovalnetQuoteId())
|
157 |
+
->getPayment()
|
158 |
+
->setNnTestorder($this->decode($response['test_mode'], $_SESSION['mima']))
|
159 |
+
->save();
|
160 |
+
}
|
161 |
+
|
162 |
+
$order->setPayment($payment);
|
163 |
+
|
164 |
+
if($paymentObj->getConfigData('createinvoice') == 1){
|
165 |
+
if ($this->saveInvoice($order)) {
|
166 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
$status = true;
|
171 |
+
} else {
|
172 |
+
$payment = $order->getPayment();
|
173 |
+
$payment->setLastTransId($response["tid"]);# to set TID in the payment info
|
174 |
+
$payment->setStatus(Novalnet_Sofortueberweisung_Model_Sofortueberweisung::STATUS_DECLINED);
|
175 |
+
|
176 |
+
$order->setPayment($payment);
|
177 |
+
$order->cancel();
|
178 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Payment was not successfull'));
|
179 |
+
$status = false;
|
180 |
+
}
|
181 |
+
|
182 |
+
$order->save();
|
183 |
+
return $status;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Save invoice for order
|
188 |
+
*
|
189 |
+
* @param Mage_Sales_Model_Order $order
|
190 |
+
* @return boolean Can save invoice or not
|
191 |
+
*/
|
192 |
+
protected function saveInvoice (Mage_Sales_Model_Order $order) {
|
193 |
+
if ($order->canInvoice()) {
|
194 |
+
$invoice = $order->prepareInvoice();
|
195 |
+
|
196 |
+
$invoice->register();
|
197 |
+
Mage::getModel('core/resource_transaction')
|
198 |
+
->addObject($invoice)
|
199 |
+
->addObject($invoice->getOrder())
|
200 |
+
->save();
|
201 |
+
|
202 |
+
$invoice->sendEmail(true, '');
|
203 |
+
return true;
|
204 |
+
}
|
205 |
+
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Get singleton of Checkout Session Model
|
211 |
+
*
|
212 |
+
* @return Mage_Checkout_Model_Session
|
213 |
+
*/
|
214 |
+
public function getCheckout()
|
215 |
+
{
|
216 |
+
return Mage::getSingleton('checkout/session');
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* checks server response and gets parameters
|
221 |
+
* @return $data array|string response parameters or ERROR_WRONG_HASH|ERROR_NO_ORDER_DETAILS if error
|
222 |
+
*
|
223 |
+
*/
|
224 |
+
public function getNotification($pwd){
|
225 |
+
$pnSu = Mage::helper('sofortueberweisung');
|
226 |
+
$pnSu->classSofortueberweisung($pwd);
|
227 |
+
return $pnSu->getNotification();
|
228 |
+
}
|
229 |
+
private function checkParams($response) {
|
230 |
+
$status = '100';
|
231 |
+
if (!$response['hash2']){
|
232 |
+
$status = '90';
|
233 |
+
}
|
234 |
+
if (!$this->checkHash($response, $_SESSION['mima'])){
|
235 |
+
$status = '91';
|
236 |
+
}
|
237 |
+
$response['amount'] = $this->decode($response['amount'], $_SESSION['mima']);
|
238 |
+
if (preg_match('/\D/', $response['amount'], $aMatch)){
|
239 |
+
$status = '92';
|
240 |
+
}
|
241 |
+
#Mage::log(__FUNCTION__.': status='.$status);
|
242 |
+
$this->_status = $status;
|
243 |
+
return$status;
|
244 |
+
}
|
245 |
+
function hash($h, $key)#$h contains encoded data
|
246 |
+
{
|
247 |
+
if (!$h) return'Error: no data';
|
248 |
+
if (!function_exists('md5')){return'Error: func n/a';}
|
249 |
+
return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
|
250 |
+
}
|
251 |
+
function checkHash($request, $key)
|
252 |
+
{
|
253 |
+
if (!$request) return false; #'Error: no data';
|
254 |
+
$h['auth_code'] = $request['auth_code'];#encoded
|
255 |
+
$h['product_id'] = $request['product']; #encoded
|
256 |
+
$h['tariff'] = $request['tariff']; #encoded
|
257 |
+
$h['amount'] = $request['amount']; #encoded
|
258 |
+
$h['test_mode'] = $request['test_mode'];#encoded
|
259 |
+
$h['uniqid'] = $request['uniqid']; #encoded
|
260 |
+
|
261 |
+
if ($request['hash2'] != $this->hash($h, $key)){
|
262 |
+
return false;
|
263 |
+
}
|
264 |
+
return true;
|
265 |
+
}
|
266 |
+
function decode($data, $key)
|
267 |
+
{
|
268 |
+
$data = trim($data);
|
269 |
+
if ($data == '') {return'Error: no data';}
|
270 |
+
if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
|
271 |
+
|
272 |
+
try {
|
273 |
+
$data = base64_decode(strrev($data));
|
274 |
+
$data = pack("H".strlen($data), $data);
|
275 |
+
$data = substr($data, 0, stripos($data, $key));
|
276 |
+
$pos = strpos($data, "|");
|
277 |
+
if ($pos === false){
|
278 |
+
return("Error: CKSum not found!");
|
279 |
+
}
|
280 |
+
$crc = substr($data, 0, $pos);
|
281 |
+
$value = trim(substr($data, $pos+1));
|
282 |
+
if ($crc != sprintf('%u', crc32($value))){
|
283 |
+
return("Error; CKSum invalid!");
|
284 |
+
}
|
285 |
+
return $value;
|
286 |
+
}catch (Exception $e){
|
287 |
+
echo('Error: '.$e);
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Novalnet_Sofortueberweisung>
|
5 |
+
<!-- declare module's version information for database updates -->
|
6 |
+
<version>1.0.0</version>
|
7 |
+
</Novalnet_Sofortueberweisung>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<frontend>
|
11 |
+
<routers>
|
12 |
+
<sofortueberweisung>
|
13 |
+
<use>standard</use>
|
14 |
+
<args>
|
15 |
+
<module>Novalnet_Sofortueberweisung</module>
|
16 |
+
<frontName>sofortueberweisung</frontName>
|
17 |
+
</args>
|
18 |
+
</sofortueberweisung>
|
19 |
+
</routers>
|
20 |
+
<layout>
|
21 |
+
<updates>
|
22 |
+
<sofortueberweisung>
|
23 |
+
<file>sofortueberweisung.xml</file>
|
24 |
+
</sofortueberweisung>
|
25 |
+
</updates>
|
26 |
+
</layout>
|
27 |
+
<translate>
|
28 |
+
<modules>
|
29 |
+
<Novalnet_Sofortueberweisung>
|
30 |
+
<files>
|
31 |
+
<default>Novalnet_Sofortueberweisung.csv</default>
|
32 |
+
</files>
|
33 |
+
</Novalnet_Sofortueberweisung>
|
34 |
+
</modules>
|
35 |
+
</translate>
|
36 |
+
<secure_url>
|
37 |
+
<sofortueberweisung_sofortueberweisung>/sofortueberweisung/sofortueberweisung/</sofortueberweisung_sofortueberweisung>
|
38 |
+
</secure_url>
|
39 |
+
</frontend>
|
40 |
+
|
41 |
+
<admin>
|
42 |
+
<routers>
|
43 |
+
<sofortueberweisung>
|
44 |
+
<use>admin</use>
|
45 |
+
<args>
|
46 |
+
<module>Novalnet_Sofortueberweisung</module>
|
47 |
+
<frontName>sofortueberweisung</frontName>
|
48 |
+
</args>
|
49 |
+
</sofortueberweisung>
|
50 |
+
</routers>
|
51 |
+
</admin>
|
52 |
+
|
53 |
+
<adminhtml>
|
54 |
+
<layout>
|
55 |
+
<updates>
|
56 |
+
<sofortueberweisung>
|
57 |
+
<file>sofortueberweisung.xml</file>
|
58 |
+
</sofortueberweisung>
|
59 |
+
</updates>
|
60 |
+
</layout>
|
61 |
+
<translate>
|
62 |
+
<modules>
|
63 |
+
<Novalnet_Sofortueberweisung>
|
64 |
+
<files>
|
65 |
+
<default>Novalnet_Sofortueberweisung.csv</default>
|
66 |
+
</files>
|
67 |
+
</Novalnet_Sofortueberweisung>
|
68 |
+
</modules>
|
69 |
+
</translate>
|
70 |
+
</adminhtml>
|
71 |
+
|
72 |
+
<global>
|
73 |
+
<blocks>
|
74 |
+
<sofortueberweisung>
|
75 |
+
<class>Novalnet_Sofortueberweisung_Block</class>
|
76 |
+
</sofortueberweisung>
|
77 |
+
</blocks>
|
78 |
+
|
79 |
+
<helpers>
|
80 |
+
<sofortueberweisung>
|
81 |
+
<class>Novalnet_Sofortueberweisung_Helper</class>
|
82 |
+
</sofortueberweisung>
|
83 |
+
</helpers>
|
84 |
+
|
85 |
+
<params_pnso>
|
86 |
+
<types>
|
87 |
+
<backlink>
|
88 |
+
<param>backlink</param>
|
89 |
+
<value><![CDATA[sofortueberweisung/adminhtml_sofortueberweisung/saveConfig]]></value>
|
90 |
+
</backlink>
|
91 |
+
<debug>
|
92 |
+
<param>debug</param>
|
93 |
+
<value>0</value>
|
94 |
+
</debug>
|
95 |
+
<input_hash>
|
96 |
+
<param>projectssetting_interface_input_hash_check_enabled</param>
|
97 |
+
<value>1</value>
|
98 |
+
</input_hash>
|
99 |
+
<projectssetting_project_password>
|
100 |
+
<param>projectssetting_project_password</param>
|
101 |
+
<value></value>
|
102 |
+
</projectssetting_project_password>
|
103 |
+
<project_notification_password>
|
104 |
+
<param>project_notification_password</param>
|
105 |
+
<value></value>
|
106 |
+
</project_notification_password>
|
107 |
+
<user_partner_id>
|
108 |
+
<param>user_partner_id</param>
|
109 |
+
<value>x</value>
|
110 |
+
</user_partner_id>
|
111 |
+
<project_shop_system_id>
|
112 |
+
<param>project_shop_system_id</param>
|
113 |
+
<value>121</value>
|
114 |
+
</project_shop_system_id>
|
115 |
+
<projectssetting_interface_success_link>
|
116 |
+
<param>projectssetting_interface_success_link</param>
|
117 |
+
<value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/return/orderId/-USER_VARIABLE_0-/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]></value>
|
118 |
+
</projectssetting_interface_success_link>
|
119 |
+
<projectssetting_interface_success_link_redirect>
|
120 |
+
<param>projectssetting_interface_success_link_redirect</param>
|
121 |
+
<value>1</value>
|
122 |
+
</projectssetting_interface_success_link_redirect>
|
123 |
+
<projectssetting_interface_cancel_link>
|
124 |
+
<param>projectssetting_interface_cancel_link</param>
|
125 |
+
<value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/error/orderId/-USER_VARIABLE_0-]]></value>
|
126 |
+
</projectssetting_interface_cancel_link>
|
127 |
+
<projectssetting_interface_timeout_link>
|
128 |
+
<param>projectssetting_interface_timeout_link</param>
|
129 |
+
<value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/error/orderId/-USER_VARIABLE_0-]]></value>
|
130 |
+
</projectssetting_interface_timeout_link>
|
131 |
+
<projectssetting_interface_timeout>
|
132 |
+
<param>projectssetting_interface_timeout</param>
|
133 |
+
<value>600</value>
|
134 |
+
</projectssetting_interface_timeout>
|
135 |
+
<projectssetting_locked_amount>
|
136 |
+
<param>projectssetting_locked_amount</param>
|
137 |
+
<value>1</value>
|
138 |
+
</projectssetting_locked_amount>
|
139 |
+
<projectssetting_locked_reason_1>
|
140 |
+
<param>projectssetting_locked_reason_1</param>
|
141 |
+
<value>1</value>
|
142 |
+
</projectssetting_locked_reason_1>
|
143 |
+
<projectsnotification_http_activated>
|
144 |
+
<param>projectsnotification_http_activated</param>
|
145 |
+
<value>1</value>
|
146 |
+
</projectsnotification_http_activated>
|
147 |
+
<projectsnotification_http_url>
|
148 |
+
<param>projectsnotification_http_url</param>
|
149 |
+
<value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/returnhttp/orderId/-USER_VARIABLE_0-/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]></value>
|
150 |
+
</projectsnotification_http_url>
|
151 |
+
<projectsnotification_http_method>
|
152 |
+
<param>projectsnotification_http_method</param>
|
153 |
+
<value>1</value>
|
154 |
+
</projectsnotification_http_method>
|
155 |
+
<project_hash_algorithm>
|
156 |
+
<param>project_hash_algorithm</param>
|
157 |
+
<value>sha1</value>
|
158 |
+
</project_hash_algorithm>
|
159 |
+
<projectsnotification_email_email>
|
160 |
+
<param>projectsnotification_email_email</param>
|
161 |
+
<value></value>
|
162 |
+
</projectsnotification_email_email>
|
163 |
+
<projectsnotification_email_activated>
|
164 |
+
<param>projectsnotification_email_activated</param>
|
165 |
+
<value>1</value>
|
166 |
+
</projectsnotification_email_activated>
|
167 |
+
<projectsnotification_email_language_id>
|
168 |
+
<param>projectsnotification_email_language_id</param>
|
169 |
+
<value>DE</value>
|
170 |
+
</projectsnotification_email_language_id>
|
171 |
+
<project_name>
|
172 |
+
<param>project_name</param>
|
173 |
+
<value>Magento</value>
|
174 |
+
</project_name>
|
175 |
+
</types>
|
176 |
+
</params_pnso>
|
177 |
+
|
178 |
+
<models>
|
179 |
+
<sofortueberweisung>
|
180 |
+
<class>Novalnet_Sofortueberweisung_Model</class>
|
181 |
+
<resourceModel>sofortueberweisung_mysql4</resourceModel>
|
182 |
+
</sofortueberweisung>
|
183 |
+
<sales>
|
184 |
+
<rewrite>
|
185 |
+
<convert_order>Novalnet_Sofortueberweisung_Model_Convert_Order</convert_order>
|
186 |
+
<convert_quote>Novalnet_Sofortueberweisung_Model_Convert_Quote</convert_quote>
|
187 |
+
</rewrite>
|
188 |
+
</sales>
|
189 |
+
<sofortueberweisung_mysql4>
|
190 |
+
<class>Novalnet_Sofortueberweisung_Model_Mysql4</class>
|
191 |
+
<entities>
|
192 |
+
<sofortueberweisung>
|
193 |
+
<table>sofortueberweisung</table>
|
194 |
+
</sofortueberweisung>
|
195 |
+
</entities>
|
196 |
+
</sofortueberweisung_mysql4>
|
197 |
+
</models>
|
198 |
+
|
199 |
+
<resources>
|
200 |
+
<!-- resource identifier -->
|
201 |
+
<sofortueberweisung_setup>
|
202 |
+
<!-- specify that this resource is a setup resource and used for upgrades -->
|
203 |
+
<setup>
|
204 |
+
<module>Novalnet_Sofortueberweisung</module>
|
205 |
+
<class>Novalnet_Sofortueberweisung_Model_Mysql4_Setup</class>
|
206 |
+
</setup>
|
207 |
+
<!-- specify database connection for this resource -->
|
208 |
+
<connection>
|
209 |
+
<use>core_setup</use>
|
210 |
+
</connection>
|
211 |
+
</sofortueberweisung_setup>
|
212 |
+
<sofortueberweisung_write>
|
213 |
+
<connection>
|
214 |
+
<use>core_write</use>
|
215 |
+
</connection>
|
216 |
+
</sofortueberweisung_write>
|
217 |
+
<sofortueberweisung_read>
|
218 |
+
<connection>
|
219 |
+
<use>core_read</use>
|
220 |
+
</connection>
|
221 |
+
</sofortueberweisung_read>
|
222 |
+
</resources>
|
223 |
+
</global>
|
224 |
+
|
225 |
+
<!-- declare default configuration values for this module -->
|
226 |
+
<default>
|
227 |
+
<payment>
|
228 |
+
<sofortueberweisung>
|
229 |
+
<active>1</active>
|
230 |
+
<model>sofortueberweisung/sofortueberweisung</model>
|
231 |
+
<order_status>1</order_status>
|
232 |
+
<title>Novalnet-Sofortüberweisung</title>
|
233 |
+
<allowspecific>0</allowspecific>
|
234 |
+
<url>https://payport.novalnet.de/online_transfer_payport</url>
|
235 |
+
<customer></customer>
|
236 |
+
<project></project>
|
237 |
+
<project_pswd></project_pswd>
|
238 |
+
<notification_pswd></notification_pswd>
|
239 |
+
<check_input_yesno>1</check_input_yesno>
|
240 |
+
<createinvoice>0</createinvoice>
|
241 |
+
<fast><![CDATA[<a href="%s">Zum automatischen Einrichten hier klicken.</a>]]></fast>
|
242 |
+
<url_new><![CDATA[https://www.sofortueberweisung.de/payment/createNew/]]></url_new>
|
243 |
+
<netherlands>0</netherlands>
|
244 |
+
</sofortueberweisung>
|
245 |
+
</payment>
|
246 |
+
</default>
|
247 |
+
</config>
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<payment>
|
5 |
+
<groups>
|
6 |
+
<sofortueberweisung translate="label" module="paygate">
|
7 |
+
<label>Novalnet-Sofortüberweisung</label>
|
8 |
+
<comment>Das Passwort ist auf admin.novalnet.de: Stammdaten - Paymentzugriffsschluessel einzusehen. The password is available at admin.novalnet.de: Stammdaten - Paymentzugriffsschluessel.<br><b>Bitte unbedingt beachten</b> auch wenn der Livemodus=0 ist, wird der Bestellbetrag abgebucht, wenn echte Kontodaten eingegeben werden. Das ist durch die Implementierung durch den Anbieter Payment Network AG bedingt.</comment>
|
9 |
+
<frontend_type>text</frontend_type>
|
10 |
+
<sort_order>0</sort_order>
|
11 |
+
<show_in_default>1</show_in_default>
|
12 |
+
<show_in_website>1</show_in_website>
|
13 |
+
<show_in_store>1</show_in_store>
|
14 |
+
<fields>
|
15 |
+
<active translate="label">
|
16 |
+
<label>Enabled</label>
|
17 |
+
<frontend_type>select</frontend_type>
|
18 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
19 |
+
<sort_order>1</sort_order>
|
20 |
+
<show_in_default>1</show_in_default>
|
21 |
+
<show_in_website>1</show_in_website>
|
22 |
+
<show_in_store>1</show_in_store>
|
23 |
+
</active>
|
24 |
+
<order_status translate="label">
|
25 |
+
<label>New order status</label>
|
26 |
+
<frontend_type>select</frontend_type>
|
27 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
28 |
+
<sort_order>2</sort_order>
|
29 |
+
<show_in_default>1</show_in_default>
|
30 |
+
<show_in_website>1</show_in_website>
|
31 |
+
<show_in_store>1</show_in_store>
|
32 |
+
</order_status>
|
33 |
+
<merchant_id translate="label">
|
34 |
+
<label>Novalnet Merchant ID</label>
|
35 |
+
<frontend_type>text</frontend_type>
|
36 |
+
<sort_order>3</sort_order>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>0</show_in_store>
|
40 |
+
</merchant_id>
|
41 |
+
<auth_code translate="label">
|
42 |
+
<label>Novalnet Auth Code</label>
|
43 |
+
<frontend_type>text</frontend_type>
|
44 |
+
<sort_order>4</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>0</show_in_store>
|
48 |
+
</auth_code>
|
49 |
+
<product_id translate="label">
|
50 |
+
<label>Novalnet Product ID</label>
|
51 |
+
<frontend_type>text</frontend_type>
|
52 |
+
<sort_order>5</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>0</show_in_store>
|
56 |
+
</product_id>
|
57 |
+
<tariff_id translate="label">
|
58 |
+
<label>Novalnet Tariff ID</label>
|
59 |
+
<frontend_type>text</frontend_type>
|
60 |
+
<sort_order>6</sort_order>
|
61 |
+
<show_in_default>1</show_in_default>
|
62 |
+
<show_in_website>1</show_in_website>
|
63 |
+
<show_in_store>0</show_in_store>
|
64 |
+
</tariff_id>
|
65 |
+
<!--comment translate="label">
|
66 |
+
<label>Notice for Clients</label>
|
67 |
+
<frontend_type>textarea</frontend_type>
|
68 |
+
<sort_order>7</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>0</show_in_store>
|
72 |
+
</comment-->
|
73 |
+
<live_mode translate="label">
|
74 |
+
<label>Live Mode</label>
|
75 |
+
<frontend_type>select</frontend_type>
|
76 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
77 |
+
<sort_order>8</sort_order>
|
78 |
+
<show_in_default>1</show_in_default>
|
79 |
+
<show_in_website>1</show_in_website>
|
80 |
+
<show_in_store>0</show_in_store>
|
81 |
+
</live_mode>
|
82 |
+
<gateway_timeout translate="label">
|
83 |
+
<comment>Gateway Timeout in seconds</comment>
|
84 |
+
<label>Gateway Timeout</label>
|
85 |
+
<frontend_type>text</frontend_type>
|
86 |
+
<sort_order>17</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>0</show_in_store>
|
90 |
+
</gateway_timeout>
|
91 |
+
<password translate="label">
|
92 |
+
<label>Password</label>
|
93 |
+
<frontend_type>text</frontend_type>
|
94 |
+
<sort_order>9</sort_order>
|
95 |
+
<show_in_default>1</show_in_default>
|
96 |
+
<show_in_website>1</show_in_website>
|
97 |
+
<show_in_store>0</show_in_store>
|
98 |
+
</password>
|
99 |
+
<sort_order translate="label">
|
100 |
+
<label>Sort order</label>
|
101 |
+
<frontend_type>text</frontend_type>
|
102 |
+
<sort_order>10</sort_order>
|
103 |
+
<show_in_default>1</show_in_default>
|
104 |
+
<show_in_website>1</show_in_website>
|
105 |
+
<show_in_store>1</show_in_store>
|
106 |
+
</sort_order>
|
107 |
+
<title translate="label">
|
108 |
+
<label>Title</label>
|
109 |
+
<frontend_type>text</frontend_type>
|
110 |
+
<sort_order>11</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
</title>
|
115 |
+
<allowspecific translate="label">
|
116 |
+
<label>Payment from applicable countries</label>
|
117 |
+
<frontend_type>allowspecific</frontend_type>
|
118 |
+
<sort_order>12</sort_order>
|
119 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
</allowspecific>
|
124 |
+
<specificcountry translate="label">
|
125 |
+
<label>Payment from Specific countries</label>
|
126 |
+
<frontend_type>multiselect</frontend_type>
|
127 |
+
<sort_order>13</sort_order>
|
128 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
129 |
+
<show_in_default>1</show_in_default>
|
130 |
+
<show_in_website>1</show_in_website>
|
131 |
+
<show_in_store>1</show_in_store>
|
132 |
+
</specificcountry>
|
133 |
+
<!--customer>
|
134 |
+
<label>User Id</label>
|
135 |
+
<frontend_type>text</frontend_type>
|
136 |
+
<sort_order>14</sort_order>
|
137 |
+
<show_in_default>1</show_in_default>
|
138 |
+
<show_in_website>1</show_in_website>
|
139 |
+
<show_in_store>1</show_in_store>
|
140 |
+
</customer-->
|
141 |
+
<!--project>
|
142 |
+
<label>Projekt Id</label>
|
143 |
+
<frontend_type>text</frontend_type>
|
144 |
+
<sort_order>15</sort_order>
|
145 |
+
<show_in_default>1</show_in_default>
|
146 |
+
<show_in_website>1</show_in_website>
|
147 |
+
<show_in_store>1</show_in_store>
|
148 |
+
</project-->
|
149 |
+
<!--project_pswd>
|
150 |
+
<label>Project password</label>
|
151 |
+
<frontend_type>text</frontend_type>
|
152 |
+
<sort_order>16</sort_order>
|
153 |
+
<show_in_default>1</show_in_default>
|
154 |
+
<show_in_website>1</show_in_website>
|
155 |
+
<show_in_store>1</show_in_store>
|
156 |
+
</project_pswd-->
|
157 |
+
<!--notification_pswd>
|
158 |
+
<label>Notification password</label>
|
159 |
+
<frontend_type>text</frontend_type>
|
160 |
+
<sort_order>17</sort_order>
|
161 |
+
<show_in_default>1</show_in_default>
|
162 |
+
<show_in_website>1</show_in_website>
|
163 |
+
<show_in_store>1</show_in_store>
|
164 |
+
</notification_pswd-->
|
165 |
+
<createinvoice translate="label">
|
166 |
+
<label>Create Invoice</label>
|
167 |
+
<frontend_type>select</frontend_type>
|
168 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
169 |
+
<sort_order>18</sort_order>
|
170 |
+
<show_in_default>1</show_in_default>
|
171 |
+
<show_in_website>1</show_in_website>
|
172 |
+
<show_in_store>1</show_in_store>
|
173 |
+
</createinvoice>
|
174 |
+
<!--fast translate="label">
|
175 |
+
<label></label>
|
176 |
+
<frontend_type>linkpnso</frontend_type>
|
177 |
+
<sort_order>19</sort_order>
|
178 |
+
<show_in_default>1</show_in_default>
|
179 |
+
<show_in_website>1</show_in_website>
|
180 |
+
<show_in_store>1</show_in_store>
|
181 |
+
</fast-->
|
182 |
+
<model>
|
183 |
+
</model>
|
184 |
+
</fields>
|
185 |
+
</sofortueberweisung>
|
186 |
+
</groups>
|
187 |
+
</payment>
|
188 |
+
</sections>
|
189 |
+
</config>
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$setup = new Mage_Sales_Model_Mysql4_Setup('core_setup');
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
$setup->addAttribute('order_payment', 'pn_su_transaction_id', array('type'=>'varchar'));
|
8 |
+
$installer->endSetup();
|
9 |
+
|
10 |
+
?>
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php echo Mage::helper('novalnetpaypal')->__('Not possible'); ?>
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* Part of the Paymentmodul of Novalnet AG
|
16 |
+
* http://www.novalnet.de
|
17 |
+
* If you have found this script usefull a small
|
18 |
+
* recommendation as well as a comment on merchant form
|
19 |
+
* would be greatly appreciated.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Novalnet AG
|
24 |
+
* @version 1.0.0
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<?php if($_info = $this->getInfo()): ?>
|
29 |
+
<?php if( $this->getNnTestorder() ) echo '<div style="color:white;font-weight:bold;background:red;padding:5px 10px;text-align:center;font-size:15px">!',$this->__('Testorder'),'!</div>' ?>
|
30 |
+
<?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
|
31 |
+
<?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
|
32 |
+
<?php else: ?>
|
33 |
+
Error in getting payment method
|
34 |
+
<?php endif; ?>
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php Mage::helper('novalnetpaypal')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?>
|
2 |
+
{{pdf_row_separator}}
|
3 |
+
<?php Mage::helper('novalnetpaypal')->__('Transaction Id: %s',$this->getInfo()->getOrder()->getPayment()->getPnSuTransactionId()) ?>
|
4 |
+
{{pdf_row_separator}}
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php echo Mage::helper('sofortueberweisung')->__('Not possible'); ?>
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php Mage::helper('sofortueberweisung')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?>
|
2 |
+
{{pdf_row_separator}}
|
3 |
+
<?php Mage::helper('sofortueberweisung')->__('Paycode: %s',$this->getInfo()->getOrder()->getPayment()->getSuPaycode()) ?>{{pdf_row_separator}}
|
4 |
+
<?php if($this->getInfo()->getOrder()->getPayment()->getSuTransactionId()): ?>
|
5 |
+
<?php Mage::helper('sofortueberweisung')->__('Transaction Id: %s',$this->getInfo()->getOrder()->getPayment()->getSuTransactionId()) ?>{{pdf_row_separator}}
|
6 |
+
<?php endif; ?>
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php Mage::helper('sofortueberweisung')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?>
|
2 |
+
{{pdf_row_separator}}
|
3 |
+
<?php Mage::helper('sofortueberweisung')->__('Transaction Id: %s',$this->getInfo()->getOrder()->getPayment()->getPnSuTransactionId()) ?>
|
4 |
+
{{pdf_row_separator}}
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php if( $this->getInfo()->getNnTestorder() ) echo '<div style="color:white;font-weight:bold;background:red;padding:5px 10px;text-align:center;font-size:15px">!',$this->__('Testorder'),'!</div>' ?><br />
|
2 |
+
<strong><?php echo Mage::helper('sofortueberweisung')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?></strong>
|
3 |
+
<br />
|
4 |
+
<?php echo Mage::helper('sofortueberweisung')->__('Transaction Id: %s',$this->getInfo()->getLastTransId()) ?><br />
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="right">
|
5 |
+
<block type="sofortueberweisung/infobox" name="infobox" after="cart_sidebar" template="sofortueberweisung/infobox.phtml" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
<sofortueberweisung_sofortueberweisung_index>
|
9 |
+
<reference name="root">
|
10 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
11 |
+
<action method="setHeaderTitle" translate="title" module="sofortueberweisung"><title>Payment</title></action>
|
12 |
+
</reference>
|
13 |
+
<reference name="content">
|
14 |
+
<block type="sofortueberweisung/sofortueberweisung" name="sofortueberweisung" template="sofortueberweisung/sofortueberweisung.phtml" />
|
15 |
+
</reference>
|
16 |
+
</sofortueberweisung_sofortueberweisung_index>
|
17 |
+
|
18 |
+
<sofortueberweisung_sofortueberweisung_error>
|
19 |
+
<reference name="root">
|
20 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
21 |
+
<action method="setHeaderTitle" translate="title" module="sofortueberweisung"><title>Payment Error</title></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="sofortueberweisung/sofortueberweisungnotice" name="sofortueberweisungnotice" template="sofortueberweisung/notice.phtml"/>
|
25 |
+
</reference>
|
26 |
+
</sofortueberweisung_sofortueberweisung_error>
|
27 |
+
</layout>
|
@@ -95,16 +95,7 @@ else
|
|
95 |
<?php
|
96 |
|
97 |
}
|
98 |
-
|
99 |
-
if(trim($payment_method)=='Novalnet Credit Card')
|
100 |
-
{
|
101 |
-
$paymentmethod='novalnetCc';
|
102 |
-
}
|
103 |
-
else
|
104 |
-
{
|
105 |
-
$paymentmethod='';
|
106 |
-
}
|
107 |
-
|
108 |
?>
|
109 |
<script type="text/javascript">
|
110 |
//<![CDATA[
|
@@ -114,10 +105,13 @@ else
|
|
114 |
</script>
|
115 |
<?php
|
116 |
$check_active = Mage::getSingleton('checkout/session')->getNnDataValue()->getCheckActive();
|
117 |
-
|
|
|
118 |
if($check_active=='1')
|
119 |
{
|
120 |
-
|
|
|
|
|
121 |
$sessionvalue=Mage::getSingleton('checkout/session');
|
122 |
$get_user_email=Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
123 |
$dataObj = new Varien_Object();
|
@@ -125,8 +119,8 @@ else
|
|
125 |
|
126 |
$datavalue = Mage::getSingleton('checkout/session');
|
127 |
$check_active = $datavalue->getNnDataValue()->getCheckActive();
|
128 |
-
$paymentid = $datavalue->getNnDataValue()->getPaymentId();
|
129 |
$vendorid = $datavalue->getNnDataValue()->getVendorId();
|
|
|
130 |
$vendorAuthcode = $datavalue->getNnDataValue()->getVendorAuthcode();
|
131 |
$pid = $datavalue->getNnDataValue()->getProductId();
|
132 |
$tid = $datavalue->getNnDataValue()->getTariffId();
|
@@ -162,23 +156,24 @@ else
|
|
162 |
if($magento_version<'1.4.1.0')
|
163 |
{
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
|
179 |
}
|
180 |
else
|
181 |
{
|
|
|
182 |
$items_collect_order = $dbc_collect_order->fetchAll("SELECT * FROM `sales_flat_quote_address` WHERE email='".$get_user_email."' and address_type='shipping' ORDER BY `address_id` DESC LIMIT 1");
|
183 |
$order_id_data = $dbc_collect_order->fetchAll("SELECT `increment_id` FROM `sales_flat_order` ORDER BY `entity_id` DESC LIMIT 1");
|
184 |
|
@@ -205,6 +200,7 @@ else
|
|
205 |
$last_main_order_id = $order_id_data['0']['increment_id'];
|
206 |
$inputval1 = $last_main_order_id+1;
|
207 |
}
|
|
|
208 |
$dataObj->setVendorId($vendorid)
|
209 |
->setVendorAuthcode($vendorAuthcode)
|
210 |
->setProductId($pid)
|
@@ -233,8 +229,11 @@ else
|
|
233 |
->setErrorReturnMethod($errorreturnmethod)
|
234 |
->setInput1($input1)
|
235 |
->setImplementation($Implementation)
|
236 |
-
->setInputval1($inputval1)
|
237 |
-
|
|
|
|
|
|
|
238 |
|
239 |
$session=Mage::getSingleton('checkout/session')->setNovalnetRealOrderId($inputval1);
|
240 |
$session=Mage::getSingleton('checkout/session')->setOrderId($inputval1);
|
@@ -250,14 +249,26 @@ else
|
|
250 |
$amt_str='amount';
|
251 |
$testmode_str='test_mode';
|
252 |
|
|
|
253 |
$dataObj=importHashData($dataObj);
|
|
|
254 |
$authcode_enc_val=importEncodeData($dataObj,$authcode_str);
|
255 |
$product_enc_val=importEncodeData($dataObj,$product_str);
|
256 |
$tarrif_enc_val=importEncodeData($dataObj,$tarrif_str);
|
257 |
$uniq_enc_val=importEncodeData($dataObj,$uniq_str);
|
258 |
$amt_enc_val=importEncodeData($dataObj,$amt_str);
|
259 |
$testmode_enc_val=importEncodeData($dataObj,$testmode_str);
|
|
|
|
|
260 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
function importEncodeData($dataObj, $dataval)
|
262 |
{
|
263 |
$password = Mage::getSingleton('checkout/session')->getNnDataValue()->getPassword();
|
@@ -349,9 +360,12 @@ else
|
|
349 |
?>
|
350 |
<div id="nn_iframe" style="display:none;">
|
351 |
<?php
|
|
|
352 |
|
353 |
if($paymentmethod=='novalnetCc')
|
354 |
{
|
|
|
|
|
355 |
$data_val=$dataObj;
|
356 |
$form = new Varien_Data_Form();
|
357 |
$html = '<html><body>';
|
@@ -365,7 +379,7 @@ else
|
|
365 |
$html.= '<script type="text/javascript">document.getElementById("review-buttons-container").style.display="none";document.getElementById("novalnetCc").submit();</script>';
|
366 |
$html.= '</body>';
|
367 |
echo $html.= '</html>';
|
368 |
-
|
369 |
}
|
370 |
?>
|
371 |
</div>
|
95 |
<?php
|
96 |
|
97 |
}
|
98 |
+
$paymentmethod=Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getCode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
?>
|
100 |
<script type="text/javascript">
|
101 |
//<![CDATA[
|
105 |
</script>
|
106 |
<?php
|
107 |
$check_active = Mage::getSingleton('checkout/session')->getNnDataValue()->getCheckActive();
|
108 |
+
$password = Mage::getSingleton('checkout/session')->getNnDataValue()->getPassword();
|
109 |
+
|
110 |
if($check_active=='1')
|
111 |
{
|
112 |
+
|
113 |
+
if($password)
|
114 |
+
{
|
115 |
$sessionvalue=Mage::getSingleton('checkout/session');
|
116 |
$get_user_email=Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
117 |
$dataObj = new Varien_Object();
|
119 |
|
120 |
$datavalue = Mage::getSingleton('checkout/session');
|
121 |
$check_active = $datavalue->getNnDataValue()->getCheckActive();
|
|
|
122 |
$vendorid = $datavalue->getNnDataValue()->getVendorId();
|
123 |
+
$paymentid = $datavalue->getNnDataValue()->getPaymentId();
|
124 |
$vendorAuthcode = $datavalue->getNnDataValue()->getVendorAuthcode();
|
125 |
$pid = $datavalue->getNnDataValue()->getProductId();
|
126 |
$tid = $datavalue->getNnDataValue()->getTariffId();
|
156 |
if($magento_version<'1.4.1.0')
|
157 |
{
|
158 |
|
159 |
+
$order_id_data = $dbc_collect_order->fetchAll("SELECT `increment_id` FROM `sales_order` ORDER BY `entity_id` DESC LIMIT 1");
|
160 |
+
$billingadd = Mage::getModel('checkout/session')->getQuote()->getBillingAddress();
|
161 |
+
|
162 |
+
$firstname = $billingadd->getFirstname();
|
163 |
+
$lastname = $billingadd->getLastname();
|
164 |
+
$email = $get_user_email;
|
165 |
+
$street = $billingadd->getData('street');
|
166 |
+
$SearchInStreet = '1';
|
167 |
+
$city = $billingadd->getCity();
|
168 |
+
$postcode = $billingadd->getPostcode();
|
169 |
+
$countryid = $billingadd->getCountryId();
|
170 |
+
$telephone = $billingadd->getTelephone();
|
171 |
+
$fax = $billingadd->getFax();
|
172 |
|
173 |
}
|
174 |
else
|
175 |
{
|
176 |
+
|
177 |
$items_collect_order = $dbc_collect_order->fetchAll("SELECT * FROM `sales_flat_quote_address` WHERE email='".$get_user_email."' and address_type='shipping' ORDER BY `address_id` DESC LIMIT 1");
|
178 |
$order_id_data = $dbc_collect_order->fetchAll("SELECT `increment_id` FROM `sales_flat_order` ORDER BY `entity_id` DESC LIMIT 1");
|
179 |
|
200 |
$last_main_order_id = $order_id_data['0']['increment_id'];
|
201 |
$inputval1 = $last_main_order_id+1;
|
202 |
}
|
203 |
+
|
204 |
$dataObj->setVendorId($vendorid)
|
205 |
->setVendorAuthcode($vendorAuthcode)
|
206 |
->setProductId($pid)
|
229 |
->setErrorReturnMethod($errorreturnmethod)
|
230 |
->setInput1($input1)
|
231 |
->setImplementation($Implementation)
|
232 |
+
->setInputval1($inputval1);
|
233 |
+
if($paymentmethod=='novalnetCc')
|
234 |
+
{
|
235 |
+
$dataObj->setIsIframe(1);
|
236 |
+
}
|
237 |
|
238 |
$session=Mage::getSingleton('checkout/session')->setNovalnetRealOrderId($inputval1);
|
239 |
$session=Mage::getSingleton('checkout/session')->setOrderId($inputval1);
|
249 |
$amt_str='amount';
|
250 |
$testmode_str='test_mode';
|
251 |
|
252 |
+
$assignmodel=new Mage_Novalnet_Model_NovalnetCc();
|
253 |
$dataObj=importHashData($dataObj);
|
254 |
+
|
255 |
$authcode_enc_val=importEncodeData($dataObj,$authcode_str);
|
256 |
$product_enc_val=importEncodeData($dataObj,$product_str);
|
257 |
$tarrif_enc_val=importEncodeData($dataObj,$tarrif_str);
|
258 |
$uniq_enc_val=importEncodeData($dataObj,$uniq_str);
|
259 |
$amt_enc_val=importEncodeData($dataObj,$amt_str);
|
260 |
$testmode_enc_val=importEncodeData($dataObj,$testmode_str);
|
261 |
+
|
262 |
+
|
263 |
}
|
264 |
+
else
|
265 |
+
{
|
266 |
+
Mage::getSingleton('core/session')
|
267 |
+
->addError('Die Methoden für die Verarbeitung von Zeichensätzen sind nicht verfügbar!');
|
268 |
+
echo '<script>alert("Basic Parameters Missing");window.location.reload();</script>';
|
269 |
+
}
|
270 |
+
|
271 |
+
}
|
272 |
function importEncodeData($dataObj, $dataval)
|
273 |
{
|
274 |
$password = Mage::getSingleton('checkout/session')->getNnDataValue()->getPassword();
|
360 |
?>
|
361 |
<div id="nn_iframe" style="display:none;">
|
362 |
<?php
|
363 |
+
$password = Mage::getSingleton('checkout/session')->getNnDataValue()->getPassword();
|
364 |
|
365 |
if($paymentmethod=='novalnetCc')
|
366 |
{
|
367 |
+
if($password)
|
368 |
+
{
|
369 |
$data_val=$dataObj;
|
370 |
$form = new Varien_Data_Form();
|
371 |
$html = '<html><body>';
|
379 |
$html.= '<script type="text/javascript">document.getElementById("review-buttons-container").style.display="none";document.getElementById("novalnetCc").submit();</script>';
|
380 |
$html.= '</body>';
|
381 |
echo $html.= '</html>';
|
382 |
+
}
|
383 |
}
|
384 |
?>
|
385 |
</div>
|
@@ -33,33 +33,35 @@
|
|
33 |
<?php if ($this->checkCustomerAccess()): ?>
|
34 |
<fieldset class="form-list">
|
35 |
<div style="position: relative; left: 14em; top: -2.5em">
|
36 |
-
|
|
|
37 |
</div>
|
38 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
39 |
<li>
|
40 |
<div class="input-box">
|
41 |
<label for="<?php echo $code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
|
42 |
-
<input type="text" value="" id="<?php echo $code ?>_account_holder" name="payment[
|
43 |
</div>
|
44 |
</li>
|
45 |
<li>
|
46 |
<div class="input-box">
|
47 |
<label for="<?php echo $code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
|
48 |
-
<input type="text" value="" id="<?php echo $code ?>_account_number" name="payment[
|
49 |
</div>
|
50 |
</li>
|
51 |
<li>
|
52 |
<div class="input-box">
|
53 |
<label for="<?php echo $code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
|
54 |
-
<input type="text" value="" id="<?php echo $code ?>_bank_sorting_code" name="payment[
|
55 |
</div>
|
56 |
</li>
|
57 |
|
58 |
-
|
|
|
59 |
<li>
|
60 |
<div class="input-box">
|
61 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
62 |
-
<input type="text" value="<?php echo $this->getCustomersTelephone() ?>" id="<?php echo $code ?>_callback_tel" name="payment[
|
63 |
</div>
|
64 |
</li>
|
65 |
<li>
|
@@ -70,12 +72,20 @@
|
|
70 |
|
71 |
</div>
|
72 |
<label for="<?php echo $code ?>_callback_pin"><?php echo $this->__('PIN') ?><span class="required">*</span></label><br/>
|
73 |
-
<input onchange="document.getElementById('new_callback_pin').checked = false;" maxlength="4" size="4" type="text" id="<?php echo $code ?>_callback_pin" name="payment[
|
74 |
-
<input id="new_callback_pin" type="checkbox" name="payment[
|
75 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
76 |
</div>
|
77 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
<?php endif ?>
|
|
|
79 |
<?php if($this->show_comment()): ?>
|
80 |
<li>
|
81 |
<div class="input-box">
|
33 |
<?php if ($this->checkCustomerAccess()): ?>
|
34 |
<fieldset class="form-list">
|
35 |
<div style="position: relative; left: 14em; top: -2.5em">
|
36 |
+
<?php $imgpath = "images/novalnet/ELV_Logo.png"; ?>
|
37 |
+
<img src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='ELV Logo'/>
|
38 |
</div>
|
39 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
40 |
<li>
|
41 |
<div class="input-box">
|
42 |
<label for="<?php echo $code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
|
43 |
+
<input type="text" value="" id="<?php echo $code ?>_account_holder" name="payment[account_holder_at]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" value="" />
|
44 |
</div>
|
45 |
</li>
|
46 |
<li>
|
47 |
<div class="input-box">
|
48 |
<label for="<?php echo $code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
|
49 |
+
<input type="text" value="" id="<?php echo $code ?>_account_number" name="payment[account_number_at]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" value="" />
|
50 |
</div>
|
51 |
</li>
|
52 |
<li>
|
53 |
<div class="input-box">
|
54 |
<label for="<?php echo $code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
|
55 |
+
<input type="text" value="" id="<?php echo $code ?>_bank_sorting_code" name="payment[bank_sorting_code_at]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="" />
|
56 |
</div>
|
57 |
</li>
|
58 |
|
59 |
+
<?php if( $this->isCallbackTypeCall() ): ?>
|
60 |
+
<?php if($this->getCallbackConfigData()!=3 ): ?>
|
61 |
<li>
|
62 |
<div class="input-box">
|
63 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
64 |
+
<input type="text" value="<?php echo $this->getCustomersTelephone() ?>" id="<?php echo $code ?>_callback_tel" name="payment[callback_tel_at]" title="<?php echo $this->__('Callback') ?>" class="required-entry input-text" />
|
65 |
</div>
|
66 |
</li>
|
67 |
<li>
|
72 |
|
73 |
</div>
|
74 |
<label for="<?php echo $code ?>_callback_pin"><?php echo $this->__('PIN') ?><span class="required">*</span></label><br/>
|
75 |
+
<input onchange="document.getElementById('new_callback_pin').checked = false;" maxlength="4" size="4" type="text" id="<?php echo $code ?>_callback_pin" name="payment[callback_pin_at]" title="<?php echo $this->__('Callback') ?>" class="input-text" /><br/>
|
76 |
+
<input id="new_callback_pin" type="checkbox" name="payment[new_callback_pin_at]" value="1">
|
77 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
78 |
</div>
|
79 |
</li>
|
80 |
+
<?php elseif($this->getCallbackConfigData()==3 ): ?>
|
81 |
+
<li>
|
82 |
+
<div class="input-box">
|
83 |
+
<label for="<?php echo $code ?>_callback_email"><?php echo $this->__('Email Address') ?><span class="required">*</span></label><br/>
|
84 |
+
<input type="text" value="<?php echo $this->getCustomersEmail() ?>" id="<?php echo $code ?>_callback_email" name="payment[callback_email_at]" title="<?php echo $this->__('Callback Email') ?>" class="required-entry input-text" />
|
85 |
+
</div>
|
86 |
+
</li>
|
87 |
<?php endif ?>
|
88 |
+
<?php endif ?>
|
89 |
<?php if($this->show_comment()): ?>
|
90 |
<li>
|
91 |
<div class="input-box">
|
@@ -33,7 +33,8 @@
|
|
33 |
<?php if ($this->checkCustomerAccess()): ?>
|
34 |
<fieldset class="form-list">
|
35 |
<div style="position: relative; left: 14em; top: -2.5em">
|
36 |
-
|
|
|
37 |
</div>
|
38 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
39 |
<li>
|
@@ -62,7 +63,8 @@
|
|
62 |
</div>
|
63 |
</li>
|
64 |
<?php endif ?>
|
65 |
-
|
|
|
66 |
<li>
|
67 |
<div class="input-box">
|
68 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
@@ -82,7 +84,15 @@
|
|
82 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
83 |
</div>
|
84 |
</li>
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
<?php if($this->show_comment()): ?>
|
87 |
<li>
|
88 |
<div class="input-box">
|
33 |
<?php if ($this->checkCustomerAccess()): ?>
|
34 |
<fieldset class="form-list">
|
35 |
<div style="position: relative; left: 14em; top: -2.5em">
|
36 |
+
<?php $imgpath = "images/novalnet/ELV_Logo.png"; ?>
|
37 |
+
<img src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='ELV Logo'/>
|
38 |
</div>
|
39 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
40 |
<li>
|
63 |
</div>
|
64 |
</li>
|
65 |
<?php endif ?>
|
66 |
+
<?php if( $this->isCallbackTypeCall() ): ?>
|
67 |
+
<?php if($this->getCallbackConfigData()!=3 ): ?>
|
68 |
<li>
|
69 |
<div class="input-box">
|
70 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
84 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
85 |
</div>
|
86 |
</li>
|
87 |
+
<?php elseif($this->getCallbackConfigData()==3 ): ?>
|
88 |
+
<li>
|
89 |
+
<div class="input-box">
|
90 |
+
<label for="<?php echo $code ?>_callback_email"><?php echo $this->__('Email Address') ?><span class="required">*</span></label><br/>
|
91 |
+
<input type="text" value="<?php echo $this->getCustomersEmail() ?>" id="<?php echo $code ?>_callback_email" name="payment[callback_email]" title="<?php echo $this->__('Callback Email') ?>" class="required-entry input-text" />
|
92 |
+
</div>
|
93 |
+
</li>
|
94 |
+
<?php endif ?>
|
95 |
+
<?php endif ?>
|
96 |
<?php if($this->show_comment()): ?>
|
97 |
<li>
|
98 |
<div class="input-box">
|
@@ -39,7 +39,8 @@
|
|
39 |
<?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process')?>.<br />
|
40 |
</div>
|
41 |
</li>
|
42 |
-
|
|
|
43 |
<li>
|
44 |
<div class="input-box">
|
45 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
@@ -59,7 +60,15 @@
|
|
59 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
60 |
</div>
|
61 |
</li>
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</ul>
|
64 |
<script type="text/javascript">
|
65 |
var showbaby;
|
39 |
<?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process')?>.<br />
|
40 |
</div>
|
41 |
</li>
|
42 |
+
<?php if( $this->isCallbackTypeCall() ): ?>
|
43 |
+
<?php if($this->getCallbackConfigData()!=3 ): ?>
|
44 |
<li>
|
45 |
<div class="input-box">
|
46 |
<label for="<?php echo $code ?>_callback_tel"><?php echo $this->__('Ihre Telefon- / Mobil- Nummer') ?><span class="required">*</span></label><br/>
|
60 |
Neue PIN anfordern <a href="javascript:show_pin_info()">[?]</a>
|
61 |
</div>
|
62 |
</li>
|
63 |
+
<?php elseif($this->getCallbackConfigData()==3 ): ?>
|
64 |
+
<li>
|
65 |
+
<div class="input-box">
|
66 |
+
<label for="<?php echo $code ?>_callback_email"><?php echo $this->__('Email Address') ?><span class="required">*</span></label><br/>
|
67 |
+
<input type="text" value="<?php echo $this->getCustomersEmail() ?>" id="<?php echo $code ?>_callback_email" name="payment[callback_email]" title="<?php echo $this->__('Callback Email') ?>" class="required-entry input-text" />
|
68 |
+
</div>
|
69 |
+
</li>
|
70 |
+
<?php endif ?>
|
71 |
+
<?php endif ?>
|
72 |
</ul>
|
73 |
<script type="text/javascript">
|
74 |
var showbaby;
|
@@ -1,98 +0,0 @@
|
|
1 |
-
|
2 |
-
<?php echo $this->getChildHtml('items_before'); ?>
|
3 |
-
<div id="checkout-review-table-wrapper">
|
4 |
-
<table class="data-table" id="checkout-review-table">
|
5 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
|
6 |
-
<col />
|
7 |
-
<col width="1" />
|
8 |
-
<col width="1" />
|
9 |
-
<col width="1" />
|
10 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
11 |
-
<col width="1" />
|
12 |
-
<col width="1" />
|
13 |
-
<?php endif; ?>
|
14 |
-
<thead>
|
15 |
-
<tr>
|
16 |
-
<th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
|
17 |
-
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
|
18 |
-
<th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
|
19 |
-
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
|
20 |
-
</tr>
|
21 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
22 |
-
<tr>
|
23 |
-
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
24 |
-
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
25 |
-
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
26 |
-
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
27 |
-
</tr>
|
28 |
-
<?php endif; ?>
|
29 |
-
</thead>
|
30 |
-
<?php echo $this->getChildHtml('totals'); ?>
|
31 |
-
<tbody>
|
32 |
-
<?php foreach($this->getItems() as $_item): ?>
|
33 |
-
<?php echo $this->getItemHtml($_item)?>
|
34 |
-
<?php endforeach ?>
|
35 |
-
</tbody>
|
36 |
-
</table>
|
37 |
-
</div>
|
38 |
-
<?php echo $this->getChildHtml('items_after'); ?>
|
39 |
-
<script type="text/javascript">
|
40 |
-
//<![CDATA[
|
41 |
-
decorateTable('checkout-review-table');
|
42 |
-
truncateOptions();
|
43 |
-
//]]>
|
44 |
-
</script>
|
45 |
-
<div id="checkout-review-submit">
|
46 |
-
<?php echo $this->getChildHtml('agreements') ?>
|
47 |
-
<div class="buttons-set" id="review-buttons-container">
|
48 |
-
<p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
|
49 |
-
<?php //echo $this->getChildHtml('button') ?>
|
50 |
-
|
51 |
-
<span class="please-wait" id="review-please-wait" style="display:none;">
|
52 |
-
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
|
53 |
-
</span>
|
54 |
-
</div>
|
55 |
-
<div align="right">
|
56 |
-
<button id="placeorder_button" type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="novalnet.save();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
<?php $payment_method=Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle();
|
60 |
-
if(trim($payment_method)=='Novalnet Credit Card PCI')
|
61 |
-
{
|
62 |
-
$paymentmethod='novalnetCcpci';
|
63 |
-
}
|
64 |
-
else
|
65 |
-
{
|
66 |
-
$paymentmethod='';
|
67 |
-
}
|
68 |
-
|
69 |
-
?>
|
70 |
-
<script type="text/javascript">
|
71 |
-
//<![CDATA[
|
72 |
-
novalnet = new Novalnet('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'), '<?php echo $paymentmethod; ?>');
|
73 |
-
|
74 |
-
//]]>
|
75 |
-
</script>
|
76 |
-
<div id="nn_iframe" style="display:none;">
|
77 |
-
<?php
|
78 |
-
|
79 |
-
if($paymentmethod=='novalnetCcpci')
|
80 |
-
{
|
81 |
-
$session=Mage::getSingleton('checkout/session');
|
82 |
-
|
83 |
-
$data_val=$session->getNnDataValue();
|
84 |
-
$form = new Varien_Data_Form();
|
85 |
-
$html = '<html><body>';
|
86 |
-
echo '<form action="https://payport.novalnet.de/pci_payport" id="novalnetCcpci" name="novalnetCcpci" method="POST" target="my_iframe">';
|
87 |
-
foreach ($data_val->toArray() as $field=>$value) {
|
88 |
-
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
89 |
-
}
|
90 |
-
$html.= $form->toHtml();
|
91 |
-
$html.="<iframe id='my_iframe' name='my_iframe' width='518' height='350' ></iframe>";
|
92 |
-
$html.= '</form>';
|
93 |
-
$html.= '<script type="text/javascript">document.getElementById("review-buttons-container").style.display="none";document.getElementById("novalnetCcpci").submit();</script>';
|
94 |
-
$html.= '</body>';
|
95 |
-
echo $html.= '</html>';
|
96 |
-
}
|
97 |
-
?>
|
98 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -33,8 +33,9 @@
|
|
33 |
<fieldset class="form-list">
|
34 |
<div style="position: relative; left: 17em; top: -2.5em">
|
35 |
<?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
36 |
-
|
37 |
-
|
|
|
38 |
</div>
|
39 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
40 |
<li>
|
33 |
<fieldset class="form-list">
|
34 |
<div style="position: relative; left: 17em; top: -2.5em">
|
35 |
<?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
36 |
+
<?php $imgpath = "images/novalnet/". $_typeCode ."_Logo.png"; ?>
|
37 |
+
<img src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='<?php echo $_typeName; ?> Logo'/>
|
38 |
+
<?php endforeach; ?>
|
39 |
</div>
|
40 |
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
41 |
<li>
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<h4><?php echo $this->__('Customer was rejected by Novalnet') ?></h4>
|
2 |
+
<!--<p>Hier steht Ihre Fehlermeldung</p>-->
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- Here we can print the custom message for the front end user -->
|
2 |
+
<?php
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* Part of the Paymentmodul of Novalnet AG
|
17 |
+
* http://www.novalnet.de
|
18 |
+
* If you have found this script usefull a small
|
19 |
+
* recommendation as well as a comment on merchant form
|
20 |
+
* would be greatly appreciated.
|
21 |
+
*
|
22 |
+
* @category design_default
|
23 |
+
* @package Mage
|
24 |
+
* @copyright Copyright (c) 2008 Novalnet AG
|
25 |
+
* @version 1.0.0
|
26 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
27 |
+
*/
|
28 |
+
?>
|
29 |
+
<?php
|
30 |
+
$code=$this->getMethodCode();
|
31 |
+
$baseUrl=Mage::getBaseUrl('skin');
|
32 |
+
?>
|
33 |
+
<fieldset class="form-list">
|
34 |
+
<div style="position: relative; left: 13em; top:-3.0em">
|
35 |
+
<?php $imgpath = "images/novalnet/novalnetpaypal/lockbox_150x47.gif"; ?>
|
36 |
+
<img src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='Paypal'/>
|
37 |
+
<ul id="payment_form_<?php echo $code ?>" style="display:none">
|
38 |
+
<li>
|
39 |
+
<?php echo $this->__('You will be redirected to Novalnet AG website when you place an order.') ?>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
</div>
|
43 |
+
</fieldset>
|
44 |
+
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* Part of the Paymentmodul of Novalnet AG
|
16 |
+
* http://www.novalnet.de
|
17 |
+
* If you have found this script usefull a small
|
18 |
+
* recommendation as well as a comment on merchant form
|
19 |
+
* would be greatly appreciated.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Novalnet AG
|
24 |
+
* @version 1.0.0
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<?php if($_info = $this->getInfo()): ?>
|
29 |
+
<?php if( $this->getNnTestorder() ) echo '<div style="color:white;font-weight:bold;background:red;padding:5px 10px;text-align:center;font-size:15px">!',$this->__('Testorder'),'!</div>' ?>
|
30 |
+
<?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
|
31 |
+
<?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
|
32 |
+
<?php else: ?>
|
33 |
+
<?php echo $this->__('Can not retrieve payment info model object.'); ?>
|
34 |
+
<?php endif; ?>
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--div class="box base-mini mini-su-infobox">
|
2 |
+
<div class="head">
|
3 |
+
<h4><?php echo $this->__('Novalnet-Paypal'); ?></h4>
|
4 |
+
</div>
|
5 |
+
<div class="content">
|
6 |
+
<a href="https://www.novalnet.de" title="Informationen zu Novalnet AG"><img src="<?php $this->getSkinUrl() ?>images/novalnetpaypal/lockbox_150x47.gif" alt="Sofort�berweisung" title="Sofort�berweisung"></a>
|
7 |
+
</div-->
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<h4><?php echo $this->__('Customer aborted payment process') ?></h4>
|
2 |
+
<!--<p>Hier steht Ihre Fehlermeldung</p>-->
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<h4><?php echo $this->__('Error of payment') ?></h4>
|
2 |
+
<!--<p>Hier steht Ihre Fehlermeldung</p>-->
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<a name="<?php echo $this->getMethodCode() ?>"></a>
|
2 |
+
<?php $_code=$this->getMethodCode() ?>
|
3 |
+
<?php $baseUrl = Mage::getBaseUrl('skin') ?>
|
4 |
+
<div style="position: relative; left: 14em; top: -2.5em">
|
5 |
+
<a href="#<?php echo $this->getMethodCode() ?>" title="Informationen zu Sofortüberweisung">
|
6 |
+
<?php $imgpath = "images/novalnet/sofortueberweisung/Sofort_Logo_t.jpg"; ?>
|
7 |
+
<img src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt="Sofortüberweisung" title="Sofortüberweisung" />
|
8 |
+
|
9 |
+
</a>
|
10 |
+
</div>
|
11 |
+
|
12 |
+
<div class="clear"></div>
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if( $this->getInfo()->getNnTestorder() ) echo '<div style="color:white;font-weight:bold;background:red;padding:5px 10px;text-align:center;font-size:15px">!',$this->__('Testorder'),'!</div>' ?>
|
2 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
3 |
+
<?php if($_info = $this->getInfo()):?>
|
4 |
+
|
5 |
+
<?php if($this->getInfo()->getSuHolder()): ?>
|
6 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getSuHolder())?><br/>
|
7 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getSuAccountNumber(),4,strlen($this->getInfo()->getSuAccountNumber())))?><br/>
|
8 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getSuBankCode())?><br/>
|
9 |
+
<?php endif; ?>
|
10 |
+
|
11 |
+
<?php if($this->getInfo()->getLastTransId()): ?>
|
12 |
+
<?php echo $this->__('TID: %s', $this->getInfo()->getLastTransId())?><br/>
|
13 |
+
<?php endif; ?>
|
14 |
+
<?php else: ?>
|
15 |
+
|
16 |
+
<?php endif; ?>
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--div class="box base-mini mini-su-infobox">
|
2 |
+
<div class="head">
|
3 |
+
<h4><?php echo $this->__('Sofortueberweisung'); ?></h4>
|
4 |
+
</div>
|
5 |
+
<div class="content">
|
6 |
+
<a href="https://www.novalnet.de" title="Informationen zu Novalnet AG"><img src="<?php $this->getSkinUrl() ?>images/sofortueberweisung/logo_sofortueberweisung170.jpg" alt="Sofort�berweisung" title="Sofort�berweisung"></a>
|
7 |
+
<p>
|
8 |
+
<ul style="list-style-type:disc;">
|
9 |
+
<li style="margin-left:15px;"><?php echo $this->helper('sofortueberweisung')->__('Fast shippiung') ?></li>
|
10 |
+
<li style="margin-left:15px;"><?php echo $this->helper('sofortueberweisung')->__('Privacy') ?></li>
|
11 |
+
<li style="margin-left:15px;"><?php echo $this->helper('sofortueberweisung')->__('No registration') ?></li>
|
12 |
+
<li style="margin-left:15px;"><?php echo $this->helper('sofortueberweisung')->__('Save payment') ?></li>
|
13 |
+
</ul>
|
14 |
+
</p>
|
15 |
+
</div>
|
16 |
+
<div class="actions">
|
17 |
+
<a href="https://www.novalnet.de"><small><?php echo $this->__('More') ?></small></a>
|
18 |
+
</div>
|
19 |
+
</div-->
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<h4><?php echo $this->__('Cancelation of payment') ?></h4>
|
2 |
+
<!--<p>Hier steht Ihre Fehlermeldung</p>-->
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<modules>
|
3 |
+
<Novalnet_NovalnetPaypal>
|
4 |
+
<active>true</active>
|
5 |
+
<codePool>community</codePool>
|
6 |
+
<depends>
|
7 |
+
<Mage_Payment />
|
8 |
+
</depends>
|
9 |
+
</Novalnet_NovalnetPaypal>
|
10 |
+
</modules>
|
11 |
+
</config>
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<modules>
|
3 |
+
<Novalnet_Sofortueberweisung>
|
4 |
+
<active>true</active>
|
5 |
+
<codePool>community</codePool>
|
6 |
+
<depends>
|
7 |
+
<Mage_Payment />
|
8 |
+
</depends>
|
9 |
+
</Novalnet_Sofortueberweisung>
|
10 |
+
</modules>
|
11 |
+
</config>
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Not possible","Nicht verfügbar im Backend"
|
2 |
+
"Account number","Kontonummer"
|
3 |
+
"Bank code","Bankleitzahl"
|
4 |
+
"Holder","Kontoinhaber"
|
5 |
+
"Account number: %s","Kontonummer: %s"
|
6 |
+
"Bank code: %s","Bankleitzahl: %s"
|
7 |
+
"Account holder: %s","Kontoinhaber: %s"
|
8 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
9 |
+
"Order No.: ","Best. "
|
10 |
+
"Order: ","Best. "
|
11 |
+
"Gateway request error: %s","Fehler beim übertragen der Daten: %s"
|
12 |
+
"Please check your account data.","Bitte überprüfen Sie Ihre Kontodaten auf Korrektheit."
|
13 |
+
"Invalid amount for authorization.","Ungültiger Betrag für die Bezahlung."
|
14 |
+
"Payment was successful.","Zahlung bei Sofortüberweisung war erfolgreich"
|
15 |
+
"Paymentinformations: %s";"Zahlungsinformationen: %s"
|
16 |
+
"Payment was not successfull","Zahlung konnte nicht durchgeführt werden. Es ist ein Fehler aufgetreten"
|
17 |
+
"You will be redirected to Sofortüberweisung","Sie werden nach Abschluss der Bestellung zu Sofortüberweisung weitergeleitet um die Bezahlung zu vollenden"
|
18 |
+
"You will be redirected to Sofortueberweisung in a few seconds.","Sie werden in wenigen Sekunden zu Sofortüberweisung weitergeleitet"
|
19 |
+
"Sofortueberweisung payment loaded","Sofortüberweisung wurde geladen"
|
20 |
+
"Please fill out the account holder","Geben Sie bitte einen Kontoinhaber an"
|
21 |
+
"Please fill out the account number","Geben Sie bitte eine Kontonummer an"
|
22 |
+
"Please fill out the bank code","Geben Sie bitte eine Bankleitzahl an"
|
23 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
24 |
+
"Cancelation of payment","Abbruch der Bezahlung"
|
25 |
+
"Paymentinformations: %s","Zahlungsinformationen: %s"
|
26 |
+
"Paycode: %s","Paycode: %s"
|
27 |
+
"Project password","Projektpasswort"
|
28 |
+
"Notification password", "Benachrichtigungspasswort"
|
29 |
+
"Use input check","Input Check aktivieren"
|
30 |
+
"Create Invoice","Generiere Rechnung nach Zahlung"
|
31 |
+
"Projekt Id","Projekt ID"
|
32 |
+
"User Id","Benutzer ID"
|
33 |
+
"Expires","Gültigkeitsdauer in Tagen (max. 90 Tage, 0 für unbegrenzt, Standard: 2Tage)"
|
34 |
+
"Sofortueberweisung","Sofortüberweisung"
|
35 |
+
"More","mehr Infos"
|
36 |
+
"Error while saving this configuration: ","Beim Speichern der Daten ist ein Fehler aufgetreten: "
|
37 |
+
"Item was successfully saved","Konfiguration wurde erfolgreich gespeichert."
|
38 |
+
"Theres no password defined","Es ist kein Passwort definiert! Bitte tragen Sie das erstellte/angelegte Passwort aus dem Kundenbereich bei sofortüberweisung.de in das entsprechende Feld für die Konfiguration ein."
|
39 |
+
"Get stock articles.","Lagerware schneller erhalten durch umgehenden Versand. Sie benötigen jetzt Ihre Online-Banking- Daten (PIN und TAN)."
|
40 |
+
"Your benefit:","Ihre Vorteile:"
|
41 |
+
"Fast shippiung","sofortiger Versand von Lagerware / sofortiger Download"
|
42 |
+
"Privacy","TÜV-geprüfter Datenschutz"
|
43 |
+
"No registration","keine Registrierung notwendig"
|
44 |
+
"Save payment","sicher und schnell bezahlen"
|
45 |
+
"Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
|
46 |
+
"Netherlands banks","Niederländische Banken anzeigen?"
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Not possible","Nicht verfügbar im Backend"
|
2 |
+
"Account number","Kontonummer"
|
3 |
+
"Bank code","Bankleitzahl"
|
4 |
+
"Holder","Kontoinhaber"
|
5 |
+
"Account number: %s","Kontonummer: %s"
|
6 |
+
"Bank code: %s","Bankleitzahl: %s"
|
7 |
+
"Account holder: %s","Kontoinhaber: %s"
|
8 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
9 |
+
"Order No.: ","Best. "
|
10 |
+
"Order: ","Best. "
|
11 |
+
"Gateway request error: %s","Fehler beim übertragen der Daten: %s"
|
12 |
+
"Please check your account data.","Bitte überprüfen Sie Ihre Kontodaten auf Korrektheit."
|
13 |
+
"Invalid amount for authorization.","Ungültiger Betrag für die Bezahlung."
|
14 |
+
"Payment was successful.","Zahlung bei Sofortüberweisung war erfolgreich"
|
15 |
+
"Paymentinformations: %s";"Zahlungsinformationen: %s"
|
16 |
+
"Payment was not successfull","Zahlung konnte nicht durchgeführt werden. Es ist ein Fehler aufgetreten"
|
17 |
+
"You will be redirected to Sofortüberweisung","Sie werden nach Abschluss der Bestellung zu Sofortüberweisung weitergeleitet um die Bezahlung zu vollenden"
|
18 |
+
"You will be redirected to Sofortueberweisung in a few seconds.","Sie werden in wenigen Sekunden zu Sofortüberweisung weitergeleitet"
|
19 |
+
"Sofortueberweisung payment loaded","Sofortüberweisung wurde geladen"
|
20 |
+
"Please fill out the account holder","Geben Sie bitte einen Kontoinhaber an"
|
21 |
+
"Please fill out the account number","Geben Sie bitte eine Kontonummer an"
|
22 |
+
"Please fill out the bank code","Geben Sie bitte eine Bankleitzahl an"
|
23 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
24 |
+
"Cancelation of payment","Abbruch der Bezahlung"
|
25 |
+
"Paymentinformations: %s","Zahlungsinformationen: %s"
|
26 |
+
"Paycode: %s","Paycode: %s"
|
27 |
+
"Project password","Projektpasswort"
|
28 |
+
"Notification password", "Benachrichtigungspasswort"
|
29 |
+
"Use input check","Input Check aktivieren"
|
30 |
+
"Create Invoice","Generiere Rechnung nach Zahlung"
|
31 |
+
"Projekt Id","Projekt ID"
|
32 |
+
"User Id","Benutzer ID"
|
33 |
+
"Expires","Gültigkeitsdauer in Tagen (max. 90 Tage, 0 für unbegrenzt, Standard: 2Tage)"
|
34 |
+
"Sofortueberweisung","Sofortüberweisung"
|
35 |
+
"More","mehr Infos"
|
36 |
+
"Error while saving this configuration: ","Beim Speichern der Daten ist ein Fehler aufgetreten: "
|
37 |
+
"Item was successfully saved","Konfiguration wurde erfolgreich gespeichert."
|
38 |
+
"Theres no password defined","Es ist kein Passwort definiert! Bitte tragen Sie das erstellte/angelegte Passwort aus dem Kundenbereich bei sofortüberweisung.de in das entsprechende Feld für die Konfiguration ein."
|
39 |
+
"Get stock articles.","Lagerware schneller erhalten durch umgehenden Versand. Sie benötigen jetzt Ihre Online-Banking- Daten (PIN und TAN)."
|
40 |
+
"Your benefit:","Ihre Vorteile:"
|
41 |
+
"Fast shippiung","sofortiger Versand von Lagerware / sofortiger Download"
|
42 |
+
"Privacy","TÜV-geprüfter Datenschutz"
|
43 |
+
"No registration","keine Registrierung notwendig"
|
44 |
+
"Save payment","sicher und schnell bezahlen"
|
45 |
+
"Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
|
46 |
+
"Netherlands banks","Niederländische Banken anzeigen?"
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Enabled,Aktiviert
|
2 |
+
New order status,Neuer Bestellstatus
|
3 |
+
Novalnet Merchant ID,Novalnet Händler ID
|
4 |
+
Title,Titel
|
5 |
+
Novalnet Auth Code,Novalnet Auth Code
|
6 |
+
Novalnet Product ID,Novalnet Produkt ID
|
7 |
+
Novalnet Tariff ID,Novalnet Tarif ID
|
8 |
+
Payment from applicable countries,Zahlungsmöglichkeit für
|
9 |
+
Payment from Specific countries,Länderauswahl für Zahlungsmöglichkeit
|
10 |
+
DE,Deutschland
|
11 |
+
AT,Österreich
|
12 |
+
Direct Debit,Lastschrift
|
13 |
+
Credit Card,Kreditkarte
|
14 |
+
Country,Buchungsland
|
15 |
+
Name on the Card,Kreditkarteninhaber
|
16 |
+
Name on Card,Kreditkarteninhaber
|
17 |
+
Credit Card Type,Kreditkarten Typ
|
18 |
+
Credit Card Number,Kreditkartennummer
|
19 |
+
Expiration Date,Ablaufdatum
|
20 |
+
Card Verification Number,CVC-Nummer
|
21 |
+
What is this?,Wo finde ich die CVC-Nummer?
|
22 |
+
Account Holder,Name des Kontoinhabers
|
23 |
+
Account Number,Kontonr.
|
24 |
+
Bank Sorting Code,BLZ
|
25 |
+
Country: ,Buchungsland:
|
26 |
+
Account Holder: %s,Kontoinhaber: %s
|
27 |
+
Account Number: %s,Kontonr.: %s
|
28 |
+
Bank Sorting Code: %s,BLZ: %s
|
29 |
+
TID: %s,TID: %s
|
30 |
+
Name on the Card: %s,Kreditkarteninhaber: %s
|
31 |
+
Credit Card Number: %s,Kreditkartennummer: %s
|
32 |
+
Credit Card Number: xxxx-%s,Kreditkartennummer: xxxx-%s
|
33 |
+
Credit Card Type: %s,Kreditkartentyp: %s
|
34 |
+
Expiration Date: %s/%s,Gültig bis: %s/%s
|
35 |
+
Credit Card Types,Mögliche Kreditkarten
|
36 |
+
The amount will be booked immediately from your credit card<BR>with <B>%s</B> note.,Der Betrag wird sofort von Ihrer Kreditkarte mit dem<BR>Verwendungszweck
|
37 |
+
<B>%s</B> abgebucht.
|
38 |
+
This is not a valid account number.,Die Kontonummer ist nicht gültig!
|
39 |
+
This is not a valid bank sorting code.,Die Bankleitzahl ist nicht gültig!
|
40 |
+
Direct Debit,Lastschrift
|
41 |
+
Credit Card,Kreditkarte
|
42 |
+
Creditcard,Kreditkarte
|
43 |
+
Credit Card 3D-Secure,Kreditkarte 3D-Secure
|
44 |
+
You will be redirected to Novalnet AG 3D-Secure in a few seconds.,Sie werden in ein paar Sekunden an das 3D-Secure Gateway der Firma Novalnet weitergeleitet
|
45 |
+
Customer was redirected to Novalnet.,Der Kunde wurde zum Novalnet Gateway weitergeleitet
|
46 |
+
Customer successfully returned from Novalnet,Der Kunde kehrte erfolgreich vom Novalnet Gateway zurück
|
47 |
+
Customer was rejected by Novalnet,Der Kunde wurde vom Novalnet Gateway zurückgewiesen
|
48 |
+
Prepayment,Vorkasse
|
49 |
+
Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.,Bemerkung: Nach dem Absenden Ihrer Bestellung wird
|
50 |
+
Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet.
|
51 |
+
Payment Duration,Zahlbar in Tagen
|
52 |
+
--Please Select--,--Bitte wählen--
|
53 |
+
Invoice,Rechnung
|
54 |
+
"Please transfer the amount at the latest, untill",Bitte ueberweisen Sie den Betrag spaetestens bis zum
|
55 |
+
to following account:,auf folgendes Konto:
|
56 |
+
I accept the ACDC check,Der acdc-Check wird akzeptiert
|
57 |
+
This is a required field,Das ist ein Pflichtfeld
|
58 |
+
CC,Kreditkarte
|
59 |
+
Cc,Kreditkarte
|
60 |
+
Method,Zahlart
|
61 |
+
Due at,Gültig bis
|
62 |
+
The Bank details will be emailed to you soon after the completion of checkout process,Die Bankverbindung wird Ihnen nach Abschluss Ihrer Bestellung per E-Mail
|
63 |
+
zugeschickt
|
64 |
+
Please transfer the amount to following account,Bitte ueberweisen sie den Betrag auf folgendes Konto
|
65 |
+
Account Holder2,Kontoinhaber
|
66 |
+
Bank,Bank
|
67 |
+
Amount,Betrag
|
68 |
+
Reference,Verwendungszweck
|
69 |
+
to following account,auf folgendes Konto
|
70 |
+
Please note that the Transfer can only be identified with the above mentioned Reference,"Bitte beachten Sie, dass die Ueberweisung nur bearbeitet werden kann,
|
71 |
+
wenn der oben angegebene Verwendungszweck verwendet wird"
|
72 |
+
The ACDC-Check accepted,Der ACDC-Check wird akzeptiert
|
73 |
+
accepted,wird akzeptiert
|
74 |
+
ACDC-Check,ACDC-Check
|
75 |
+
The,Der
|
76 |
+
Month,Monat
|
77 |
+
Year,Jahr
|
78 |
+
Direct Debit German,Lastschrift Deutschland
|
79 |
+
Direct Debit Austria,Lastschrift Österreich
|
80 |
+
Booking Reference,Verwendungszweck
|
81 |
+
The Bankcode must have a length of at least 8 digits,Die BLZ muss mindestens 8-stellig sein
|
82 |
+
The Bankcode must have a length of at least 5 digits,Die BLZ muss mindestens 5-stellig sein
|
83 |
+
You must check ACDC,You must check ACDC
|
84 |
+
Notice for Clients,Hinweis für Kunden
|
85 |
+
Pay by Call,Per Telefon
|
86 |
+
Phonepayment,Per Telefon
|
87 |
+
Error,Fehler
|
88 |
+
Order Price not found,Bestellsumme nicht gefunden
|
89 |
+
Amount below 0.90 Euro and above 10.00 Euro is not accepted,Betraege unter 0.90 Euro und ueber 10.00 Euro koennen nicht verarbeitet werden bzw. werden nicht
|
90 |
+
akzeptiert!
|
91 |
+
Params (aryResponse) missing,Params (aryResponse) fehlt
|
92 |
+
Following steps are required to complete the telephone payment process,Folgende Schritte sind noetig um Ihre Zahlung abzuschliessen
|
93 |
+
Step,Schritt
|
94 |
+
Please dial this number,Bitte rufen Sie diese Telefonnummer an
|
95 |
+
Please wait for the Signal tone and hangup the reciever,Bitte warten Sie auf den Signalton und legen Sie dann den Hoerer auf
|
96 |
+
Please click on continue after your successive call,Nach Ihrem erfolgreichen Anruf klicken Sie bitte unten auf Weiter
|
97 |
+
This call costs,Dieser Anruf kostet einmalig
|
98 |
+
inclusive tax,inkl. MwSt.
|
99 |
+
and is only possible from German Landline Telefon connection,und ist nur vom Deutschen Festnetzanschluss moeglich
|
100 |
+
Response contains no XML data,Response enthält keine XML Daten
|
101 |
+
Did you called this number,Did you called this number
|
102 |
+
Billing Addr. not found,Rechnungsadresse nicht gefunden
|
103 |
+
User Group Excluded,Ausgeschlossene Benutzergruppe
|
104 |
+
Parameter missing,Parameter fehlt
|
105 |
+
Comment,Bemerkung
|
106 |
+
Email address missing,Emailadresse nicht vorhanden
|
107 |
+
Instant Bank Transfer,Sofortüberweisung
|
108 |
+
Customer successfully returned from Novalnet,Besteller von Novalnet erfolgreich zurückgeleitet
|
109 |
+
Customer was redirected to Novalnet,Besteller zu Novalnet umgeleitet
|
110 |
+
Customer aborted payment process,Besteller hat den Bezahlvorgang abgebrochen
|
111 |
+
Customer was rejected by Novalnet,Besteller von Novalnet abgelehnt
|
112 |
+
Password,Passwort
|
113 |
+
Test Mode,Testmodus
|
114 |
+
Live Mode,Livemodus
|
115 |
+
Testorder,Testbestellung
|
116 |
+
Credit Card PCI,Kreditkarte PCI
|
117 |
+
Direct Debit German PCI,Lastschrift Deutschland PCI
|
118 |
+
Direct Debit Austria PCI,Lastschrift Österreich PCI
|
119 |
+
Novalnet Phonepayment,Novalnet Per Telefon
|
120 |
+
Novalnet Prepayment,Novalnet Vorkasse
|
121 |
+
Novalnet Invoice,Novalnet Per Rechnung
|
122 |
+
Novalnet Direct Debit,Novalnet Lastschrift
|
123 |
+
Novalnet Credit Card,Novalnet Kreditkarte
|
124 |
+
Novalnet Creditcard,Novalnet Kreditkarte
|
125 |
+
Novalnet Credit Card 3D-Secure,Novalnet Kreditkarte 3D-Secure
|
126 |
+
Novalnet Credit Card PCI,Novalnet Kreditkarte PCI
|
127 |
+
Novalnet Direct Debit German PCI,Novalnet Lastschrift Deutschland PCI
|
128 |
+
Novalnet Direct Debit Austria PCI,Novalnet Lastschrift Österreich PCI
|
129 |
+
Novalnet Instant Bank Transfer,Novalnet Sofortüberweisung
|
130 |
+
You will be redirected to Novalnet AG 3D-Secure in a few seconds.,Sie werden gleich auf die Novalnet AG 3D-Secure Schnittstelle umgeleitet.
|
131 |
+
You will be redirected to Novalnet AG website when you place an order.,"Sie werden auf das Novalnet Payment Gateway umgeleitet, wenn Sie eine Bestellung
|
132 |
+
aufgeben."
|
133 |
+
Novalnet Direct Debit German,Novalnet Lastschrift Deutschland
|
134 |
+
Novalnet Direct Debit Austria,Novalnet Lastschrift Österreich
|
135 |
+
Only for foreign transfers,Nur bei Auslandsüberweisungen
|
136 |
+
Please transfer the invoice amount with the following information to our payment provider Novalnet AG,Bitte überweisen Sie den Betrag mit der folgenden
|
137 |
+
Information an unseren Zahlungsdienstleister Novalnet AG
|
138 |
+
You will be redirected to Novalnet AG in a few seconds,Sie werden nach ein paar Sekunden auf das Gateway der Novalnet AG umgeleitet
|
139 |
+
Customer was redirected to Novalnet,Endkunde wurde auf das Gateway der Novalnet AG umgeleitet
|
140 |
+
You will be redirected to Novalnet AG website when you place an order.,Sie werden dann auf das Gateway der Novalnet AG umgeleitet.
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Not possible","Nicht verfügbar im Backend"
|
2 |
+
"Account number","Kontonummer"
|
3 |
+
"Bank code","Bankleitzahl"
|
4 |
+
"Holder","Kontoinhaber"
|
5 |
+
"Account number: %s","Kontonummer: %s"
|
6 |
+
"Bank code: %s","Bankleitzahl: %s"
|
7 |
+
"Account holder: %s","Kontoinhaber: %s"
|
8 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
9 |
+
"Order No.: ","Best. "
|
10 |
+
"Order: ","Best. "
|
11 |
+
"Gateway request error: %s","Fehler beim übertragen der Daten: %s"
|
12 |
+
"Please check your account data.","Bitte überprüfen Sie Ihre Kontodaten auf Korrektheit."
|
13 |
+
"Invalid amount for authorization.","Ungültiger Betrag für die Bezahlung."
|
14 |
+
"Payment was successful.","Zahlung bei Sofortüberweisung war erfolgreich"
|
15 |
+
"Paymentinformations: %s";"Zahlungsinformationen: %s"
|
16 |
+
"Payment was not successfull","Zahlung konnte nicht durchgeführt werden. Es ist ein Fehler aufgetreten"
|
17 |
+
"You will be redirected to Sofortüberweisung","Sie werden nach Abschluss der Bestellung zu Sofortüberweisung weitergeleitet um die Bezahlung zu vollenden"
|
18 |
+
"You will be redirected to Sofortueberweisung in a few seconds.","Sie werden in wenigen Sekunden zu Sofortüberweisung weitergeleitet"
|
19 |
+
"Sofortueberweisung payment loaded","Sofortüberweisung wurde geladen"
|
20 |
+
"Please fill out the account holder","Geben Sie bitte einen Kontoinhaber an"
|
21 |
+
"Please fill out the account number","Geben Sie bitte eine Kontonummer an"
|
22 |
+
"Please fill out the bank code","Geben Sie bitte eine Bankleitzahl an"
|
23 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
24 |
+
"Cancelation of payment","Abbruch der Bezahlung"
|
25 |
+
"Paymentinformations: %s","Zahlungsinformationen: %s"
|
26 |
+
"Paycode: %s","Paycode: %s"
|
27 |
+
"Project password","Projektpasswort"
|
28 |
+
"Notification password", "Benachrichtigungspasswort"
|
29 |
+
"Use input check","Input Check aktivieren"
|
30 |
+
"Create Invoice","Generiere Rechnung nach Zahlung"
|
31 |
+
"Projekt Id","Projekt ID"
|
32 |
+
"User Id","Benutzer ID"
|
33 |
+
"Expires","Gültigkeitsdauer in Tagen (max. 90 Tage, 0 für unbegrenzt, Standard: 2Tage)"
|
34 |
+
"Sofortueberweisung","Sofortüberweisung"
|
35 |
+
"More","mehr Infos"
|
36 |
+
"Error while saving this configuration: ","Beim Speichern der Daten ist ein Fehler aufgetreten: "
|
37 |
+
"Item was successfully saved","Konfiguration wurde erfolgreich gespeichert."
|
38 |
+
"Theres no password defined","Es ist kein Passwort definiert! Bitte tragen Sie das erstellte/angelegte Passwort aus dem Kundenbereich bei sofortüberweisung.de in
|
39 |
+
das entsprechende Feld für die Konfiguration ein."
|
40 |
+
"Get stock articles.","Lagerware schneller erhalten durch umgehenden Versand. Sie benötigen jetzt Ihre Online-Banking- Daten (PIN und TAN)."
|
41 |
+
"Your benefit:","Ihre Vorteile:"
|
42 |
+
"Fast shippiung","sofortiger Versand von Lagerware / sofortiger Download"
|
43 |
+
"Privacy","TÜV-geprüfter Datenschutz"
|
44 |
+
"No registration","keine Registrierung notwendig"
|
45 |
+
"Save payment","sicher und schnell bezahlen"
|
46 |
+
"Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und
|
47 |
+
TAN)."
|
48 |
+
"Netherlands banks","Niederländische Banken anzeigen?"
|
49 |
+
Customer cancled payment or payment error,Endkunde hat Bezahlung abgebrochen oder ein Fehler trat bei Bezahlung auf
|
50 |
+
Customer cancled payment,Endkunde hat Bezahlung abgebrochen
|
51 |
+
payment error,Fehler bei Bezahlung
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Enabled,Enabled
|
2 |
+
New order status,New order status
|
3 |
+
Novalnet Merchant ID,Novalnet Merchant ID
|
4 |
+
Title,Title
|
5 |
+
Novalnet Auth Code,Novalnet Auth Code
|
6 |
+
Novalnet Product ID,Novalnet Product ID
|
7 |
+
Novalnet Tariff ID,Novalnet Tariff IDD
|
8 |
+
Payment from applicable countries,Payment from applicable countries
|
9 |
+
Payment from Specific countries,Payment from Specific countries
|
10 |
+
DE,Germany
|
11 |
+
AT,Austria
|
12 |
+
Direct Debit,Direct Debit
|
13 |
+
Credit Card,Credit Card
|
14 |
+
Country,Country
|
15 |
+
Name on Card,Name on Card
|
16 |
+
Credit Card Type,Credit Card Type
|
17 |
+
Credit Card Number,Credit Card Number
|
18 |
+
Expiration Date,Expiration Date
|
19 |
+
Card Verification Number,Card Verification Number
|
20 |
+
What is this?,What is this?
|
21 |
+
Account Holder,Account Holder
|
22 |
+
Account Number,Account No.
|
23 |
+
Bank Sorting Code,Bank Code
|
24 |
+
Country: ,Country:
|
25 |
+
Account Holder: %s,Account Holder: %s
|
26 |
+
Account Number: %s,Account No.: %s
|
27 |
+
Bank Sorting Code: %s,Bank Code: %s
|
28 |
+
TID: %s,TID: %s
|
29 |
+
Name on Card: %s,Name on Card: %s
|
30 |
+
Credit Card Number: %s,Credit Card Number: %s
|
31 |
+
Credit Card Number: xxxx-%s,Credit Card Number: xxxx-%s
|
32 |
+
Credit Card Type: %s,Credit Card Type: %s
|
33 |
+
Expiration Date: %s/%s,Expiration Date: %s/%s
|
34 |
+
Credit Card Types,Credit Card Types
|
35 |
+
The amount will be booked immediately from your credit card<BR>with <B>%s</B> note.,"The amount will be booked immediately from your credit card<BR>with
|
36 |
+
<B>%s</B> note."
|
37 |
+
This is not a valid account number.,This is not a valid account number!
|
38 |
+
This is not a valid bank sorting code.,This is not a valid bank sorting code!
|
39 |
+
You will be redirected to Novalnet AG 3D-Secure in a few seconds.,You will be redirected to Novalnet AG 3D-Secure in a few seconds.
|
40 |
+
Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.,Bemerkung: Nach dem Absenden Ihrer Bestellung wird
|
41 |
+
Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet.,
|
42 |
+
Payment Duration,Zahlbar in Tagen
|
43 |
+
--Please Select--,--Please Select--
|
44 |
+
"Please transfer the amount at the latest, untill","Please transfer the amount at the latest, untill"
|
45 |
+
to following account:,to following account:
|
46 |
+
I accept the ACDC check,I accept the ACDC check
|
47 |
+
This is a required field,This is a required field
|
48 |
+
CC,Credit Card
|
49 |
+
Cc,Credit Card
|
50 |
+
Method,Method
|
51 |
+
Due at,Due at
|
52 |
+
The Bank details will be emailed to you soon after the completion of checkout process,The Bank details will be emailed to you soon after the completion of
|
53 |
+
checkout process,
|
54 |
+
"Please transfer the amount at the latest, untill","Please transfer the amount at the latest, untill"
|
55 |
+
Please transfer the amount to following account,Please transfer the amount to following account
|
56 |
+
Account Holder2,Account Holder
|
57 |
+
Bank,Bank
|
58 |
+
Amount,Amount
|
59 |
+
Reference,Reference
|
60 |
+
to following account,to following account
|
61 |
+
Please note that the Transfer can only be identified with the above mentioned Reference,Please note that the Transfer can only be identified with the above
|
62 |
+
mentioned Reference,
|
63 |
+
ACDC-Check accepted,ACDC-Check accepted
|
64 |
+
accepted,accepted
|
65 |
+
ACDC-Check,ACDC-Check
|
66 |
+
The,The
|
67 |
+
Month,Month
|
68 |
+
Year,Year
|
69 |
+
Direct Debit German,Direct Debit German
|
70 |
+
Direct Debit Austria,Direct Debit Austria
|
71 |
+
Booking Reference,Booking Reference
|
72 |
+
The Bankcode must have a length of at least 8 digits,The Bankcode must have a length of at least 8 digits
|
73 |
+
The Bankcode must have a length of at least 5 digits,The Bankcode must have a length of at least 5 digits
|
74 |
+
You must check ACDC,Sie m��ssen ACAC aktivieren
|
75 |
+
Notice for Clients,Notice for Clients
|
76 |
+
Pay by Call,Pay by Call
|
77 |
+
Error,Error
|
78 |
+
Order Price not found,Order Price not found
|
79 |
+
Amount below 0.90 Euro and above 10.00 Euro is not accepted,Amount below 0.90 Euro and above 10.00 Euro is not accepted
|
80 |
+
Params (aryResponse) missing,Params (aryResponse) missing
|
81 |
+
Following steps are required to complete the telephone payment process,Following steps are required to complete the telephone payment process
|
82 |
+
Step,Step
|
83 |
+
Please dial the following number,Please dial the following number
|
84 |
+
Please wait for the Signal tone and hangup the reciever,Please wait for the Signal tone and hangup the reciever
|
85 |
+
Please click on continue after your successive call,Please click on continue after your successive call
|
86 |
+
This call costs,This call costs
|
87 |
+
inclusive tax,inclusive tax
|
88 |
+
and is only possible from German Landline Telefon connection,and is only possible from German Landline Telefon connection
|
89 |
+
Response contains no XML data,Response contains no XML data
|
90 |
+
Did you called this number,Haben Sie diese Nummer angerufen
|
91 |
+
Billing Addr. not found,Billing Addr. not found
|
92 |
+
User Group Excluded,User Group Excluded
|
93 |
+
Parameter missing,Parameter missing
|
94 |
+
Comment,Comment
|
95 |
+
Email address missing,Email address missing
|
96 |
+
Customer successfully returned from Novalnet,Customer successfully returned from Novalnet
|
97 |
+
Customer was redirected to Novalnet,Customer was redirected to Novalnet
|
98 |
+
Customer aborted payment process,Customer aborted payment process
|
99 |
+
Customer was rejected by Novalnet,Customer was rejected by Novalnet
|
100 |
+
Password,Password
|
101 |
+
Test Mode,Test mode
|
102 |
+
Live Mode,Live mode
|
103 |
+
Testorder,Test order
|
104 |
+
Phonepayment,Phonepayment
|
105 |
+
Prepayment,Prepayment
|
106 |
+
Invoice,Invoice
|
107 |
+
Direct Debit,Direct Debit
|
108 |
+
Credit Card,Credit Card
|
109 |
+
Creditcard,Credit Card
|
110 |
+
Credit Card 3D-Secure,Kreditkarte 3D-Secure
|
111 |
+
Credit Card PCI,Credit Card PCI
|
112 |
+
Direct Debit German PCI,Direct Debit German PCI
|
113 |
+
Direct Debit Austria PCI,Direct Debit Austria PCI
|
114 |
+
Instant Bank Transfer,Instant Bank Transfer
|
115 |
+
Novalnet Phonepayment,Novalnet Phonepayment
|
116 |
+
Novalnet Prepayment,Novalnet Prepayment
|
117 |
+
Novalnet Invoice,Novalnet Invoice
|
118 |
+
Novalnet Direct Debit,Novalnet Direct Debit
|
119 |
+
Novalnet Credit Card,Novalnet Credit Card
|
120 |
+
Novalnet Creditcard,Novalnet Credit Card
|
121 |
+
Novalnet Credit Card 3D-Secure,Novalnet Credit Card 3D-Secure
|
122 |
+
Novalnet Credit Card PCI,Novalnet Credit Card PCI
|
123 |
+
Novalnet Direct Debit German PCI,Novalnet Direct Debit German PCI
|
124 |
+
Novalnet Direct Debit Austria PCI,Novalnet Direct Debit Austria PCI
|
125 |
+
Novalnet Instant Bank Transfer,Novalnet Instant Bank Transfer
|
126 |
+
You will be redirected to Novalnet AG 3D-Secure in a few seconds.,You will be redirected to Novalnet AG 3D-Secure in a few seconds.
|
127 |
+
You will be redirected to Novalnet AG website when you place an order.,You will be redirected to Novalnet AG website when you place an order.
|
128 |
+
Novalnet Direct Debit German,Novalnet Direct Debit German
|
129 |
+
Novalnet Direct Debit Austria,Novalnet Direct Debit Austria
|
130 |
+
Only for foreign transfers,Only for foreign transfers
|
131 |
+
Please transfer the invoice amount with the following information to our payment provider Novalnet AG,Please transfer the invoice amount with the following
|
132 |
+
information to our payment provider Novalnet AG
|
133 |
+
You will be redirected to Novalnet AG in a few seconds,You will be redirected to Novalnet AG in a few seconds
|
134 |
+
Customer was redirected to Novalnet,Customer was redirected to Novalnet
|
135 |
+
You will be redirected to Novalnet AG website when you place an order.,You will be redirected to Novalnet AG website when you place an order.
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Not possible","Not available"
|
2 |
+
"Account number","Account number"
|
3 |
+
"Bank code","Bank code"
|
4 |
+
"Holder","Account holder"
|
5 |
+
"Account number: %s","Account number: %s"
|
6 |
+
"Bank code: %s","Bank code: %s"
|
7 |
+
"Account holder: %s","Kontoinhaber: %s"
|
8 |
+
"Transaction Id: %s","Transaction Id: %s"
|
9 |
+
"Order No.: ","Order No. "
|
10 |
+
"Order: ","Order. "
|
11 |
+
"Gateway request error: %s","Gateway request error: %s"
|
12 |
+
"Please check your account data.","Please check your account data."
|
13 |
+
"Invalid amount for authorization.","Invalid amount for authorization."
|
14 |
+
"Payment was successful.","Payment was successful."
|
15 |
+
"Paymentinformations: %s";"Paymentinformations: %s"
|
16 |
+
"Payment was not successfull","Payment was not successfull. An error occured."
|
17 |
+
"You will be redirected to Sofortüberweisung","You will be redirected to Sofortüberweisung"
|
18 |
+
"You will be redirected to Sofortueberweisung in a few seconds.","You will be redirected to Sofortueberweisung in a few seconds."
|
19 |
+
"Sofortueberweisung payment loaded","Sofortueberweisung was loaded"
|
20 |
+
"Please fill out the account holder","Please fill in the account holder"
|
21 |
+
"Please fill out the account number","Please fill in the account number"
|
22 |
+
"Please fill out the bank code","Please fill in the bank code"
|
23 |
+
"Transaction Id: %s","Transaktions Id: %s"
|
24 |
+
"Cancelation of payment","Cancelation of payment"
|
25 |
+
"Paymentinformations: %s","Paymentinformations: %s"
|
26 |
+
"Paycode: %s","Paycode: %s"
|
27 |
+
"Project password","Project password"
|
28 |
+
"Notification password", "Notification password"
|
29 |
+
"Use input check","Activate input check"
|
30 |
+
"Create Invoice","Create Invoice after payment"
|
31 |
+
"Projekt Id","Project ID"
|
32 |
+
"User Id","User ID"
|
33 |
+
"Expires","Expires"
|
34 |
+
"Sofortueberweisung","Sofortüberweisung"
|
35 |
+
"More","More information"
|
36 |
+
"Error while saving this configuration: ","Error while saving this configuration: "
|
37 |
+
"Item was successfully saved","Item was successfully saved."
|
38 |
+
"Theres no password defined","There is no password defined. Please fill in the created/designed password from the customer area at sofortüberweisung.de in the
|
39 |
+
corresponding field for the configuration."
|
40 |
+
"Get stock articles.","Stock quickly obtained due to immediate dispatch. Now you need your online banking data (PIN/TAN)."
|
41 |
+
"Your benefit:","Your advantages:"
|
42 |
+
"Fast shippiung","ships immediately from stock / immediate download"
|
43 |
+
"Privacy","TÜV-certified privacy"
|
44 |
+
"No registration","no registration required"
|
45 |
+
"Save payment","pay safely und fast"
|
46 |
+
"Paycode information","Product is immediately sent after the payment with a paycode. Your online banking data is primarily needed when paying (PIN und TAN)."
|
47 |
+
"Netherlands banks","Netherlands banks?"
|
48 |
+
Customer cancled payment or payment error,Customer cancled payment or payment error
|
49 |
+
Customer cancled payment,Customer cancled payment
|
50 |
+
payment error,payment error
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Paymentnetwork
|
16 |
+
* @package Paymentnetwork_Sofortueberweisung
|
17 |
+
* @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
* @version $Id: Linkpnso.php 199 2010-06-10 14:56:03Z thoma $
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Varien_Data_Form_Element_Linkpnso extends Varien_Data_Form_Element_Abstract
|
23 |
+
{
|
24 |
+
var $pnSu;
|
25 |
+
public function __construct($attributes=array())
|
26 |
+
{
|
27 |
+
parent::__construct($attributes);
|
28 |
+
$this->setType('label');
|
29 |
+
$this->pnSu = Mage::helper('sofortueberweisung');
|
30 |
+
$this->pnSu->classSofortueberweisung();
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getElementHtml()
|
34 |
+
{
|
35 |
+
|
36 |
+
#echo $this->getConfigDataWeb('base_url');
|
37 |
+
#echo "<pre>";
|
38 |
+
#print_r($params = $this->getParams()->toArray());
|
39 |
+
#echo "</pre>";
|
40 |
+
|
41 |
+
$params = $this->getParams()->toArray();
|
42 |
+
foreach($params AS $key => $val){
|
43 |
+
switch($key){
|
44 |
+
case 'backlink':
|
45 |
+
$backurl = Mage::getSingleton('adminhtml/url')->getUrl($val);
|
46 |
+
$params[$key] = $backurl;
|
47 |
+
break;
|
48 |
+
case 'projectssetting_interface_success_link':
|
49 |
+
$params[$key] = $this->getConfigDataWeb('base_url').$val;
|
50 |
+
break;
|
51 |
+
case 'projectsnotification_http_url':
|
52 |
+
$params[$key] = $this->getConfigDataWeb('base_url').$val;
|
53 |
+
break;
|
54 |
+
case 'projectssetting_interface_cancel_link':
|
55 |
+
$params[$key] = $this->getConfigDataWeb('base_url').$val;
|
56 |
+
break;
|
57 |
+
case 'projectssetting_interface_timeout_link':
|
58 |
+
$params[$key] = $this->getConfigDataWeb('base_url').$val;
|
59 |
+
break;
|
60 |
+
case 'projectssetting_project_password':
|
61 |
+
$params[$key] = $this->pnSu->generateRandomValue();
|
62 |
+
//store pwd in session so we can save it later
|
63 |
+
Mage::getSingleton('adminhtml/session')->setData('projectssetting_project_password', $params[$key]);
|
64 |
+
break;
|
65 |
+
case 'project_notification_password':
|
66 |
+
$params[$key] = $this->pnSu->generateRandomValue();
|
67 |
+
Mage::getSingleton('adminhtml/session')->setData('project_notification_password', $params[$key]);
|
68 |
+
break;
|
69 |
+
case 'projectsnotification_email_email':
|
70 |
+
$params[$key] = Mage::getStoreConfig('trans_email/ident_general/email');
|
71 |
+
break;
|
72 |
+
case 'project_name':
|
73 |
+
$params[$key] = Mage::getStoreConfig('general/store_information/name');
|
74 |
+
break;
|
75 |
+
default:
|
76 |
+
$params[$key] = $val;
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
$queryString = http_build_query($params);
|
81 |
+
|
82 |
+
$html = $this->getBold() ? '<strong>' : '';
|
83 |
+
$html.= sprintf($this->getValue(),$this->getConfigDataPayment('url_new').'?'.$queryString);
|
84 |
+
$html.= $this->getBold() ? '</strong>' : '';
|
85 |
+
$html.= $this->getAfterElementHtml();
|
86 |
+
return $html;
|
87 |
+
}
|
88 |
+
|
89 |
+
public function getConfigDataPayment($field, $storeId = null)
|
90 |
+
{
|
91 |
+
if (null === $storeId) {
|
92 |
+
$storeId = $this->getStore();
|
93 |
+
}
|
94 |
+
$path = 'payment/sofortueberweisung/'.$field;
|
95 |
+
return Mage::getStoreConfig($path, $storeId);
|
96 |
+
}
|
97 |
+
|
98 |
+
public function getConfigDataWeb($field, $storeId = null)
|
99 |
+
{
|
100 |
+
if (null === $storeId) {
|
101 |
+
$storeId = $this->getStore();
|
102 |
+
}
|
103 |
+
$path = 'web/unsecure/'.$field;
|
104 |
+
return Mage::getStoreConfig($path, $storeId);
|
105 |
+
}
|
106 |
+
|
107 |
+
public function getParams()
|
108 |
+
{
|
109 |
+
|
110 |
+
$_types = Mage::getConfig()->getNode('global/params_pnso/types')->asArray();
|
111 |
+
$params = Mage::getModel('sofortueberweisung/params');
|
112 |
+
foreach ($_types as $data) {
|
113 |
+
$params->setData($data["param"],$data["value"]);
|
114 |
+
}
|
115 |
+
return $params;
|
116 |
+
}
|
117 |
+
}
|
@@ -1,23 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Novalnet</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Novalnet AG ist ein deutsches EPayment - Unternehmen, bietet alle relevanten Zahlungsarten weltweit. / Novalnet is a German based payment service provider, which offers all the available payments and solutions worldwide.</summary>
|
10 |
<description>The NOVALNET AG is an essential component of e-Payment platform that facilitates your company to process all type of payments. As one of the leading company in Online-Payment the NOVALNET AG provides its customers an individual, technically qualified secured Payment system and also the best possible support throughout. NOVALNET AG is not only an e-Payment provider but also we offer our Merchants an optimal strategic solution for easy payment processing which is pocket-friendly for our customer.</description>
|
11 |
-
<notes>1.3.
|
12 |
-
1.3 database table name is now fetched from system.1.2.9 the same as 1.2.7 only because Magento upload did not work correctly.1.2.8 the same as 1.2.7 only because Magento upload did not work correctly.1.2.7Bugfix:FC;r ELV DE, ELV AT und CC wurde die W&amp;amp;#xE4;hrung fix als &amp;amp;amp;apos;EUR&amp;amp;amp;apos; &amp;amp;#xFC;bergeben.&amp;amp;#xD;&amp;#xD;&#xD;
|
13 |
-
&amp;amp;#xD;&amp;#xD;&#xD;
|
14 |
-
The parameter currency was passed over as fixed value &amp;amp;amp;apos;EUR&amp;amp;amp;apos; for payment modules &amp;amp;amp;apos;Direct Debit German&amp;amp;amp;apos;, &amp;amp;amp;apos;Direct Debit Austria&amp;amp;amp;apos; and &amp;amp;amp;apos;Credir Card&amp;amp;amp;apos;.Allgemeine Bemerkung:Die Cache-Ordner var/cache und var/session m&amp;amp;#xFC;ssen wie immer nach Aktualisierungen geleert werden.&amp;#xD;&#xD;
|
15 |
-
&amp;amp;#xD;&amp;#xD;&#xD;
|
16 |
Notice: the cache folders var/cache and var/session must be emptied after updates.</notes>
|
17 |
<authors><author><name>Dixon Rajdaniel</name><user>Novalnet</user><email>dr@novalnet.de</email></author></authors>
|
18 |
-
<date>2012-
|
19 |
-
<time>
|
20 |
-
<contents><target name="magecommunity"><dir name="Mage"><dir name="Novalnet"><dir name="Block"><dir name="Cc"><file name="Form.php" hash="67b6fad8502b7620892f22bbf959f26f"/><file name="Info.php" hash="c24e83809550bef8b52db11e447b0d2b"/></dir><dir name="Elvaustria"><file name="Form.php" hash="e43f7b046f7442d7c541f4c3e23eee96"/><file name="Info.php" hash="86885be407cf8b1919e0a4464c582daa"/></dir><dir name="Elvgerman"><file name="Form.php" hash="9e27b96c3bdcb5f39f5d5d1ea4626ca5"/><file name="Info.php" hash="5250c4450dd35de0b6b027ce36f31a35"/></dir><dir name="Invoice"><file name="Form.php" hash="95378a30aaf639280d320f02bea17d30"/><file name="Info.php" hash="ced5e0db4dd89743e338af2c570aae70"/></dir><dir name="Pci"><file name="Form.php" hash="495df856c7fea65106c3357a6e1ae3b5"/><file name="Info.php" hash="381d5d176cd6ff9675120f3885b9070e"/><file name="Redirect.php" hash="24070c631f417152cec3bc8c736b15e0"/></dir><dir name="Phonepayment"><file name="Form.php" hash="0a378f5d2501e3ee737405020b54e930"/><file name="Info.php" hash="ba9a8211a8009c3d2fd1b0a99614abee"/></dir><dir name="Prepayment"><file name="Form.php" hash="f228a0ef5ee5da05a82936d2935d7645"/><file name="Info.php" hash="64bd855914a0b25e22fab2c0f63939b4"/></dir><dir name="Secure"><file name="Form.php" hash="4701c66723891b9968cfa95ceab1ca1a"/><file name="Info.php" hash="d8ac878ca88b2b854e30bc490a736ca8"/><file name="Redirect.php" hash="da3ae9034328b652deea8f3767db82b5"/></dir></dir><dir name="Helper"><file name="Data.php" hash="6fe7c1ca7fd2ef5dc8c331082ddc3d51"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="39edfcc97c0c2b7c182795976c85e2d6"/></dir><dir name="Novalnet"><file name="Request.php" hash="c0234e4b26de88337c559f1bb1aacaba"/><file name="Result.php" hash="a8e0b204eedf4b9db7bbf93341e71f0c"/><dir name="Source"><file name="Callbacktypes.php" hash="dd1d2478f6aae100715e46c4d1756828"/><file name="Cctype.php" hash="ac531951c9c4b0d6534600c58fcf825f"/></dir></dir><file name="NovalnetCc.php" hash="a68f1f3e7f73e4e0e7c498e7590a0ebc"/><file name="NovalnetCcpci.php" hash="fd867df4844adab5f46933097ceca25d"/><file name="NovalnetElvatpci.php" hash="986a6b9090e348c5cabe87250516708c"/><file name="NovalnetElvaustria.php" hash="656e1a08c5f65aa59abb3f2719421536"/><file name="NovalnetElvdepci.php" hash="16f96fca0b9ab6203d4403ddba753028"/><file name="NovalnetElvgerman.php" hash="3ca0bff0ce3c3c747be0da33f6e1a0b2"/><file name="NovalnetInvoice.php" hash="56254332784597b2d9e747b96aaf5206"/><file name="NovalnetPciAbstract.php" hash="2c82c47d8e9da38b2f397ea494e610f6"/><file name="NovalnetPhonepayment.php" hash="4bee5d5ef161b82aac6fa31b11843824"/><file name="NovalnetPrepayment.php" hash="49cd8025def458b9e07927b7afaf7fae"/><file name="NovalnetSecure.php" hash="52f137be63260b2899b2edd610b7fe4f"/><file name="Observer.php" hash="6e7bc4f2d961fd65afbb36cd0a3f980f"/></dir><dir name="controllers"><file name="PciController.php" hash="72a48e3ea7bd0141db884aff65babf25"/><file name="SecureController.php" hash="5104b240ae9ccb066b2b83671a1e587b"/></dir><dir name="etc"><file name="config.xml" hash="2162c4c801c1847eefd14fdf34b3c838"/><file name="system.xml" hash="7f91fe87bc052205f03e45940d9c5dc0"/></dir><dir name="sql"><dir name="novalnet_setup"><file name="mysql4-install-1.0.0.php" hash="32990c8b75f5da216c8751d0644e4680"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="novalnet"><dir><dir name="cc"><file name="form.phtml" hash="3a98902a7b8cee94ca0aa58ea3965c4f"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir><dir name="elvaustria"><file name="form.phtml" hash="a55abf37fd664a9c30ff2f3cd6dadf14"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="elvgerman"><file name="form.phtml" hash="03c2b2b407fb5a812b825fce2e5bb122"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="invoice"><file name="form.phtml" hash="2648529fd204a27dc4f7f25fa2cd5fb2"/><file name="info.phtml" hash="cfc62c76287fb274401056d35466ba4e"/></dir><dir name="pci"><file name="form.phtml" hash="1ebc26e915b4e5240ac29b3cc956069f"/><file name="info.phtml" hash="31a1a88d15a6041a0145496cd6e239a1"/></dir><dir name="phonepayment"><file name="form.phtml" hash="6c9886f70020bdf314ff82f6b9b10332"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="prepayment"><file name="form.phtml" hash="33e833624cf5f31f9ebadd333d081a9f"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="secure"><file name="form.phtml" hash="924c965679f40ae06329869aa385f4d0"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir></dir></dir><dir name="payment"><dir name="info"><dir name="pdf"><file name="cc.phtml" hash="975007b7c3f7dceb66feb4147852a712"/><file name="pci.phtml" hash="975007b7c3f7dceb66feb4147852a712"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="novalnet.xml" hash="c66652992b93637596c732a111a34184"/></dir><dir name="template"><dir><dir name="novalnet"><dir name="cc"><file name="form.phtml" hash="1d0b27175f3427a78eff0c50d6b3cc8e"/><file name="info.phtml" hash="5d71c930c1051ce205bf6096e36e9c16"/><file name="pciiframe.phtml" hash="770df7e15710d59b0eaf99b77133d63d"/></dir><dir name="elvaustria"><file name="form.phtml" hash="40b903a059dd814475ad17b7714e14ae"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="elvgerman"><file name="form.phtml" hash="c884ad276aece22b9278074333e164ea"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="invoice"><file name="form.phtml" hash="c91d975bddd597fa847865dfbf3fb892"/><file name="info.phtml" hash="cfc62c76287fb274401056d35466ba4e"/></dir><dir name="pci"><file name="form.phtml" hash="3e07a44dd1dc633a5f104e14dde7c7bf"/><file name="info.phtml" hash="5d71c930c1051ce205bf6096e36e9c16"/><file name="pciiframe.phtml" hash="39f52b2cc49927af05dd7356aa4d255f"/></dir><dir name="phonepayment"><file name="form.phtml" hash="6c9886f70020bdf314ff82f6b9b10332"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="prepayment"><file name="form.phtml" hash="33e833624cf5f31f9ebadd333d081a9f"/><file name="info.phtml" hash="fc1580efac5b264615513441535394a6"/></dir><dir name="secure"><file name="form.phtml" hash="98411d5f1cb2a7eaf5d34ad7e3639661"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Novalnet.xml" hash="71217c898352b41ed08facc218335405"/></dir></target><target name="magelocale"><dir name="de_AT"><file name="Mage_Novalnet.csv" hash="dc12e2400c27a3a0105a3748a287183d"/></dir><dir name="de_CH"><file name="Mage_Novalnet.csv" hash="dc12e2400c27a3a0105a3748a287183d"/></dir><dir name="de_DE"><file name="Mage_Novalnet.csv" hash="5b87a25271da2e64422000f058db3dfa"/></dir><dir name="en_US"><file name="Mage_Novalnet.csv" hash="519df0ea15b0feb96eed0a8bda8fee3d"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="novalnet"><file name="AE_Logo.png" hash="ed3b558031a1f03e1bd536ecf1233e0e"/><file name="ELV_Logo.png" hash="b265493a083f03e4da7d24c23cc55b67"/><file name="MC_Logo.png" hash="cd17acdae3de28aeff7da7952d2ef802"/><file name="NN_Logo.png" hash="e17794ee0b984fd6e1ec2b884da1a29b"/><file name="NN_Logo_T.png" hash="4d442efcb94c9fee7749022478a9d1f3"/><file name="VI_Logo.png" hash="5e963373aa1db58369730238cf311548"/><file name="acdc_info.png" hash="fa69e3f3098c4f85d9d3c796d82bdf0a"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="novalnet"><file name="AE_Logo.png" hash="ed3b558031a1f03e1bd536ecf1233e0e"/><file name="ELV_Logo.png" hash="b265493a083f03e4da7d24c23cc55b67"/><file name="MC_Logo.png" hash="cd17acdae3de28aeff7da7952d2ef802"/><file name="NN_Logo.png" hash="e17794ee0b984fd6e1ec2b884da1a29b"/><file name="NN_Logo_T.png" hash="4d442efcb94c9fee7749022478a9d1f3"/><file name="VI_Logo.png" hash="5e963373aa1db58369730238cf311548"/><file name="acdc_info.png" hash="fa69e3f3098c4f85d9d3c796d82bdf0a"/></dir></dir><dir name="js"><file name="novalnet.js" hash="ba196f1c34101f64cdaab92ab58560bd"/></dir></dir></dir></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Novalnet</name>
|
4 |
+
<version>1.3.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Novalnet AG ist ein deutsches EPayment - Unternehmen, bietet alle relevanten Zahlungsarten weltweit. / Novalnet is a German based payment service provider, which offers all the available payments and solutions worldwide.</summary>
|
10 |
<description>The NOVALNET AG is an essential component of e-Payment platform that facilitates your company to process all type of payments. As one of the leading company in Online-Payment the NOVALNET AG provides its customers an individual, technically qualified secured Payment system and also the best possible support throughout. NOVALNET AG is not only an e-Payment provider but also we offer our Merchants an optimal strategic solution for easy payment processing which is pocket-friendly for our customer.</description>
|
11 |
+
<notes>1.3.4 is now loaded with Iframe functionality&amp;amp;#xD;&amp;#xD;&#xD;
|
12 |
+
1.3 database table name is now fetched from system.1.2.9 the same as 1.2.7 only because Magento upload did not work correctly.1.2.8 the same as 1.2.7 only because Magento upload did not work correctly.1.2.7Bugfix:FC;r ELV DE, ELV AT und CC wurde die W&amp;amp;amp;#xE4;hrung fix als &amp;amp;amp;amp;apos;EUR&amp;amp;amp;amp;apos; &amp;amp;amp;#xFC;bergeben.&amp;amp;amp;#xD;&amp;amp;#xD;&amp;#xD;&#xD;
|
13 |
+
&amp;amp;amp;#xD;&amp;amp;#xD;&amp;#xD;&#xD;
|
14 |
+
The parameter currency was passed over as fixed value &amp;amp;amp;amp;apos;EUR&amp;amp;amp;amp;apos; for payment modules &amp;amp;amp;amp;apos;Direct Debit German&amp;amp;amp;amp;apos;, &amp;amp;amp;amp;apos;Direct Debit Austria&amp;amp;amp;amp;apos; and &amp;amp;amp;amp;apos;Credir Card&amp;amp;amp;amp;apos;.Allgemeine Bemerkung:Die Cache-Ordner var/cache und var/session m&amp;amp;amp;#xFC;ssen wie immer nach Aktualisierungen geleert werden.&amp;amp;#xD;&amp;#xD;&#xD;
|
15 |
+
&amp;amp;amp;#xD;&amp;amp;#xD;&amp;#xD;&#xD;
|
16 |
Notice: the cache folders var/cache and var/session must be emptied after updates.</notes>
|
17 |
<authors><author><name>Dixon Rajdaniel</name><user>Novalnet</user><email>dr@novalnet.de</email></author></authors>
|
18 |
+
<date>2012-02-14</date>
|
19 |
+
<time>13:38:52</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Mage"><dir><dir name="Novalnet"><dir name="Block"><dir name="Cc"><file name="Form.php" hash="67b6fad8502b7620892f22bbf959f26f"/><file name="Info.php" hash="c24e83809550bef8b52db11e447b0d2b"/></dir><dir name="Elvaustria"><file name="Form.php" hash="bcad4b791f589da7a0b5b02e8984d722"/><file name="Info.php" hash="86885be407cf8b1919e0a4464c582daa"/></dir><dir name="Elvgerman"><file name="Form.php" hash="8326c73336b9a5a99886caa2d2b0f985"/><file name="Info.php" hash="5250c4450dd35de0b6b027ce36f31a35"/></dir><dir name="Invoice"><file name="Form.php" hash="21f5ee0ecd50cfc66219265089d92aa4"/><file name="Info.php" hash="ced5e0db4dd89743e338af2c570aae70"/></dir><dir name="Pci"><file name="Form.php" hash="495df856c7fea65106c3357a6e1ae3b5"/><file name="Info.php" hash="381d5d176cd6ff9675120f3885b9070e"/><file name="Redirect.php" hash="24070c631f417152cec3bc8c736b15e0"/></dir><dir name="Phonepayment"><file name="Form.php" hash="0a378f5d2501e3ee737405020b54e930"/><file name="Info.php" hash="ba9a8211a8009c3d2fd1b0a99614abee"/></dir><dir name="Prepayment"><file name="Form.php" hash="f228a0ef5ee5da05a82936d2935d7645"/><file name="Info.php" hash="64bd855914a0b25e22fab2c0f63939b4"/></dir><dir name="Secure"><file name="Form.php" hash="4701c66723891b9968cfa95ceab1ca1a"/><file name="Info.php" hash="71f1804de3fa4c659cfacfd757d176d5"/><file name="Redirect.php" hash="da3ae9034328b652deea8f3767db82b5"/></dir></dir><dir name="Helper"><file name="Data.php" hash="6fe7c1ca7fd2ef5dc8c331082ddc3d51"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="39edfcc97c0c2b7c182795976c85e2d6"/></dir><dir name="Novalnet"><file name="Request.php" hash="c0234e4b26de88337c559f1bb1aacaba"/><file name="Result.php" hash="a8e0b204eedf4b9db7bbf93341e71f0c"/><dir name="Source"><file name="Callbacktypes.php" hash="e4abd034b15f40e934785ce0c1ade5d5"/><file name="Cctype.php" hash="ac531951c9c4b0d6534600c58fcf825f"/></dir></dir><file name="NovalnetCc.php" hash="a68f1f3e7f73e4e0e7c498e7590a0ebc"/><file name="NovalnetCcpci.php" hash="fd867df4844adab5f46933097ceca25d"/><file name="NovalnetElvatpci.php" hash="986a6b9090e348c5cabe87250516708c"/><file name="NovalnetElvaustria.php" hash="d4b439a0abfa65346c0abb993450d39a"/><file name="NovalnetElvdepci.php" hash="16f96fca0b9ab6203d4403ddba753028"/><file name="NovalnetElvgerman.php" hash="d86a24f97cfa068cc4de682d68f4f5d7"/><file name="NovalnetInvoice.php" hash="81bcfe6fa006560b174d8eea598fd659"/><file name="NovalnetPciAbstract.php" hash="60f7660dac06ca2fd17336e3d63a0ef2"/><file name="NovalnetPhonepayment.php" hash="4bee5d5ef161b82aac6fa31b11843824"/><file name="NovalnetPrepayment.php" hash="49cd8025def458b9e07927b7afaf7fae"/><file name="NovalnetSecure.php" hash="52f137be63260b2899b2edd610b7fe4f"/><file name="Observer.php" hash="6e7bc4f2d961fd65afbb36cd0a3f980f"/></dir><dir name="controllers"><file name="PciController.php" hash="4acaa9ab410bc0a6c4ab42ee23c3f2a1"/><file name="SecureController.php" hash="5104b240ae9ccb066b2b83671a1e587b"/></dir><dir name="etc"><file name="config.xml" hash="2162c4c801c1847eefd14fdf34b3c838"/><file name="system.xml" hash="7f91fe87bc052205f03e45940d9c5dc0"/></dir><dir name="sql"><dir name="novalnet_setup"><file name="mysql4-install-1.0.0.php" hash="32990c8b75f5da216c8751d0644e4680"/></dir></dir></dir></dir></dir><dir name="Novalnet"><dir><dir name="NovalnetPaypal"><dir name="Block"><dir name="Form"><file name="Novalnetpaypal.php" hash="de7ea13bc68dede626abb236a47f4953"/></dir><dir name="Info"><file name="Novalnetpaypal.php" hash="cbf1188d302a22aa9aa07f014a7f0714"/></dir><file name="Infobox.php" hash="73e6c1d32c25651fcaa903c62881589a"/><file name="Novalnetpaypal.php" hash="68493bb80d80b2364e1d898f91224233"/><file name="Novalnetpaypalerrornotice.php" hash="f6fca10039b3d640b5580bcd02f2fefe"/><file name="Novalnetpaypalnotice.php" hash="5202b936e310cc19d7fccc9ada75079a"/></dir><dir name="Helper"><file name="Data.php" hash="8e7e13e72a0295189736978c5399d773"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="4282bb92fd050f2ca2331d94ac7a4849"/><file name="Quote.php" hash="cc53aa00e0a463f6235c56e6a6e36028"/></dir><dir name="Mysql4"><dir name="NovalnetPaypal"><file name="Collection.php" hash="9b50213a65358b67df8086208d2ed372"/></dir><file name="Novalnetpaypal.php" hash="b2cffababa7331c0b4aa03e140b3b8ce"/><file name="Setup.php" hash="bf62e4eafd28dbbcd3f82007de645fd2"/></dir><file name="Novalnetpaypal.php" hash="32cda15c207b85598e136a451678c8de"/></dir><dir name="controllers"><file name="NovalnetpaypalController.php" hash="6f6860f51788569f59b8ef146d5d2fb0"/></dir><dir name="etc"><file name="config.xml" hash="867db3f7e1c6062b79e83dd65f980136"/><file name="system.xml" hash="7ffad88d7154b7451cc449d9d8e839b8"/></dir><dir name="sql"><dir name="novalnetpaypal_setup"><file name="mysql4-install-1.0.0.php" hash="289f0b2b374ac83c8c5b4f58340e62aa"/></dir></dir></dir><dir name="Sofortueberweisung"><dir name="Block"><dir name="Adminhtml"><dir name="Sofortueberweisung"><dir name="Edit"><file name="Form.php" hash="6a25298a6b800c16b7952a34ad9cf5fc"/><dir name="Tab"><file name="Form.php" hash="f6b81ae8f12bf6e385f66c5f5060e5b3"/></dir><file name="Tabs.php" hash="e8598d847ec9af0f557b3db64ec35c95"/></dir><file name="Edit.php" hash="f1b148191995aba58a7f53464de2de2d"/><file name="Grid.php" hash="84eec377296c9331911989925fa7e9f4"/></dir><file name="Sofortueberweisung.php" hash="dcbb52956c22986c9f331584ae6bc836"/></dir><dir name="Form"><file name="Sofortueberweisung.php" hash="7b0d155b2970dc76197fab1da7e36263"/></dir><dir name="Info"><file name="Sofortueberweisung.php" hash="02aa647deb2f7fecad0af7ca3fae956c"/></dir><file name="Infobox.php" hash="f870e8acff837b0af74990addfd0172e"/><file name="Sofortueberweisung.php" hash="0e834559f3001a2ba4a1c4d944029cc4"/><file name="Sofortueberweisungerrornotice.php" hash="a7365690ad51ab880fc27ec23128feaa"/><file name="Sofortueberweisungnotice.php" hash="81c0a55eac2f1c730c00a5b7e662a993"/></dir><dir name="Helper"><file name="Data.php" hash="57df7bd9fcd4cb3696d7efd051208cec"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="a918b59093e0689b4a53b2b05d995ddf"/><file name="Quote.php" hash="5f81c5a7758346c3129e338247bd3bec"/></dir><dir name="Data"><dir name="Form"><dir name="Element"><file name="Link.php" hash="cae04aa06b48555f5798f81e71975259"/></dir></dir></dir><dir name="Mysql4"><file name="Setup.php" hash="563fbfc017ce9ffab25e3e749fbf3b80"/><dir name="Sofortueberweisung"><file name="Collection.php" hash="da19275e5c48467101e221fd48f58c50"/></dir><file name="Sofortueberweisung.php" hash="640114f57c27b9a1caeffaf6c4d041ef"/></dir><file name="Params.php" hash="8ce745b20319b74445a58509d11f2461"/><file name="Paycode.php" hash="2dc1bd1e9542173a41463cd810d93b26"/><file name="Sofortueberweisung.php" hash="b539cb49d55576282d32cce586cd0c53"/><file name="Status.php" hash="a473406914a3094e02a325a34851c7b5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SofortueberweisungController.php" hash="41cea197ffa498ec5becba85116c365a"/></dir><file name="PcsofortueberweisungController.php" hash="8cb060276970aed30066303a6e335a5a"/><file name="SofortueberweisungController.php" hash="a21b64dca076b3fda06df59fe97ed8d2"/></dir><dir name="etc"><file name="config.xml" hash="08dc891963223d3947b61e5d6fd34c11"/><file name="system.xml" hash="5afb96a5b57a1cdfa6917c6fc9e78127"/></dir><dir name="sql"><dir name="sofortueberweisung_setup"><file name="mysql4-install-1.0.0.php" hash="941f70d07d3e2342e98de594162453d5"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="novalnet"><dir><dir name="cc"><file name="form.phtml" hash="3a98902a7b8cee94ca0aa58ea3965c4f"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir><dir name="elvaustria"><file name="form.phtml" hash="a55abf37fd664a9c30ff2f3cd6dadf14"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="elvgerman"><file name="form.phtml" hash="03c2b2b407fb5a812b825fce2e5bb122"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="invoice"><file name="form.phtml" hash="2648529fd204a27dc4f7f25fa2cd5fb2"/><file name="info.phtml" hash="cfc62c76287fb274401056d35466ba4e"/></dir><dir name="pci"><file name="form.phtml" hash="1ebc26e915b4e5240ac29b3cc956069f"/><file name="info.phtml" hash="31a1a88d15a6041a0145496cd6e239a1"/></dir><dir name="phonepayment"><file name="form.phtml" hash="6c9886f70020bdf314ff82f6b9b10332"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="prepayment"><file name="form.phtml" hash="33e833624cf5f31f9ebadd333d081a9f"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="secure"><file name="form.phtml" hash="924c965679f40ae06329869aa385f4d0"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir></dir></dir><dir name="novalnetpaypal"><dir><dir name="form"><file name="novalnetpaypal.phtml" hash="00c5cede3befa08ab40cd474c73c3169"/></dir><dir name="info"><file name="novalnetpaypal.phtml" hash="823248576e75f4401064180183a61ebd"/><dir name="pdf"><file name="novalnetpaypal.phtml" hash="46f9a7c6c094213820e6760e9ec00501"/></dir></dir></dir></dir><dir name="payment"><dir name="info"><dir name="pdf"><file name="cc.phtml" hash="975007b7c3f7dceb66feb4147852a712"/><file name="pci.phtml" hash="975007b7c3f7dceb66feb4147852a712"/></dir></dir></dir><dir name="sofortueberweisung"><dir><dir name="form"><file name="sofortueberweisung.phtml" hash="a8698665bb3f30cc713c39f8be56f643"/></dir><dir name="info"><dir name="pdf"><file name="paycode.phtml" hash="60695cf5ed91dc1c2476ecc87c9976bd"/><file name="sofortueberweisung.phtml" hash="065e2e421b7a8eed49e934b4c1b21d97"/></dir><file name="sofortueberweisung.phtml" hash="23d0e7a7321dcf63b5fd42cf5b0ce72b"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="novalnet.xml" hash="c66652992b93637596c732a111a34184"/><file name="sofortueberweisung.xml" hash="5f85ce99d53d90e542e94c144c920ebf"/></dir><dir name="template"><dir><dir name="novalnet"><dir name="cc"><file name="form.phtml" hash="1d0b27175f3427a78eff0c50d6b3cc8e"/><file name="info.phtml" hash="5d71c930c1051ce205bf6096e36e9c16"/><file name="pciiframe.phtml" hash="5e1bc36565fd45766facf0a3271164ed"/></dir><dir name="elvaustria"><file name="form.phtml" hash="ccfcbbaa6f8c806a2157b1ac6dc93a73"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="elvgerman"><file name="form.phtml" hash="82cb3930a26205a1d126d235d9eaf172"/><file name="info.phtml" hash="c865f7bfcbdbdc3778494d06c2160db7"/></dir><dir name="invoice"><file name="form.phtml" hash="914c829f990f3656da4154ef1eb3b1f8"/><file name="info.phtml" hash="cfc62c76287fb274401056d35466ba4e"/></dir><dir name="pci"><file name="form.phtml" hash="3e07a44dd1dc633a5f104e14dde7c7bf"/><file name="info.phtml" hash="5d71c930c1051ce205bf6096e36e9c16"/></dir><dir name="phonepayment"><file name="form.phtml" hash="6c9886f70020bdf314ff82f6b9b10332"/><file name="info.phtml" hash="ce4edf100d22b6a262670a62044b3ab5"/></dir><dir name="prepayment"><file name="form.phtml" hash="33e833624cf5f31f9ebadd333d081a9f"/><file name="info.phtml" hash="fc1580efac5b264615513441535394a6"/></dir><dir name="secure"><file name="form.phtml" hash="807bb17a8dce824d9e3c99a5d6031010"/><file name="info.phtml" hash="8a932fe5a1bfe86d03139e224d7d5682"/></dir></dir><dir name="novalnetpaypal"><file name="errornotice.phtml" hash="a9862596ff313bb129b122fee07791b1"/><dir name="form"><file name="novalnetpaypal.phtml" hash="f124c3d65bf18e371a827a524422cfd3"/></dir><dir name="info"><file name="novalnetpaypal.phtml" hash="2eb24bbdbf08cb1695a6d0d2af6dd103"/></dir><file name="infobox.phtml" hash="7fb6159ded397e11926f82b71c6120ee"/><file name="notice.phtml" hash="a1d4bc5dca8fe79c373d5d9321ed8ebf"/></dir><dir name="sofortueberweisung"><file name="errornotice.phtml" hash="138cb66cb30fab6879253cf847462cb2"/><dir name="form"><file name="sofortueberweisung.phtml" hash="276d1e2d45503f3bbc9e1be749e47a40"/></dir><dir name="info"><file name="sofortueberweisung.phtml" hash="5d4984f06bad8287b672e0c2ec8c9082"/></dir><file name="infobox.phtml" hash="ef54958cc46cf0e923023721996e0c0a"/><file name="notice.phtml" hash="572b09cd956a7282822269facdeed822"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Novalnet.xml" hash="71217c898352b41ed08facc218335405"/><file name="Novalnet_NovalnetPaypal.xml" hash="a1d656cde7b9ac1c2314016b126447fd"/><file name="Novalnet_Sofortueberweisung.xml" hash="a765244a198aaf5f70912e2a9c2423b8"/></dir></target><target name="magelocale"><dir name="de_AT"><file name="Mage_Novalnet.csv" hash="dc12e2400c27a3a0105a3748a287183d"/><file name="Novalnet_Sofortueberweisung.csv" hash="f964d9c73a2d9e1873bbaab7ecbbb62d"/></dir><dir name="de_CH"><file name="Mage_Novalnet.csv" hash="dc12e2400c27a3a0105a3748a287183d"/><file name="Novalnet_Sofortueberweisung.csv" hash="f964d9c73a2d9e1873bbaab7ecbbb62d"/></dir><dir name="de_DE"><file name="Mage_Novalnet.csv" hash="5b87a25271da2e64422000f058db3dfa"/><file name="Novalnet_NovalnetPaypal.csv" hash="b62020b8398db6d7eec230c81de0d4a2"/><file name="Novalnet_Sofortueberweisung.csv" hash="bd10326170d914dcb8e63b2d48848e59"/></dir><dir name="en_US"><file name="Mage_Novalnet.csv" hash="519df0ea15b0feb96eed0a8bda8fee3d"/><file name="Novalnet_NovalnetPaypal.csv" hash="0e219c0d9c16af4a1d83f8c696ab4120"/><file name="Novalnet_Sofortueberweisung.csv" hash="144dc6ddbfce2eb373a0cf66631fb9f4"/></dir></target><target name="magelib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Linkpnso.php" hash="821c5b9534c651910096f418e1b819fa"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="novalnet"><file name="AE_Logo.png" hash="ed3b558031a1f03e1bd536ecf1233e0e"/><file name="ELV_Logo.png" hash="b265493a083f03e4da7d24c23cc55b67"/><file name="MC_Logo.png" hash="cd17acdae3de28aeff7da7952d2ef802"/><file name="NN_Logo.png" hash="e17794ee0b984fd6e1ec2b884da1a29b"/><file name="NN_Logo_T.png" hash="4d442efcb94c9fee7749022478a9d1f3"/><file name="VI_Logo.png" hash="5e963373aa1db58369730238cf311548"/><file name="acdc_info.png" hash="fa69e3f3098c4f85d9d3c796d82bdf0a"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="novalnet"><file name="AE_Logo.png" hash="ed3b558031a1f03e1bd536ecf1233e0e"/><file name="ELV_Logo.png" hash="b265493a083f03e4da7d24c23cc55b67"/><file name="MC_Logo.png" hash="cd17acdae3de28aeff7da7952d2ef802"/><file name="NN_Logo.png" hash="e17794ee0b984fd6e1ec2b884da1a29b"/><file name="NN_Logo_T.png" hash="4d442efcb94c9fee7749022478a9d1f3"/><file name="VI_Logo.png" hash="5e963373aa1db58369730238cf311548"/><file name="acdc_info.png" hash="fa69e3f3098c4f85d9d3c796d82bdf0a"/><dir><dir name="novalnetpaypal"><file name="lockbox_150x47.gif" hash="3b5f83843dc7f4a8bbbbd5fed4c0f16e"/></dir><dir name="sofortueberweisung"><file name="Sofort_Logo_t.jpg" hash="3b88302d88393b582c1cccd152e267bc"/></dir></dir></dir></dir><dir name="js"><file name="novalnet.js" hash="ba196f1c34101f64cdaab92ab58560bd"/></dir></dir></dir></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|