Novalnet - Version 5.0.0

Version Notes

- New Release

- Created separate Novalnet tab for Payment configuration

- Implemented the functionality of transaction void, capture and refund API calls.

- Implemented the global configuration for Novalnet payment methods.

- Created menu to display only Novalnet orders.

- Added the novalnet ordered transaction status and overview.

- Mapped the novalnet Magento module information.

- Implemented the callback script for all Novalnet Payments.

Download this release

Release Info

Developer Gabriel Dixon
Extension Novalnet
Version 5.0.0
Comparing to
See all releases


Code changes from version 3.0.1 to 5.0.0

Files changed (206) hide show
  1. app/code/community/Mage/Novalnet/Block/Cc/Form.php +0 -89
  2. app/code/community/Mage/Novalnet/Block/Cc/Info.php +0 -98
  3. app/code/community/Mage/Novalnet/Block/Elvaustria/Form.php +0 -94
  4. app/code/community/Mage/Novalnet/Block/Elvaustria/Info.php +0 -108
  5. app/code/community/Mage/Novalnet/Block/Elvgerman/Form.php +0 -100
  6. app/code/community/Mage/Novalnet/Block/Elvgerman/Info.php +0 -109
  7. app/code/community/Mage/Novalnet/Block/Invoice/Form.php +0 -99
  8. app/code/community/Mage/Novalnet/Block/Invoice/Info.php +0 -122
  9. app/code/community/Mage/Novalnet/Block/Pci/Form.php +0 -80
  10. app/code/community/Mage/Novalnet/Block/Pci/Info.php +0 -98
  11. app/code/community/Mage/Novalnet/Block/Pci/Redirect.php +0 -53
  12. app/code/community/Mage/Novalnet/Block/Phonepayment/Form.php +0 -57
  13. app/code/community/Mage/Novalnet/Block/Phonepayment/Info.php +0 -108
  14. app/code/community/Mage/Novalnet/Block/Prepayment/Form.php +0 -68
  15. app/code/community/Mage/Novalnet/Block/Prepayment/Info.php +0 -109
  16. app/code/community/Mage/Novalnet/Block/Secure/Info.php +0 -144
  17. app/code/community/Mage/Novalnet/Block/Secure/Redirect.php +0 -52
  18. app/code/community/Mage/Novalnet/Helper/Data.php +0 -137
  19. app/code/community/Mage/Novalnet/Model/Novalnet/Source/Callbacktypes.php +0 -35
  20. app/code/community/Mage/Novalnet/Model/NovalnetCc.php +0 -40
  21. app/code/community/Mage/Novalnet/Model/NovalnetElvaustria.php +0 -722
  22. app/code/community/Mage/Novalnet/Model/NovalnetElvgerman.php +0 -733
  23. app/code/community/Mage/Novalnet/Model/NovalnetInvoice.php +0 -680
  24. app/code/community/Mage/Novalnet/Model/NovalnetPciAbstract.php +0 -555
  25. app/code/community/Mage/Novalnet/Model/NovalnetPhonepayment.php +0 -749
  26. app/code/community/Mage/Novalnet/Model/NovalnetPrepayment.php +0 -368
  27. app/code/community/Mage/Novalnet/Model/NovalnetSecure.php +0 -279
  28. app/code/community/Mage/Novalnet/Model/Observer.php +0 -112
  29. app/code/community/Mage/Novalnet/controllers/InvoiceController.php +0 -62
  30. app/code/community/Mage/Novalnet/controllers/PciController.php +0 -90
  31. app/code/community/Mage/Novalnet/controllers/SecureController.php +0 -165
  32. app/code/community/Mage/Novalnet/etc/config.xml +0 -249
  33. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-install-1.0.0.php +0 -57
  34. app/code/community/Novalnet/NovalnetPaypal/Block/Form/Novalnetpaypal.php +0 -23
  35. app/code/community/Novalnet/NovalnetPaypal/Block/Info/Novalnetpaypal.php +0 -76
  36. app/code/community/Novalnet/NovalnetPaypal/Block/Infobox.php +0 -9
  37. app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypal.php +0 -31
  38. app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalerrornotice.php +0 -9
  39. app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalnotice.php +0 -9
  40. app/code/community/Novalnet/NovalnetPaypal/Helper/Data.php +0 -5
  41. app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Order.php +0 -16
  42. app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Quote.php +0 -18
  43. app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/NovalnetPaypal/Collection.php +0 -10
  44. app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Novalnetpaypal.php +0 -10
  45. app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Setup.php +0 -5
  46. app/code/community/Novalnet/NovalnetPaypal/Model/Novalnetpaypal.php +0 -353
  47. app/code/community/Novalnet/NovalnetPaypal/controllers/NovalnetpaypalController.php +0 -254
  48. app/code/community/Novalnet/NovalnetPaypal/etc/config.xml +0 -122
  49. app/code/community/Novalnet/NovalnetPaypal/etc/system.xml +0 -191
  50. app/code/community/Novalnet/NovalnetPaypal/sql/novalnetpaypal_setup/mysql4-install-1.0.0.php +0 -16
  51. app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Config/Form.php +160 -0
  52. app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Page/Edit.php +76 -0
  53. app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Page/View.php +78 -0
  54. app/code/community/Novalnet/Payment/Block/Adminhtml/Information.php +48 -0
  55. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order.php +42 -0
  56. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/Grid.php +252 -0
  57. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View.php +51 -0
  58. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View/Tab/TransactionOverview.php +84 -0
  59. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View/Tab/TransactionStatus.php +178 -0
  60. app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Sales.php +46 -0
  61. app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction.php +43 -0
  62. app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction/Grid.php +105 -0
  63. app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction/View.php +79 -0
  64. app/code/community/{Mage/Novalnet/Model/Novalnet/Request.php → Novalnet/Payment/Block/Adminhtml/Transaction/View/Form.php} +37 -38
  65. app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview.php +42 -0
  66. app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview/Grid.php +100 -0
  67. app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview/View.php +75 -0
  68. app/code/community/{Mage/Novalnet/Model/NovalnetElvdepci.php → Novalnet/Payment/Block/Adminhtml/Transactionoverview/View/Form.php} +34 -34
  69. app/code/community/Novalnet/Payment/Block/Adminhtml/Widget.php +44 -0
  70. app/code/community/{Mage/Novalnet/Model/NovalnetCcpci.php → Novalnet/Payment/Block/Adminhtml/Widget/Grid/Container.php} +14 -15
  71. app/code/community/Novalnet/Payment/Block/Adminhtml/Widget/View/Container.php +33 -0
  72. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Cc.php +89 -0
  73. app/code/community/{Mage/Novalnet/Block/Secure/Form.php → Novalnet/Payment/Block/Payment/Method/Form/Ccsecure.php} +130 -133
  74. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Elvaustria.php +107 -0
  75. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Elvgerman.php +107 -0
  76. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Ideal.php +64 -0
  77. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Invoice.php +94 -0
  78. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Paypal.php +64 -0
  79. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Phonepayment.php +94 -0
  80. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Prepayment.php +94 -0
  81. app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Sofortueberweisung.php +64 -0
  82. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Cc.php +71 -0
  83. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Ccsecure.php +110 -0
  84. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Elvaustria.php +78 -0
  85. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Elvgerman.php +78 -0
  86. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Ideal.php +64 -0
  87. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Invoice.php +78 -0
  88. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Paypal.php +64 -0
  89. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Phonepayment.php +78 -0
  90. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Prepayment.php +78 -0
  91. app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Sofortueberweisung.php +64 -0
  92. app/code/community/Novalnet/Payment/Block/Payment/Method/NovalnetRedirect.php +69 -0
  93. app/code/community/Novalnet/Payment/Helper/AssignData.php +383 -0
  94. app/code/community/Novalnet/Payment/Helper/Data.php +865 -0
  95. app/code/community/Novalnet/Payment/Model/Config.php +186 -0
  96. app/code/community/{Mage/Novalnet/Model/Novalnet/Result.php → Novalnet/Payment/Model/Novalnet/Source/Callbacktypes.php} +14 -15
  97. app/code/community/{Mage/Novalnet → Novalnet/Payment}/Model/Novalnet/Source/Cctype.php +33 -36
  98. app/code/community/Novalnet/Payment/Model/Novalnet/Source/PendingOrder.php +31 -0
  99. app/code/community/Novalnet/Payment/Model/Payment/Method/Abstract.php +1344 -0
  100. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetCc.php +36 -0
  101. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetElvaustria.php +35 -0
  102. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetElvgerman.php +35 -0
  103. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetIdeal.php +45 -0
  104. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetInvoice.php +35 -0
  105. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPaypal.php +45 -0
  106. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPhonepayment.php +37 -0
  107. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPrepayment.php +35 -0
  108. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetSecure.php +45 -0
  109. app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetSofortueberweisung.php +45 -0
  110. app/code/community/Novalnet/Payment/Model/Resource/Transactionoverview.php +36 -0
  111. app/code/community/Novalnet/Payment/Model/Resource/Transactionoverview/Collection.php +44 -0
  112. app/code/community/Novalnet/Payment/Model/Resource/Transactionstatus.php +36 -0
  113. app/code/community/Novalnet/Payment/Model/Resource/Transactionstatus/Collection.php +44 -0
  114. app/code/community/Novalnet/Payment/Model/System/Config/Activemethods.php +73 -0
  115. app/code/community/Novalnet/Payment/Model/Transactionoverview.php +65 -0
  116. app/code/community/Novalnet/Payment/Model/Transactionstatus.php +65 -0
  117. app/code/community/Novalnet/Payment/controllers/Adminhtml/Configuration/Wizard/PageController.php +112 -0
  118. app/code/community/Novalnet/Payment/controllers/Adminhtml/InformationController.php +41 -0
  119. app/code/community/Novalnet/Payment/controllers/Adminhtml/NovalnetCcController.php +44 -0
  120. app/code/community/Novalnet/Payment/controllers/Adminhtml/Sales/OrderController.php +120 -0
  121. app/code/community/Novalnet/Payment/controllers/Adminhtml/TransactionController.php +84 -0
  122. app/code/community/Novalnet/Payment/controllers/Adminhtml/TransactionoverviewController.php +82 -0
  123. app/code/community/Novalnet/Payment/controllers/GatewayController.php +329 -0
  124. app/code/community/Novalnet/Payment/controllers/NovalnetCcController.php +44 -0
  125. app/code/community/Novalnet/Payment/etc/adminhtml.xml +93 -0
  126. app/code/community/Novalnet/Payment/etc/config.xml +317 -0
  127. app/code/community/{Mage/Novalnet → Novalnet/Payment}/etc/system.xml +1800 -1849
  128. app/code/community/Novalnet/Payment/sql/novalnet_setup/install.sql +35 -0
  129. app/code/community/Novalnet/Payment/sql/novalnet_setup/mysql4-install-1.0.0.php +146 -0
  130. app/code/community/Novalnet/Sofortueberweisung/Block/Form/Sofortueberweisung.php +0 -44
  131. app/code/community/Novalnet/Sofortueberweisung/Block/Info/Sofortueberweisung.php +0 -69
  132. app/code/community/Novalnet/Sofortueberweisung/Block/Sofortueberweisung.php +0 -33
  133. app/code/community/Novalnet/Sofortueberweisung/Helper/Data.php +0 -326
  134. app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Order.php +0 -25
  135. app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Quote.php +0 -26
  136. app/code/community/Novalnet/Sofortueberweisung/Model/Data/Form/Element/Link.php +0 -19
  137. app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Setup.php +0 -5
  138. app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung.php +0 -10
  139. app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung/Collection.php +0 -10
  140. app/code/community/Novalnet/Sofortueberweisung/Model/Sofortueberweisung.php +0 -353
  141. app/code/community/Novalnet/Sofortueberweisung/controllers/Adminhtml/SofortueberweisungController.php +0 -88
  142. app/code/community/Novalnet/Sofortueberweisung/controllers/PcsofortueberweisungController.php +0 -154
  143. app/code/community/Novalnet/Sofortueberweisung/controllers/SofortueberweisungController.php +0 -298
  144. app/code/community/Novalnet/Sofortueberweisung/etc/config.xml +0 -235
  145. app/code/community/Novalnet/Sofortueberweisung/etc/system.xml +0 -214
  146. app/code/community/Novalnet/Sofortueberweisung/sql/sofortueberweisung_setup/mysql4-install-1.0.0.php +0 -10
  147. app/design/adminhtml/default/default/layout/novalnet/configuration.xml +119 -0
  148. app/design/adminhtml/default/default/template/novalnet/cc/form.phtml +0 -115
  149. app/design/adminhtml/default/default/template/novalnet/cc/info.phtml +0 -33
  150. app/design/adminhtml/default/default/template/novalnet/elvaustria/form.phtml +0 -86
  151. app/design/adminhtml/default/default/template/novalnet/elvaustria/info.phtml +0 -37
  152. app/design/adminhtml/default/default/template/novalnet/elvgerman/form.phtml +0 -102
  153. app/design/adminhtml/default/default/template/novalnet/elvgerman/info.phtml +0 -37
  154. app/{code/community/Mage/Novalnet/Model/NovalnetElvatpci.php → design/adminhtml/default/default/template/novalnet/information/iframe.phtml} +35 -34
  155. app/design/adminhtml/default/default/template/novalnet/invoice/form.phtml +0 -61
  156. app/design/adminhtml/default/default/template/novalnet/invoice/info.phtml +0 -36
  157. app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/form/container.phtml +12 -0
  158. app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/store_switcher.phtml +19 -0
  159. app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/view/container.phtml +19 -0
  160. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Cc.phtml +71 -0
  161. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Ccform.phtml +81 -0
  162. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Ccsecure.phtml +113 -0
  163. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Elvaustria.phtml +79 -0
  164. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Elvgerman.phtml +103 -0
  165. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Invoice.phtml +59 -0
  166. app/design/adminhtml/default/default/template/novalnet/payment/method/form/Prepayment.phtml +59 -0
  167. app/{code/community/Mage/Novalnet/Model/Mysql4/Setup.php → design/adminhtml/default/default/template/novalnet/payment/method/form/Sofortueberweisung.phtml} +27 -30
  168. app/design/adminhtml/default/default/template/novalnet/payment/method/form/blank.phtml +38 -0
  169. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Cc.phtml +35 -0
  170. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Ccsecure.phtml +37 -0
  171. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Elvaustria.phtml +37 -0
  172. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Elvgerman.phtml +37 -0
  173. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Ideal.phtml +37 -0
  174. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Invoice.phtml +40 -0
  175. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Paypal.phtml +37 -0
  176. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Phonepayment.phtml +37 -0
  177. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Prepayment.phtml +40 -0
  178. app/design/adminhtml/default/default/template/novalnet/payment/method/info/Sofortueberweisung.phtml +37 -0
  179. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Cc.phtml +29 -0
  180. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Ccsecure.phtml +29 -0
  181. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Elvaustria.phtml +29 -0
  182. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Elvgerman.phtml +29 -0
  183. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Ideal.phtml +29 -0
  184. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Invoice.phtml +35 -0
  185. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Paypal.phtml +30 -0
  186. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Phonepayment.phtml +29 -0
  187. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Prepayment.phtml +35 -0
  188. app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Sofortueberweisung.phtml +29 -0
  189. app/design/adminhtml/default/default/template/novalnet/pci/form.phtml +0 -69
  190. app/design/adminhtml/default/default/template/novalnet/pci/info.phtml +0 -34
  191. app/design/adminhtml/default/default/template/novalnet/phonepayment/form.phtml +0 -61
  192. app/design/adminhtml/default/default/template/novalnet/phonepayment/info.phtml +0 -34
  193. app/design/adminhtml/default/default/template/novalnet/prepayment/form.phtml +0 -61
  194. app/design/adminhtml/default/default/template/novalnet/prepayment/info.phtml +0 -34
  195. app/design/adminhtml/default/default/template/novalnet/sales/order/view/tab/transactionoverview.phtml +154 -0
  196. app/design/adminhtml/default/default/template/novalnet/sales/order/view/tab/transactionstatus.phtml +128 -0
  197. app/design/adminhtml/default/default/template/novalnet/secure/form.phtml +0 -115
  198. app/design/adminhtml/default/default/template/novalnet/secure/info.phtml +0 -38
  199. app/design/adminhtml/default/default/template/novalnet/transaction/overview/view/form.phtml +181 -0
  200. app/design/adminhtml/default/default/template/novalnet/transaction/view/form.phtml +181 -0
  201. app/design/adminhtml/default/default/template/novalnetpaypal/form/novalnetpaypal.phtml +0 -1
  202. app/design/adminhtml/default/default/template/novalnetpaypal/info/novalnetpaypal.phtml +0 -34
  203. app/design/adminhtml/default/default/template/novalnetpaypal/info/pdf/novalnetpaypal.phtml +0 -7
  204. app/design/adminhtml/default/default/template/novalnetsofortueberweisung/form/sofortueberweisung.phtml +0 -1
  205. app/design/adminhtml/default/default/template/novalnetsofortueberweisung/info/pdf/paycode.phtml +0 -6
  206. app/design/adminhtml/default/default/template/novalnetsofortueberweisung/info/pdf/sofortueberweisung.phtml +0 -0
app/code/community/Mage/Novalnet/Block/Cc/Form.php DELETED
@@ -1,89 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Cc_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/cc/form.phtml');
37
- }
38
- /**
39
- * Retrieve payment configuration object
40
- *
41
- * @return Mage_Payment_Model_Config
42
- */
43
- protected function _getConfig()
44
- {
45
- if (!$this->_localConfig) {
46
- $this->_localConfig = Mage::getModel('payment/config');
47
- }
48
- return $this->_localConfig;
49
- }
50
-
51
- /**
52
- * Retrieve availables credit card types
53
- *
54
- * @return array
55
- */
56
- public function getCcAvailableTypes()
57
- {
58
- $types = $this->_getConfig()->getCcTypes();
59
- if ($method = $this->getMethod()) {
60
- $availableTypes = $method->getConfigData('cctypes');
61
- if ($availableTypes) {
62
- $availableTypes = explode(',', $availableTypes);
63
- foreach ($types as $code=>$name) {
64
- if (!in_array($code, $availableTypes)) {
65
- unset($types[$code]);
66
- }
67
- }
68
- }
69
- }
70
- return $types;
71
- }
72
- /**
73
- * Retrieve payment configuration object
74
- *
75
- * @return Mage_Payment_Model_Config
76
- */
77
- public function checkCustomerAccess() {
78
-
79
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
80
- if( strlen( $exludedGroupes ) ) {
81
- $exludedGroupes = explode(',', $exludedGroupes);
82
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
83
- return !in_array($custGrpId, $exludedGroupes);
84
- }
85
- return true;
86
- }
87
-
88
-
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Cc/Info.php DELETED
@@ -1,98 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Cc_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
- /**
33
- * Init default template for block
34
- */
35
- protected function _construct()
36
- {
37
- parent::_construct();
38
- $this->setTemplate('novalnet/cc/info.phtml');
39
- }
40
-
41
- public function getInfo()
42
- {
43
- if (!$this->_localInfo) {
44
- $this->_localInfo = $this->getData('info');
45
- $this->loadNovalnetData();
46
- }
47
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
48
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
49
- }
50
- return $this->_localInfo;
51
- }
52
-
53
- public function toPdf()
54
- {
55
- $this->setTemplate('payment/info/pdf/pci.phtml');
56
- return $this->toHtml();
57
- }
58
-
59
- public function getMethod()
60
- {
61
- return $this->getInfo()->getMethodInstance();
62
- }
63
-
64
- public function getPaymentMethod()
65
- {
66
- return $this->getMethod()->getConfigData('title');
67
- }
68
-
69
- public function loadNovalnetData() {
70
- $order_id = $this->getRequest()->getParam('order_id');
71
- $obj = NULL;
72
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
73
- $order_id = $this->getData('info')->getOrder()->getId();
74
- }
75
- if( $order_id ) {
76
- $objOrder = Mage::getModel('sales/order')->load($order_id);
77
- $objQuote = Mage::getModel( 'sales/quote' );
78
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
79
- }else if( $this->getRequest()->getParam('invoice_id') ) {
80
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
81
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
82
- $objOrder = $invoice->getOrder();
83
- $objQuote = Mage::getModel( 'sales/quote' );
84
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
85
- }else {
86
- $chSess = Mage::getSingleton('checkout/session');
87
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
88
- $objQuote = Mage::getModel( 'sales/quote' );
89
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
90
- }else {
91
- $obj = $this->_localInfo;
92
- }
93
- }
94
- $this->setNnTestorder($obj->getNnTestorder());
95
- $this->setNnComments($obj->getNnComments());
96
- return $this;
97
- }
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Elvaustria/Form.php DELETED
@@ -1,94 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Elvaustria_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/elvaustria/form.phtml');
37
- }
38
-
39
- protected function _getConfig()
40
- {
41
- if(empty($this->_localConfig)) {
42
- $this->_localConfig = Mage::getSingleton('payment/config');
43
- }
44
- return $this->_localConfig;
45
- }
46
-
47
- public function isCallbackTypeCall()
48
- {
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')
60
- ->getCustomer()
61
- ->getDefaultBillingAddress();
62
-
63
- if( $customer )
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();
80
- return $method->getConfigData('comment');
81
- }
82
-
83
- public function checkCustomerAccess() {
84
-
85
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
86
- if( strlen( $exludedGroupes ) ) {
87
- $exludedGroupes = explode(',', $exludedGroupes);
88
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
89
- return !in_array($custGrpId, $exludedGroupes);
90
- }
91
- return true;
92
- }
93
-
94
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Elvaustria/Info.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Block_Elvaustria_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/elvaustria/info.phtml');
37
- }
38
- public function toPdf()
39
- {
40
- $this->setTemplate('payment/info/pdf/cc.phtml');
41
- return $this->toHtml();
42
- }
43
- public function getInfo()
44
- {
45
- if (!$this->_localInfo) {
46
- $this->_localInfo = $this->getData('info');
47
- $this->loadNovalnetData();
48
- }
49
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
50
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
51
- }
52
- return $this->_localInfo;
53
- }
54
-
55
- /**
56
- * Retrieve payment method model
57
- *
58
- * @return Mage_Payment_Model_Method_Abstract
59
- */
60
- public function getMethod()
61
- {
62
- return $this->getInfo()->getMethodInstance();
63
- }
64
-
65
- public function getPaymentMethod()
66
- {
67
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
68
- }
69
-
70
- public function getInfoData($field)
71
- {
72
- return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
73
- }
74
-
75
- public function loadNovalnetData() {
76
- $order_id = $this->getRequest()->getParam('order_id');
77
- $obj = NULL;
78
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
79
- $order_id = $this->getData('info')->getOrder()->getId();
80
- }
81
- if( $order_id ) {
82
- $objOrder = Mage::getModel('sales/order')->load($order_id);
83
- $objQuote = Mage::getModel( 'sales/quote' );
84
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
85
- }else if( $this->getRequest()->getParam('invoice_id') ) {
86
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
87
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
88
- $objOrder = $invoice->getOrder();
89
- $objQuote = Mage::getModel( 'sales/quote' );
90
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
91
- }else {
92
- $chSess = Mage::getSingleton('checkout/session');
93
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
94
- $objQuote = Mage::getModel( 'sales/quote' );
95
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
96
- }else {
97
- $obj = $this->_localInfo;
98
- }
99
- }
100
- $this->setNnAccountHolder($obj->getNnAccountHolder());
101
- $this->setNnAccountNumber($obj->getNnAccountNumber());
102
- $this->setNnBankSortingCode($obj->getNnBankSortingCode());
103
- $this->setNnElvCountry($obj->getNnElvCountry());
104
- $this->setNnTestorder($obj->getNnTestorder());
105
- $this->setNnComments($obj->getNnComments());
106
- return $this;
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Elvgerman/Form.php DELETED
@@ -1,100 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Elvgerman_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/elvgerman/form.phtml');
37
- }
38
-
39
- protected function _getConfig()
40
- {
41
- if(empty($this->_localConfig)) {
42
- $this->_localConfig = Mage::getSingleton('payment/config');
43
- }
44
- return $this->_localConfig;
45
- }
46
-
47
- public function acdc_check()
48
- {
49
- $method = $this->getMethod();
50
- return $method->getConfigData('acdc_check');
51
- }
52
-
53
- public function isCallbackTypeCall()
54
- {
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')
66
- ->getCustomer()
67
- ->getDefaultBillingAddress();
68
-
69
- if( $customer )
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();
86
- return $method->getConfigData('comment');
87
- }
88
-
89
- public function checkCustomerAccess() {
90
-
91
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
92
- if( strlen( $exludedGroupes ) ) {
93
- $exludedGroupes = explode(',', $exludedGroupes);
94
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
95
- return !in_array($custGrpId, $exludedGroupes);
96
- }
97
- return true;
98
- }
99
-
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Elvgerman/Info.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Block_Elvgerman_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/elvgerman/info.phtml');
37
- }
38
-
39
- public function getInfo()
40
- {
41
- if (!$this->_localInfo) {
42
- $this->_localInfo = $this->getData('info');
43
- $this->loadNovalnetData();
44
- }
45
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
46
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
47
- }
48
- return $this->_localInfo;
49
- }
50
-
51
- /**
52
- * Retrieve payment method model
53
- *
54
- * @return Mage_Payment_Model_Method_Abstract
55
- */
56
- public function getMethod()
57
- {
58
- return $this->getInfo()->getMethodInstance();
59
- }
60
-
61
- public function getPaymentMethod()
62
- {
63
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
64
- }
65
-
66
- public function getInfoData($field)
67
- {
68
- return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
69
- }
70
- public function toPdf()
71
- {
72
- $this->setTemplate('payment/info/pdf/cc.phtml');
73
- return $this->toHtml();
74
- }
75
- public function loadNovalnetData() {
76
- $order_id = $this->getRequest()->getParam('order_id');
77
- $obj = NULL;
78
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
79
- $order_id = $this->getData('info')->getOrder()->getId();
80
- }
81
- if( $order_id ) {
82
- $objOrder = Mage::getModel('sales/order')->load($order_id);
83
- $objQuote = Mage::getModel( 'sales/quote' );
84
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
85
-
86
- }else if( $this->getRequest()->getParam('invoice_id') ) {
87
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
88
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
89
- $objOrder = $invoice->getOrder();
90
- $objQuote = Mage::getModel( 'sales/quote' );
91
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
92
- }else {
93
- $chSess = Mage::getSingleton('checkout/session');
94
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
95
- $objQuote = Mage::getModel( 'sales/quote' );
96
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
97
- }else {
98
- $obj = $this->_localInfo;
99
- }
100
- }
101
- $this->setNnAccountHolder($obj->getNnAccountHolder());
102
- $this->setNnAccountNumber($obj->getNnAccountNumber());
103
- $this->setNnBankSortingCode($obj->getNnBankSortingCode());
104
- $this->setNnElvCountry($obj->getNnElvCountry());
105
- $this->setNnTestorder($obj->getNnTestorder());
106
- $this->setNnComments($obj->getNnComments());
107
- return $this;
108
- }
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Invoice/Form.php DELETED
@@ -1,99 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Invoice_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/invoice/form.phtml');
37
- }
38
-
39
- protected function _getConfig()
40
- {
41
- if(empty($this->_localConfig)) {
42
- $this->_localConfig = Mage::getSingleton('payment/config');
43
- }
44
- return $this->_localConfig;
45
- }
46
-
47
- /* public function getInvoiceAvailableCountries()
48
- {
49
- if ($method = $this->getMethod()) {
50
- $availableCountries = $method->getConfigData('invoicecountries');
51
- if ($availableCountries) {
52
- $availableCountries = explode(',', $availableCountries);
53
- }
54
- }
55
- return $availableCountries;
56
- }
57
- */
58
- public function checkCustomerAccess() {
59
-
60
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
61
- if( strlen( $exludedGroupes ) ) {
62
- $exludedGroupes = explode(',', $exludedGroupes);
63
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
64
- return !in_array($custGrpId, $exludedGroupes);
65
- }
66
- return true;
67
- }
68
-
69
- public function isCallbackTypeCall()
70
- {
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')
82
- ->getCustomer()
83
- ->getDefaultBillingAddress();
84
-
85
- if( $customer )
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Invoice/Info.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Block_Invoice_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/invoice/info.phtml');
37
- }
38
-
39
- public function getInfo()
40
- {
41
- if (!$this->_localInfo) {
42
- $this->_localInfo = $this->getData('info');
43
- $this->loadNovalnetData();
44
- }
45
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
46
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
47
- }
48
- return $this->_localInfo;
49
- }
50
-
51
- /**
52
- * Retrieve payment method model
53
- *
54
- * @return Mage_Payment_Model_Method_Abstract
55
- */
56
- public function getMethod()
57
- {
58
- return $this->getInfo()->getMethodInstance();
59
- }
60
-
61
- public function getInfoData($field)
62
- {
63
- return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
64
- }
65
-
66
- public function getPaymentMethod()
67
- {
68
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
69
- }
70
-
71
- public function loadNovalnetData() {
72
- $order_id = $this->getRequest()->getParam('order_id');
73
- $obj = NULL;
74
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
75
- $order_id = $this->getData('info')->getOrder()->getId();
76
- }
77
- if( $order_id ) {
78
- $objOrder = Mage::getModel('sales/order')->load($order_id);
79
- $objQuote = Mage::getModel( 'sales/quote' );
80
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
81
- }else if( $this->getRequest()->getParam('invoice_id') ) {
82
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
83
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
84
- $objOrder = $invoice->getOrder();
85
- $objQuote = Mage::getModel( 'sales/quote' );
86
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
87
- }else {
88
- $chSess = Mage::getSingleton('checkout/session');
89
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
90
- $objQuote = Mage::getModel( 'sales/quote' );
91
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
92
- }else {
93
- $obj = $this->_localInfo;
94
- }
95
- }
96
- // $this->setNnAccountHolder($obj->getNnAccountHolder());
97
- // $this->setNnAccountNumber($obj->getNnAccountNumber());
98
- // $this->setNnBankSortingCode($obj->getNnBankSortingCode());
99
- // $this->setNnElvCountry($obj->getNnElvCountry());
100
- $this->setNnTestorder($obj->getNnTestorder());
101
- $this->setNnComments($obj->getNnComments());
102
- $this->setNote($obj->getNote());
103
- return $this;
104
- }
105
- public function toPdf()
106
- {
107
- $this->setTemplate('payment/info/pdf/cc.phtml');
108
- return $this->toHtml();
109
- }
110
- public function getDuedate()
111
- {
112
- $dueDate = NULL;
113
- $order_id = $this->getRequest()->getParam('order_id');
114
- $paymentDuration = (int)trim($this->getMethod()
115
- ->getConfigData('payment_duration'))
116
- ;
117
- if($paymentDuration && !$order_id) {
118
- $dueDate = date('d.m.Y', strtotime('+' . $paymentDuration . ' days'));
119
- }
120
- return $dueDate;
121
- }
122
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Pci/Form.php DELETED
@@ -1,80 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Pci_Form extends Mage_Payment_Block_Form
30
- {
31
- protected function _construct()
32
- {
33
- parent::_construct();
34
- $this->setTemplate('novalnet/pci/form.phtml');
35
- }
36
- /**
37
- * Retrieve payment configuration object
38
- *
39
- * @return Mage_Payment_Model_Config
40
- */
41
- protected function _getConfig()
42
- {
43
- if (!$this->_localConfig) {
44
- $this->_localConfig = Mage::getModel('payment/config');
45
- }
46
- return $this->_localConfig;
47
- }
48
-
49
- /**
50
- * Retrieve availables credit card types
51
- *
52
- * @return array
53
- */
54
- public function getCcAvailableTypes()
55
- {
56
- $types = $this->_getConfig()->getCcTypes();
57
- if ($method = $this->getMethod()) {
58
- $availableTypes = $method->getConfigData('cctypes');
59
- if ($availableTypes) {
60
- $availableTypes = explode(',', $availableTypes);
61
- foreach ($types as $code=>$name) {
62
- if (!in_array($code, $availableTypes)) {
63
- unset($types[$code]);
64
- }
65
- }
66
- }
67
- }
68
- return $types;
69
- }
70
- public function checkCustomerAccess() {
71
-
72
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
73
- if( strlen( $exludedGroupes ) ) {
74
- $exludedGroupes = explode(',', $exludedGroupes);
75
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
76
- return !in_array($custGrpId, $exludedGroupes);
77
- }
78
- return true;
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Pci/Info.php DELETED
@@ -1,98 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Pci_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
- /**
33
- * Init default template for block
34
- */
35
- protected function _construct()
36
- {
37
- parent::_construct();
38
- $this->setTemplate('novalnet/pci/info.phtml');
39
- }
40
-
41
- public function getInfo()
42
- {
43
- if (!$this->_localInfo) {
44
- $this->_localInfo = $this->getData('info');
45
- $this->loadNovalnetData();
46
- }
47
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
48
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
49
- }
50
- return $this->_localInfo;
51
- }
52
-
53
- public function toPdf()
54
- {
55
- $this->setTemplate('payment/info/pdf/pci.phtml');
56
- return $this->toHtml();
57
- }
58
-
59
- public function getMethod()
60
- {
61
- return $this->getInfo()->getMethodInstance();
62
- }
63
-
64
- public function getPaymentMethod()
65
- {
66
- return $this->getMethod()->getConfigData('title');
67
- }
68
-
69
- public function loadNovalnetData() {
70
- $order_id = $this->getRequest()->getParam('order_id');
71
- $obj = NULL;
72
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
73
- $order_id = $this->getData('info')->getOrder()->getId();
74
- }
75
- if( $order_id ) {
76
- $objOrder = Mage::getModel('sales/order')->load($order_id);
77
- $objQuote = Mage::getModel( 'sales/quote' );
78
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
79
- }else if( $this->getRequest()->getParam('invoice_id') ) {
80
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
81
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
82
- $objOrder = $invoice->getOrder();
83
- $objQuote = Mage::getModel( 'sales/quote' );
84
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
85
- }else {
86
- $chSess = Mage::getSingleton('checkout/session');
87
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
88
- $objQuote = Mage::getModel( 'sales/quote' );
89
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
90
- }else {
91
- $obj = $this->_localInfo;
92
- }
93
- }
94
- $this->setNnTestorder($obj->getNnTestorder());
95
- $this->setNnComments($obj->getNnComments());
96
- return $this;
97
- }
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Pci/Redirect.php DELETED
@@ -1,53 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Pci_Redirect extends Mage_Core_Block_Abstract
30
- {
31
- protected function _toHtml()
32
- {
33
- $pci = $this->getOrder()->getPayment()->getMethodInstance();
34
- $formName = $formID = $pci->getCode();
35
- $form = new Varien_Data_Form();
36
- $form->setAction($pci->getCgiUrl())
37
- ->setId($formID)
38
- ->setName($formName)
39
- ->setMethod('POST')
40
- ->setUseContainer(true);
41
- foreach ($pci->getFormData()->toArray() as $field=>$value) {
42
- $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
43
- }
44
- $form->addField('continue', 'submit', array('name'=>'continue', 'value'=>$this->__('continue')));
45
-
46
- $html = '<html><body>';
47
- $html.= $this->__('You will be redirected to Novalnet AG in a few seconds.');
48
- $html.= $form->toHtml();
49
- $html.= '<script type="text/javascript">document.getElementById("' . $formID . '").submit();</script>';
50
- $html.= '</body></html>';
51
- return $html;
52
- }
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Phonepayment/Form.php DELETED
@@ -1,57 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Phonepayment_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/phonepayment/form.phtml');
37
- }
38
-
39
- protected function _getConfig()
40
- {
41
- if(empty($this->_localConfig)) {
42
- $this->_localConfig = Mage::getSingleton('payment/config');
43
- }
44
- return $this->_localConfig;
45
- }
46
-
47
- public function checkCustomerAccess() {
48
-
49
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
50
- if( strlen( $exludedGroupes ) ) {
51
- $exludedGroupes = explode(',', $exludedGroupes);
52
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
53
- return !in_array($custGrpId, $exludedGroupes);
54
- }
55
- return true;
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Phonepayment/Info.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Block_Phonepayment_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/phonepayment/info.phtml');
37
- }
38
-
39
- public function getInfo()
40
- {
41
- if (!$this->_localInfo) {
42
- $this->_localInfo = $this->getData('info');
43
- $this->loadNovalnetData();
44
- }
45
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
46
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
47
- }
48
- return $this->_localInfo;
49
- }
50
-
51
- /**
52
- * Retrieve payment method model
53
- *
54
- * @return Mage_Payment_Model_Method_Abstract
55
- */
56
- public function getMethod()
57
- {
58
- return $this->getInfo()->getMethodInstance();
59
- }
60
-
61
- public function getInfoData($field)
62
- {
63
- return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
64
- }
65
- public function toPdf()
66
- {
67
- $this->setTemplate('payment/info/pdf/cc.phtml');
68
- return $this->toHtml();
69
- }
70
- public function getPaymentMethod()
71
- {
72
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
73
- }
74
-
75
- public function loadNovalnetData() {
76
- $order_id = $this->getRequest()->getParam('order_id');
77
- $obj = NULL;
78
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
79
- $order_id = $this->getData('info')->getOrder()->getId();
80
- }
81
- if( $order_id ) {
82
- $objOrder = Mage::getModel('sales/order')->load($order_id);
83
- $objQuote = Mage::getModel( 'sales/quote' );
84
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
85
- }else if( $this->getRequest()->getParam('invoice_id') ) {
86
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
87
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
88
- $objOrder = $invoice->getOrder();
89
- $objQuote = Mage::getModel( 'sales/quote' );
90
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
91
- }else {
92
- $chSess = Mage::getSingleton('checkout/session');
93
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
94
- $objQuote = Mage::getModel( 'sales/quote' );
95
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
96
- }else {
97
- $obj = $this->_localInfo;
98
- }
99
- }
100
- // $this->setNnAccountHolder($obj->getNnAccountHolder());
101
- // $this->setNnAccountNumber($obj->getNnAccountNumber());
102
- // $this->setNnBankSortingCode($obj->getNnBankSortingCode());
103
- // $this->setNnElvCountry($obj->getNnElvCountry());
104
- $this->setNnTestorder($obj->getNnTestorder());
105
- $this->setNnComments($obj->getNnComments());
106
- return $this;
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Prepayment/Form.php DELETED
@@ -1,68 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Prepayment_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/prepayment/form.phtml');
37
- }
38
-
39
- protected function _getConfig()
40
- {
41
- if(empty($this->_localConfig)) {
42
- $this->_localConfig = Mage::getSingleton('payment/config');
43
- }
44
- return $this->_localConfig;
45
- }
46
-
47
- /* public function getPrepaymentAvailableCountries()
48
- {
49
- if ($method = $this->getMethod()) {
50
- $availableCountries = $method->getConfigData('prepaymentcountries');
51
- if ($availableCountries) {
52
- $availableCountries = explode(',', $availableCountries);
53
- }
54
- }
55
- return $availableCountries;
56
- }
57
- */
58
- public function checkCustomerAccess() {
59
-
60
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
61
- if( strlen( $exludedGroupes ) ) {
62
- $exludedGroupes = explode(',', $exludedGroupes);
63
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
64
- return !in_array($custGrpId, $exludedGroupes);
65
- }
66
- return true;
67
- }
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Prepayment/Info.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Block_Prepayment_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/prepayment/info.phtml');
37
- }
38
-
39
- public function getInfo()
40
- {
41
- if (!$this->_localInfo) {
42
- $this->_localInfo = $this->getData('info');
43
- $this->loadNovalnetData();
44
- }
45
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
46
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
47
- }
48
- return $this->_localInfo;
49
- }
50
- public function toPdf()
51
- {
52
- $this->setTemplate('payment/info/pdf/cc.phtml');
53
- return $this->toHtml();
54
- }
55
- public function loadNovalnetData() {
56
- $order_id = $this->getRequest()->getParam('order_id');
57
- $obj = NULL;
58
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
59
- $order_id = $this->getData('info')->getOrder()->getId();
60
- }
61
- if( $order_id ) {
62
- $objOrder = Mage::getModel('sales/order')->load($order_id);
63
- $objQuote = Mage::getModel( 'sales/quote' );
64
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
65
- }else if( $this->getRequest()->getParam('invoice_id') ) {
66
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
67
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
68
- $objOrder = $invoice->getOrder();
69
- $objQuote = Mage::getModel( 'sales/quote' );
70
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
71
- }else {
72
- $chSess = Mage::getSingleton('checkout/session');
73
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
74
- $objQuote = Mage::getModel( 'sales/quote' );
75
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
76
- }else {
77
- $obj = $this->_localInfo;
78
- }
79
- }
80
- // $this->setNnAccountHolder($obj->getNnAccountHolder());
81
- // $this->setNnAccountNumber($obj->getNnAccountNumber());
82
- // $this->setNnBankSortingCode($obj->getNnBankSortingCode());
83
- // $this->setNnElvCountry($obj->getNnElvCountry());
84
- $this->setNnTestorder($obj->getNnTestorder());
85
- $this->setNnComments($obj->getNnComments());
86
- $this->setNote($obj->getNote());
87
- return $this;
88
- }
89
-
90
- /**
91
- * Retrieve payment method model
92
- *
93
- * @return Mage_Payment_Model_Method_Abstract
94
- */
95
- public function getMethod()
96
- {
97
- return $this->getInfo()->getMethodInstance();
98
- }
99
-
100
- public function getInfoData($field)
101
- {
102
- return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
103
- }
104
-
105
- public function getPaymentMethod()
106
- {
107
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
108
- }
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Secure/Info.php DELETED
@@ -1,144 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Secure_Info extends Mage_Payment_Block_Info
30
- {
31
- protected $_localInfo = NULL;
32
-
33
- /**
34
- * Init default template for block
35
- */
36
- protected function _construct()
37
- {
38
- parent::_construct();
39
- $this->setTemplate('novalnet/secure/info.phtml');
40
- }
41
-
42
- public function getInfo()
43
- {
44
- if (!$this->_localInfo) {
45
- $this->_localInfo = $this->getData('info');
46
- $this->loadNovalnetData();
47
- }
48
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
49
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
50
- }
51
- return $this->_localInfo;
52
- }
53
-
54
- /**
55
- * Retrieve credit card type name
56
- *
57
- * @return string
58
- */
59
- public function getCcTypeName()
60
- {
61
- $types = Mage::getSingleton('payment/config')->getCcTypes();
62
- if (isset($types[$this->getInfo()->getCcType()])) {
63
- return $types[$this->getInfo()->getCcType()];
64
- }
65
- return $this->getInfo()->getCcType();
66
- }
67
-
68
- /**
69
- * Retrieve CC expiration month
70
- *
71
- * @return string
72
- */
73
- public function getCcExpMonth()
74
- {
75
- $month = $this->getInfo()->getCcExpMonth();
76
- if ($month<10) {
77
- $month = '0'.$month;
78
- }
79
- return $month;
80
- }
81
-
82
- /**
83
- * Retrieve CC expiration date
84
- *
85
- * @return Zend_Date
86
- */
87
- public function getCcExpDate()
88
- {
89
- $date = Mage::app()->getLocale()->date(0);
90
- $date->setYear($this->getInfo()->getCcExpYear());
91
- $date->setMonth($this->getInfo()->getCcExpMonth());
92
- return $date;
93
- }
94
- public function toPdf()
95
- {
96
- $this->setTemplate('payment/info/pdf/cc.phtml');
97
- return $this->toHtml();
98
- }
99
- public function loadNovalnetData() {
100
- $order_id = $this->getRequest()->getParam('order_id');
101
- $obj = NULL;
102
- if($this->getRequest()->getControllerName() == 'sales_order_invoice') {
103
- $order_id = $this->getData('info')->getOrder()->getId();
104
- }
105
- if( $order_id ) {
106
- $objOrder = Mage::getModel('sales/order')->load($order_id);
107
- $objQuote = Mage::getModel( 'sales/quote' );
108
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
109
- }else if( $this->getRequest()->getParam('invoice_id') ) {
110
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
111
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
112
- $objOrder = $invoice->getOrder();
113
- $objQuote = Mage::getModel( 'sales/quote' );
114
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
115
- }else {
116
- $chSess = Mage::getSingleton('checkout/session');
117
- if($this->getRequest()->getControllerName() == 'onepage' && $this->getRequest()->getActionName() == 'saveOrder' && $chSess->hasLastSuccessQuoteId()){
118
- $objQuote = Mage::getModel( 'sales/quote' );
119
- $obj = $objQuotePayment = $objQuote->setStoreId($this->getMethod()->getStoreId())->load($chSess->getLastSuccessQuoteId())->getPayment();
120
- }else {
121
- $obj = $this->_localInfo;
122
- }
123
- }
124
- // $this->setNnAccountHolder($obj->getNnAccountHolder());
125
- // $this->setNnAccountNumber($obj->getNnAccountNumber());
126
- // $this->setNnBankSortingCode($obj->getNnBankSortingCode());
127
- // $this->setNnElvCountry($obj->getNnElvCountry());
128
- $this->setNnTestorder($obj->getNnTestorder());
129
- $this->setNnComments($obj->getNnComments());
130
- return $this;
131
- }
132
-
133
-
134
-
135
- public function getMethod()
136
- {
137
- return $this->getInfo()->getMethodInstance();
138
- }
139
-
140
- public function getPaymentMethod()
141
- {
142
- return $this->htmlEscape($this->getMethod()->getConfigData('title'));
143
- }
144
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Block/Secure/Redirect.php DELETED
@@ -1,52 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Secure_Redirect extends Mage_Core_Block_Abstract
30
- {
31
- protected function _toHtml()
32
- {
33
- $secure = $this->getOrder()->getPayment()->getMethodInstance();
34
- $formName = $formID = $secure->getCode();
35
- $form = new Varien_Data_Form();
36
- $form->setAction($secure->getCgiUrl())
37
- ->setId($formID)
38
- ->setName($formName)
39
- ->setMethod('POST')
40
- ->setUseContainer(true);
41
- foreach ($secure->getFormData()->toArray() as $field=>$value) {
42
- $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
43
- }
44
- //$form->addField('enter', 'Submit', array('name'=>'enter', 'value'=>'enter'));#for debug
45
- $html = '<html><body>';
46
- $html.= $this->__('You will be redirected to Novalnet AG 3D-Secure in a few seconds.');
47
- $html.= $form->toHtml();
48
- $html.= '<script type="text/javascript">document.getElementById("' . $formID . '").submit();</script>';
49
- $html.= '</body></html>';
50
- return $html;
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Helper/Data.php DELETED
@@ -1,137 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Helper_Data extends Mage_Core_Helper_Abstract
30
- {
31
- public function isPublicIP($value) {
32
- return (count(explode('.', $value)) == 4 && !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value));
33
- }
34
-
35
- public function nn_url(){
36
- $url = (Mage::app()->getLocale()->getLocaleCode()=='de_DE')?"https://www.novalnet.de":"http://www.novalnet.com";
37
- return $url;
38
- }
39
-
40
- public function getRealIpAddr() {
41
- $_check = array(
42
- 'HTTP_X_FORWARDED_FOR',
43
- 'HTTP_CLIENT_IP',
44
- 'HTTP_X_CLUSTER_CLIENT_IP',
45
- 'HTTP_FORWARDED_FOR',
46
- );
47
- foreach($_check as $_key) {
48
- if(isset($_SERVER[$_key])) {
49
- $ips = explode(',', $_SERVER[$_key]);
50
- if(isset($ips[0]) && $this->isPublicIP($ips[0])) {
51
- return $ips[0];
52
- }
53
- }
54
- }
55
- return $_SERVER['REMOTE_ADDR'];
56
- }
57
-
58
- public function encode(&$fields, $key) {
59
- if(!function_exists('base64_encode') || !function_exists('pack') || !function_exists('crc32')) {
60
- return false;
61
- }
62
- $toBeEncoded = array('vendor_authcode', 'product_id', 'tariff_id', 'test_mode', 'uniqid', 'amount');
63
- foreach($toBeEncoded as $_value ) {
64
- $data = $fields[$_value];
65
- if($this->isEmptyString($data)) {
66
- return false;
67
- }
68
- try {
69
- $crc = sprintf('%u', crc32($data));//%u is a must for ccrc32 returns a signed value
70
- $data = $crc."|".$data;
71
- $data = bin2hex($data.$key);
72
- $data = strrev(base64_encode($data));
73
- $fields[$_value] = $data;
74
- }catch(Exception $e) {
75
- return false;
76
- }
77
- }
78
- return true;
79
- }
80
-
81
- public function decode(&$fields, $key) {
82
- if(!function_exists('base64_decode') || !function_exists('pack') || !function_exists('crc32')) {
83
- return false;
84
- }
85
- $toBeEncoded = array('vendor_authcode', 'product_id', 'tariff_id', 'test_mode', 'uniqid', 'amount');
86
- foreach($toBeEncoded as $_value ) {
87
- $data = $fields[$_value];
88
- if($this->isEmptyString($data)) {
89
- return false;
90
- }
91
- try {
92
- $data = base64_decode(strrev($data));
93
- $data = pack("H".strlen($data), $data);
94
- $data = substr($data, 0, stripos($data, $key));
95
- $pos = strpos($data, "|");
96
- if($pos === false) {
97
- return false;
98
- }
99
- $crc = substr($data, 0, $pos);
100
- $value = trim(substr($data, $pos+1));
101
- if( $crc != sprintf('%u', crc32($value)) ) {
102
- return false;
103
- }
104
- $fields[$_value] = $value;
105
- }catch(Exception $e) {
106
- return false;
107
- }
108
- }
109
- return true;
110
- }
111
- public function generateHash($data, $key) {
112
- if(!function_exists('md5') || $this->isEmptyString($key)) {
113
- return false;
114
- }
115
- $hashFields = array('vendor_authcode', 'product_id', 'tariff_id', 'amount', 'test_mode', 'uniqid' );
116
- $str = NULL;
117
- foreach( $hashFields as $_value ) {
118
- if($this->isEmptyString($data[$_value])) {
119
- return false;
120
- }
121
- $str .= $data[$_value];
122
- }
123
- return md5($str . strrev($key));
124
- }
125
-
126
- public function isEmptyString($str) {
127
- $str = trim($str);
128
- return !isset($str[0]);
129
- }
130
-
131
- public function checkHash($response, $key) {
132
- return isset($response['hash2'])
133
- && !$this->isEmptyString($response['hash2'])
134
- && (($tmp = $this->generateHash($response, $key)) !== false)
135
- && ($response['hash2'] == $tmp);
136
- }
137
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/Novalnet/Source/Callbacktypes.php DELETED
@@ -1,35 +0,0 @@
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
-
29
- 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 )', 3 => 'Email' );
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetCc.php DELETED
@@ -1,40 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- class Mage_Novalnet_Model_NovalnetCc extends Mage_Novalnet_Model_NovalnetPciAbstract
29
- {
30
- const PAYMENT_METHOD = 'Credit Card';
31
- protected $_nnPaymentId = 6;
32
- protected $_code = 'novalnetCc';
33
- protected $_formBlockType = 'novalnet/cc_form';
34
- protected $_infoBlockType = 'novalnet/cc_info';
35
-
36
- /**
37
- * Can use this payment method in administration panel?
38
- */
39
- protected $_canUseInternal = false;
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetElvaustria.php DELETED
@@ -1,722 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_Abstract
30
- {
31
- const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
- const XML_URL = 'https://payport.novalnet.de/nn_infoport.xml';
33
- const PAYMENT_METHOD = 'Direct Debit';
34
- const RESPONSE_DELIM_CHAR = '&';
35
- const RESPONSE_CODE_APPROVED = 100;
36
- const BANK_SORTCODE_LENGTH = 3;
37
- const CALLBACK_PIN_LENGTH = 4;
38
- const ACCNO_MIN_LENGTH = 5;
39
-
40
- // are used with _buildRequest and _postRequest
41
- const POST_NORMAL = 'normal';
42
- const POST_CALLBACK = 'callback';
43
- const POST_NEWPIN = 'newpin';
44
- const POST_PINSTATUS = 'pinstatus';
45
- const POST_EMAILSTATUS = 'emailstatus';
46
-
47
- const ISOCODE_FOR_GERMAN = 'DE';
48
-
49
- private $_nnPaymentId = '8';
50
-
51
- /**
52
- * unique internal payment method identifier
53
- * @var string [a-z0-9_]
54
- */
55
- protected $_code = 'novalnetElvaustria';
56
- protected $_formBlockType = 'novalnet/elvaustria_form';
57
- protected $_infoBlockType = 'novalnet/elvaustria_info';
58
-
59
- /**
60
- * Is this payment method a gateway (online auth/charge) ?
61
- */
62
- protected $_isGateway = true;
63
-
64
- /**
65
- * Can authorize online?
66
- */
67
- protected $_canAuthorize = false;
68
-
69
- /**
70
- * Can capture funds online?
71
- */
72
- protected $_canCapture = true;
73
-
74
- /**
75
- * Can capture partial amounts online?
76
- */
77
- protected $_canCapturePartial = true;
78
-
79
- /**
80
- * Can refund online?
81
- */
82
- protected $_canRefund = false;
83
-
84
- /**
85
- * Can void transactions online?
86
- */
87
- protected $_canVoid = false;
88
-
89
- /**
90
- * Can use this payment method in administration panel?
91
- */
92
- protected $_canUseInternal = true;
93
-
94
- /**
95
- * Can show this payment method as an option on checkout payment page?
96
- */
97
- protected $_canUseCheckout = true;
98
-
99
- /**
100
- * Is this payment method suitable for multi-shipping checkout?
101
- */
102
- protected $_canUseForMultishipping = true;
103
-
104
- /**
105
- * Can save credit card information for future processing?
106
- */
107
- protected $_canSaveCc = false;
108
-
109
- public function __construct() {
110
- }
111
-
112
- /**
113
- * Send capture request to gateway
114
- * @param Varien_Object $payment
115
- * @param decimal $amount
116
- * @throws Mage_Core_Exception
117
- */
118
- public function capture(Varien_Object $payment, $amount) {
119
- $methodSession = $this->_getMethodSession();
120
- if( $this->isCallbackTypeCall()) {
121
- $buildrequest = $this->_buildPostBackRequest();
122
- $postrequest = $this->_postRequest($buildrequest, self::POST_NORMAL);
123
- $result = $methodSession->getNnResponseData();
124
- }else {
125
- $request = $this->_buildRequest(self::POST_NORMAL);
126
- $result = $this->_postRequest($request, self::POST_NORMAL);
127
- }
128
-
129
- // Analyze the response from Novalnet
130
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
131
- $this->_unsetMethodSession();
132
- $payment->setStatus(self::STATUS_APPROVED)
133
- ->setLastTransId($result->getTid())
134
- ->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
135
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****')
136
- ;
137
- $quotePayment = $this->_getQuotePaymentById($payment->getNnId());
138
- if($quotePayment) {
139
- $quotePayment->setNnTestorder($result->getTestMode())
140
- ->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
141
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****')
142
- ->save();
143
- }
144
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
145
- } else {
146
- $error = ($result->getStatusDesc()||$result->getStatusMessage())
147
- ? Mage::helper('novalnet')->htmlEscape(utf8_decode($result->getStatusMessage()).utf8_decode($result->getStatusDesc()))
148
- : Mage::helper('novalnet')->__('Error in capturing the payment');
149
- Mage::throwException($error);
150
- }
151
- return $this;
152
- }
153
- /**
154
- * To display the payment method based on the condition
155
- * @param Varien_Object $quote
156
- */
157
- public function isAvailable($quote = null) {
158
- $minOrderCount = trim($this->getConfigData('orderscount'));
159
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
160
- // Load orders and check
161
- $orders = Mage::getResourceModel('sales/order_collection')
162
- ->addAttributeToSelect('*')
163
- ->addAttributeToFilter('customer_id', $customerId)
164
- ->load();
165
- if (count($orders) < $minOrderCount) {
166
- return false;
167
- }else if(time()<$this->_getMethodSession()->getNnAtDisableTime()){
168
- return false;
169
- }
170
- return parent::isAvailable();
171
- }
172
- /**
173
- * To check Novalnet Authentication data
174
- */
175
- private function _checkNnAuthData() {
176
- return strlen($this->getConfigData('merchant_id'))
177
- && strlen($this->getConfigData('auth_code'))
178
- && strlen($this->getConfigData('product_id'))
179
- && strlen($this->getConfigData('tariff_id'));
180
- }
181
-
182
- /**
183
- * To build the request as per the type request
184
- * @param String $type
185
- */
186
- protected function _buildRequest($type=self::POST_NORMAL) {
187
- if( $type == self::POST_NORMAL || $type == self::POST_CALLBACK ) {
188
- $request = Mage::getModel('novalnet/novalnet_request');
189
- $amount = round($this->_getAmount(), 2) * 100;
190
- $billing = $this->_getBillingAddress();
191
-
192
- $this->_assignNnAuthData($request, $amount);
193
- $request->setAmount($amount)
194
- ->setCurrency($this->_getCurrencyCode())
195
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
196
- ->setUseUtf8(1)
197
- ->setfirstName($billing->getFirstname())
198
- ->setLastName($billing->getLastname())
199
- ->setSearchInStreet(1)
200
- ->setStreet(implode(',', $billing->getStreet()))
201
- ->setCity($billing->getCity())
202
- ->setZip($billing->getPostcode())
203
- ->setCountry($billing->getCountry())
204
- ->setLang(strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2)))
205
- ->setTel($billing->getTelephone())
206
- ->setFax($billing->getFax())
207
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
208
- ->setGender('u')
209
- ->setEmail($this->_getCustomerEmail())
210
- ->setBankAccountHolder($this->_getNnAccountHolder())
211
- ->setBankAccount($this->_getNnAccountNumber())
212
- ->setBankCode($this->_getNnBankSortingCode())
213
- ->setOrderNo($this->_getOrderId())
214
- ->setInput1('order_id')
215
- ->setInputval1($this->_getOrderId());
216
-
217
- $infoInstance = $this->getInfoInstance();
218
- $infoInstance->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
219
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****');
220
-
221
- if( $type == self::POST_CALLBACK ) {
222
- if($this->getConfigData('callback') == 1) {
223
- $request->setTel($this->getInfoInstance()->getNnCallbackTel());
224
- $request->setPinByCallback(1);
225
- }else if($this->getConfigData('callback') == 2) {
226
- $request->setMobile($this->getInfoInstance()->getNnCallbackTel());
227
- $request->setPinBySms(1);
228
- }else if($this->getConfigData('callback') == 3){
229
- $request->setReplyEmailCheck(1);
230
- }
231
- }
232
- $request->toLatin1();
233
- return $request;
234
- }else if($type == self::POST_NEWPIN) {
235
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
236
- $request .= '<nnxml><info_request>';
237
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
238
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
239
- $request .= '<request_type>TRANSMIT_PIN_AGAIN</request_type>';
240
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
241
- $request .= '</info_request></nnxml>';
242
- return $request;
243
- }else if($type == self::POST_PINSTATUS) {
244
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
245
- $request .= '<nnxml><info_request>';
246
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
247
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
248
- $request .= '<request_type>PIN_STATUS</request_type>';
249
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
250
- $request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
251
- $request .= '</info_request></nnxml>';
252
- return $request;
253
- }else if($type == self::POST_EMAILSTATUS) {
254
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
255
- $request .= '<nnxml><info_request>';
256
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
257
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
258
- $request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
259
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
260
- $request .= '</info_request></nnxml>';
261
- return $request;
262
- }
263
- }
264
-
265
- /**
266
- * To assign Novalnet Authentication Data
267
- * @param Varien_Object $request
268
- * @param Decimal $amount
269
- */
270
- private function _assignNnAuthData( Varien_Object $request, $amount ) {
271
- $manualCheckAmt = (int)$this->getConfigData('manual_checking_amount');
272
- $request->setVendor(trim($this->getConfigData('merchant_id')))
273
- ->setAuthCode(trim($this->getConfigData('auth_code')))
274
- ->setProduct(
275
- (strlen(trim($this->getConfigData('second_product_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
276
- ?trim($this->getConfigData('second_product_id'))
277
- :trim($this->getConfigData('product_id'))
278
- )
279
- ->setTariff(
280
- (strlen(trim($this->getConfigData('second_tariff_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
281
- ?trim($this->getConfigData('second_tariff_id'))
282
- :trim($this->getConfigData('tariff_id'))
283
- )
284
- ->setTestMode((!$this->getConfigData('live_mode'))? 1: 0)
285
- ->setKey($this->_nnPaymentId);
286
- }
287
-
288
- /**
289
- * To post the request to Novalnet server
290
- * @param Varien_Object $request
291
- * @param String $type
292
- */
293
- protected function _postRequest($request, $type=self::POST_NORMAL)
294
- {
295
- $result = Mage::getModel('novalnet/novalnet_result');
296
- $httpClientConfig = array('maxredirects'=>0);
297
- if(((int)$this->getConfigData( 'gateway_timeout' )) > 0) {
298
- $httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
299
- }
300
- $client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
301
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
302
- $client->setUri( self::XML_URL );
303
- $client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
304
- }else {
305
- $client->setParameterPost( $request->getData() )->setMethod( Varien_Http_Client::POST );
306
- }
307
- $response = $client->request();
308
- if (!$response->isSuccessful()) {
309
- Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
310
- }
311
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
312
- $result = new Varien_Simplexml_Element( $response->getRawBody() );
313
- $result = new Varien_Object( $this->_xmlToArray( $result ) );
314
- }else {
315
- $result->addData( $this->_deformatNvp( $response->getBody() ) );
316
- $result->toUtf8();
317
- }
318
- return $result;
319
- }
320
-
321
- /**
322
- * To build post back request
323
- */
324
- protected function _buildPostBackRequest()
325
- {
326
- $methodSession = $this->_getMethodSession();
327
- $request = Mage::getModel('novalnet/novalnet_request');
328
- $amount = round($this->_getAmount(), 2) * 100;
329
- $this->_assignNnAuthData($request, $amount);
330
- $request->setTid($methodSession->getNnResponseData()->getTid())
331
- ->setOrderNo($this->_getOrderId())
332
- ->setStatus(100);
333
- return $request;
334
- }
335
-
336
- private function _xmlToArray( SimpleXMLElement $xml ) {
337
- $array = array();
338
- if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
339
- $array = $xml->asArray();
340
- }else {
341
- foreach( $xml->children() as $name => $value ) {
342
- if( $value instanceof SimpleXMLElement && count( $value ) ) {
343
- $array[ trim( $name ) ] = $this->_xmlToArray( $value );
344
- }else {
345
- $array[$name] = trim( (string)$value );
346
- }
347
- }
348
- }
349
- return $array;
350
- }
351
-
352
- public function isCallbackTypeCall(){
353
- $total = $this->_getAmount() * 100;
354
- $callBackMinimum = (int)$this->getConfigData('callback_minimum_amount');
355
- $countryCode = strtoupper( $this->_getBillingCountryCode() );
356
-
357
- return $this->_getCheckoutSession()->hasNnCallbackTid()
358
- || ($this->getConfigData('callback')
359
- && ($callBackMinimum?$total>=$callBackMinimum:true)
360
- && ($countryCode?$countryCode==self::ISOCODE_FOR_GERMAN:true))
361
- ;
362
- }
363
-
364
- public function getCallbackConfigData(){
365
- return $this->getConfigData('callback') ;
366
- }
367
-
368
- public function assignData($data)
369
- {
370
- if (!($data instanceof Varien_Object)) {
371
- $data = new Varien_Object($data);
372
- }
373
- $infoInstance = $this->getInfoInstance();
374
- $infoInstance->setNnElvCountry($data->getElvCountry())
375
- ->setNnAccountHolder($data->getAccountHolderAt())
376
- ->setNnAccountNumber(trim($data->getAccountNumberAt()))
377
- ->setNnBankSortingCode(trim($data->getBankSortingCodeAt()))
378
- ->setNnCallbackPin($data->getCallbackPinAt())
379
- ->setNnNewCallbackPin($data->getNewCallbackPinAt())
380
- ->setNnCallbackTel($data->getCallbackTelAt())
381
- ->setNnCallbackEmail($data->getCallbackEmailAt());
382
-
383
- if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
384
- $infoInstance->setCallbackPinValidationFlag( true );
385
- }
386
- return $this;
387
- }
388
-
389
- /**
390
- * To Validate Admin Back End Parameters
391
- */
392
- public function validate() {
393
- parent::validate();
394
- //Validate Backend Parameters
395
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id'))) {
396
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
397
- }if((int)$this->getConfigData('manual_checking_amount')&& (!trim($this->getConfigData('second_product_id')) || !trim($this->getConfigData('second_tariff_id')))) {
398
- Mage::throwException(Mage::helper('novalnet')->__('Required Second Product Tariff').'!');
399
- }
400
- //Customer_id verification
401
- try{
402
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
403
- if($login_check){
404
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
405
- if (empty($customer_no)){
406
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
407
- }
408
- if($customer_no==""){
409
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
410
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
411
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
412
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
413
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
414
- }
415
- }
416
- }catch(Exception $e){
417
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
418
- }
419
- $this->_validateCallbackSession();
420
- $infoInstance = $this->getInfoInstance();
421
- $nnAccountHolder = $infoInstance->getNnAccountHolder();
422
- $nnAccountNumber = preg_replace('/[\-\s]+/', '', $infoInstance->getNnAccountNumber());
423
- $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $infoInstance->getNnBankSortingCode());
424
-
425
- if(preg_match('/[#%\^<>@$=*!]/', $nnAccountHolder)){
426
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid Account Holder Name').'!');
427
- }
428
- if (preg_match("/\D/", $nnAccountNumber)){
429
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.').'!');
430
- }
431
- if (preg_match("/\D/", $nnBankSortingCode)){
432
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.').'!');
433
- }
434
- if (strlen($nnAccountNumber) < self::ACCNO_MIN_LENGTH) {
435
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.').'!');
436
- }
437
- if (strlen($nnBankSortingCode) < self::BANK_SORTCODE_LENGTH) {
438
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.').'!');
439
- }
440
-
441
- if( $infoInstance->getCallbackPinValidationFlag() && $this->_getMethodSession()->getNnCallbackTid() ) {
442
- if( !$infoInstance->getNnNewCallbackPin()
443
- && !preg_match('/^[0-9]+$/', $infoInstance->getNnCallbackPin())
444
- && strlen( $infoInstance->getNnCallbackPin() ) != self::CALLBACK_PIN_LENGTH )
445
- {
446
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid pin code.'));
447
- }
448
- }
449
- // Call for pin generation
450
- if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
451
- if( $this->_getMethodSession()->getNnCallbackTid() ) {
452
- if($infoInstance->getNnNewCallbackPin()) {
453
- $this->regenerateCallbackPin();
454
- }else {
455
- $this->_getMethodSession()
456
- ->setNnCallbackPin($infoInstance->getNnCallbackPin());
457
- }
458
- }else {
459
- $this->generateCallbackPin();
460
- }
461
- }else if($this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()==3){
462
- if(!$this->_getMethodSession()->getNnCallbackTid()) {
463
- $this->generateCallbackEmail();
464
- }
465
- }
466
-
467
- if($this->_isPlaceOrder()){
468
- $this->_validateCallbackProcess();
469
- }
470
- return $this;
471
- }
472
-
473
- /**
474
- * To Save the masking account information
475
- */
476
- public function prepareSave() {
477
- $infoInstance = $this->getInfoInstance();
478
- $t = $infoInstance->getData();
479
- if( $this->_isPlaceOrder() ) {
480
- $infoInstance->setNnAccountNumber(substr($infoInstance->getAccountNumberAt(), 0, -4) . '****' )
481
- ->setNnBankSortingCode(substr($infoInstance->getBankSortingCodeAt(), 0, -4) . '****' );
482
- }
483
- return $this;
484
- }
485
-
486
- public function getTitle() {
487
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
488
- }
489
-
490
- public function getCheckoutRedirectUrl() {
491
- return false;
492
- }
493
-
494
- public function getIsCentinelValidationEnabled() {
495
- return false;
496
- }
497
-
498
- /**
499
- * For Pin by callback method
500
- */
501
- private function generateCallbackPin() {
502
- $request = $this->_buildRequest(self::POST_CALLBACK);
503
- $response = $this->_postRequest($request, self::POST_CALLBACK);
504
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
505
- $this->_getMethodSession()
506
- ->setNnCallbackTid($response->getTid())
507
- ->setNnTestMode($response->getTestMode())
508
- ->setNnCallbackTidTimeStamp(time())
509
- ->setOrderAmount($request->getAmount())
510
- ->setNnCallbackSuccessState(true);
511
- $this->getInfoInstance()->save();
512
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the received PIN code in the text box.');
513
- }else {
514
- $text = Mage::helper('novalnet')->__( utf8_decode($response->getStatusDesc()) );
515
- }
516
- Mage::throwException($text);
517
- }
518
-
519
- private function generateCallbackEmail() {
520
- $request = $this->_buildRequest(self::POST_CALLBACK);
521
- $response = $this->_postRequest($request, self::POST_CALLBACK);
522
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
523
- $this->_getMethodSession()
524
- ->setNnCallbackTid($response->getTid())
525
- ->setNnTestMode($response->getTestMode())
526
- ->setNnCallbackTidTimeStamp(time())
527
- ->setOrderAmount($request->getAmount())
528
- ->setNnCallbackSuccessState(true);
529
- $this->getInfoInstance()->save();
530
- $text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
531
- }else {
532
- $text = Mage::helper('novalnet')->__( utf8_decode($response->getStatusDesc()) );
533
- }
534
- Mage::throwException($text);
535
- }
536
-
537
- private function regenerateCallbackPin() {
538
- $request = $this->_buildRequest(self::POST_NEWPIN);
539
- $response = $this->_postRequest($request, self::POST_NEWPIN);
540
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
541
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the received PIN code in the text box.');
542
- }else {
543
- $text = Mage::helper('novalnet')->__( utf8_decode($response->getStatusMessage()) );//status_message
544
- }
545
- Mage::throwException($text);
546
- }
547
-
548
- private function _deformatNvp($query) {
549
- $deformated = array();
550
- if(strlen($query)){
551
- $tmp = explode(self::RESPONSE_DELIM_CHAR, $query);
552
- foreach($tmp as $k){
553
- $k = explode('=', $k);
554
- $deformated[urldecode($k[0])] = isset($k[1]) ? urldecode($k[1]) : NULL;
555
- }
556
- }
557
- return $deformated;
558
- }
559
- /**
560
- * For Admin orders
561
- */
562
- private function _getQuotePaymentById($id) {
563
- //return $this->_getCheckoutSession()->getQuote()->getPaymentById($id);
564
- $PaymentById = Mage::getSingleton('checkout/session')->getQuote()->getPaymentById($id);
565
- if(!$PaymentById)
566
- return Mage::getSingleton('adminhtml/session_quote')->getQuote()->getPaymentById($id);
567
- else
568
- return $PaymentById;
569
- }
570
-
571
- private function _getCheckoutSession() {
572
- return Mage::getSingleton('checkout/session');
573
- }
574
-
575
- private function _validateCallbackSession() {
576
- $methodSession = $this->_getMethodSession();
577
- if($methodSession->hasNnCallbackTid()) {
578
- if($methodSession->getNnAtDisableTime() && time()>$methodSession->getNnAtDisableTime()) {
579
- $this->_unsetMethodSession();
580
- }elseif( $methodSession->getOrderAmount() != (int)($this->_getAmount()*100) ) {
581
- $this->_unsetMethodSession();
582
- if (!$this->_isPlaceOrder()) {
583
- Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
584
- }
585
- }
586
- }
587
- }
588
-
589
- private function _validateCallbackProcess() {
590
- $methodSession = $this->_getMethodSession();
591
- if($methodSession->getNnCallbackSuccessState()){
592
- if($this->getCallbackConfigData()==3) {
593
- $type=self::POST_EMAILSTATUS;
594
- }elseif($this->getCallbackConfigData()!=3){
595
- $type=self::POST_PINSTATUS;
596
- }
597
- $request = $this->_buildRequest($type);
598
- $result = $this->_postRequest($request, $type);
599
- $result->setTid( $methodSession->getNnCallbackTid() );
600
- $result->setTestMode( $methodSession->getNnTestMode() );
601
-
602
- // Analyze the response from Novalnet
603
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
604
- $methodSession->setNnResponseData($result);
605
- $methodSession->setNnCallbackSuccessState(false);
606
- } else {
607
- if($result->getStatus()=='0529006'){
608
- $methodSession->setNnAtDisableTime(time()+(30*60));
609
- }
610
-
611
- $error = ($result->getStatusDesc()||$result->getStatusMessage())
612
- ? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
613
- : Mage::helper('novalnet')->__('Error in capturing the payment')
614
- ;
615
- Mage::throwException($error);
616
- }
617
- }
618
- }
619
-
620
- private function _getMethodSession() {
621
- $checkoutSession = $this->_getCheckoutSession();
622
- if( !$checkoutSession->hasData( $this->getCode() ) ) {
623
- $checkoutSession->setData( $this->getCode(), new Varien_Object() );
624
- }
625
- return $checkoutSession->getData( $this->getCode() );
626
- }
627
-
628
- private function _unsetMethodSession() {
629
- $this->_getCheckoutSession()->unsetData( $this->getCode() );
630
- return $this;
631
- }
632
-
633
- private function _getNnAccountHolder() {
634
- $info = $this->getInfoInstance();
635
- if ($this->_isPlaceOrder()) {
636
- return $info->getOrder()->getPayment()->getNnAccountHolder();
637
- } else {
638
- return $info->getNnAccountHolder();
639
- }
640
- }
641
-
642
- private function _getNnAccountNumber() {
643
- $info = $this->getInfoInstance();
644
- if ($this->_isPlaceOrder()) {
645
- return $info->getOrder()->getPayment()->getNnAccountNumber();
646
- } else {
647
- return $info->getNnAccountNumber();
648
- }
649
- }
650
-
651
- private function _getNnBankSortingCode() {
652
- $info = $this->getInfoInstance();
653
- if ($this->_isPlaceOrder()) {
654
- return $info->getOrder()->getPayment()->getNnBankSortingCode();
655
- } else {
656
- return $info->getNnBankSortingCode();
657
- }
658
- }
659
-
660
- private function _getOrderId(){
661
- $info = $this->getInfoInstance();
662
- if ($this->_isPlaceOrder()) {
663
- return $info->getOrder()->getIncrementId();
664
- } else {
665
- return true;
666
- }
667
- }
668
-
669
- private function _getAmount() {
670
- $info = $this->getInfoInstance();
671
- if ($this->_isPlaceOrder()) {
672
- return (double)$info->getOrder()->getQuoteBaseGrandTotal();
673
- } else {
674
- return (double)$info->getQuote()->getBaseGrandTotal();
675
- }
676
- }
677
-
678
- private function _getCustomerEmail() {
679
- $info = $this->getInfoInstance();
680
- if ($this->_isPlaceOrder()) {
681
- return $info->getOrder()->getCustomerEmail();
682
- } else {
683
- return $info->getQuote()->getCustomerEmail();
684
- }
685
- }
686
-
687
- private function _getBillingAddress() {
688
- $info = $this->getInfoInstance();
689
- if ($this->_isPlaceOrder()) {
690
- return $info->getOrder()->getBillingAddress();
691
- } else {
692
- return $info->getQuote()->getBillingAddress();
693
- }
694
- }
695
-
696
- private function _getBillingCountryCode() {
697
- $info = $this->getInfoInstance();
698
- if ($this->_isPlaceOrder()) {
699
- return $info->getOrder()->getBillingAddress()->getCountryId();
700
- } else {
701
- return $info->getQuote()->getBillingAddress()->getCountryId();
702
- }
703
- }
704
-
705
- private function _getCurrencyCode(){
706
- $info = $this->getInfoInstance();
707
- if ($this->_isPlaceOrder()) {
708
- return $info->getOrder()->getBaseCurrencyCode();
709
- } else {
710
- return $info->getQuote()->getBaseCurrencyCode();
711
- }
712
- }
713
-
714
- private function _isPlaceOrder() {
715
- $info = $this->getInfoInstance();
716
- if ($info instanceof Mage_Sales_Model_Quote_Payment) {
717
- return false;
718
- } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
719
- return true;
720
- }
721
- }
722
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetElvgerman.php DELETED
@@ -1,733 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Abstract
30
- {
31
- const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
- const XML_URL = 'https://payport.novalnet.de/nn_infoport.xml';
33
- const PAYMENT_METHOD = 'Direct Debit';
34
- const RESPONSE_DELIM_CHAR = '&';
35
- const RESPONSE_CODE_APPROVED = 100;
36
- const BANK_SORTCODE_LENGTH = 3;
37
- const CALLBACK_PIN_LENGTH = 4;
38
- const ACCNO_MIN_LENGTH = 5;
39
-
40
- // are used with _buildRequest and _postRequest
41
- const POST_NORMAL = 'normal';
42
- const POST_CALLBACK = 'callback';
43
- const POST_NEWPIN = 'newpin';
44
- const POST_PINSTATUS = 'pinstatus';
45
- const POST_EMAILSTATUS = 'emailstatus';
46
-
47
- const ISOCODE_FOR_GERMAN = 'DE';
48
-
49
- private $_nnPaymentId = '2';
50
-
51
- /**
52
- * unique internal payment method identifier
53
- *
54
- * @var string [a-z0-9_]
55
- */
56
- protected $_code = 'novalnetElvgerman';
57
- protected $_formBlockType = 'novalnet/elvgerman_form';
58
- protected $_infoBlockType = 'novalnet/elvgerman_info';
59
-
60
- /**
61
- * Is this payment method a gateway (online auth/charge) ?
62
- */
63
- protected $_isGateway = true;
64
-
65
- /**
66
- * Can authorize online?
67
- */
68
- protected $_canAuthorize = false;
69
-
70
- /**
71
- * Can capture funds online?
72
- */
73
- protected $_canCapture = true;
74
-
75
- /**
76
- * Can capture partial amounts online?
77
- */
78
- protected $_canCapturePartial = true;
79
-
80
- /**
81
- * Can refund online?
82
- */
83
- protected $_canRefund = false;
84
-
85
- /**
86
- * Can void transactions online?
87
- */
88
- protected $_canVoid = false;
89
-
90
- /**
91
- * Can use this payment method in administration panel?
92
- */
93
- protected $_canUseInternal = true;
94
-
95
- /**
96
- * Can show this payment method as an option on checkout payment page?
97
- */
98
- protected $_canUseCheckout = true;
99
-
100
- /**
101
- * Is this payment method suitable for multi-shipping checkout?
102
- */
103
- protected $_canUseForMultishipping = true;
104
-
105
- /**
106
- * Can save credit card information for future processing?
107
- */
108
- protected $_canSaveCc = false;
109
-
110
- public function __construct() {
111
- }
112
-
113
- /**
114
- * Send capture request to gateway
115
- * @param Varien_Object $payment
116
- * @param decimal $amount
117
- * @throws Mage_Core_Exception
118
- */
119
- public function capture(Varien_Object $payment, $amount) {
120
- $methodSession = $this->_getMethodSession();
121
- if( $this->isCallbackTypeCall()) {
122
- $buildrequest = $this->_buildPostBackRequest();
123
- $postrequest = $this->_postRequest($buildrequest, self::POST_NORMAL);
124
- $result = $methodSession->getNnResponseData();
125
- }else {
126
- $request = $this->_buildRequest(self::POST_NORMAL);
127
- $result = $this->_postRequest($request, self::POST_NORMAL);
128
- }
129
-
130
- // Analyze the response from Novalnet
131
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
132
- $this->_unsetMethodSession();
133
- $payment->setStatus(self::STATUS_APPROVED)
134
- ->setLastTransId($result->getTid())
135
- ->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
136
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****')
137
- ;
138
- $quotePayment = $this->_getQuotePaymentById($payment->getNnId());
139
- if($quotePayment) {
140
- $quotePayment->setNnTestorder($result->getTestMode())
141
- ->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
142
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****')
143
- ->save()
144
- ;
145
- }
146
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
147
- } else {
148
- $error = ($result->getStatusDesc()||$result->getStatusMessage())
149
- ? Mage::helper('novalnet')->htmlEscape(utf8_decode($result->getStatusMessage()).utf8_decode($result->getStatusDesc()))
150
- : Mage::helper('novalnet')->__('Error in capturing the payment')
151
- ;
152
- Mage::throwException($error);
153
- }
154
- return $this;
155
- }
156
-
157
- /**
158
- * To display the payment method based on the condition
159
- * @param Varien_Object $quote
160
- */
161
- public function isAvailable($quote = null) {
162
-
163
- $minOrderCount = trim($this->getConfigData('orderscount'));
164
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
165
-
166
- // Load orders and check
167
- $orders = Mage::getResourceModel('sales/order_collection')
168
- ->addAttributeToSelect('*')
169
- ->addAttributeToFilter('customer_id', $customerId)
170
- ->load();
171
- if (count($orders) < $minOrderCount) {
172
- return false;
173
- }else if(time()<$this->_getMethodSession()->getNnDeDisableTime()){
174
- return false;
175
- }
176
- return parent::isAvailable();
177
- }
178
-
179
- /**
180
- * To check Novalnet Authentication data
181
- */
182
- private function _checkNnAuthData() {
183
- return strlen($this->getConfigData('merchant_id'))
184
- && strlen($this->getConfigData('auth_code'))
185
- && strlen($this->getConfigData('product_id'))
186
- && strlen($this->getConfigData('tariff_id'))
187
- ;
188
- }
189
-
190
- /**
191
- * To build the request as per the type request
192
- * @param String $type
193
- */
194
- protected function _buildRequest($type=self::POST_NORMAL) {
195
- if( $type == self::POST_NORMAL || $type == self::POST_CALLBACK ) {
196
- $request = Mage::getModel('novalnet/novalnet_request');
197
- $amount = round($this->_getAmount(), 2) * 100;
198
- $billing = $this->_getBillingAddress();
199
-
200
- $this->_assignNnAuthData($request, $amount);
201
- $request->setAmount($amount)
202
- ->setCurrency($this->_getCurrencyCode())
203
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
204
- ->setUseUtf8(1)
205
- ->setfirstName($billing->getFirstname())
206
- ->setLastName($billing->getLastname())
207
- ->setSearchInStreet(1)
208
- ->setStreet(implode(',', $billing->getStreet()))
209
- ->setCity($billing->getCity())
210
- ->setZip($billing->getPostcode())
211
- ->setCountry($billing->getCountry())
212
- ->setLang(strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2)))
213
- ->setTel($billing->getTelephone())
214
- ->setFax($billing->getFax())
215
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
216
- ->setGender('u')
217
- ->setEmail($this->_getCustomerEmail())
218
- ->setBankAccountHolder($this->_getNnAccountHolder())
219
- ->setBankAccount($this->_getNnAccountNumber())
220
- ->setBankCode($this->_getNnBankSortingCode())
221
- ->setAcdc($this->getConfigData('acdc_check'))
222
- ->setOrderNo($this->_getOrderId())
223
- ->setInput1('order_id')
224
- ->setInputval1($this->_getOrderId());
225
-
226
- $infoInstance = $this->getInfoInstance();
227
- $infoInstance->setNnAccountNumber(substr($this->_getNnAccountNumber(),0,-4) . '****')
228
- ->setNnBankSortingCode(substr($this->_getNnBankSortingCode(),0,-4) . '****');
229
-
230
- if( $type == self::POST_CALLBACK ) {
231
- if($this->getConfigData('callback') == 1) {
232
- $request->setTel($this->getInfoInstance()->getNnCallbackTel());
233
- $request->setPinByCallback(1);
234
- }else if($this->getConfigData('callback') == 2) {
235
- $request->setMobile($this->getInfoInstance()->getNnCallbackTel());
236
- $request->setPinBySms(1);
237
- }else if($this->getConfigData('callback') == 3){
238
- $request->setReplyEmailCheck(1);
239
- }
240
- }
241
- $request->toLatin1();
242
- return $request;
243
- }else if($type == self::POST_NEWPIN) {
244
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
245
- $request .= '<nnxml><info_request>';
246
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
247
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
248
- $request .= '<request_type>TRANSMIT_PIN_AGAIN</request_type>';
249
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
250
- $request .= '</info_request></nnxml>';
251
- return $request;
252
- }else if($type == self::POST_PINSTATUS) {
253
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
254
- $request .= '<nnxml><info_request>';
255
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
256
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
257
- $request .= '<request_type>PIN_STATUS</request_type>';
258
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
259
- $request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
260
- $request .= '</info_request></nnxml>';
261
- return $request;
262
- }else if($type == self::POST_EMAILSTATUS) {
263
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
264
- $request .= '<nnxml><info_request>';
265
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
266
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
267
- $request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
268
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
269
- $request .= '</info_request></nnxml>';
270
- return $request;
271
- }
272
- }
273
-
274
- /**
275
- * To assign Novalnet Authentication Data
276
- * @param Varien_Object $request
277
- * @param Decimal $amount
278
- */
279
- private function _assignNnAuthData( Varien_Object $request, $amount ) {
280
- $manualCheckAmt = (int)$this->getConfigData('manual_checking_amount');
281
- $request->setVendor(trim($this->getConfigData('merchant_id')))
282
- ->setAuthCode(trim($this->getConfigData('auth_code')))
283
- ->setProduct(
284
- (strlen(trim($this->getConfigData('second_product_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
285
- ?trim($this->getConfigData('second_product_id'))
286
- :trim($this->getConfigData('product_id'))
287
- )
288
- ->setTariff(
289
- (strlen(trim($this->getConfigData('second_tariff_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
290
- ?trim($this->getConfigData('second_tariff_id'))
291
- :trim($this->getConfigData('tariff_id'))
292
- )
293
- ->setTestMode((!$this->getConfigData('live_mode'))? 1: 0)
294
- ->setKey($this->_nnPaymentId)
295
- ;
296
- }
297
-
298
- /**
299
- * To post the request to Novalnet server
300
- * @param Varien_Object $request
301
- * @param String $type
302
- */
303
- protected function _postRequest($request, $type=self::POST_NORMAL)
304
- {
305
- $result = Mage::getModel('novalnet/novalnet_result');
306
- $httpClientConfig = array('maxredirects'=>0);
307
- if(((int)$this->getConfigData( 'gateway_timeout' )) > 0) {
308
- $httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
309
- }
310
- $client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
311
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
312
- $client->setUri( self::XML_URL );
313
- $client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
314
- }else {
315
- $client->setParameterPost( $request->getData() )->setMethod( Varien_Http_Client::POST );
316
- }
317
- $response = $client->request();
318
- if (!$response->isSuccessful()) {
319
- Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
320
- }
321
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
322
- $result = new Varien_Simplexml_Element( $response->getRawBody() );
323
- $result = new Varien_Object( $this->_xmlToArray( $result ) );
324
- }else {
325
- $result->addData( $this->_deformatNvp( $response->getBody() ) );
326
- $result->toUtf8();
327
- }
328
- return $result;
329
- }
330
-
331
- /**
332
- * To build post back request
333
- */
334
- protected function _buildPostBackRequest()
335
- {
336
- $methodSession = $this->_getMethodSession();
337
- $request = Mage::getModel('novalnet/novalnet_request');
338
- $amount = round($this->_getAmount(), 2) * 100;
339
- $this->_assignNnAuthData($request, $amount);
340
- $request->setTid($methodSession->getNnResponseData()->getTid())
341
- ->setOrderNo($this->_getOrderId())
342
- ->setStatus(100);
343
- return $request;
344
- }
345
-
346
- private function _xmlToArray( SimpleXMLElement $xml ) {
347
- $array = array();
348
- if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
349
- $array = $xml->asArray();
350
- }else {
351
- foreach( $xml->children() as $name => $value ) {
352
- if( $value instanceof SimpleXMLElement && count( $value ) ) {
353
- $array[ trim( $name ) ] = $this->_xmlToArray( $value );
354
- }else {
355
- $array[$name] = trim( (string)$value );
356
- }
357
- }
358
- }
359
- return $array;
360
- }
361
-
362
- public function isCallbackTypeCall(){
363
- $total = $this->_getAmount() * 100;
364
- $callBackMinimum = (int)$this->getConfigData('callback_minimum_amount');
365
- $countryCode = strtoupper( $this->_getBillingCountryCode() );
366
-
367
- return $this->_getCheckoutSession()->hasNnCallbackTid()
368
- || ($this->getConfigData('callback')
369
- && ($callBackMinimum?$total>=$callBackMinimum:true)
370
- && ($countryCode?$countryCode==self::ISOCODE_FOR_GERMAN:true))
371
- ;
372
- }
373
-
374
- public function getCallbackConfigData(){
375
- return $this->getConfigData('callback') ;
376
- }
377
-
378
- public function assignData($data)
379
- {
380
- if (!($data instanceof Varien_Object)) {
381
- $data = new Varien_Object($data);
382
- }
383
- $infoInstance = $this->getInfoInstance();
384
- $infoInstance->setNnElvCountry($data->getElvCountry())
385
- ->setNnAccountHolder($data->getAccountHolder())
386
- ->setNnAccountNumber(trim($data->getAccountNumber()))
387
- ->setNnBankSortingCode(trim($data->getBankSortingCode()))
388
- ->setNnAcdc($data->getAcdc())
389
- ->setNnCallbackPin($data->getCallbackPin())
390
- ->setNnNewCallbackPin($data->getNewCallbackPin())
391
- ->setNnCallbackTel($data->getCallbackTel())
392
- ->setNnCallbackEmailDE($data->getCallbackEmail());
393
- if( $this->getConfigData('acdc_check') ) {
394
- $infoInstance->setAcdcValidationFlag( true );
395
- }
396
- if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
397
- $infoInstance->setCallbackPinValidationFlag( true );
398
- }
399
- return $this;
400
- }
401
-
402
- public function validate() {
403
- parent::validate();
404
- //Validate Backend Parameters
405
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id'))) {
406
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
407
- }if((int)$this->getConfigData('manual_checking_amount')&& (!trim($this->getConfigData('second_product_id')) || !trim($this->getConfigData('second_tariff_id')))) {
408
- Mage::throwException(Mage::helper('novalnet')->__('Required Second Product Tariff').'!');
409
- }
410
- //Customer_id verification
411
- try{
412
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
413
- if($login_check){
414
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
415
- if (empty($customer_no)){
416
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
417
- }
418
- if($customer_no==""){
419
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
420
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
421
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
422
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
423
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
424
- }
425
- }
426
- }catch(Exception $e){
427
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
428
- }
429
- $this->_validateCallbackSession();
430
- $infoInstance = $this->getInfoInstance();
431
- $nnAccountHolder = $infoInstance->getNnAccountHolder();
432
- $nnAccountNumber = preg_replace('/[\-\s]+/', '', $infoInstance->getNnAccountNumber());
433
- $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $infoInstance->getNnBankSortingCode());
434
-
435
- if(preg_match('/[#%\^<>@$=*!]/', $nnAccountHolder)){
436
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid Account Holder Name').'!');
437
- }
438
- if (preg_match("/\D/", $nnAccountNumber)){
439
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.').'!');
440
- }
441
- if (preg_match("/\D/", $nnBankSortingCode)){
442
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.').'!');
443
- }
444
- if (strlen($nnAccountNumber) < self::ACCNO_MIN_LENGTH) {
445
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.').'!');
446
- }
447
- if (strlen($nnBankSortingCode) < self::BANK_SORTCODE_LENGTH) {
448
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.').'!');
449
- }
450
- if ($infoInstance->getAcdcValidationFlag() && !$infoInstance->getNnAcdc()){
451
- Mage::throwException(Mage::helper('novalnet')->__('You must check ACDC'.'!'));
452
- }
453
- if( $infoInstance->getCallbackPinValidationFlag() && $this->_getMethodSession()->getNnCallbackTid() ) {
454
- if( !$infoInstance->getNnNewCallbackPin()
455
- && !preg_match('/^[0-9]+$/', $infoInstance->getNnCallbackPin())
456
- && strlen( $infoInstance->getNnCallbackPin() ) != self::CALLBACK_PIN_LENGTH )
457
- {
458
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid pin code.'));
459
- }
460
- }
461
- // Call for pin generation
462
- if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
463
- if( $this->_getMethodSession()->getNnCallbackTid() ) {
464
- if($infoInstance->getNnNewCallbackPin()) {
465
- $this->regenerateCallbackPin();
466
- }else {
467
- $this->_getMethodSession()
468
- ->setNnCallbackPin($infoInstance->getNnCallbackPin());
469
- }
470
- }else {
471
- $this->generateCallbackPin();
472
- }
473
- }else if($this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()==3){
474
- if(!$this->_getMethodSession()->getNnCallbackTid()) {
475
- $this->generateCallbackEmail();
476
- }
477
- }
478
-
479
- if($this->_isPlaceOrder()){
480
- $this->_validateCallbackProcess();
481
- }
482
- return $this;
483
- }
484
-
485
- public function prepareSave() {
486
- $infoInstance = $this->getInfoInstance();
487
- $t = $infoInstance->getData();
488
- if( $this->_isPlaceOrder() ) {
489
- $infoInstance->setNnAccountNumber(substr($infoInstance->getAccountNumber(), 0, -4) . '****' )
490
- ->setNnBankSortingCode(substr($infoInstance->getBankSortingCode(), 0, -4) . '****' )
491
- ;
492
- }
493
- return $this;
494
- }
495
-
496
- public function getTitle() {
497
- //return $this->getConfigData('title');
498
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
499
- }
500
-
501
- public function getCheckoutRedirectUrl() {
502
- return false;
503
- }
504
-
505
- public function getIsCentinelValidationEnabled() {
506
- return false;
507
- }
508
-
509
- private function generateCallbackPin() {
510
- $request = $this->_buildRequest(self::POST_CALLBACK);
511
- $response = $this->_postRequest($request, self::POST_CALLBACK);
512
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
513
- $this->_getMethodSession()
514
- ->setNnCallbackTid($response->getTid())
515
- ->setNnTestMode($response->getTestMode())
516
- ->setNnCallbackTidTimeStamp(time())
517
- ->setOrderAmount($request->getAmount())
518
- ->setNnCallbackSuccessState(true)
519
- ;
520
- $this->getInfoInstance()->save();
521
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the PIN code received in the text box.');
522
- }else {
523
- $text = Mage::helper('novalnet')->__( utf8_decode($response->getStatusDesc()) );
524
- }
525
- Mage::throwException($text);
526
- }
527
-
528
- private function generateCallbackEmail() {
529
- $request = $this->_buildRequest(self::POST_CALLBACK);
530
- $response = $this->_postRequest($request, self::POST_CALLBACK);
531
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
532
- $this->_getMethodSession()
533
- ->setNnCallbackTid($response->getTid())
534
- ->setNnTestMode($response->getTestMode())
535
- ->setNnCallbackTidTimeStamp(time())
536
- ->setOrderAmount($request->getAmount())
537
- ->setNnCallbackSuccessState(true)
538
- ;
539
- $this->getInfoInstance()->save();
540
- $text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
541
- }else {
542
- $text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
543
- }
544
- Mage::throwException($text);
545
- }
546
-
547
- private function regenerateCallbackPin() {
548
- $request = $this->_buildRequest(self::POST_NEWPIN);
549
- $response = $this->_postRequest($request, self::POST_NEWPIN);
550
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
551
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the PIN code received in the text box.');
552
- }else {
553
- $text = Mage::helper('novalnet')->__( utf8_decode($response->getStatusMessage()) );//status_message
554
- }
555
- Mage::throwException($text);
556
- }
557
-
558
- private function _deformatNvp($query) {
559
- $deformated = array();
560
- if(strlen($query)){
561
- $tmp = explode(self::RESPONSE_DELIM_CHAR, $query);
562
- foreach($tmp as $k){
563
- $k = explode('=', $k);
564
- $deformated[urldecode($k[0])] = isset($k[1]) ? urldecode($k[1]) : NULL;
565
- }
566
- }
567
- return $deformated;
568
- }
569
-
570
- /**
571
- * For Admin orders
572
- */
573
- private function _getQuotePaymentById($id) {
574
- //return $this->_getCheckoutSession()->getQuote()->getPaymentById($id);
575
- $PaymentById = Mage::getSingleton('checkout/session')->getQuote()->getPaymentById($id);
576
- if(!$PaymentById)
577
- return Mage::getSingleton('adminhtml/session_quote')->getQuote()->getPaymentById($id);
578
- else
579
- return $PaymentById;
580
- }
581
-
582
- private function _getCheckoutSession() {
583
- return Mage::getSingleton('checkout/session');
584
- }
585
-
586
- private function _validateCallbackSession() {
587
-
588
- $methodSession = $this->_getMethodSession();
589
- if($methodSession->hasNnCallbackTid()) {
590
- if($methodSession->getNnDeDisableTime() && time()>$methodSession->getNnDeDisableTime()){
591
- $this->_unsetMethodSession();
592
- }elseif( $methodSession->getOrderAmount() != (int)($this->_getAmount()*100) ) {
593
- $this->_unsetMethodSession();
594
- if (!$this->_isPlaceOrder()) {
595
- Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
596
- }
597
- }
598
- }
599
- }
600
-
601
- private function _validateCallbackProcess() {
602
- $methodSession = $this->_getMethodSession();
603
- if($methodSession->getNnCallbackSuccessState()){
604
- if($this->getCallbackConfigData()==3) {
605
- $type=self::POST_EMAILSTATUS;
606
- }elseif($this->getCallbackConfigData()!=3){
607
- $type=self::POST_PINSTATUS;
608
- }
609
- $request = $this->_buildRequest($type);
610
- $result = $this->_postRequest($request, $type);
611
- $result->setTid( $methodSession->getNnCallbackTid() );
612
- $result->setTestMode( $methodSession->getNnTestMode() );
613
-
614
- // Analyze the response from Novalnet
615
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
616
- $methodSession->setNnResponseData($result);
617
- $methodSession->setNnCallbackSuccessState(false);
618
- } else {
619
- if($result->getStatus()=='0529006'){
620
- $methodSession->setNnDeDisableTime(time()+(30*60));
621
- }
622
- $error = ($result->getStatusDesc()||$result->getStatusMessage())
623
- ? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
624
- : Mage::helper('novalnet')->__('Error in capturing the payment')
625
- ;
626
- Mage::throwException($error);
627
- }
628
- }
629
- }
630
-
631
- private function _getMethodSession() {
632
- $checkoutSession = $this->_getCheckoutSession();
633
- if( !$checkoutSession->hasData( $this->getCode() ) ) {
634
- $checkoutSession->setData( $this->getCode(), new Varien_Object() );
635
- }
636
- return $checkoutSession->getData( $this->getCode() );
637
- }
638
-
639
- private function _unsetMethodSession() {
640
- $this->_getCheckoutSession()->unsetData( $this->getCode() );
641
- return $this;
642
- }
643
-
644
- private function _getNnAccountHolder() {
645
- $info = $this->getInfoInstance();
646
- if ($this->_isPlaceOrder()) {
647
- return $info->getOrder()->getPayment()->getNnAccountHolder();
648
- } else {
649
- return $info->getNnAccountHolder();
650
- }
651
- }
652
-
653
- private function _getNnAccountNumber() {
654
- $info = $this->getInfoInstance();
655
- if ($this->_isPlaceOrder()) {
656
- return $info->getOrder()->getPayment()->getNnAccountNumber();
657
- } else {
658
- return $info->getNnAccountNumber();
659
- }
660
- }
661
-
662
- private function _getAmount() {
663
- $info = $this->getInfoInstance();
664
- if ($this->_isPlaceOrder()) {
665
- return (double)$info->getOrder()->getQuoteBaseGrandTotal();
666
- } else {
667
- return (double)$info->getQuote()->getBaseGrandTotal();
668
- }
669
- }
670
-
671
- private function _getNnBankSortingCode() {
672
- $info = $this->getInfoInstance();
673
- if ($this->_isPlaceOrder()) {
674
- return $info->getOrder()->getPayment()->getNnBankSortingCode();
675
- } else {
676
- return $info->getNnBankSortingCode();
677
- }
678
- }
679
-
680
- private function _getOrderId(){
681
- $info = $this->getInfoInstance();
682
- if ($this->_isPlaceOrder()) {
683
- return $info->getOrder()->getIncrementId();
684
- } else {
685
- return true;
686
- }
687
- }
688
-
689
- private function _getCustomerEmail() {
690
- $info = $this->getInfoInstance();
691
- if ($this->_isPlaceOrder()) {
692
- return $info->getOrder()->getCustomerEmail();
693
- } else {
694
- return $info->getQuote()->getCustomerEmail();
695
- }
696
- }
697
-
698
- private function _getBillingAddress() {
699
- $info = $this->getInfoInstance();
700
- if ($this->_isPlaceOrder()) {
701
- return $info->getOrder()->getBillingAddress();
702
- } else {
703
- return $info->getQuote()->getBillingAddress();
704
- }
705
- }
706
-
707
- private function _getBillingCountryCode() {
708
- $info = $this->getInfoInstance();
709
- if ($this->_isPlaceOrder()) {
710
- return $info->getOrder()->getBillingAddress()->getCountryId();
711
- } else {
712
- return $info->getQuote()->getBillingAddress()->getCountryId();
713
- }
714
- }
715
-
716
- private function _getCurrencyCode(){
717
- $info = $this->getInfoInstance();
718
- if ($this->_isPlaceOrder()) {
719
- return $info->getOrder()->getBaseCurrencyCode();
720
- } else {
721
- return $info->getQuote()->getBaseCurrencyCode();
722
- }
723
- }
724
-
725
- private function _isPlaceOrder() {
726
- $info = $this->getInfoInstance();
727
- if ($info instanceof Mage_Sales_Model_Quote_Payment) {
728
- return false;
729
- } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
730
- return true;
731
- }
732
- }
733
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetInvoice.php DELETED
@@ -1,680 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abstract
30
- {
31
- const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
- const XML_URL = 'https://payport.novalnet.de/nn_infoport.xml';
33
- const PAYMENT_METHOD = 'Invoice';
34
- const RESPONSE_DELIM_CHAR = '&';
35
- const RESPONSE_CODE_APPROVED = 100;
36
- const CALLBACK_PIN_LENGTH = 4;
37
-
38
- // are used with _buildRequest and _postRequest
39
- const POST_NORMAL = 'normal';
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
-
47
- private $_nnPaymentId = 27;
48
- /**
49
- * unique internal payment method identifier
50
- *
51
- * @var string [a-z0-9_]
52
- */
53
- protected $_code = 'novalnetInvoice';
54
- protected $_formBlockType = 'novalnet/invoice_form';
55
- protected $_infoBlockType = 'novalnet/invoice_info';
56
-
57
- /**
58
- * Is this payment method a gateway (online auth/charge) ?
59
- */
60
- protected $_isGateway = false;
61
-
62
- /**
63
- * Can authorize online?
64
- */
65
- protected $_canAuthorize = true;
66
-
67
- /**
68
- * Can capture funds online?
69
- */
70
- protected $_canCapture = true; #important; default: false
71
-
72
- /**
73
- * Can capture partial amounts online?
74
- */
75
- protected $_canCapturePartial = false;
76
-
77
- /**
78
- * Can refund online?
79
- */
80
- protected $_canRefund = false;
81
-
82
- /**
83
- * Can void transactions online?
84
- */
85
- protected $_canVoid = false;
86
-
87
- /**
88
- * Can use this payment method in administration panel?
89
- */
90
- protected $_canUseInternal = false;
91
-
92
- /**
93
- * Can show this payment method as an option on checkout payment page?
94
- */
95
- protected $_canUseCheckout = true;
96
-
97
- /**
98
- * Is this payment method suitable for multi-shipping checkout?
99
- */
100
- protected $_canUseForMultishipping = false;
101
-
102
- /**
103
- * Can save credit card information for future processing?
104
- */
105
- protected $_canSaveCc = false;
106
-
107
- protected $_isInitializeNeeded = true;
108
- /**
109
- * To display the payment method based on the condition
110
- * @param Varien_Object $quote
111
- */
112
- public function isAvailable($quote = null) {
113
- $minOrderCount = trim($this->getConfigData('orderscount'));
114
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
115
- // Load orders and check
116
- $orders = Mage::getResourceModel('sales/order_collection')
117
- ->addAttributeToSelect('*')
118
- ->addAttributeToFilter('customer_id', $customerId)
119
- ->load();
120
- if (count($orders) < $minOrderCount) {
121
- return false;
122
- }else if(time()<$this->_getMethodSession()->getNnInvDisableTime()){
123
- return false;
124
- }
125
- return parent::isAvailable();
126
- }
127
- /**
128
- * To check Novalnet Authentication data
129
- */
130
- private function _checkNnAuthData() {
131
- return strlen($this->getConfigData('merchant_id'))
132
- && strlen($this->getConfigData('auth_code'))
133
- && strlen($this->getConfigData('product_id'))
134
- && strlen($this->getConfigData('tariff_id'));
135
- }
136
- /**
137
- * To build the request as per the type request
138
- * @param String $type
139
- */
140
- protected function _buildRequest($type=self::POST_NORMAL) {
141
- if( $type == self::POST_NORMAL || $type == self::POST_CALLBACK ) {
142
- $request = Mage::getModel('novalnet/novalnet_request');
143
- $amount = round($this->_getAmount(), 2) * 100;
144
- $billing = $this->_getBillingAddress();
145
-
146
- $paymentDuration = (int)trim($this->getConfigData('payment_duration'));
147
- $dueDate = $paymentDuration ? date('d.m.Y', strtotime('+' . $paymentDuration . ' days')) : NULL;
148
-
149
- $this->_assignNnAuthData($request, $amount);
150
- $request->setAmount($amount)
151
- ->setCurrency($this->_getCurrencyCode())
152
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
153
- ->setUseUtf8(1)
154
- ->setfirstName($billing->getFirstname())
155
- ->setLastName($billing->getLastname())
156
- ->setSearchInStreet(1)
157
- ->setStreet(implode(',', $billing->getStreet()))
158
- ->setCity($billing->getCity())
159
- ->setZip($billing->getPostcode())
160
- ->setCountry($billing->getCountry())
161
- ->setLang(strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2)))
162
- ->setTel($billing->getTelephone())
163
- ->setFax($billing->getFax())
164
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
165
- ->setGender('u')
166
- ->setEmail($this->_getCustomerEmail())
167
- ->setOrderNo($this->_getOrderId())
168
- ->setInput1('order_id')
169
- ->setInputval1($this->_getOrderId())
170
- ->setInvoiceType(self::PAYMENT_METHOD)
171
- ->setDueDate($dueDate);
172
- $infoInstance = $this->getInfoInstance();
173
- if( $type == self::POST_CALLBACK ) {
174
- if($this->getConfigData('callback') == 1) {
175
- $request->setTel($infoInstance->getNnCallbackTel());
176
- $request->setPinByCallback(1);
177
- }else if($this->getConfigData('callback') == 2) {
178
- $request->setMobile($infoInstance->getNnCallbackTel());
179
- $request->setPinBySms(1);
180
- }else if($this->getConfigData('callback') == 3){
181
- $request->setReplyEmailCheck(1);
182
- }
183
- }else{
184
- $request->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $this->_getOrderId());
185
- }
186
- $request->toLatin1();
187
- return $request;
188
- }else if($type == self::POST_NEWPIN) {
189
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
190
- $request .= '<nnxml><info_request>';
191
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
192
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
193
- $request .= '<request_type>TRANSMIT_PIN_AGAIN</request_type>';
194
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
195
- $request .= '</info_request></nnxml>';
196
- return $request;
197
- }else if($type == self::POST_PINSTATUS) {
198
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
199
- $request .= '<nnxml><info_request>';
200
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
201
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
202
- $request .= '<request_type>PIN_STATUS</request_type>';
203
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
204
- $request .= '<pin>' . $this->_getMethodSession()->getNnCallbackPin() . '</pin>';
205
- $request .= '</info_request></nnxml>';
206
- return $request;
207
- }else if($type == self::POST_EMAILSTATUS) {
208
- $request = '<?xml version="1.0" encoding="UTF-8"?>';
209
- $request .= '<nnxml><info_request>';
210
- $request .= '<vendor_id>' . trim($this->getConfigData( 'merchant_id' )) . '</vendor_id>';
211
- $request .= '<vendor_authcode>' . trim($this->getConfigData( 'auth_code' )) . '</vendor_authcode>';
212
- $request .= '<request_type>REPLY_EMAIL_STATUS</request_type>';
213
- $request .= '<tid>' . $this->_getMethodSession()->getNnCallbackTid() . '</tid>';
214
- $request .= '</info_request></nnxml>';
215
- return $request;
216
- }
217
- }
218
-
219
- /**
220
- * To assign Novalnet Authentication Data
221
- * @param Varien_Object $request
222
- * @param Decimal $amount
223
- */
224
- private function _assignNnAuthData( Varien_Object $request, $amount ) {
225
- $request->setVendor(trim($this->getConfigData('merchant_id')))
226
- ->setAuthCode(trim($this->getConfigData('auth_code')))
227
- ->setProduct(trim($this->getConfigData('product_id')))
228
- ->setTariff(trim($this->getConfigData('tariff_id')))
229
- ->setTestMode((!$this->getConfigData('live_mode'))? 1: 0)
230
- ->setKey($this->_nnPaymentId);
231
-
232
- Mage::getSingleton('checkout/session')->unsNnInvoiceTestOrder();
233
- Mage::getSingleton('checkout/session')->setNnInvoiceTestOrder($request->getTestMode());
234
- }
235
- /**
236
- * To post the request to Novalnet server
237
- * @param Varien_Object $request
238
- * @param String $type
239
- */
240
- protected function _postRequest($request, $type=self::POST_NORMAL)
241
- {
242
- $result = Mage::getModel('novalnet/novalnet_result');
243
- $httpClientConfig = array('maxredirects'=>0);
244
- if(((int)$this->getConfigData( 'gateway_timeout' )) > 0) {
245
- $httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
246
- }
247
- $client = new Varien_Http_Client( self::CGI_URL, $httpClientConfig );
248
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
249
- $client->setUri( self::XML_URL );
250
- $client->setRawData( $request )->setMethod( Varien_Http_Client::POST );
251
- }else {
252
- $client->setParameterPost( $request->getData() )->setMethod( Varien_Http_Client::POST );
253
- }
254
- $response = $client->request();
255
-
256
- if (!$response->isSuccessful()) {
257
- Mage::throwException( Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage()) );
258
- }
259
- if( $type == self::POST_NEWPIN || $type == self::POST_PINSTATUS || $type == self::POST_EMAILSTATUS ) {
260
- $result = new Varien_Simplexml_Element( $response->getRawBody() );
261
- $result = new Varien_Object( $this->_xmlToArray( $result ) );
262
- }else {
263
- $result->addData( $this->_deformatNvp( $response->getBody() ) );
264
- $result->toUtf8();
265
- }
266
- return $result;
267
- }
268
-
269
- private function _xmlToArray( SimpleXMLElement $xml ) {
270
- $array = array();
271
- if( version_compare( Mage::getVersion(), '1.4.0.0', '>=' ) ) {
272
- $array = $xml->asArray();
273
- }else {
274
- foreach( $xml->children() as $name => $value ) {
275
- if( $value instanceof SimpleXMLElement && count( $value ) ) {
276
- $array[ trim( $name ) ] = $this->_xmlToArray( $value );
277
- }else {
278
- $array[$name] = trim( (string)$value );
279
- }
280
- }
281
- }
282
- return $array;
283
- }
284
-
285
- public function isCallbackTypeCall(){
286
- $total = $this->_getAmount() * 100;
287
- $callBackMinimum = (int)$this->getConfigData('callback_minimum_amount');
288
- $countryCode = strtoupper( $this->_getBillingCountryCode() );
289
-
290
- return $this->_getCheckoutSession()->hasNnCallbackTid()
291
- || ($this->getConfigData('callback')
292
- && ($callBackMinimum?$total>=$callBackMinimum:true)
293
- && ($countryCode?$countryCode==self::ISOCODE_FOR_GERMAN:true))
294
- ;
295
- }
296
-
297
- public function getCallbackConfigData(){
298
- return $this->getConfigData('callback') ;
299
- }
300
-
301
- public function assignData($data)
302
- {
303
- if (!($data instanceof Varien_Object)) {
304
- $data = new Varien_Object($data);
305
- }
306
- $infoInstance = $this->getInfoInstance();
307
- $infoInstance->setNnCallbackPin($data->getCallbackPin())
308
- ->setNnNewCallbackPin($data->getNewCallbackPin())
309
- ->setNnCallbackTel($data->getCallbackTel())
310
- ;
311
- if( $this->isCallbackTypeCall() && $this->getCallbackConfigData()!=3) {
312
- $infoInstance->setCallbackPinValidationFlag( true );
313
- }
314
- return $this;
315
- }
316
-
317
- public function validate() {
318
-
319
- $session = Mage::getSingleton('checkout/session');
320
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id'))) {
321
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
322
- }
323
- //Customer_id verification
324
- try{
325
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
326
- if($login_check){
327
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
328
- if (empty($customer_no)){
329
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
330
- }
331
- if($customer_no==""){
332
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
333
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
334
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
335
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
336
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
337
- }
338
- }
339
- }catch(Exception $e){
340
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
341
- }
342
- if(!$this->_isPlaceOrder()){
343
- parent::validate();
344
- $this->_validateCallbackSession();
345
- $infoInstance = $this->getInfoInstance();
346
- if( $infoInstance->getCallbackPinValidationFlag() && $this->_getMethodSession()->getNnCallbackTid() ) {
347
- if( !$infoInstance->getNnNewCallbackPin()
348
- && !preg_match('/^[0-9]+$/', $infoInstance->getNnCallbackPin())
349
- && strlen( $infoInstance->getNnCallbackPin() ) != self::CALLBACK_PIN_LENGTH )
350
- {
351
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid pin code.'));
352
- }
353
- }
354
-
355
- // Call for pin generation
356
- if( $this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()!=3) {
357
- if( $this->_getMethodSession()->getNnCallbackTid() ) {
358
- if($infoInstance->getNnNewCallbackPin()) {
359
- $this->regenerateCallbackPin();
360
- }else {
361
- $this->_getMethodSession()
362
- ->setNnCallbackPin($infoInstance->getNnCallbackPin());
363
- }
364
- }else {
365
- $this->generateCallbackPin();
366
- }
367
-
368
- }else if($this->isCallbackTypeCall() && !$this->_isPlaceOrder() && $this->getCallbackConfigData()==3){
369
- if(!$this->_getMethodSession()->getNnCallbackTid()) {
370
- $this->generateCallbackEmail();
371
- }
372
- }
373
-
374
- }
375
-
376
- if($this->_isPlaceOrder()){
377
- if(!$this->isCallbackTypeCall() && !$session->getInvoiceReqData())
378
- {
379
- $request = $this->_buildRequest(self::POST_NORMAL);
380
- $inputval1 = $this->_getOrderId();
381
- $request->setOrderNo($inputval1)
382
- ->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $inputval1)
383
- ->setInputval1($inputval1);
384
- $response = $this->_postRequest($request, self::POST_NORMAL);
385
- Mage::getSingleton('checkout/session')->setInvoiceReqData($response);
386
- Mage::getSingleton('checkout/session')->setInvoiceReqDataNote($this->_getNote($response));
387
- if($response->getStatus()!='100'){
388
-
389
- $session=Mage::getSingleton('checkout/session');
390
- $session->unsInvoiceReqData()
391
- ->unsInvoiceReqDataNote();
392
- $text = Mage::helper('novalnet')->__($response->getstatus_desc());
393
- Mage::throwException($text);
394
- }
395
- return $this;
396
- }
397
- $this->_validateCallbackProcess();
398
- }
399
- return $this;
400
- }
401
-
402
- public function getTitle() {
403
- //return $this->getConfigData('title');
404
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
405
- }
406
-
407
- public function getCheckoutRedirectUrl() {
408
- return false;
409
- }
410
-
411
- public function getIsCentinelValidationEnabled() {
412
- return false;
413
- }
414
-
415
- private function generateCallbackPin() {
416
- $request = $this->_buildRequest(self::POST_CALLBACK);
417
- $inputval1 = $this->_getIncrementId();
418
- $request->setOrderNo($inputval1)
419
- ->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $inputval1)
420
- ->setInputval1($inputval1);
421
- $response = $this->_postRequest($request, self::POST_CALLBACK);
422
-
423
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
424
-
425
- Mage::getSingleton('checkout/session')->setInvoiceReqData($response);
426
- Mage::getSingleton('checkout/session')->setInvoiceReqDataNote($this->_getNote($response));
427
-
428
- $this->_getMethodSession()
429
- ->setNnCallbackTid($response->getTid())
430
- ->setNnTestMode($response->getTestMode())
431
- ->setNnCallbackTidTimeStamp(time())
432
- ->setNote($this->_getNote($response))
433
- ->setOrderAmount($request->getAmount())
434
- ->setNnCallbackSuccessState(true)
435
- ;
436
- $this->getInfoInstance()->save();
437
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the received PIN code in the text box.');
438
- }else {
439
- $text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
440
- }
441
- Mage::throwException($text);
442
- }
443
-
444
- private function generateCallbackEmail() {
445
- $request = $this->_buildRequest(self::POST_CALLBACK);
446
- $inputval1 = $this->_getIncrementId();
447
-
448
- $request->setOrderNo($inputval1)
449
- ->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $inputval1)
450
- ->setInputval1($inputval1);
451
- $response = $this->_postRequest($request, self::POST_CALLBACK);
452
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
453
-
454
- Mage::getSingleton('checkout/session')->setInvoiceReqData($response);
455
- Mage::getSingleton('checkout/session')->setInvoiceReqDataNote($this->_getNote($response));
456
-
457
- $this->_getMethodSession()
458
- ->setNnCallbackTid($response->getTid())
459
- ->setNnTestMode($response->getTestMode())
460
- ->setNnCallbackTidTimeStamp(time())
461
- ->setNote($this->_getNote($response))
462
- ->setOrderAmount($request->getAmount())
463
- ->setNnCallbackSuccessState(true)
464
- ;
465
- $this->getInfoInstance()->save();
466
- $text = Mage::helper('novalnet')->__('Bitte antworten Sie auf die E-Mail');
467
- }else {
468
- $text = Mage::helper('novalnet')->__( $response->getStatusDesc() );
469
- }
470
- Mage::throwException($text);
471
- }
472
-
473
- private function regenerateCallbackPin() {
474
- $request = $this->_buildRequest(self::POST_NEWPIN);
475
- $response = $this->_postRequest($request, self::POST_NEWPIN);
476
- if( $response->getStatus() == self::RESPONSE_CODE_APPROVED ) {
477
- $text = Mage::helper('novalnet')->__('You receive a call soon! Please enter the received PIN code in the text box.');
478
- }else {
479
- $text = Mage::helper('novalnet')->__( $response->getStatusMessage() );//status_message
480
- }
481
- Mage::throwException($text);
482
- }
483
-
484
- private function _deformatNvp($query) {
485
- $deformated = array();
486
- if(strlen($query)){
487
- $tmp = explode(self::RESPONSE_DELIM_CHAR, $query);
488
- foreach($tmp as $k){
489
- $k = explode('=', $k);
490
- $deformated[urldecode($k[0])] = isset($k[1]) ? urldecode($k[1]) : NULL;
491
- }
492
- }
493
- return $deformated;
494
- }
495
-
496
- private function _getQuotePaymentById($id) {
497
- return $this->_getCheckoutSession()->getQuote()->getPaymentById($id);
498
- }
499
-
500
- private function _validateCallbackSession() {
501
- $methodSession = $this->_getMethodSession();
502
- if($methodSession->hasNnCallbackTid()) {
503
- if($methodSession->getNnInvDisableTime() && time()>$methodSession->getNnInvDisableTime()){
504
- $this->_unsetMethodSession();
505
- }elseif( $methodSession->getOrderAmount() != (int)($this->_getAmount()*100) ) {
506
- $this->_unsetMethodSession();
507
- if (!$this->_isPlaceOrder()) {
508
- Mage::throwException(Mage::helper('payment')->__('Order amount has been changed. Please resubmit the payment method'));
509
- }
510
- }
511
- }
512
- }
513
-
514
- private function _validateCallbackProcess() {
515
- $methodSession = $this->_getMethodSession();
516
- if($methodSession->getNnCallbackSuccessState()){
517
- if($this->getCallbackConfigData()==3) {
518
- $type=self::POST_EMAILSTATUS;
519
- }elseif($this->getCallbackConfigData()!=3){
520
- $type=self::POST_PINSTATUS;
521
- }
522
- $request = $this->_buildRequest($type);
523
-
524
- $result = $this->_postRequest($request, $type);
525
- $result->setTid( $methodSession->getNnCallbackTid() );
526
- $result->setTestMode( $methodSession->getNnTestMode() );
527
-
528
- // Analyze the response from Novalnet
529
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
530
- $methodSession->setNnResponseData($result);
531
- $methodSession->setNnCallbackSuccessState(false);
532
- } else {
533
- if($result->getStatus()=='0529006'){
534
- $methodSession->setNnInvDisableTime(time()+(30*60));
535
- }
536
- $error = ($result->getStatusDesc()||$result->getStatusMessage())
537
- ? Mage::helper('novalnet')->htmlEscape($result->getStatusMessage().$result->getStatusDesc())
538
- : Mage::helper('novalnet')->__('Error in capturing the payment')
539
- ;
540
- Mage::throwException($error);
541
- }
542
- }
543
- }
544
-
545
- private function _getCheckoutSession() {
546
- return Mage::getSingleton('checkout/session');
547
- }
548
-
549
- private function _getMethodSession() {
550
- $checkoutSession = $this->_getCheckoutSession();
551
- if( !$checkoutSession->hasData( $this->getCode() ) ) {
552
- $checkoutSession->setData( $this->getCode(), new Varien_Object() );
553
- }
554
- return $checkoutSession->getData( $this->getCode() );
555
- }
556
-
557
- private function _unsetMethodSession() {
558
- $this->_getCheckoutSession()->unsetData( $this->getCode() );
559
- return $this;
560
- }
561
-
562
- private function _getNote($result)
563
- {
564
- $paymentDuration = (int)trim($this->getConfigData('payment_duration'));
565
- $helper = Mage::helper('novalnet');
566
- $note = NULL;
567
- $note .= "<br /><b>".$helper->__('Please transfer the invoice amount with the following information to our payment provider Novalnet AG')."</b><br />";
568
- $note .= $paymentDuration
569
- ? ($helper->__('Due Date') . ' : <b>' . date('d.m.Y', strtotime('+' . $paymentDuration . ' days')) . "</b><br />")
570
- : NULL
571
- ;
572
- $note .= $helper->__('Account Holder2') . " : <b>NOVALNET AG</b><br />";
573
- $note .= $helper->__('Account Number') . " : <b>" . $result->getInvoiceAccount() . "</b><br />";
574
- $note .= $helper->__('Bank Sorting Code') . " : <b>" . $result->getInvoiceBankcode() . "</b><br />";
575
- $note .= $helper->__('Bank') . ": <b>" . $result->getInvoiceBankname()." ".$result->getInvoiceBankplace()."</b>";
576
- $note .= $helper->__('Amount') . " : <b>" . str_replace('.', ',', $result->getAmount()) . " EUR </b><br />";
577
- $note .= $helper->__('Reference') . " : <b>TID " . $result->getTid() . "</b><br /><br />";
578
- $note .= "<b>".$helper->__('Only for foreign transfers') . ":</b><br />";
579
- $note .= "IBAN : <b> " . $result->getInvoiceIban() . " </b><br />";
580
- $note .= "SWIFT/BIC : <b>" . $result->getInvoiceBic() . " </b><br />";
581
- return $note;
582
- }
583
-
584
- private function _getOrderId(){
585
- $info = $this->getInfoInstance();
586
- if ($this->_isPlaceOrder()) {
587
- return $info->getOrder()->getIncrementId();
588
- } else {
589
- return true;
590
- }
591
- }
592
-
593
- private function _getAmount() {
594
- $info = $this->getInfoInstance();
595
- if ($this->_isPlaceOrder()) {
596
- return (double)$info->getOrder()->getQuoteBaseGrandTotal();
597
- } else {
598
- return (double)$info->getQuote()->getBaseGrandTotal();
599
- }
600
- }
601
-
602
- private function _getCustomerEmail() {
603
- $info = $this->getInfoInstance();
604
- if ($this->_isPlaceOrder()) {
605
- return $info->getOrder()->getCustomerEmail();
606
- } else {
607
- return $info->getQuote()->getCustomerEmail();
608
- }
609
- }
610
-
611
- private function _getBillingAddress() {
612
- $info = $this->getInfoInstance();
613
- if ($this->_isPlaceOrder()) {
614
- return $info->getOrder()->getBillingAddress();
615
- } else {
616
- return $info->getQuote()->getBillingAddress();
617
- }
618
- }
619
-
620
- private function _getBillingCountryCode() {
621
- $info = $this->getInfoInstance();
622
- if ($this->_isPlaceOrder()) {
623
- return $info->getOrder()->getBillingAddress()->getCountryId();
624
- } else {
625
- return $info->getQuote()->getBillingAddress()->getCountryId();
626
- }
627
- }
628
-
629
- private function _getCurrencyCode(){
630
- $info = $this->getInfoInstance();
631
- if ($this->_isPlaceOrder()) {
632
- return $info->getOrder()->getBaseCurrencyCode();
633
- } else {
634
- return $info->getQuote()->getBaseCurrencyCode();
635
- }
636
- }
637
-
638
- private function _isPlaceOrder() {
639
- $info = $this->getInfoInstance();
640
- if ($info instanceof Mage_Sales_Model_Quote_Payment) {
641
- return false;
642
- } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
643
- return true;
644
- }
645
- }
646
-
647
- private function _getIncrementId() {
648
- $dbc_collect_order = Mage::getSingleton('core/resource')->getConnection('core_read');
649
- $magento_version=Mage::getVersion();
650
- $store_id = Mage::app()->getStore()->getId();
651
- if($magento_version<'1.4.1.0'){
652
- $tableSalesOrder = Mage::getSingleton('core/resource')->getTableName('sales_order');
653
-
654
- $result = $dbc_collect_order->query("SELECT `increment_id` FROM `".$tableSalesOrder."` where store_id= ".$store_id." ORDER BY `entity_id` DESC LIMIT 1");
655
- }else{
656
- $tableSalesFlatOrder = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
657
- $result = $dbc_collect_order->query("SELECT `increment_id` FROM `".$tableSalesFlatOrder."` where store_id= ".$store_id." ORDER BY `entity_id` DESC LIMIT 1");
658
- }
659
-
660
- $result_data = $result->fetch(PDO::FETCH_ASSOC);
661
- $order_id_data = $result_data['increment_id'];
662
- if(!$order_id_data){
663
- $last_main_order_id = '100000000';
664
- $inputval1 = $last_main_order_id;
665
- }else{
666
- $last_main_order_id = $order_id_data;
667
- $inputval1 = $last_main_order_id;
668
- }
669
- $IncrementId = $inputval1+1;
670
- return $IncrementId;
671
- }
672
-
673
- public function getOrderPlaceRedirectUrl()
674
- {
675
- $this->_unsetMethodSession();
676
- return Mage::getUrl('novalnet/invoice/invoicefunction');
677
- }
678
-
679
-
680
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetPciAbstract.php DELETED
@@ -1,555 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- class Mage_Novalnet_Model_NovalnetPciAbstract extends Mage_Payment_Model_Method_Abstract
29
- {
30
- const RESPONSE_CODE_APPROVED = 100;
31
- const RESPONSE_CODE_ABORT = 20;
32
- const CGI_URL = 'https://payport.novalnet.de/pci_payport';
33
- /**
34
- * unique internal payment method identifier
35
- *
36
- * @var string [a-z0-9_]
37
- */
38
- protected $_formBlockType = 'novalnet/pci_form';
39
- protected $_infoBlockType = 'novalnet/pci_info';
40
- protected $_redirectBlockType = 'novalnet/pci_redirect';
41
- protected $_formPHTML = 'novalnet/pci/form.phtml';
42
- protected $_infoPHTML = 'novalnet/pci/info.phtml';
43
- protected $_pdfPHTML = 'payment/info/pdf/pci.phtml';
44
- protected $_nnPaymentId;
45
- protected $_code;
46
-
47
- /**
48
- * Is this payment method a gateway (online auth/charge) ?
49
- */
50
- protected $_isGateway = false;
51
-
52
- /**
53
- * Can authorize online?
54
- */
55
- protected $_canAuthorize = true;
56
-
57
- /**
58
- * Can capture funds online?
59
- */
60
- protected $_canCapture = false; #important; default: false
61
-
62
- /**
63
- * Can capture partial amounts online?
64
- */
65
- protected $_canCapturePartial = false;
66
-
67
- /**
68
- * Can refund online?
69
- */
70
- protected $_canRefund = false;
71
-
72
- /**
73
- * Can void transactions online?
74
- */
75
- protected $_canVoid = false;
76
-
77
- /**
78
- * Can use this payment method in administration panel?
79
- */
80
- protected $_canUseInternal = false;
81
-
82
- /**
83
- * Can show this payment method as an option on checkout payment page?
84
- */
85
- protected $_canUseCheckout = true;
86
-
87
- /**
88
- * Is this payment method suitable for multi-shipping checkout?
89
- */
90
- protected $_canUseForMultishipping = false;
91
-
92
- /**
93
- * Can save credit card information for future processing?
94
- */
95
- protected $_canSaveCc = false;
96
-
97
- protected $_isInitializeNeeded = true;
98
-
99
- /**
100
- * Instantiate state and set it to state object
101
- * @param string $paymentAction
102
- * @param Varien_Object
103
- */
104
- public function initialize($paymentAction, $stateObject)
105
- {
106
- }
107
-
108
- public function getRedirectBlockType()
109
- {
110
- return $this->_redirectBlockType;
111
- }
112
-
113
- public function getReturnURL()
114
- {
115
- return Mage::getUrl('novalnet/pci/success', array('_secure' => true));
116
- }
117
-
118
- public function getBookingReference()
119
- {
120
- return $this->getConfigData('booking_reference');
121
- }
122
-
123
- public function getTitle()
124
- {
125
- return $this->getConfigData('title');
126
- }
127
-
128
- /**
129
- * To display the payment method based on the condition
130
- * @param Varien_Object $quote
131
- */
132
- public function isAvailable($quote = null) {
133
-
134
- $minOrderCount = trim($this->getConfigData('orderscount'));
135
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
136
-
137
- // Load orders and check
138
- $orders = Mage::getResourceModel('sales/order_collection')
139
- ->addAttributeToSelect('*')
140
- ->addAttributeToFilter('customer_id', $customerId)
141
- ->load();
142
-
143
- //added
144
- if (count($orders) < $minOrderCount) {
145
- return false;
146
- }
147
- return parent::isAvailable();
148
- }
149
-
150
- public function getFormData()
151
- {
152
- $dataObj = new Varien_Object();
153
-
154
- $dataObj->setPaymentId($this->_nnPaymentId)
155
- ->setNnMethod($this->_code);
156
-
157
- $this->_importNovalnetFormData($dataObj)
158
- ->_importBillingData($dataObj)
159
- ->_importUrlData($dataObj)
160
- ->_importEncodeData($dataObj)
161
- ->_importHashData($dataObj);
162
- return $dataObj;
163
- }
164
-
165
- /**
166
- * To import Novalnet form data
167
- * @param Varien_Object $dataObj
168
- */
169
- public function _importNovalnetFormData($dataObj) {
170
- $pid = trim($this->getConfigData('product_id'));
171
- $tid = trim($this->getConfigData('tariff_id'));
172
- $product2 = trim($this->getConfigData('second_product_id'));
173
- $tariff2 = trim($this->getConfigData('second_tariff_id'));
174
- if($this->_checkPaymentType()) {
175
- $grand_total = Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal();
176
- $amount = (round($grand_total, 2) * 100);
177
- }else{
178
- $order = $this->getInfoInstance()->getOrder();
179
- $amount = (round($order->getBaseGrandTotal(), 2) * 100);
180
- }
181
- $manualCheckAmt = (int)$this->getConfigData('manual_checking_amount');
182
-
183
- if($manualCheckAmt && $amount>=$manualCheckAmt && $product2 && $tariff2) {
184
- $pid = trim($this->getConfigData('second_product_id'));
185
- $tid = trim($this->getConfigData('second_tariff_id'));
186
- }
187
-
188
- $uniqid = uniqid();
189
-
190
- $test_mode = (!$this->getConfigData('live_mode'))? 1: 0;
191
-
192
- $dataObj->setVendorId(trim($this->getConfigData('merchant_id')))
193
- ->setVendorAuthcode(trim($this->getConfigData('auth_code')))
194
- ->setProductId(trim($pid))
195
- ->setTariffId(trim($tid))
196
- ->setUniqid($uniqid)
197
- ->setAmount($amount)
198
- ->setTestMode($test_mode)
199
- ->setPaymentId($this->_nnPaymentId)
200
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
201
- ->setUseUtf8(1);
202
-
203
- return $this;
204
- }
205
-
206
- /**
207
- * To import Billing data
208
- * @param Varien_Object $dataObj
209
- */
210
- public function _importBillingData($dataObj) {
211
- if($this->_checkPaymentType()) {
212
- $billing = Mage::getModel('checkout/session')->getQuote()->getBillingAddress();
213
- $email_first_register = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
214
- $email_address = $billing->getEmail();
215
- if(trim($email_address)=="")
216
- $email_address = $email_first_register;
217
- $dataObj->setCurrency(Mage::app()->getStore()->getCurrentCurrencyCode())
218
- ->setEmail($email_address);
219
-
220
- }else {
221
- $order = $this->getInfoInstance()->getOrder();
222
- $billing = $order->getBillingAddress();
223
- $objQuote = $objQuote = Mage::getModel( 'sales/quote' );
224
- $objQuote->setStoreId($order->getStoreId())->load($order->getQuoteId());
225
- $objQuotePayment = $objQuote->getPayment();
226
- $objQuotePayment->setNnTestOrder((!$this->getConfigData('live_mode'))? 1: 0)->save();
227
- $dataObj->setCurrency($order->getOrderCurrencyCode())
228
- ->setEmail($order->getCustomerEmail());
229
- }
230
- $dataObj->setFirstname($billing->getFirstname())
231
- ->setLastname($billing->getLastname())
232
- ->setStreet($billing->getData('street'))
233
- ->setSearchInStreet(1)
234
- ->setCity($billing->getCity())
235
- ->setZip($billing->getPostcode())
236
- ->setCountryCode($billing->getCountry())
237
- ->setLang(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2))
238
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
239
- ->setTel($billing->getTelephone())
240
- ->setFax($billing->getFax());
241
- return $this;
242
- }
243
-
244
- /**
245
- * To import URL data
246
- * @param Varien_Object $dataObj
247
- */
248
- public function _importUrlData($dataObj) {
249
- if($this->_checkPaymentType()) {
250
- $magento_version=Mage::getVersion();
251
- $dbc_collect_order = Mage::getSingleton('core/resource')->getConnection('core_read');
252
- $store_id = Mage::app()->getStore()->getId();
253
- if($magento_version<'1.4.1.0'){
254
- $tableSalesOrder = Mage::getSingleton('core/resource')->getTableName('sales_order');
255
- $result = $dbc_collect_order->query("SELECT `increment_id` FROM `".$tableSalesOrder."` where store_id= ".$store_id." ORDER BY `entity_id` DESC LIMIT 1");
256
- }else{
257
- $tableSalesFlatOrder = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
258
- $result = $dbc_collect_order->query("SELECT `increment_id` FROM `".$tableSalesFlatOrder."` where store_id= ".$store_id." ORDER BY `entity_id` DESC LIMIT 1");
259
- }
260
- $result_data = $result->fetch(PDO::FETCH_ASSOC);
261
- $order_id_data = $result_data['increment_id'];
262
- if(!$order_id_data)
263
- {
264
- $last_main_order_id = '100000000';
265
- $inputval1 = $last_main_order_id+1;
266
- }
267
- else
268
- {
269
- $last_main_order_id = $order_id_data;
270
- $inputval1 = $last_main_order_id+1;
271
- }
272
- $dataObj->setOrderNo($inputval1)
273
- ->setInputval1($inputval1);
274
- }else {
275
- $order = $this->getInfoInstance()->getOrder();
276
- $dataObj->setOrderNo($order->getRealOrderId())
277
- ->setInputval1($order->getRealOrderId());
278
- }
279
- $dataObj->setSession(Mage::getSingleton('checkout/session')->getSessionId())
280
- ->setReturnUrl($this->getReturnURL())
281
- ->setReturnMethod('POST')
282
- ->setErrorReturnUrl($this->getReturnURL())
283
- ->setErrorReturnMethod('POST')
284
- ->setInput1('order_id')
285
- ->setImplementation('PHP_PCI');
286
-
287
- return $this;
288
- }
289
-
290
- /**
291
- * To get Hash data
292
- * @param Varien_Object $dataObj
293
- */
294
- public function _importHashData($dataObj) {
295
- $hash = Mage::helper('novalnet')->generateHash($dataObj, trim($this->getConfigData('password')));
296
- if($hash == false) {
297
- Mage::getSingleton('core/session')
298
- ->addError('Die Hashfunktionen sind nicht verf&uuml;gbar!');
299
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
300
- Mage::app()->getResponse()->setRedirect($url);
301
- Mage::app()->getResponse()->sendResponse();
302
- exit;
303
- }
304
- $dataObj->setHash($hash);
305
- return $this;
306
- }
307
-
308
- /**
309
- * To get encode data
310
- * @param Varien_Object $dataObj
311
- */
312
- public function _importEncodeData($dataObj) {
313
- $encoding = Mage::helper('novalnet')->encode($dataObj, trim($this->getConfigData('password')));
314
- if($encoding != true) {
315
- Mage::getSingleton('core/session')
316
- ->addError('Die Methoden f&uuml;r die Verarbeitung von Zeichens&auml;tzen sind nicht verf&uuml;gbar!');
317
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
318
- Mage::app()->getResponse()->setRedirect($url);
319
- Mage::app()->getResponse()->sendResponse();
320
- exit;
321
- }
322
- return $this;
323
- }
324
-
325
- /**
326
- * To Validate Admin Back End Parameters
327
- */
328
- public function validate() {
329
- parent::validate();
330
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id')) || !trim($this->getConfigData('password'))) {
331
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
332
- }
333
- if((int)$this->getConfigData('manual_checking_amount')&& (!trim($this->getConfigData('second_product_id')) || !trim($this->getConfigData('second_tariff_id')))) {
334
- Mage::throwException(Mage::helper('novalnet')->__('Required Second Product Tariff').'!');
335
- }
336
- //Customer_id verification
337
- try{
338
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
339
- if($login_check){
340
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
341
- if (empty($customer_no)){
342
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
343
- }
344
- if($customer_no==""){
345
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
346
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
347
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
348
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
349
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
350
- }
351
- }
352
- }catch(Exception $e){
353
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
354
- }
355
- return $this;
356
- }
357
-
358
- /**
359
- * Check status based on server response
360
- * @param Varien_Object $response
361
- * @param Varien_Object $session
362
- */
363
- public function statusCheck($response,$session) {
364
- $status = false;
365
- $dataObj = new Varien_Object($response);
366
-
367
- $order = Mage::getModel('sales/order')
368
- ->loadByIncrementId($dataObj->getOrderId());
369
- $payment = $order->getPayment();
370
-
371
- if(Mage::helper('novalnet')->checkHash($response, trim($this->getConfigData('password')))) {
372
- if ($response['status'] == Mage_Novalnet_Model_NovalnetCcpci::RESPONSE_CODE_APPROVED) {
373
- $status = $this->onSuccess($dataObj,$order,$payment,$session);
374
- } else {
375
- $status = $this->onFailure($dataObj,$order,$payment,$session);
376
- }
377
- }else {
378
-
379
- Mage::getSingleton('core/session')
380
- ->addError(Mage::helper('novalnet')->__('Die Hashfunktionen sind nicht verf&uuml;gbar!'));
381
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
382
- Mage::app()->getResponse()->setRedirect($url);
383
- Mage::app()->getResponse()->sendResponse();
384
- exit;
385
- }
386
- $session->unsNovalnetRealOrderId();
387
- $session->unsNovalnetQuoteId();
388
- return $status;
389
- }
390
-
391
- /**
392
- * On success based on server response
393
- * @param Varien_Object $dataObj
394
- * @param Varien_Object $order
395
- * @param Varien_Object $payment
396
- * @param Varien_Object $session
397
- */
398
- public function onSuccess($dataObj,$order,$payment,$session) {
399
- $payment->setStatus(Mage_Novalnet_Model_NovalnetCcpci::STATUS_SUCCESS)
400
- ->setStatusDescription(Mage::helper('novalnet')->__('Payment was successful.'))
401
- ->setTransactionId($dataObj->getTid())
402
- ->setSuTransactionId($dataObj->getTid())
403
- ->setLastTransId($dataObj->getTid());
404
-
405
- $session->setQuoteId($session->getNovalnetQuoteId());
406
- $session->getQuote()->setIsActive(false)->save();
407
- $order->setPayment($payment);
408
-
409
- $session->unsNnTestOrder();
410
-
411
- if( $dataObj->hasTestMode() ) {
412
- Mage::getModel( 'sales/quote' )
413
- ->load($session->getNovalnetQuoteId())
414
- ->getPayment()
415
- ->setNnComments()
416
- ->setNnTestorder($this->_decode($dataObj->getTestMode(), trim($this->getConfigData('password'))))
417
- ->save();
418
- $session->setpciTestOrder($this->_decode($dataObj->getTestMode(), trim($this->getConfigData('password'))));
419
- }
420
-
421
- if($this->getConfigData('createinvoice') == 1){
422
- if ($this->saveInvoice($order)) {
423
- //$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
424
- }
425
- }
426
-
427
- $order->addStatusToHistory(
428
- $this->getConfigData('order_status'),
429
- Mage::helper('novalnet')->__('Customer successfully returned from Novalnet'),
430
- true
431
- )->setState(Mage_Sales_Model_Order::STATE_PROCESSING)
432
- ->save();
433
-
434
- if ($order->getId()) {
435
- try {
436
- $order->sendNewOrderEmail();
437
- } catch (Exception $e) {
438
- Mage::throwException(Mage::helper('novalnet')->__('Can not send new order email.'));
439
- }
440
- }
441
- $session->unspciTestOrder();
442
- return true;
443
- }
444
-
445
- /**
446
- * On success based on server response
447
- * @param Varien_Object $dataObj
448
- * @param Varien_Object $order
449
- * @param Varien_Object $payment
450
- * @param Varien_Object $session
451
- */
452
- public function onFailure($dataObj,$order,$payment,$session) {
453
- $payment->setStatus(Mage_Novalnet_Model_NovalnetCcpci::STATUS_ERROR);
454
- $payment->setStatusDescription(Mage::helper('novalnet')->__('Payment was fail.'));
455
- $order->setPayment($payment);
456
-
457
- if ($dataObj->getStatus() == 20){
458
- $order->addStatusToHistory(
459
- $order->getStatus(),
460
- Mage::helper('novalnet')->__('Customer aborted payment process'),
461
- true
462
- );
463
-
464
-
465
- } else {
466
- $order->addStatusToHistory(
467
- $order->getStatus(),
468
- Mage::helper('novalnet')->__('Customer was rejected by Novalnet'),
469
- true
470
- );
471
- }
472
- $paystatus = "<b><font color='red'>Payment Failed</font> - ".utf8_decode($dataObj->getStatusText())."</b>";
473
- Mage::getModel( 'sales/quote' )
474
- ->load($session->getNovalnetQuoteId())
475
- ->getPayment()
476
- ->setNnComments($paystatus)
477
- ->save();
478
- $order->cancel();
479
- $order->save();
480
- $order->setState(Mage_Sales_Model_Order::STATE_CANCELED)->save();
481
- Mage::getSingleton('checkout/session')
482
- ->setErrorMessage(utf8_decode($dataObj->getStatusText()));
483
- return false;
484
- }
485
-
486
- /**
487
- * Save invoice for order
488
- * @param Mage_Sales_Model_Order $order
489
- * @return boolean Can save invoice or not
490
- */
491
- protected function saveInvoice (Mage_Sales_Model_Order $order) {
492
- if ($order->canInvoice()) {
493
- $invoice = $order->prepareInvoice();
494
-
495
- $invoice->register();
496
- Mage::getModel('core/resource_transaction')
497
- ->addObject($invoice)
498
- ->addObject($invoice->getOrder())
499
- ->save();
500
-
501
- $invoice->sendEmail(true, '');
502
- return true;
503
- }
504
- return false;
505
- }
506
-
507
- /**
508
- * On success based on server response
509
-
510
-
511
-
512
- * @param String $data
513
- * @param String $pwd
514
- */
515
- public function _decode($data,$pwd)
516
- {
517
- $data = trim($data);
518
- if ($data == '') {return'Error: no data';}
519
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
520
-
521
- try {
522
- $data = base64_decode(strrev($data));
523
- $data = pack("H".strlen($data), $data);
524
- $data = substr($data, 0, stripos($data, $pwd));
525
- $pos = strpos($data, "|");
526
- if ($pos === false){
527
- return("Error: CKSum not found!");
528
- }
529
- $crc = substr($data, 0, $pos);
530
- $value = trim(substr($data, $pos+1));
531
- if ($crc != sprintf('%u', crc32($value))){
532
- return("Error; CKSum invalid!");
533
- }
534
- return $value;
535
- }catch (Exception $e){
536
- echo('Error: '.$e);
537
- }
538
- }
539
- public function getOrderPlaceRedirectUrl()
540
- {
541
- return Mage::getUrl('novalnet/pci/redirect');
542
- }
543
-
544
- public function getCgiUrl() {
545
- return self::CGI_URL;
546
- }
547
-
548
- public function _checkPaymentType() {
549
- if($this->_code == "novalnetCc") {
550
- return true;
551
- }
552
- return false;
553
- }
554
-
555
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetPhonepayment.php DELETED
@@ -1,749 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Model_NovalnetPhonepayment extends Mage_Payment_Model_Method_Abstract
30
- {
31
- const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
- const CGI_URL2= 'https://payport.novalnet.de/nn_infoport.xml';#'nn_infoport_test.xml';
33
- const RESPONSE_DELIM_CHAR = '&';
34
- const RESPONSE_CODE_APPROVED = 100;
35
- const PAYMENT_METHOD = 'PHONEPAYMENT';
36
- const KEY = 18;
37
- const AMOUNT_MIN = 90;
38
- const AMOUNT_MAX = 1000;#10;#todo:
39
- const CURRENCY = 'EUR';
40
- const CODE = 'novalnet_tel';
41
- /**
42
- * unique internal payment method identifier
43
- *
44
- * @var string [a-z0-9_]
45
- */
46
- protected $_code = 'novalnetPhonepayment';
47
- protected $_formBlockType = 'novalnet/phonepayment_form';
48
- protected $_infoBlockType = 'novalnet/phonepayment_info';
49
- protected $code = 'novalnet_tel';
50
- protected $public_title = 'Telefonpayment';
51
- protected $amount = 0;
52
- protected $aBillingAddress = array();
53
- protected $aryResponse = array();
54
- protected $urlparam = '';
55
- protected $text = '';
56
- protected $debug = false;
57
-
58
-
59
- /**
60
- * Is this payment method a gateway (online auth/charge) ?
61
- */
62
- protected $_isGateway = true;
63
-
64
- /**
65
- * Can authorize online?
66
- */
67
- protected $_canAuthorize = false;
68
-
69
- /**
70
- * Can capture funds online?
71
- */
72
- protected $_canCapture = true;
73
-
74
- /**
75
- * Can capture partial amounts online?
76
- */
77
- protected $_canCapturePartial = true;
78
-
79
- /**
80
- * Can refund online?
81
- */
82
- protected $_canRefund = false;
83
-
84
- /**
85
- * Can void transactions online?
86
- */
87
- protected $_canVoid = false;
88
-
89
- /**
90
- * Can use this payment method in administration panel?
91
- */
92
- protected $_canUseInternal = false;
93
-
94
- /**
95
- * Can show this payment method as an option on checkout payment page?
96
- */
97
- protected $_canUseCheckout = true;
98
-
99
- /**
100
- * Is this payment method suitable for multi-shipping checkout?
101
- */
102
- protected $_canUseForMultishipping = true;
103
-
104
- /**
105
- * Can save credit card information for future processing?
106
- */
107
- protected $_canSaveCc = false;
108
-
109
- /**
110
- * Here you will need to implement authorize, capture and void public methods
111
- *
112
- * @see examples of transaction specific public methods such as
113
- * authorize, capture and void in Mage_Paygate_Model_Authorizenet
114
- */
115
- public function authorize(Varien_Object $payment, $amount)
116
- {
117
- return $this;
118
- }
119
- public function capture(Varien_Object $payment, $amount)
120
- {
121
- $error = false;
122
- $payment->setAmount($amount);
123
- $this->debug2($amount, 'magento_capture_amount.txt');
124
-
125
- $order = $payment->getOrder();
126
- $note = $order->getCustomerNote();
127
- if ($note)
128
- {
129
- $note .= '<br />'.Mage::helper('novalnet')->__('Comment').': ';
130
- $note .= $order->getCustomerNote();
131
- }
132
- if ( !$this->getConfigData('live_mode') ){
133
- $note .= '<br /><b>'.strtoupper(Mage::helper('novalnet')->__('Testorder')).'</b>';
134
- }
135
-
136
- $order->setCustomerNote($note);
137
- $order->setCustomerNoteNotify(true);
138
-
139
- $request = $this->_buildRequest($payment);
140
- $this->debug2($request, 'magento_capture_request.txt');
141
- $result = $this->_postRequest($request, $payment);
142
- $this->debug2($result, 'magento_capture_result.txt');
143
- if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
144
- $this->debug2($result, 'magento_capture_resultok.txt');
145
- $payment->setStatus(self::STATUS_APPROVED);
146
- $payment->setLastTransId($result->getTid());
147
- $id = $payment->getNnId();
148
- $quote_payment = $this->getQuote()->getPaymentById($id);
149
- if ($quote_payment)#to avoid error msg. in admin interface
150
- {
151
- $quote_payment->save();
152
- }
153
- }
154
- else {
155
- $this->debug2($result, 'magento_capture_resultnotok.txt');
156
- if ($result->getStatusDesc()) {
157
- $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
158
- }else {
159
- $error = Mage::helper('novalnet')->__('Error in capturing the payment');
160
- }
161
- }
162
-
163
- if ($error !== false) {
164
- $this->debug2($error, 'magento_error.txt');
165
- Mage::throwException($error);
166
- }
167
- return $this;
168
- }
169
- public function refund(Varien_Object $payment, $amount)
170
- {
171
- return $this;
172
- }
173
-
174
- public function void(Varien_Object $payment)
175
- {
176
- return $this;
177
- }
178
- /**
179
- * Prepare request to gateway
180
- *
181
- * @link http://www.authorize.net/support/AIM_guide.pdf
182
- * @param Mage_Sales_Model_Document $order
183
- * @return unknown
184
- */
185
- protected function _saveObject (Varien_Object $payment)
186
- {
187
- $order = $payment->getOrder();
188
- if (!empty($order)) {
189
- $billing = $order->getBillingAddress();
190
- }
191
- }
192
- protected function _buildRequest(Varien_Object $payment)
193
- {
194
- $order = $payment->getOrder();
195
- if (session_is_registered('tid')){
196
- $this->debug2($order, 'magento_order2.txt');
197
- }
198
- $request = Mage::getModel('novalnet/novalnet_request');
199
-
200
- $request->setvendor(trim($this->getConfigData('merchant_id')))
201
- ->setauth_code(trim($this->getConfigData('auth_code')))
202
- ->setproduct(trim($this->getConfigData('product_id')))
203
- ->settariff(trim($this->getConfigData('tariff_id')))
204
- ->settest_mode((!$this->getConfigData('live_mode'))? 1: 0);
205
-
206
- $request->setcurrency($order->getOrderCurrencyCode());
207
-
208
- if($payment->getAmount()){
209
- $request->setamount(round($payment->getAmount(), 2) * 100);
210
- }
211
-
212
- if (!empty($order)) {
213
- $request->setinput1($order->getIncrementId());
214
-
215
- $billing = $order->getBillingAddress();
216
- $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
217
- if (!$billing->getStreet(1)){Mage::throwException(Mage::helper('novalnet')->__('Street missing'));}
218
- if (!empty($billing)) {
219
- if (session_is_registered('tid')){
220
- $this->debug2($billing, 'magento_billing2.txt');
221
- }
222
-
223
- if (!$order->getCustomerEmail())
224
- {
225
- Mage::throwException(Mage::helper('novalnet')->__('Email address missing'));
226
- }
227
-
228
- $request->setfirst_name($billing->getFirstname())
229
- ->setLast_name($billing->getlastname())
230
- ->setstreet($street[0].$street[1].$street[2])
231
- ->setcity($billing->getCity())
232
- ->setzip($billing->getPostcode())
233
- ->setcountry($billing->getCountry())
234
- ->settel($billing->getTelephone())
235
- ->setfax($billing->getFax())
236
- ->setremote_ip(Mage::helper('novalnet')->getRealIpAddr())
237
- ->setgender('u')
238
- ->setemail($order->getCustomerEmail())
239
- ->setInput1('order_id')
240
- ->setOrderNo($this->_getOrderId())
241
- ->setInputval1($this->_getOrderId())
242
- ->setsearch_in_street(1);
243
- }
244
- }
245
- $request->setkey(self::KEY);
246
-
247
- if (session_is_registered('tid')){
248
- $this->urlparam = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
249
- $this->urlparam .= '<nnxml><info_request><vendor_id>'.trim($this->getConfigData('merchant_id')).'</vendor_id>';
250
- $this->urlparam .= '<vendor_authcode>'.trim($this->getConfigData('auth_code')).'</vendor_authcode>';
251
- $this->urlparam .= '<request_type>NOVALTEL_STATUS</request_type><tid>'.$_SESSION['tid'].'</tid>';
252
- $this->urlparam .= '<lang>DE</lang></info_request></nnxml>';
253
- }
254
-
255
- return $request;
256
- }
257
-
258
- protected function _postRequest(Varien_Object $request, Varien_Object $payment=null)
259
- {
260
- $result = Mage::getModel('novalnet/novalnet_result');
261
- $client = new Varien_Http_Client();
262
-
263
- if (!session_is_registered('tid')){#first call
264
- $client->setUri(self::CGI_URL);
265
- }else{#second call
266
- $client->setUri(self::CGI_URL2);
267
- }
268
-
269
- $httpClientConfig = array( 'maxredirects'=>0 );
270
- if( ((int)$this->getConfigData( 'gateway_timeout' )) > 0 ) {
271
- $httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
272
- }
273
- $client->setConfig( $httpClientConfig );
274
-
275
- if (!session_is_registered('tid')){#first call
276
- $request->toLatin1();
277
- $client->setParameterPost($request->getData());
278
- $this->debug2($request->getData(), 'magento_request1.txt');
279
- }else{#secondcall
280
- $client->setHeaders('Content-Type', 'application/atom+xml');
281
- $client->setRawData($this->urlparam);
282
- $this->debug2($this->urlparam, 'magento_request2.txt');
283
- }
284
-
285
- $client->setMethod(Zend_Http_Client::POST);
286
- try {
287
- $method2 = '';
288
- if (session_is_registered('tid')){
289
- $method2 = 'POST';
290
- }
291
- $response = $client->request($method2);
292
- } catch (Exception $e) {
293
- $this->debug2($e->getMessage(), 'magento_exceptionMsg.txt');
294
- $result->setResponseCode(-1)
295
- ->setResponseReasonCode($e->getCode())
296
- ->setResponseReasonText($e->getMessage());
297
- Mage::throwException(
298
- Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
299
- );
300
- }
301
- $responseBody = $response->getBody();
302
-
303
- if (session_is_registered('tid')){#second call
304
- $this->debug2($response, 'magento_response2.txt');
305
- $xml = serialize($response);
306
- $this->debug2($xml, 'magento_xml.txt');
307
-
308
- if (!preg_match('|\<nnxml\>(.+)\</nnxml\>|is', $xml, $matches)){
309
- Mage::throwException(Mage::helper('novalnet')->__('Error in payment gateway').': '.Mage::helper('novalnet')->__('Response contains no XML'));
310
- }
311
-
312
- $xml = $matches[1];
313
- $this->debug2($xml, 'magento_xml_purged.txt');
314
-
315
- $data = $xml; #$response;
316
- if(strstr($data, '<novaltel_status>'))
317
- {
318
- preg_match('/novaltel_status>?([^<]+)/i', $data, $matches);
319
- $aryResponse['status'] = $matches[1];
320
- $result->setStatus($aryResponse['status']);
321
- $this->debug2($aryResponse['status'], 'magento_novaltel_status.txt');
322
-
323
- preg_match('/novaltel_status_message>?([^<]+)/i', $data, $matches);
324
- $aryResponse['status_desc'] = $matches[1];
325
- $result->setStatusDesc($aryResponse['status_desc']);
326
- $result->setTid($_SESSION['tid']);
327
- $this->debug2($aryResponse['status_desc'], 'magento_novaltel_status_desc.txt');
328
-
329
- if ($aryResponse['status']!= 100){
330
- if ($aryResponse['status'] == 18 and isset($_SESSION['novalnet_tel'])){
331
- Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc'])."\n".Mage::helper('novalnet')->__('Did you called this number').': '.preg_replace('/(\d{4})(\d{4})(\d{4})(\d{4})/', "$1 $2 $3 $4", $_SESSION['novalnet_tel']));
332
- }else{
333
- Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc']));
334
- }
335
- }
336
- }
337
- $this->debug2($result, 'magento_result2.txt');
338
- }else {#first call
339
- $this->debug2($response, 'magento_response1.txt');
340
- $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
341
-
342
- if ($r) {
343
- foreach($r as $key => $value)
344
- {
345
- if($value!="")
346
- {
347
- $aryKeyVal = explode("=",$value);
348
- $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
349
- }
350
- }
351
-
352
- if (isset($aryResponse['status'])){
353
- $result->setStatus($aryResponse['status']);
354
- }
355
- if (isset($aryResponse['tid'])){
356
- $result->setTid($aryResponse['tid']);
357
- }
358
-
359
- if (isset($aryResponse['status_desc'])){
360
- $result->setStatusDesc($aryResponse['status_desc']);
361
- }
362
-
363
- if (isset($aryResponse['status']) and $aryResponse['status'] != 100) {
364
- Mage::throwException(Mage::helper('novalnet')->__('Error in payment gateway') .': '.utf8_encode($aryResponse['status_desc']));
365
- }
366
- #$this->debug2($result, 'magento_result1.txt');
367
- } else {
368
- Mage::throwException(Mage::helper('novalnet')->__('Error in payment gateway'));
369
- }
370
- }
371
- $result->toUtf8();
372
- if (session_is_registered('tid')){
373
- $this->debug2($response, 'magento_response2.txt');
374
- $this->debug2($aryResponse, 'magento_aryResponse2.txt');
375
- }
376
- if ($payment){
377
- $this->debug2($payment, 'magento_payment2.txt');
378
- $order = $payment->getOrder();
379
- }
380
-
381
- if ($aryResponse['status'] == 100){
382
- if (session_is_registered('tid')){
383
- session_unregister('tid');
384
- }
385
- if (session_is_registered('novalnet_tel')){
386
- session_unregister('novalnet_tel');
387
- }
388
- }
389
- $this->aryResponse = $aryResponse;
390
- return $result;
391
- }
392
-
393
-
394
- public function assignData($data)
395
- {
396
- if(!session_is_registered('tid')){
397
- $this->debug2($data, 'magento_assignData1.txt');
398
- $addresses = $this->getQuote()->getAllAddresses();
399
- $this->checkAmountAllowed();
400
- $this->aBillingAddress = $this->getBillingAddress($addresses);
401
- $this->debug2($this, 'magento_assignData_this.txt');
402
- $this->getFirstCall();
403
- }else{
404
- $this->debug2($data, 'magento_assignData2.txt');
405
- }
406
-
407
- if (!($data instanceof Varien_Object)) {
408
- $data = new Varien_Object($data);
409
- }
410
- $info=$this->getInfoInstance();
411
-
412
- return $this;
413
- }
414
- /**
415
- * Get checkout
416
- *
417
- * @return Mage_Sales_Model_Quote
418
- */
419
- public function getQuote()
420
- {
421
- if (empty($this->_quote)) {
422
- $this->_quote = $this->getCheckout()->getQuote();
423
- }
424
- return $this->_quote;
425
- }
426
- /**
427
- * Get checkout
428
- *
429
- * @return Mage_Sales_Model_Order
430
- */
431
- public function getCheckout()
432
- {
433
- if (empty($this->_checkout)) {
434
- //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
435
- $this->_checkout = Mage::getSingleton('checkout/session');
436
- }
437
- return $this->_checkout;
438
- }
439
-
440
- public function getTitle() {
441
- //return $this->getConfigData('title');
442
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
443
- }
444
-
445
- public function validate()
446
- {
447
- parent::validate();
448
- $info = $this->getInfoInstance();
449
- return $this;
450
- }
451
- public function isPublicIP($value)
452
- {
453
- if(!$value || count(explode('.',$value))!=4)
454
- {
455
- return false;
456
- }
457
- return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
458
- }
459
-
460
- public function getAmount4Request($amount) {
461
- $orig_amount = $amount;
462
- if(preg_match('/[,.]$/', $amount)) {
463
- $amount = $amount . '00';
464
- }
465
- else if(preg_match('/[,.][0-9]$/', $amount)) {
466
- $amount = $amount . '0';
467
- }
468
-
469
- $amount = round($amount, 2);
470
- $amount = str_replace(array('.', ','), array('',''), $amount);
471
- return$amount;
472
- }
473
- public function getNote($aryResponse)
474
- {
475
- #todo: Kontoinhaber fehlt
476
- $note = Mage::helper('novalnet')->__('Please transfer the amount to following account').":<br /><br />\n\n";
477
-
478
- $note.= Mage::helper('novalnet')->__('Account Holder2').": NOVALNET AG<br />\n";
479
-
480
- $note.= Mage::helper('novalnet')->__('Account Number').": ".$aryResponse['invoice_account']."<br />\n";
481
- $note.= Mage::helper('novalnet')->__('Bank Sorting Code').": ".$aryResponse['invoice_bankcode']."<br />\n";
482
- $note.= Mage::helper('novalnet')->__('Bank').": ".$aryResponse['invoice_bankname'].' Muenchen<br /><br />'."\n\n"; #.$aryResponse['invoice_bankplace']."\n\n";
483
-
484
- $note.= "IBAN: ".$aryResponse['invoice_iban']."<br />\n";
485
- $note.= "SWIFT / BIC: ".$aryResponse['invoice_bic']."<br /><br />\n\n";
486
-
487
- $note.= Mage::helper('novalnet')->__('Amount').": ".str_replace('.', ',', $aryResponse['amount'])." EUR<br />\n";
488
- $note.= Mage::helper('novalnet')->__('Reference').": TID ".$aryResponse['tid']."<br />\n";
489
- $note.= Mage::helper('novalnet')->__('Please note that the Transfer can only be identified with the above mentioned Reference').'.';
490
- return$note;
491
- }
492
-
493
- public function checkAmountAllowed()
494
- {
495
-
496
- $amount = sprintf('%.2f', $this->getQuote()->getGrandTotal()) * 100;
497
- if ($amount >= self::AMOUNT_MIN and $amount <= self::AMOUNT_MAX){
498
- $this->amount = $amount;
499
- return true;
500
- }
501
- Mage::throwException(Mage::helper('novalnet')->__('Amount below 0.90 Euro and above 10.00 Euro is not accepted'));
502
- }
503
- public function debug2($object, $filename, $debug = false)
504
- {
505
- if (!$this->debug and !$debug){return;}
506
- $fh = fopen("/tmp/$filename", 'a+');
507
- if (gettype($object) == 'object' or gettype($object) == 'array'){
508
- fwrite($fh, serialize($object));
509
- }else{
510
- fwrite($fh, $object);
511
- }
512
- fwrite($fh, "<hr />\n");
513
- fclose($fh);
514
- }
515
- public function getFirstCall()
516
- {
517
- $url = 'https://payport.novalnet.de/paygate.jsp';
518
- $request = Mage::getModel('novalnet/novalnet_request');
519
- $request->setvendor($this->getConfigData('merchant_id'))
520
- ->setauth_code($this->getConfigData('auth_code'))
521
- ->setproduct($this->getConfigData('product_id'))
522
- ->settariff($this->getConfigData('tariff_id'));
523
-
524
- $request->setkey(self::KEY);
525
- $request->setcurrency(self::CURRENCY);
526
- $request->setamount($this->amount);
527
-
528
- $request->setfirst_name(utf8_encode($this->aBillingAddress['firstname']))
529
- ->setLast_name(utf8_encode($this->aBillingAddress['lastname']))
530
- ->setstreet(utf8_encode($this->aBillingAddress['street']))
531
- ->setcity(utf8_encode($this->aBillingAddress['city']))
532
- ->setzip($this->aBillingAddress['postcode'])
533
- ->setcountry(utf8_encode($this->aBillingAddress['country']))
534
- ->settel($this->aBillingAddress['telephone'])
535
- ->setfax($this->aBillingAddress['fax'])
536
- ->setremote_ip(Mage::helper('novalnet')->getRealIpAddr())
537
- ->setgender('u')
538
- ->setemail($this->aBillingAddress['email'])
539
- ->setsearch_in_street(1);
540
- #$request->setinvoice_type(self::PAYMENT_METHOD);
541
-
542
- $this->debug2($request, 'magento_getFirstCall_request.txt');
543
- $result = $this->_postRequest($request);
544
-
545
- if(!$this->aryResponse){
546
- Mage::throwException('Params (aryResponse) missing');
547
- }
548
- $data = '';
549
- foreach ($this->aryResponse as $k=>$v){
550
- $data.= "$k=$v&";
551
- }
552
- if (substr($data, -1) == '&'){
553
- $data = substr($data, 0, -1);
554
- }
555
-
556
- if(strstr($data, '<novaltel_status>'))
557
- {
558
- preg_match('/novaltel_status>?([^<]+)/i', $data, $matches);
559
- $aryResponse['status'] = $matches[1];
560
-
561
- preg_match('/novaltel_status_message>?([^<]+)/i', $data, $matches);
562
- $aryResponse['status_desc'] = $matches[1];
563
- }
564
- else
565
- {
566
- #capture the result and message and other parameters from response data '$data' in an array
567
- $aryPaygateResponse = explode('&', $data);
568
- foreach($aryPaygateResponse as $key => $value)
569
- {
570
- if($value!="")
571
- {
572
- $aryKeyVal = explode("=",$value);
573
- $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
574
- }
575
- }
576
- }
577
-
578
- if((session_is_registered('tid') and $_SESSION['tid'] != '') && $aryResponse['status']==100) #### SECOND CALL -> On successful payment ####
579
- {
580
- #### Redirecting the user to the checkout page ####
581
- session_unregister('tid'); #$_SESSION['tid'] = '';
582
- if (session_is_registered('novalnet_tel')){
583
- session_unregister('novalnet_tel');#$_SESSION['novalnet_tel'] = '';
584
- }
585
- }
586
- else #### On payment failure ####
587
- {
588
- $status = '';
589
- $wrong_amount = '';#todo:
590
- if($wrong_amount==1){
591
- $status = '1';
592
- $aryResponse['status_desc'] = 'novalnet_amount_error';}
593
-
594
- ### Passing the Error Response from Novalnet's paygate to payment error ###
595
- elseif($aryResponse['status']==100 && $aryResponse['tid'])
596
- {
597
- $aryResponse['status_desc']='';
598
- if(!session_is_registered('tid')){
599
- session_register('tid');
600
- }
601
- if(!session_is_registered('novalnet_tel')){
602
- session_register('novalnet_tel');
603
- }
604
-
605
- $_SESSION['tid'] = $aryResponse['tid'];
606
- $_SESSION['novalnet_tel'] = $aryResponse['novaltel_number'];
607
- $text = Mage::helper('novalnet')->__('Following steps are required to complete the telephone payment process').':'."\n";
608
- $text .= Mage::helper('novalnet')->__('Step').'1: ';
609
- $text .= Mage::helper('novalnet')->__('Please dial this number').': '.preg_replace('/(\d{4})(\d{4})(\d{4})(\d{4})/', "$1 $2 $3 $4", $_SESSION['novalnet_tel']).".\n";
610
- $text .= Mage::helper('novalnet')->__('Step').'2: ';
611
- $text .= Mage::helper('novalnet')->__('Please wait for the Signal tone and hangup the reciever').'. ';
612
- $text .= Mage::helper('novalnet')->__('Please click on continue after your successive call').'.'."\n";
613
- $text .= '* '. Mage::helper('novalnet')->__('This call costs').' '.($this->amount/100).' Euro ('.Mage::helper('novalnet')->__('inclusive tax').') ';
614
- $text .= Mage::helper('novalnet')->__('and is only possible from German Landline Telefon connection').'! *';
615
-
616
- $this->text = $text;
617
- Mage::throwException($text);#show note for client to call...
618
- }
619
- elseif($aryResponse['status']==18){$error = true;}
620
- elseif($aryResponse['status']==19)
621
- {
622
- if(!session_is_registered('tid')){
623
- $_SESSION['tid'] = '';
624
- }
625
- if(!session_is_registered('novalnet_tel')){
626
- $_SESSION['novalnet_tel'] = '';
627
- }
628
- }
629
- else $status = $aryResponse['status'];
630
-
631
- ### Passing through the Error Response from Novalnet's paygate into order-info ###
632
- #$order->info['comments'] .= '. Novalnet Error Code : '.$aryResponse['status'].', Novalnet Error Message : '.$aryResponse['status_desc'];
633
-
634
- #$payment_error_return = 'payment_error=' . self::CODE. '&error=' . urlencode($aryResponse['status_desc']);
635
- }
636
- if ($aryResponse['status']!= 100){
637
- Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc']));
638
- }
639
- }
640
- public function getBillingAddress($addresses)
641
- {
642
- $this->debug2($addresses, 'magento_addresses.txt');
643
- $addresses = serialize($addresses);
644
- /*"address_type";s:7:"billing";s:5:"email";s:14:"jz@novalnet.de";s:6:"prefix";N;s:9:"firstname";s:7:"Jianguo";s:10:"middlename";N;s:8:"lastname";s:5:"Zhang";s:6:"suffix";N;s:7:"company";s:11:"Novalnet AG";s:6:"street";s:14:"Stiftsbogen 70";s:4:"city";s:8:"M��nchen";s:6:"region";s:6:"Bayern";s:9:"region_id";s:2:"81";s:8:"postcode";s:5:"81375";s:10:"country_id";s:2:"DE";s:9:"telephone";s:12:"089 47027059";s:3:"fax";s:0:"";s:15:"same_as_billing"*/
645
- $t = preg_match('/\"address\_type\"\;s\:7\:\"billing\"(.{100,1000})\"same\_as\_billing\"/is', $addresses, $aMatch);
646
- if (!$aMatch or !$aMatch[1]){
647
- Mage::throwException(Mage::helper('novalnet')->__('Billing Addr. not found'));
648
- }
649
- $foundString = $aMatch[1];
650
- $t = preg_match('/\"firstname\"\;s\:\d*\:\"(.+)\"\;s\:10\:\"middlename\"\;/',$foundString, $aMatch);
651
- if ($aMatch and $aMatch[1]){
652
- $aBillingAddress['firstname'] = $aMatch[1];
653
- }else{
654
- $aBillingAddress['firstname'] = '';
655
- }
656
-
657
- $t = preg_match('/\"lastname\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"suffix\"\;/',$foundString, $aMatch);
658
- if ($aMatch and $aMatch[1]){
659
- $aBillingAddress['lastname'] = $aMatch[1];
660
- }else{
661
- $aBillingAddress['lastname'] = '';
662
- }
663
-
664
- $t = preg_match('/\"street\"\;s\:\d*\:\"(.+)\"\;s\:4\:\"city\"\;/',$foundString, $aMatch);
665
- if ($aMatch and $aMatch[1]){
666
- $aBillingAddress['street'] = $aMatch[1];
667
- }else{
668
- $aBillingAddress['street'] = '';
669
- }
670
-
671
- $t = preg_match('/\"city\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"region\"\;/',$foundString, $aMatch);
672
- if ($aMatch and $aMatch[1]){
673
- $aBillingAddress['city'] = $aMatch[1];
674
- }else{
675
- $aBillingAddress['city'] = '';
676
- }
677
-
678
- $t = preg_match('/\"postcode\"\;s\:\d*\:\"(.+)\"\;s\:10\:\"country_id\"\;/',$foundString, $aMatch);
679
- if ($aMatch and $aMatch[1]){
680
- $aBillingAddress['postcode'] = $aMatch[1];
681
- }else{
682
- $aBillingAddress['postcode'] = '';
683
- }
684
-
685
- $t = preg_match('/\"email\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"prefix\"\;/',$foundString, $aMatch);
686
- if ($aMatch and $aMatch[1]){
687
- $aBillingAddress['email'] = $aMatch[1];
688
- }else{
689
- $aBillingAddress['email'] = '';
690
- }
691
-
692
- $t = preg_match('/\"telephone\"\;s\:\d*\:\"(.+)\"\;s\:3\:\"fax\"\;/',$foundString, $aMatch);
693
- if ($aMatch and $aMatch[1]){
694
- $aBillingAddress['telephone'] = $aMatch[1];
695
- }else{
696
- $aBillingAddress['telephone'] = '';
697
- }
698
-
699
- $t = preg_match('/\"country_id\"\;s\:\d*\:\"(.+)\"\;s\:9\:\"telephone\"\;/',$foundString, $aMatch);
700
- if ($aMatch and $aMatch[1]){
701
- $aBillingAddress['country'] = $aMatch[1];
702
- }else{
703
- $aBillingAddress['country'] = '';
704
- }
705
-
706
- $t = preg_match('/\"fax\"\;s\:\d*\:\"(.+)\"\;s\:15\:\"same_as_billing\"\;/',$foundString, $aMatch);
707
- if ($aMatch and $aMatch[1]){
708
- $aBillingAddress['fax'] = $aMatch[1];
709
- }else{
710
- $aBillingAddress['fax'] = '';
711
- }
712
- return$aBillingAddress;
713
- }
714
-
715
- public function isAvailable($quote=null)
716
- {
717
-
718
- $minOrderCount = trim($this->getConfigData('orderscount'));
719
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
720
-
721
- // Load orders and check
722
- $orders = Mage::getResourceModel('sales/order_collection')
723
- ->addAttributeToSelect('*')
724
- ->addAttributeToFilter('customer_id', $customerId)
725
- ->load();
726
- if (count($orders) < $minOrderCount) {
727
- return false;
728
- }
729
-
730
- if(!is_null($quote) && parent::isAvailable($quote)){
731
- $amount = round($quote->getGrandTotal(), 2);
732
- if( $amount >= 0.9 && $amount <= 10 ) {
733
- return true;
734
- }
735
- }
736
- return false;
737
- }
738
- private function _getOrderId(){
739
- $info = $this->getInfoInstance();
740
- if ($this->_isPlaceOrder()) {
741
- return $info->getOrder()->getIncrementId();
742
- } else {
743
- if (!$info->getQuote()->getReservedOrderId()) {
744
- $info->getQuote()->reserveOrderId();
745
- }
746
- return $info->getQuote()->getReservedOrderId();
747
- }
748
- }
749
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetPrepayment.php DELETED
@@ -1,368 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- class Mage_Novalnet_Model_NovalnetPrepayment extends Mage_Payment_Model_Method_Abstract
30
- {
31
- const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
- const RESPONSE_DELIM_CHAR = '&';
33
- const RESPONSE_CODE_APPROVED = 100;
34
- const PAYMENT_METHOD = 'PREPAYMENT';
35
-
36
- private $_nnPaymentId = '27';
37
-
38
- /**
39
- * unique internal payment method identifier
40
- *
41
- * @var string [a-z0-9_]
42
- */
43
- protected $_code = 'novalnetPrepayment';
44
- protected $_formBlockType = 'novalnet/prepayment_form';
45
- protected $_infoBlockType = 'novalnet/prepayment_info';
46
-
47
- /**
48
- * Is this payment method a gateway (online auth/charge) ?
49
- */
50
- protected $_isGateway = false;
51
-
52
- /**
53
- * Can authorize online?
54
- */
55
- protected $_canAuthorize = true;
56
-
57
- /**
58
- * Can capture funds online?
59
- */
60
- protected $_canCapture = true; #important; default: false
61
-
62
- /**
63
- * Can capture partial amounts online?
64
- */
65
- protected $_canCapturePartial = false;
66
-
67
- /**
68
- * Can refund online?
69
- */
70
- protected $_canRefund = false;
71
-
72
- /**
73
- * Can void transactions online?
74
- */
75
- protected $_canVoid = false;
76
-
77
- /**
78
- * Can use this payment method in administration panel?
79
- */
80
- protected $_canUseInternal = false;
81
-
82
- /**
83
- * Can show this payment method as an option on checkout payment page?
84
- */
85
- protected $_canUseCheckout = true;
86
-
87
- /**
88
- * Is this payment method suitable for multi-shipping checkout?
89
- */
90
- protected $_canUseForMultishipping = false;
91
-
92
- /**
93
- * Can save credit card information for future processing?
94
- */
95
- protected $_canSaveCc = false;
96
-
97
- protected $_isInitializeNeeded = true;
98
- /**
99
- * To post the request to Novalnet server
100
- * @param Varien_Object $request
101
- * @param String $type
102
- */
103
- protected function _postRequest(Varien_Object $request)
104
- {
105
- $result = Mage::getModel('novalnet/novalnet_result');
106
- $request->toLatin1();
107
- $httpClientConfig = array('maxredirects'=>0);
108
- if(((int)$this->getConfigData( 'gateway_timeout' )) > 0) {
109
- $httpClientConfig['timeout'] = (int)$this->getConfigData( 'gateway_timeout' );
110
- }
111
- $client = new Varien_Http_Client(self::CGI_URL, $httpClientConfig);
112
- $client->setParameterPost($request->getData())
113
- ->setMethod(Zend_Http_Client::POST);
114
- $response = $client->request();
115
- if (!$response->isSuccessful()) {
116
- Mage::throwException(
117
- Mage::helper('novalnet')->__('Gateway request error: %s', $response->getMessage())
118
- );
119
- }
120
- $result->addData(
121
- $this->_deformatNvp($response->getBody()));
122
- $result->setNnNote($this->getNote($result));
123
- $result->toUtf8();
124
- return $result;
125
- }
126
- /**
127
- * To display the payment method based on the condition
128
- * @param Varien_Object $quote
129
- */
130
- public function isAvailable($quote = null) {
131
- $minOrderCount = trim($this->getConfigData('orderscount'));
132
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
133
- // Load orders and check
134
- $orders = Mage::getResourceModel('sales/order_collection')
135
- ->addAttributeToSelect('*')
136
- ->addAttributeToFilter('customer_id', $customerId)
137
- ->load();
138
- if (count($orders) < $minOrderCount) {
139
- return false;
140
- }
141
- return parent::isAvailable();
142
- }
143
- /**
144
- * To Validate Admin Back End Parameters
145
- */
146
- public function validate() {
147
- $session = Mage::getSingleton('checkout/session');
148
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id'))) {
149
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
150
- }
151
- //Customer_id verification
152
- try{
153
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
154
- if($login_check){
155
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
156
- if (empty($customer_no)){
157
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
158
- }
159
- if($customer_no==""){
160
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
161
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
162
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
163
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
164
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
165
- }
166
- }
167
- }catch(Exception $e){
168
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
169
- }
170
- if(!$session->getInvoiceReqData() && $this->_isPlaceOrder())
171
- {
172
- $request = $this->_buildNoInvoiceRequest();
173
- $response = $this->_postRequest($request);
174
- Mage::getSingleton('checkout/session')->setInvoiceReqData($response);
175
- Mage::getSingleton('checkout/session')->setInvoiceReqDataNote($this->getNote($response));
176
- $resultdata=Mage::getSingleton('checkout/session')->getInvoiceReqData();
177
- if($response->getStatus()!='100'){
178
-
179
- $session=Mage::getSingleton('checkout/session');
180
- $session->unsInvoiceReqData()
181
- ->unsInvoiceReqDataNote();
182
-
183
- $text = Mage::helper('novalnet')->__($response->getstatus_desc());
184
- Mage::throwException($text);
185
- }
186
- return $this;
187
- }
188
- }
189
- /**
190
- * To build no Invoice Request
191
- */
192
- protected function _buildNoInvoiceRequest() {
193
- $request = Mage::getModel('novalnet/novalnet_request');
194
- $amount = round($this->_getAmount(), 2) * 100;
195
- $billing = $this->_getBillingAddress();
196
-
197
- $paymentDuration = (int)trim($this->getConfigData('payment_duration'));
198
- $dueDate = $paymentDuration ? date('d.m.Y', strtotime('+' . $paymentDuration . ' days')) : NULL;
199
-
200
- $this->_assignNnAuthData($request, $amount);
201
- $request->setAmount($amount)
202
- ->setCurrency($this->_getCurrencyCode())
203
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
204
- ->setUseUtf8(1)
205
- ->setfirstName($billing->getFirstname())
206
- ->setLastName($billing->getLastname())
207
- ->setSearchInStreet(1)
208
- ->setStreet(implode(',', $billing->getStreet()))
209
- ->setCity($billing->getCity())
210
- ->setZip($billing->getPostcode())
211
- ->setCountry($billing->getCountry())
212
- ->setLang(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2))
213
- ->setTel($billing->getTelephone())
214
- ->setFax($billing->getFax())
215
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
216
- ->setGender('u')
217
- ->setEmail($this->_getCustomerEmail())
218
- ->setOrderNo($this->_getOrderId())
219
- ->setInput1('order_id')
220
- ->setInputval1($this->_getOrderId())
221
- ->setInvoiceType(self::PAYMENT_METHOD)
222
- ->setDueDate($dueDate)
223
- ->setInvoiceRef('BNR-'.$this->getConfigData('product_id').'-'. $this->_getOrderId());
224
- return $request;
225
- }
226
-
227
- /**
228
- * Get checkout
229
- *
230
- * @return Mage_Sales_Model_Quote
231
- */
232
- public function getQuote()
233
- {
234
- if (empty($this->_quote)) {
235
- $this->_quote = $this->getCheckout()->getQuote();
236
- }
237
- return $this->_quote;
238
- }
239
- /**
240
- * Get checkout
241
- *
242
- * @return Mage_Sales_Model_Order
243
- */
244
- public function getCheckout()
245
- {
246
- if (empty($this->_checkout)) {
247
- $this->_checkout = Mage::getSingleton('checkout/session');
248
- }
249
- return $this->_checkout;
250
- }
251
-
252
- public function getTitle() {
253
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
254
- }
255
-
256
- public function isPublicIP($value)
257
- {
258
- if(!$value || count(explode('.',$value))!=4)
259
- {
260
- return false;
261
- }
262
- return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
263
- }
264
-
265
- public function getNote($result)
266
- {
267
- $helper = Mage::helper('novalnet');
268
- $note = NULL;
269
- $note .= "<br /><b>".$helper->__('Please transfer the invoice amount with the following information to our payment provider Novalnet AG')."</b><br />";
270
-
271
- $note .= $helper->__('Account Holder2') . " : <b>NOVALNET AG</b><br />";
272
- $note .= $helper->__('Account Number') . " : <b>" . $result->getInvoiceAccount() . "</b><br />";
273
- $note .= $helper->__('Bank Sorting Code') . " : <b>" . $result->getInvoiceBankcode() . "</b><br />";
274
- $note .= $helper->__('Bank') . ": <b>" . $result->getInvoiceBankname()." ".$result->getInvoiceBankplace()."</b>";
275
- $note .= $helper->__('Amount') . " : <b>" . str_replace('.', ',', $result->getAmount()) . " EUR</b><br />";
276
- $note .= $helper->__('Reference') . " : <b>TID " . $result->getTid() . "</b><br /><br />";
277
- $note .= "<b>".$helper->__('Only for foreign transfers') . ":</b><br />";
278
- $note .= "IBAN : <b>" . $result->getInvoiceIban() . "</b><br />";
279
- $note .= "SWIFT/BIC : <b>" . $result->getInvoiceBic() . "</b><br />";
280
- return $note;
281
- }
282
-
283
- private function _deformatNvp($query) {
284
- $deformated = array();
285
- if(strlen($query)){
286
- $tmp = explode(self::RESPONSE_DELIM_CHAR, $query);
287
- foreach($tmp as $k){
288
- $k = explode('=', $k);
289
- $deformated[urldecode($k[0])] = isset($k[1]) ? urldecode($k[1]) : NULL;
290
- }
291
- }
292
- return $deformated;
293
- }
294
-
295
- private function _assignNnAuthData( Varien_Object $request, $amount ) {
296
- $request->setVendor(trim($this->getConfigData('merchant_id')))
297
- ->setAuthCode(trim($this->getConfigData('auth_code')))
298
- ->setProduct(trim($this->getConfigData('product_id')))
299
- ->setTariff(trim($this->getConfigData('tariff_id')))
300
- ->setTestMode((!$this->getConfigData('live_mode'))? 1: 0)
301
- ->setKey($this->_nnPaymentId);
302
- Mage::getSingleton('checkout/session')->unsNnInvoiceTestOrder();
303
- Mage::getSingleton('checkout/session')->setNnInvoiceTestOrder($request->getTestMode());
304
- }
305
-
306
- private function _getCurrencyCode(){
307
- $info = $this->getInfoInstance();
308
- if ($this->_isPlaceOrder()) {
309
- return $info->getOrder()->getBaseCurrencyCode();
310
- } else {
311
- return $info->getQuote()->getBaseCurrencyCode();
312
- }
313
- }
314
-
315
- private function _getCustomerEmail() {
316
- $info = $this->getInfoInstance();
317
- if ($this->_isPlaceOrder()) {
318
- return $info->getOrder()->getCustomerEmail();
319
- } else {
320
- return $info->getQuote()->getCustomerEmail();
321
- }
322
- }
323
-
324
- private function _getOrderId(){
325
- $info = $this->getInfoInstance();
326
- if ($this->_isPlaceOrder()) {
327
- return $info->getOrder()->getIncrementId();
328
- } else {
329
- if (!$info->getQuote()->getReservedOrderId()) {
330
- $info->getQuote()->reserveOrderId();
331
- }
332
- return $info->getQuote()->getReservedOrderId();
333
- }
334
- }
335
-
336
- private function _getAmount() {
337
- $info = $this->getInfoInstance();
338
- if ($this->_isPlaceOrder()) {
339
- return (double)$info->getOrder()->getQuoteBaseGrandTotal();
340
- } else {
341
- return (double)$info->getQuote()->getBaseGrandTotal();
342
- }
343
- }
344
-
345
- private function _isPlaceOrder() {
346
- $info = $this->getInfoInstance();
347
- if ($info instanceof Mage_Sales_Model_Quote_Payment) {
348
- return false;
349
- } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
350
- return true;
351
- }
352
- }
353
-
354
- private function _getBillingAddress() {
355
- $info = $this->getInfoInstance();
356
- if ($this->_isPlaceOrder()) {
357
- return $info->getOrder()->getBillingAddress();
358
- } else {
359
- return $info->getQuote()->getBillingAddress();
360
- }
361
- }
362
-
363
- public function getOrderPlaceRedirectUrl()
364
- {
365
- return Mage::getUrl('novalnet/invoice/invoicefunction');
366
- }
367
-
368
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/NovalnetSecure.php DELETED
@@ -1,279 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
-
30
- class Mage_Novalnet_Model_NovalnetSecure extends Mage_Payment_Model_Method_Cc
31
- {
32
- const CGI_URL = 'https://payport.novalnet.de/global_pci_payport';
33
- const PAYMENT_METHOD = '3D-Secure Credit Card';
34
- const RESPONSE_CODE_APPROVED = 100;
35
- const RESPONSE_CODE_ABORT = 20;
36
-
37
- private $_nnPaymentId = 6;
38
-
39
- /**
40
- * unique internal payment method identifier
41
- *
42
- * @var string [a-z0-9_]
43
- */
44
- protected $_code = 'novalnet_secure';
45
- protected $_formBlockType = 'novalnet/secure_form';
46
- protected $_infoBlockType = 'novalnet/secure_info';
47
-
48
- /**
49
- * Is this payment method a gateway (online auth/charge) ?
50
- */
51
- protected $_isGateway = true;
52
-
53
- /**
54
- * Can authorize online?
55
- */
56
- protected $_canAuthorize = true;
57
-
58
- /**
59
- * Can capture funds online?
60
- */
61
- protected $_canCapture = true;
62
-
63
- /**
64
- * Can capture partial amounts online?
65
- */
66
- protected $_canCapturePartial = true;
67
-
68
- /**
69
- * Can refund online?
70
- */
71
- protected $_canRefund = false;
72
-
73
- /**
74
- * Can void transactions online?
75
- */
76
- protected $_canVoid = false;
77
-
78
- /**
79
- * Can use this payment method in administration panel?
80
- */
81
- protected $_canUseInternal = false;
82
-
83
- /**
84
- * Can show this payment method as an option on checkout payment page?
85
- */
86
- protected $_canUseCheckout = true;
87
-
88
- /**
89
- * Is this payment method suitable for multi-shipping checkout?
90
- */
91
- protected $_canUseForMultishipping = false;
92
-
93
- /**
94
- * Can save credit card information for future processing?
95
- */
96
- protected $_canSaveCc = false;
97
-
98
- protected $_isInitializeNeeded = true;
99
-
100
- /**
101
- * Instantiate state and set it to state object
102
- * @param string $paymentAction
103
- * @param Varien_Object
104
- */
105
- public function initialize($paymentAction, $stateObject)
106
- {
107
- $paymentInfo = $this->getInfoInstance();
108
- $session = Mage::getSingleton('checkout/session');
109
- $session->setCcNo(Mage::helper('core')->encrypt($paymentInfo->getCcNumber()));
110
- $session->setCcCvc2(Mage::helper('core')->encrypt($paymentInfo->getCcCid()));
111
- }
112
-
113
- public function getBookingReference()
114
- {
115
- return $this->getConfigData('booking_reference');
116
- }
117
-
118
- public function getTitle() {
119
- return Mage::helper('novalnet')->__($this->getConfigData('title'));
120
- }
121
- /**
122
- * To display the payment method based on the condition
123
- * @param Varien_Object $quote
124
- */
125
- public function isAvailable($quote = null) {
126
-
127
- $minOrderCount = trim($this->getConfigData('orderscount'));
128
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
129
-
130
- // Load orders and check
131
- $orders = Mage::getResourceModel('sales/order_collection')
132
- ->addAttributeToSelect('*')
133
- ->addAttributeToFilter('customer_id', $customerId)
134
- ->load();
135
- if (count($orders) < $minOrderCount) {
136
- return false;
137
- }
138
- return parent::isAvailable();
139
- }
140
-
141
- public function getFormData()
142
- {
143
- $dataObj = new Varien_Object();
144
- $order = $this->getInfoInstance()->getOrder();
145
- $amount = (round($order->getBaseGrandTotal(), 2) * 100);
146
- $manualCheckAmt = (int)$this->getConfigData('manual_checking_amount');
147
- $billing = $order->getBillingAddress();
148
- $session = Mage::getSingleton('checkout/session');
149
- $payment = $order->getPayment();
150
-
151
- $objQuote = $objQuote = Mage::getModel( 'sales/quote' );
152
- $objQuote->setStoreId($order->getStoreId())->load($order->getQuoteId());
153
- $objQuotePayment = $objQuote->getPayment();
154
- $objQuotePayment->setNnTestOrder((!$this->getConfigData('live_mode'))? 1: 0)->save();
155
-
156
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id')))
157
- {
158
- Mage::getSingleton('core/session')
159
- ->addError('Die Hashfunktionen sind nicht verf&uuml;gbar!');
160
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
161
- Mage::app()->getResponse()->setRedirect($url);
162
- Mage::app()->getResponse()->sendResponse();
163
- exit;
164
- }
165
-
166
- $dataObj->setVendor(trim($this->getConfigData('merchant_id')))
167
- ->setVendorAuthcode(trim($this->getConfigData('auth_code')))
168
- ->setProduct(
169
- (strlen(trim($this->getConfigData('second_product_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
170
- ?trim($this->getConfigData('second_product_id'))
171
- :trim($this->getConfigData('product_id'))
172
- )
173
- ->setTariff(
174
- (strlen(trim($this->getConfigData('second_tariff_id'))) && $manualCheckAmt && $manualCheckAmt<=$amount)
175
- ?trim($this->getConfigData('second_tariff_id'))
176
- :trim($this->getConfigData('tariff_id'))
177
- )
178
- ->setAmount($amount)
179
- ->setKey($this->_nnPaymentId)
180
- ->setTestMode((!$this->getConfigData('live_mode'))? 1: 0)
181
- ->setCurrency($order->getOrderCurrencyCode())
182
- ->setCustomerNo(Mage::getSingleton('customer/session')->getCustomerId())
183
- ->setUseUtf8(1)
184
- ->setFirstName($billing->getFirstname())
185
- ->setLastName($billing->getLastname())
186
- ->setEmail($order->getCustomerEmail())
187
- ->setStreet($billing->getStreet(1))
188
- ->setSearchInStreet(1)
189
- ->setCity($billing->getCity())
190
- ->setZip($billing->getPostcode())
191
- ->setCountryCode($billing->getCountry())
192
- ->setLang(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2))
193
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
194
- ->setTel($billing->getTelephone())
195
- ->setFax($billing->getFax())
196
- ->setCcHolder($payment->getCcOwner())
197
- ->setCcNo(Mage::helper('core')->decrypt($session->getCcNo()))
198
- ->setCcExpMonth($payment->getCcExpMonth())
199
- ->setCcExpYear($payment->getCcExpYear())
200
- ->setCcCvc2(Mage::helper('core')->decrypt($session->getCcCvc2()))
201
- ->setSession($session->getSessionId())
202
- ->setReturnUrl(Mage::getUrl('novalnet/secure/success', array('_secure' => true)))
203
- ->setReturnMethod('POST')
204
- ->setErrorReturnUrl(Mage::getUrl('novalnet/secure/success', array('_secure' => true)))
205
- ->setErrorReturnMethod('POST')
206
- ->setOrderId($order->getRealOrderId())
207
- ->setOrderNo($order->getRealOrderId())
208
- ->setInput1('order_id')
209
- ->setInputval1($order->getRealOrderId());
210
-
211
- $session->unsCcNo()->unsCcCvc2()->unsNnSecureTestOrder();
212
- $session->setNnSecureTestOrder($dataObj->getTestMode());
213
- return $dataObj;
214
- }
215
- /**
216
- * To Validate Admin Back End Parameters
217
- */
218
- public function validate()
219
- {
220
- parent::validate();
221
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id'))) {
222
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
223
- }if((int)$this->getConfigData('manual_checking_amount')&& (!trim($this->getConfigData('second_product_id')) || !trim($this->getConfigData('second_tariff_id')))) {
224
- Mage::throwException(Mage::helper('novalnet')->__('Required Second Product Tariff').'!');
225
- }
226
- $info = $this->getInfoInstance();
227
- if(preg_match('/[#%\^<>@$=*!]/', $info->getCcOwner())){
228
- Mage::throwException(Mage::helper('novalnet')->__('This is not a valid Account Holder Name'));
229
- }
230
- //Customer_id verification
231
- try{
232
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
233
- if($login_check){
234
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
235
- if (empty($customer_no)){
236
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
237
- }
238
- if($customer_no==""){
239
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
240
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
241
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
242
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
243
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
244
- }
245
- }
246
- }catch(Exception $e){
247
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
248
- }
249
- return $this;
250
- }
251
- /**
252
- * To Save the masking account information
253
- */
254
- public function prepareSave()
255
- {
256
- $info = $this->getInfoInstance();
257
- $info->setCcNumberEnc(str_pad(substr($info->getCcNumber(),0,6),strlen($info->getCcNumber())-4,'*',STR_PAD_RIGHT).substr($info->getCcNumber(),-4));
258
- $info->setCcNumber(null)
259
- ->setCcCid(null);
260
- return $this;
261
- }
262
- public function getOrderPlaceRedirectUrl()
263
- {
264
- return Mage::getUrl('novalnet/secure/redirect');
265
- }
266
-
267
- public function getCgiUrl() {
268
- return self::CGI_URL;
269
- }
270
-
271
- public function isPublicIP($value)
272
- {
273
- if(!$value || count(explode('.',$value))!=4)
274
- {
275
- return false;
276
- }
277
- return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
278
- }
279
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/Model/Observer.php DELETED
@@ -1,112 +0,0 @@
1
- <?php
2
-
3
-
4
- class Mage_Novalnet_Model_Observer extends Mage_Payment_Model_Method_Abstract
5
- {
6
-
7
- const PAYMENT_METHOD = 'Credit Card';
8
- protected $_nnPaymentId = 6;
9
- protected $_code = 'novalnetCc';
10
-
11
-
12
-
13
- /**
14
- * Instantiate state and set it to state object
15
- * @param string $paymentAction
16
- * @param Varien_Object
17
- */
18
-
19
- public function getReturnURL()
20
- {
21
- return Mage::getUrl('novalnet/pci/success', array('_secure' => true));
22
- }
23
-
24
- public function getFormData($observer)
25
- {
26
-
27
- $check_active = $this->getConfigData('active');
28
- $dataObj = new Varien_Object();
29
- $dataObj->setCheckActive($check_active);
30
- if($check_active=='1')
31
- {
32
-
33
- $paymentid = $this->_nnPaymentId;
34
- $vendorid = $this->getConfigData('merchant_id');
35
- $vendorAuthcode = $this->getConfigData('auth_code');
36
- $pid = $this->getConfigData('product_id');
37
- $tid = $this->getConfigData('tariff_id');
38
- $uniqid = uniqid();
39
- $product2 = $this->getConfigData('second_product_id');
40
- $tariff2 = $this->getConfigData('second_tariff_id');
41
- $manualCheckAmt = (int)$this->getConfigData('manual_checking_amount');
42
- $test_mode = (!$this->getConfigData('live_mode'))? 1: 0;
43
- $password = $this->getConfigData('password');
44
- $order_status = $this->getConfigData('order_status');
45
- $createinvoice = $this->getConfigData('createinvoice');
46
-
47
- $returnURL = $this->getReturnURL();
48
- $returnmethod = 'POST';
49
- $errorreturnURL = $this->getReturnURL();
50
- $errorreturnmethod = 'POST';
51
- $input1 = 'order_id';
52
- $Implementation = 'PHP_PCI';
53
- $sessionid = Mage::getSingleton('checkout/session')->getSessionId();
54
-
55
-
56
- $dataObj->setCheckActive($check_active)
57
- ->setPaymentId($paymentid)
58
- ->setVendorAuthcode($vendorAuthcode)
59
- ->setVendorId($vendorid)
60
- ->setVendorAuthcode($vendorAuthcode)
61
- ->setProductId($pid)
62
- ->setTariffId($tid)
63
- ->setProductId2($product2)
64
- ->setTariffId2($tariff2)
65
- ->setManualCheckAmt($manualCheckAmt)
66
- ->setUniqid($uniqid)
67
- ->setTestMode($test_mode)
68
- ->setPassword($password)
69
- ->setLang(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2))
70
- ->setRemoteIp(Mage::helper('novalnet')->getRealIpAddr())
71
- ->setSessionId($sessionid)
72
- ->setReturnUrl($returnURL)
73
- ->setReturnMethod($returnmethod)
74
- ->setErrorReturnUrl($errorreturnURL)
75
- ->setErrorReturnMethod($errorreturnmethod)
76
- ->setInput1($input1)
77
- ->setImplementation($Implementation)
78
- ->setOrderStatus($order_status)
79
- ->setCreateInvoice($createinvoice);
80
-
81
- }
82
-
83
- $session=Mage::getSingleton('checkout/session')->setNnDataValue($dataObj);
84
-
85
- }
86
-
87
- /*
88
- * To Set the Order Status for CCiframe during redirection .
89
- *
90
- */
91
-
92
- public function SaveOrderStatus($observer)
93
- {
94
- $result = Mage::helper('core')->jsonDecode($observer->getEvent()->getData('controller_action')->getResponse()->getBody());
95
- if(trim($result['error'])=='' && $result['error']!=true) {
96
- $paymentmethod=Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getCode();
97
- if($paymentmethod == 'novalnetCc')
98
- {
99
- $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
100
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
101
- $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
102
- ->addStatusToHistory(
103
- Mage_Sales_Model_Order::STATE_HOLDED,
104
- Mage::helper('novalnet')->__('Customer was redirected to Novalnet'),
105
- true
106
- )->save();
107
- }
108
- }
109
- }
110
- }
111
-
112
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/controllers/InvoiceController.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- class Mage_Novalnet_InvoiceController extends Mage_Core_Controller_Front_Action
3
- {
4
- public function invoicefunctionAction()
5
- {
6
- $session=Mage::getSingleton('checkout/session');
7
-
8
- $resultdata=$session->getInvoiceReqData();
9
- $resultnote=$session->getInvoiceReqDataNote();
10
-
11
- $last_order_id=$session->getLastRealOrderId();
12
- $order = Mage::getModel('sales/order')->loadByIncrementId($last_order_id);
13
-
14
- $payment = $order->getPayment();
15
- $payment->setStatusDescription(Mage::helper('novalnet')->__('Payment was successful.'))
16
- ->setTransactionId($resultdata->getTid())
17
- ->setSuTransactionId($resultdata->getTid())
18
- ->setLastTransId($resultdata->getTid())
19
- ->setNote($resultnote);
20
- $order->setPayment($payment)
21
- ->save();
22
-
23
- if( $resultdata->hasTestMode() ) {
24
- Mage::getModel( 'sales/quote' )
25
- ->load($session->getQuoteId())
26
- ->getPayment()
27
- ->setNnComments($resultnote)
28
- ->setNnTestorder($resultdata->getTestMode())
29
- ->save();
30
- $session->setInvTestOrder($resultdata->getTestMode());
31
- }
32
-
33
- if ($order->getId()) {
34
- $order->sendNewOrderEmail();
35
- }
36
- $session->unsInvoiceReqData()
37
- ->unsInvoiceReqDataNote()
38
- ->unsInvTestOrder();
39
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/success");
40
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
41
- Mage::app()->getResponse()->setRedirect($url);
42
- Mage::app()->getResponse()->sendResponse();
43
- exit;
44
- }
45
-
46
- protected function saveInvoice (Mage_Sales_Model_Order $order) {
47
- if ($order->canInvoice()) {
48
- $invoice = $order->prepareInvoice();
49
-
50
- $invoice->register();
51
- Mage::getModel('core/resource_transaction')
52
- ->addObject($invoice)
53
- ->addObject($invoice->getOrder())
54
- ->save();
55
-
56
- $invoice->sendEmail(true, '');
57
- return true;
58
- }
59
-
60
- return false;
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/controllers/PciController.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- class Mage_Novalnet_PciController extends Mage_Core_Controller_Front_Action
3
- {
4
- protected $_responseText;
5
-
6
- protected function _expireAjax()
7
- {
8
- if (!$this->getCheckout()->getQuote()->hasItems()) {
9
- $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
10
- exit;
11
- }
12
- }
13
- /**
14
- * Get singleton of Checkout Session Model
15
- * @return Mage_Checkout_Model_Session
16
- */
17
- public function getCheckout()
18
- {
19
- return Mage::getSingleton('checkout/session');
20
- }
21
-
22
- /**
23
- * when customer select novalnet payment method
24
- */
25
- public function redirectAction()
26
- {
27
- $session = $this->getCheckout();
28
- $session->setNovalnetQuoteId($session->getQuoteId())
29
- ->setNovalnetRealOrderId($session->getLastRealOrderId());
30
- $order = Mage::getModel('sales/order')
31
- ->loadByIncrementId($session->getLastRealOrderId());
32
- $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
33
- ->addStatusToHistory(
34
- Mage_Sales_Model_Order::STATE_HOLDED, #$order->getStatus(),
35
- Mage::helper('novalnet')->__('Customer was redirected to Novalnet'),
36
- true
37
- )->save();
38
-
39
- $this->getResponse()->setBody(
40
- $this->getLayout()
41
- ->createBlock($order->getPayment()->getMethodInstance()->getRedirectBlockType())
42
- ->setOrder($order)
43
- ->toHtml()
44
- );
45
- $session->unsQuoteId();
46
- }
47
- /**
48
- * novalnet returns POST variables to this action
49
- */
50
- public function successAction()
51
- {
52
- if ($this->_checkReturnedPost()) {
53
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/success");
54
- Mage::getSingleton('core/session')->addSuccess($this->_responseText);
55
- } else {
56
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
57
- Mage::getSingleton('core/session')->addError($this->_responseText);
58
- Mage::getSingleton('checkout/session')->setErrorMessage(html_entity_decode($this->_responseText));
59
- }
60
- Mage::app()->getResponse()->setRedirect($url);
61
- Mage::app()->getResponse()->sendResponse();
62
- exit;
63
- }
64
-
65
- /**
66
- * Checking POST variables.
67
- * Creating invoice if payment was successfull or cancel order if payment was declined
68
- */
69
- protected function _checkReturnedPost()
70
- {
71
- $status = false;
72
- if (!$this->getRequest()->isPost()) {
73
- $this->norouteAction();
74
- return $status;
75
- }
76
- $response = $this->getRequest()->getPost();
77
- $session = $this->getCheckout();
78
- $dataObj = new Varien_Object($response);
79
- if ($dataObj->hasOrderId()
80
- && $session->hasNovalnetRealOrderId()
81
- && $dataObj->getOrderId() == $session->getNovalnetRealOrderId()) {
82
-
83
- $order = Mage::getModel('sales/order')->loadByIncrementId($dataObj->getOrderId());
84
- $status=$order->getPayment()->getMethodInstance()->statusCheck($response,$session);
85
- $this->_responseText = $response['status_desc'];
86
- }
87
-
88
- return $status;
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/controllers/SecureController.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
- class Mage_Novalnet_SecureController extends Mage_Core_Controller_Front_Action
3
- {
4
- protected function _expireAjax()
5
- {
6
- if (!$this->getCheckout()->getQuote()->hasItems()) {
7
- $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
8
- exit;
9
- }
10
- }
11
-
12
- /**
13
- * Redirect Block
14
- * need to be redeclared
15
- */
16
- protected $_redirectBlockType = 'novalnet/secure_redirect';
17
-
18
- /**
19
- * Get singleton of Checkout Session Model
20
- *
21
- * @return Mage_Checkout_Model_Session
22
- */
23
- public function getCheckout()
24
- {
25
- return Mage::getSingleton('checkout/session');
26
- }
27
-
28
- private function _getConfigData($var)
29
- {
30
- return Mage::getModel( 'novalnet/novalnetSecure' )->getConfigData( $var );
31
- }
32
-
33
- /**
34
- * when customer select novalnet payment method
35
- */
36
- public function redirectAction()
37
- {
38
- $session = $this->getCheckout();
39
- $session->setNovalnetQuoteId($session->getQuoteId())
40
- ->setNovalnetRealOrderId($session->getLastRealOrderId());
41
-
42
- $order = Mage::getModel('sales/order')
43
- ->loadByIncrementId($session->getLastRealOrderId());
44
- $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
45
- ->addStatusToHistory(
46
- Mage_Sales_Model_Order::STATE_HOLDED, #$order->getStatus(),
47
- Mage::helper('novalnet')->__('Customer was redirected to Novalnet'),
48
- true
49
- )->save();
50
-
51
- $this->getResponse()->setBody(
52
- $this->getLayout()
53
- ->createBlock($this->_redirectBlockType)
54
- ->setOrder($order)
55
- ->toHtml()
56
- );
57
- $session->unsQuoteId();
58
- }
59
-
60
- /**
61
- * novalnet returns POST variables to this action
62
- */
63
- public function successAction()
64
- {
65
- if ($this->_checkReturnedPost()) {
66
- $this->_redirect('checkout/onepage/success');
67
- } else {
68
- $this->_redirect('checkout/onepage/failure');
69
- }
70
- }
71
-
72
- /**
73
- * Checking POST variables.
74
- * Creating invoice if payment was successfull or cancel order if payment was declined
75
- */
76
- protected function _checkReturnedPost()
77
- {
78
- $status = false;
79
- if (!$this->getRequest()->isPost()) {
80
- $this->norouteAction();
81
- return $status;
82
- }
83
- $session = $this->getCheckout();
84
- $dataObj = new Varien_Object($this->getRequest()->getPost());
85
- if ( $dataObj->hasOrderId()
86
- && $session->hasNovalnetRealOrderId()
87
- && $dataObj->getOrderId() == $session->getNovalnetRealOrderId())
88
- {
89
- $session->setQuoteId($session->getNovalnetQuoteId());
90
- $session->getQuote()->setIsActive(false)->save();
91
-
92
- $order = Mage::getModel('sales/order')
93
- ->loadByIncrementId($dataObj->getOrderId());
94
- $payment = $order->getPayment();
95
-
96
- if ($dataObj->getStatus() == Mage_Novalnet_Model_NovalnetSecure::RESPONSE_CODE_APPROVED) {
97
- $payment->setStatus(Mage_Novalnet_Model_NovalnetSecure::STATUS_SUCCESS)
98
- ->setStatusDescription(Mage::helper('novalnet')->__('Payment was successful.'))
99
- ->setTransactionId($dataObj->getTid())
100
- ->setSuTransactionId($dataObj->getTid())
101
- ->setLastTransId($dataObj->getTid());
102
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
103
- $order->setPayment($payment);
104
- //Added
105
- $session->unsSecureTestOrder();
106
- if( $dataObj->hasTestMode() ) {
107
- Mage::getModel( 'sales/quote' )
108
- ->load($session->getNovalnetQuoteId())
109
- ->getPayment()
110
- ->setNnTestorder($dataObj->getTestMode())
111
- ->save();
112
- $session->setSecureTestOrder($dataObj->getTestMode());
113
- }
114
-
115
- $invoice = $order->prepareInvoice();
116
- $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)
117
- ->register()
118
- ->capture();
119
- Mage::getModel('core/resource_transaction')
120
- ->addObject($invoice)
121
- ->addObject($invoice->getOrder())
122
- ->save();
123
-
124
- $order->addStatusToHistory(
125
- $this->_getConfigData('order_status'),
126
- Mage::helper('novalnet')->__('Customer successfully returned from Novalnet'),
127
- true
128
- )->setState(Mage_Sales_Model_Order::STATE_PROCESSING)
129
- ->save();
130
- if ($order->getId()) {
131
- $order->sendNewOrderEmail();
132
- }
133
- $status = true;
134
- $session->unsSecureTestOrder()
135
- ->unsNnSecureTestOrder();
136
- } else {
137
- $payment->setStatus(Mage_Novalnet_Model_NovalnetSecure::STATUS_ERROR);
138
- $payment->setStatusDescription(Mage::helper('novalnet')->__('Payment was fail.'));
139
- $order->setPayment($payment);
140
- if ($dataObj->getStatus() == 20){
141
- $order->addStatusToHistory(
142
- $order->getStatus(),
143
- Mage::helper('novalnet')->__('Customer aborted payment process'),
144
- true
145
- );
146
- } else {
147
- $order->addStatusToHistory(
148
- $order->getStatus(),
149
- Mage::helper('novalnet')->__('Customer was rejected by Novalnet'),
150
- true
151
- );
152
- }
153
- $order->cancel()
154
- ->save();
155
- $order->setState(Mage_Sales_Model_Order::STATE_CANCELED)->save();
156
- Mage::getSingleton('core/session')->addError(html_entity_decode($dataObj->getStatusText()));
157
- Mage::getSingleton('checkout/session')
158
- ->setErrorMessage(html_entity_decode($dataObj->getStatusText()));
159
- }
160
- }
161
- $session->unsNovalnetRealOrderId();
162
- $session->unsNovalnetQuoteId();
163
- return $status;
164
- }
165
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/etc/config.xml DELETED
@@ -1,249 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <global>
4
- <template>
5
- <email>
6
- <novalnet_callback_email_template module="novalnet">
7
- <label>Novalnet Callback Email</label>
8
- <file>novalnet/novalnet_callback_email.html</file>
9
- <type>html</type>
10
- </novalnet_callback_email_template>
11
- </email>
12
- </template>
13
-
14
- <!-- declare model group for new module -->
15
- <models>
16
- <!-- model group alias to be used in Mage::getModel('newmodule/...') -->
17
- <novalnet>
18
- <!-- base class name for the model group -->
19
- <class>Mage_Novalnet_Model</class>
20
- </novalnet>
21
- </models>
22
- <fieldsets>
23
- <sales_convert_quote_payment>
24
- <nn_account_number><to_order_payment>*</to_order_payment></nn_account_number>
25
- <nn_bank_sorting_code><to_order_payment>*</to_order_payment></nn_bank_sorting_code>
26
- <nn_account_holder><to_order_payment>*</to_order_payment></nn_account_holder>
27
- <nn_elv_country><to_order_payment>*</to_order_payment></nn_elv_country>
28
- <nn_account_number_at><to_order_payment>*</to_order_payment></nn_account_number_at>
29
- <nn_bank_sorting_code_at><to_order_payment>*</to_order_payment></nn_bank_sorting_code_at>
30
- <nn_account_holder_at><to_order_payment>*</to_order_payment></nn_account_holder_at>
31
- <nn_elv_country_at><to_order_payment>*</to_order_payment></nn_elv_country_at>
32
- <nn_testorder><to_order_payment>*</to_order_payment></nn_testorder>
33
- <nn_comments><to_order_payment>*</to_order_payment></nn_comments>
34
- <id><to_order_payment>nn_id</to_order_payment></id>
35
- </sales_convert_quote_payment>
36
- <sales_convert_order_payment>
37
- <nn_account_number><to_quote_payment>*</to_quote_payment></nn_account_number>
38
- <nn_bank_sorting_code><to_quote_payment>*</to_quote_payment></nn_bank_sorting_code>
39
- <nn_account_holder><to_quote_payment>*</to_quote_payment></nn_account_holder>
40
- <nn_elv_country><to_quote_payment>*</to_quote_payment></nn_elv_country>
41
- <nn_account_number_at><to_quote_payment>*</to_quote_payment></nn_account_number_at>
42
- <nn_bank_sorting_code_at><to_quote_payment>*</to_quote_payment></nn_bank_sorting_code_at>
43
- <nn_account_holder_at><to_quote_payment>*</to_quote_payment></nn_account_holder_at>
44
- <nn_elv_country_at><to_quote_payment>*</to_quote_payment></nn_elv_country_at>
45
- <nn_testorder><to_quote_payment>*</to_quote_payment></nn_testorder>
46
- <nn_comments><to_quote_payment>*</to_quote_payment></nn_comments>
47
- <id><to_quote_payment>nn_id</to_quote_payment></id>
48
- </sales_convert_order_payment>
49
- </fieldsets>
50
- <!-- declare resource setup for new module -->
51
- <resources>
52
- <!-- resource identifier -->
53
- <novalnet_setup>
54
- <!-- specify that this resource is a setup resource and used for upgrades -->
55
- <setup>
56
- <!-- which module to look for install/upgrade files in -->
57
- <module>Mage_Novalnet</module>
58
- </setup>
59
- <!-- specify database connection for this resource -->
60
- <connection>
61
- <!-- do not create new connection, use predefined core setup connection -->
62
- <use>core_setup</use>
63
- </connection>
64
- </novalnet_setup>
65
- <novalnet_write>
66
- <use>core_write</use>
67
- </novalnet_write>
68
- <novalnet_read>
69
- <use>core_read</use>
70
- </novalnet_read>
71
- </resources>
72
- <helpers>
73
- <novalnet>
74
- <class>Mage_Novalnet_Helper</class>
75
- </novalnet>
76
- </helpers>
77
- </global>
78
- <adminhtml>
79
- <translate>
80
- <modules>
81
- <Mage_Novalnet>
82
- <files>
83
- <default>Mage_Novalnet.csv</default>
84
- </files>
85
- </Mage_Novalnet>
86
- </modules>
87
- </translate>
88
- <layout>
89
- <updates>
90
- <novalnet>
91
- <file>novalnet.xml</file>
92
- </novalnet>
93
- </updates>
94
- </layout>
95
- </adminhtml>
96
- <frontend>
97
- <routers>
98
- <novalnet_secure>
99
- <use>standard</use>
100
- <args>
101
- <module>Mage_Novalnet</module>
102
- <frontName>novalnet</frontName>
103
- </args>
104
- </novalnet_secure>
105
- </routers>
106
- <translate>
107
- <modules>
108
- <Mage_Novalnet>
109
- <files>
110
- <default>Mage_Novalnet.csv</default>
111
- </files>
112
- </Mage_Novalnet>
113
- </modules>
114
- </translate>
115
- <events>
116
- <controller_action_predispatch_checkout_onepage_index>
117
- <observers>
118
- <Mage_Novalnet_Model_Observer>
119
- <type>singleton</type>
120
- <class>Mage_Novalnet_Model_Observer</class>
121
- <method>getFormData</method>
122
- </Mage_Novalnet_Model_Observer>
123
- </observers>
124
- </controller_action_predispatch_checkout_onepage_index>
125
- <controller_action_postdispatch_checkout_onepage_saveOrder>
126
- <observers>
127
- <Mage_Novalnet_Model_Observer>
128
- <type>singleton</type>
129
- <class>Mage_Novalnet_Model_Observer</class>
130
- <method>SaveOrderStatus</method>
131
- </Mage_Novalnet_Model_Observer>
132
- </observers>
133
- </controller_action_postdispatch_checkout_onepage_saveOrder>
134
- </events>
135
- <layout>
136
- <updates>
137
- <novalnet>
138
- <file>novalnet.xml</file>
139
- </novalnet>
140
- </updates>
141
- </layout>
142
- </frontend>
143
- <!-- declare default configuration values for this module -->
144
- <default>
145
- <!-- 'payment' configuration section (tab) -->
146
- <payment>
147
- <!-- cc-start -->
148
- <novalnetCc>
149
- <cctypes>VI,MC</cctypes>
150
- <!-- by default this payment method is inactive -->
151
- <active>0</active>
152
- <!-- model to handle logic for this payment method -->
153
- <model>novalnet/novalnetCc</model>
154
- <!-- order status for new orders paid by this payment method -->
155
- <order_status>0</order_status>
156
- <payment_action>authorize_capture</payment_action>
157
- <allowspecific>0</allowspecific>
158
- <!-- default title for payment checkout page and order view page -->
159
- <title>Novalnet Kreditkarte</title>
160
- <gateway_timeout>90</gateway_timeout>
161
- </novalnetCc>
162
- <novalnetElvgerman>
163
- <active>0</active>
164
- <model>novalnet/novalnetElvgerman</model>
165
- <payment_action>authorize_capture</payment_action>
166
- <order_status>0</order_status>
167
- <allowspecific>0</allowspecific>
168
- <title>Novalnet Lastschrift Deutschland</title>
169
- <gateway_timeout>90</gateway_timeout>
170
- </novalnetElvgerman>
171
- <novalnetElvaustria>
172
- <active>0</active>
173
- <model>novalnet/novalnetElvaustria</model>
174
- <payment_action>authorize_capture</payment_action>
175
- <order_status>0</order_status>
176
- <allowspecific>0</allowspecific>
177
- <title>Novalnet Lastschrift Österreich</title>
178
- <gateway_timeout>90</gateway_timeout>
179
- </novalnetElvaustria>
180
- <novalnetPrepayment>
181
- <active>0</active>
182
- <prepaymentcountries>DE,AT</prepaymentcountries>
183
- <model>novalnet/novalnetPrepayment</model>
184
- <payment_action>authorize_capture</payment_action>
185
- <order_status>0</order_status>
186
- <allowspecific>0</allowspecific>
187
- <title>Novalnet Vorauskasse</title>
188
- <gateway_timeout>90</gateway_timeout>
189
- </novalnetPrepayment>
190
- <novalnetInvoice>
191
- <active>0</active>
192
- <invoicecountries>DE,AT</invoicecountries>
193
- <model>novalnet/novalnetInvoice</model>
194
- <payment_action>authorize_capture</payment_action>
195
- <order_status>0</order_status>
196
- <allowspecific>0</allowspecific>
197
- <title>Novalnet Kauf auf Rechnung</title>
198
- <gateway_timeout>90</gateway_timeout>
199
- </novalnetInvoice>
200
- <novalnetPhonepayment>
201
- <active>0</active>
202
- <Phonepaymentcountries>DE,AT</Phonepaymentcountries>
203
- <model>novalnet/novalnetPhonepayment</model>
204
- <payment_action>authorize_capture</payment_action>
205
- <order_status>0</order_status>
206
- <allowspecific>0</allowspecific>
207
- <title>Novalnet Telefonpayment</title>
208
- <gateway_timeout>90</gateway_timeout>
209
- </novalnetPhonepayment>
210
- <novalnet_secure>
211
- <cctypes>VI,MC</cctypes>
212
- <active>0</active>
213
- <model>novalnet/novalnetSecure</model>
214
- <order_status>0</order_status>
215
- <payment_action>sale</payment_action>
216
- <allowspecific>0</allowspecific>
217
- <title>Novalnet Kreditkarte 3D Secure</title>
218
- </novalnet_secure>
219
- <novalnetCcpci>
220
- <cctypes>VI,MC</cctypes>
221
- <active>0</active>
222
- <payment_action>sale</payment_action>
223
- <model>novalnet/novalnetCcpci</model>
224
- <order_status>0</order_status>
225
- <allowspecific>0</allowspecific>
226
- <title>Novalnet Kreditkarte PCI</title>
227
- <createinvoice>0</createinvoice>
228
- </novalnetCcpci>
229
- <novalnetElvdepci>
230
- <active>0</active>
231
- <payment_action>sale</payment_action>
232
- <model>novalnet/novalnetElvdepci</model>
233
- <order_status>0</order_status>
234
- <allowspecific>0</allowspecific>
235
- <title>Novalnet Lastschrift Deutschland PCI</title>
236
- <createinvoice>0</createinvoice>
237
- </novalnetElvdepci>
238
- <novalnetElvatpci>
239
- <active>0</active>
240
- <payment_action>sale</payment_action>
241
- <model>novalnet/novalnetElvatpci</model>
242
- <order_status>0</order_status>
243
- <allowspecific>0</allowspecific>
244
- <title>Novalnet Lastschrift Österreich PCI</title>
245
- <createinvoice>0</createinvoice>
246
- </novalnetElvatpci>
247
- </payment>
248
- </default>
249
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-install-1.0.0.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
- $installer = $this;
3
- $setup = new Mage_Sales_Model_Mysql4_Setup('core_setup');
4
-
5
- $installer->startSetup();
6
-
7
- $setup->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
8
- $setup->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
9
- $setup->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
10
- $setup->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
11
-
12
- $setup->addAttribute('quote_payment', 'nn_account_holder_at', array('type'=>'varchar'));
13
- $setup->addAttribute('quote_payment', 'nn_account_number_at', array('type'=>'varchar'));
14
- $setup->addAttribute('quote_payment', 'nn_bank_sorting_code_at', array('type'=>'varchar'));
15
- $setup->addAttribute('quote_payment', 'nn_elv_country_at', array('type'=>'varchar'));
16
-
17
- $setup->addAttribute('quote_payment', 'nn_testorder', array('type'=>'smallint'));
18
- // Save the payment information for prepayment & invoice
19
- $setup->addAttribute('quote_payment', 'nn_comments', array('type'=>'text'));
20
-
21
- if (Mage::getVersion() >= '1.4.1.0') {
22
-
23
- $setup->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
24
- $setup->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
25
- $setup->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
26
- $setup->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
27
-
28
- $setup->addAttribute('order_payment', 'nn_account_holder_at', array('type'=>'varchar'));
29
- $setup->addAttribute('order_payment', 'nn_account_number_at', array('type'=>'varchar'));
30
- $setup->addAttribute('order_payment', 'nn_bank_sorting_code_at', array('type'=>'varchar'));
31
- $setup->addAttribute('order_payment', 'nn_elv_country_at', array('type'=>'varchar'));
32
- $setup->addAttribute('order_payment', 'nn_testorder', array('type'=>'smallint'));
33
- // Save the payment information for prepayment & invoice
34
- $setup->addAttribute('order_payment', 'nn_comments', array('type'=>'text'));
35
-
36
- }
37
-
38
- $installer->endSetup();
39
-
40
- if (Mage::getVersion() >= 1.1) {
41
- $installer->startSetup();
42
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
43
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
44
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
45
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
46
-
47
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder_at', 'VARCHAR(255) NOT NULL');
48
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number_at', 'VARCHAR(255) NOT NULL');
49
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code_at', 'VARCHAR(255) NOT NULL');
50
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country_at', 'VARCHAR(255) NOT NULL');
51
-
52
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_testorder', 'SMALLINT NULL DEFAULT NULL');
53
-
54
- $setup->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_comments', 'TEXT NULL DEFAULT NULL');
55
- $installer->endSetup();
56
- }
57
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Form/Novalnetpaypal.php DELETED
@@ -1,23 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Info/Novalnetpaypal.php DELETED
@@ -1,76 +0,0 @@
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_Paypal_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 if( $this->getRequest()->getParam('invoice_id') ) {
64
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
65
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
66
- $objOrder = $invoice->getOrder();
67
- $objQuote = Mage::getModel( 'sales/quote' );
68
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
69
- }else {
70
- $obj = $this->_localInfo;
71
- }
72
- $this->setNnTestorder($obj->getNnTestorder());
73
- $this->setNnComments($obj->getNnComments());
74
- return $this;
75
- }
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Infobox.php DELETED
@@ -1,9 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypal.php DELETED
@@ -1,31 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalerrornotice.php DELETED
@@ -1,9 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Block/Novalnetpaypalnotice.php DELETED
@@ -1,9 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Helper/Data.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- class Novalnet_NovalnetPaypal_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
-
5
- }
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Order.php DELETED
@@ -1,16 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Convert/Quote.php DELETED
@@ -1,18 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/NovalnetPaypal/Collection.php DELETED
@@ -1,10 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Novalnetpaypal.php DELETED
@@ -1,10 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Mysql4/Setup.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- class Novalnet_NovalnetPaypal_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
3
- {
4
-
5
- }
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/Model/Novalnetpaypal.php DELETED
@@ -1,353 +0,0 @@
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 = false;#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
- return Mage::getUrl('novalnetpaypal/novalnetpaypal/redirect');
73
- }
74
-
75
- public function assignData($data)
76
- {
77
- if (!($data instanceof Varien_Object)) {
78
- $data = new Varien_Object($data);
79
- }
80
- $info = $this->getInfoInstance();
81
- return $this;
82
- }
83
-
84
- public function getSecurityKey(){
85
- return uniqid(rand(), true);
86
- }
87
-
88
- public function validate()
89
- {
90
- parent::validate();
91
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id')) || !trim($this->getConfigData('paypal_api_signature')) || !trim($this->getConfigData('paypal_api_username')) || !trim($this->getConfigData('paypal_api_password')) || !trim($this->getConfigData('password'))) {
92
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
93
- }
94
- //Customer_id verification
95
- try{
96
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
97
- if($login_check){
98
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
99
- if (empty($customer_no)){
100
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
101
- }
102
- if($customer_no==""){
103
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
104
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
105
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
106
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
107
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
108
- }
109
- }
110
- }catch(Exception $e){
111
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
112
- }
113
- return $this;
114
- }
115
-
116
- public function isAvailable($quote = null) {
117
-
118
- $minOrderCount = trim($this->getConfigData('orderscount'));
119
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
120
-
121
- // Load orders and check
122
- $orders = Mage::getResourceModel('sales/order_collection')
123
- ->addAttributeToSelect('*')
124
- ->addAttributeToFilter('customer_id', $customerId)
125
- ->load();
126
- if (count($orders) < $minOrderCount) {
127
- return false;
128
- }
129
- return parent::isAvailable();
130
- }
131
-
132
- public function getFormFields()
133
- {
134
- $billing = $this->getOrder()->getBillingAddress();
135
- $security = $this->getSecurityKey();
136
- $this->getOrder()->getPayment()->setSuSecurity($security)->save();
137
- $order = $this->getOrder();
138
- $this->password = trim($this->getConfigData('password'));
139
- $session = Mage::getSingleton('checkout/session');
140
- $session->setNovalnetPassword($this->password);
141
- $paymentInfo = $this->getInfoInstance();
142
-
143
- $fieldsArr = array();
144
- $note = $order->getCustomerNote();
145
- if ($note){
146
- $note = '<br />'.Mage::helper('novalnetpaypal')->__('Comment').': '.$note;
147
- }
148
- if ( !$this->getConfigData('live_mode') ){
149
- $note .= '<br /><b><font color="red">'.strtoupper(Mage::helper('novalnetpaypal')->__('Testorder')).'</font></b>';
150
- }
151
- $order->setComment($note);
152
- $order->setCustomerNote($note);
153
- $order->setCustomerNoteNotify(true);
154
- $fieldsArr['key'] = self::KEY;
155
- $fieldsArr['vendor'] = trim($this->getConfigData('merchant_id'));
156
- $fieldsArr['auth_code'] = $this->encode(trim($this->getConfigData('auth_code')), $this->password);
157
- $fieldsArr['product'] = $this->encode(trim($this->getConfigData('product_id')), $this->password);
158
- $fieldsArr['tariff'] = $this->encode(trim($this->getConfigData('tariff_id')), $this->password);
159
- $fieldsArr['amount'] = $this->encode(( round($order->getBaseGrandTotal(), 2) * 100), $this->password);
160
- $fieldsArr['test_mode'] = $this->encode((!$this->getConfigData('live_mode'))? 1: 0, $this->password);
161
- $fieldsArr['uniqid'] = $this->encode(uniqid(), $this->password);
162
-
163
- $hParams['auth_code'] = $fieldsArr['auth_code'];
164
- $hParams['product_id'] = $fieldsArr['product'];
165
- $hParams['tariff'] = $fieldsArr['tariff'];
166
- $hParams['amount'] = $fieldsArr['amount'];
167
- $hParams['test_mode'] = $fieldsArr['test_mode'];
168
- $hParams['uniqid'] = $fieldsArr['uniqid'];
169
-
170
- $fieldsArr['hash'] = $this->hash($hParams, $this->password);
171
- $fieldsArr['currency'] = $order->getOrderCurrencyCode();
172
- $fieldsArr['customer_no'] = Mage::getSingleton('customer/session')->getCustomerId();
173
- $fieldsArr['use_utf8'] = '1';
174
- $fieldsArr['first_name'] = $billing->getFirstname();
175
- $fieldsArr['last_name'] = $billing->getLastname();
176
- $fieldsArr['email'] = $this->getOrder()->getCustomerEmail();
177
- $fieldsArr['street'] = $billing->getStreet(1);
178
- $fieldsArr['search_in_street'] = 1;
179
- $fieldsArr['city'] = $billing->getCity();
180
- $fieldsArr['zip'] = $billing->getPostcode();
181
- $fieldsArr['country_code'] = $billing->getCountry();
182
- $fieldsArr['country'] = $billing->getCountry();
183
- $fieldsArr['lang'] = strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2));
184
- $fieldsArr['remote_ip'] = $this->getRealIpAddr();
185
- $fieldsArr['tel'] = $billing->getTelephone();
186
- $fieldsArr['fax'] = $billing->getFax();
187
- $fieldsArr['session'] = session_id();
188
- $fieldsArr['return_url'] = Mage::getUrl('novalnetpaypal/novalnetpaypal/return', array('_novalnetpaypal' => true));
189
- $fieldsArr['return_method'] = 'POST';
190
- $fieldsArr['error_return_url'] = Mage::getUrl('novalnetpaypal/novalnetpaypal/error', array('_novalnetpaypal' => true));
191
- $fieldsArr['error_return_method'] = 'POST';
192
- $fieldsArr['order_no'] = $paymentInfo->getOrder()->getRealOrderId();
193
- $fieldsArr['input1'] = 'order_id';
194
- $fieldsArr['inputval1'] = $paymentInfo->getOrder()->getRealOrderId();
195
- $fieldsArr['user_variable_0'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
196
- $fieldsArr['api_signature'] = $this->encode(trim($this->getConfigData('paypal_api_signature')), $this->password);
197
- $fieldsArr['api_user'] = $this->encode(trim($this->getConfigData('paypal_api_username')), $this->password);
198
- $fieldsArr['api_pw'] = $this->encode(trim($this->getConfigData('paypal_api_password')), $this->password);
199
-
200
- $request = '';
201
- foreach ($fieldsArr as $k => $v) {
202
- $request .= '<' . $k . '>' . $v . '</' . $k . '>';
203
- }
204
- return $fieldsArr;
205
- }
206
-
207
- /**
208
- * Get quote
209
- *
210
- * @return Mage_Sales_Model_Order
211
- */
212
- public function getQuote()
213
- {
214
- if (empty($this->_quote)) {
215
- $this->_quote = $this->getCheckout()->getQuote();
216
- }
217
- return $this->_quote;
218
- }
219
-
220
- /**
221
- * Get checkout
222
- *
223
- * @return Mage_Sales_Model_Order
224
- */
225
- public function getCheckout()
226
- {
227
- if (empty($this->_checkout)) {
228
- $this->_checkout = Mage::getSingleton('checkout/session');
229
- }
230
- return $this->_checkout;
231
- }
232
-
233
- /**
234
- * Get order model
235
- *
236
- * @return Mage_Sales_Model_Order
237
- */
238
- public function getOrder()
239
- {
240
- if (!$this->_order) {
241
- $paymentInfo = $this->getInfoInstance();
242
- $this->_order = Mage::getModel('sales/order')
243
- ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
244
- }
245
- return $this->_order;
246
- }
247
- public function isPublicIP($value)
248
- {
249
- if(!$value || count(explode('.',$value))!=4)
250
- {
251
- return false;
252
- }
253
- return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
254
- }
255
- public function getRealIpAddr()
256
- {
257
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
258
- {
259
- return $_SERVER['HTTP_X_FORWARDED_FOR'];
260
- }
261
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
262
- {
263
- if($this->isPublicIP($iplist[0])) return $iplist[0];
264
- }
265
- if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
266
- {
267
- return $_SERVER['HTTP_CLIENT_IP'];
268
- }
269
- if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
270
- {
271
- return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
272
- }
273
- if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
274
- {
275
- return $_SERVER['HTTP_FORWARDED_FOR'];
276
- }
277
- return $_SERVER['REMOTE_ADDR'];
278
- }
279
-
280
- private function debug2($object, $filename, $debug = false)
281
- {
282
- if (!$this->debug and !$debug){return;}
283
- $fh = fopen("/tmp/$filename", 'a+');
284
- if (gettype($object) == 'object' or gettype($object) == 'array'){
285
- fwrite($fh, serialize($object));
286
- }else{
287
- fwrite($fh, date('H:i:s').' '.$object);
288
- }
289
- fwrite($fh, "<hr />\n");
290
- fclose($fh);
291
- }
292
- function encode($data, $key)
293
- {
294
- $data = trim($data);
295
- if ($data == '') return'Error: no data';
296
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
297
-
298
- try {
299
- $crc = sprintf('%u', crc32($data));# %u is a must for ccrc32 returns a signed value
300
- $data = $crc."|".$data;
301
- $data = bin2hex($data.$key);
302
- $data = strrev(base64_encode($data));
303
- }catch (Exception $e){
304
- echo('Error: '.$e);
305
- }
306
- return $data;
307
- }
308
- function decode($data, $key)
309
- {
310
- $data = trim($data);
311
- if ($data == '') {return'Error: no data';}
312
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
313
- try {
314
- $data = base64_decode(strrev($data));
315
- $data = pack("H".strlen($data), $data);
316
- $data = substr($data, 0, stripos($data, $key));
317
- $pos = strpos($data, "|");
318
- if ($pos === false){
319
- return("Error: CKSum not found!");
320
- }
321
- $crc = substr($data, 0, $pos);
322
- $value = trim(substr($data, $pos+1));
323
- if ($crc != sprintf('%u', crc32($value))){
324
- return("Error; CKSum invalid!");
325
- }
326
- return $value;
327
- }catch (Exception $e){
328
- echo('Error: '.$e);
329
- }
330
- }
331
- function hash($h, $key)#$h contains encoded data
332
- {
333
- if (!$h) return'Error: no data';
334
- if (!function_exists('md5')){return'Error: func n/a';}
335
- #Mage::throwException(Mage::helper('novalnet')->__("$h[auth_code].$h[product_id].$h[tariff].$h[amount].$h[test_mode].$h[uniqid].strrev($key)").'!');
336
- return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
337
- }
338
- function checkHash($request, $key)
339
- {
340
- if (!$request) return false; #'Error: no data';
341
- $h['auth_code'] = $request['auth_code'];#encoded
342
- $h['product_id'] = $request['product'];#encoded
343
- $h['tariff'] = $request['tariff'];#encoded
344
- $h['amount'] = $request['amount'];#encoded
345
- $h['test_mode'] = $request['test_mode'];#encoded
346
- $h['uniqid'] = $request['uniqid'];#encoded
347
-
348
- if ($request['hash2'] != $this->hash($h, $key)){
349
- return false;
350
- }
351
- return true;
352
- }
353
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/controllers/NovalnetpaypalController.php DELETED
@@ -1,254 +0,0 @@
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
- $session->unsNnPayPalTestOrder();
53
- }
54
- }
55
-
56
- public function errorAction() {
57
- $session = $this->getCheckout();
58
- $session->getQuote()->setIsActive(false)->save();
59
- //Get response
60
- $response = $this->getRequest()->getParams();
61
- #print_r($response); exit;
62
- $order = Mage::getModel('sales/order');
63
- $order->load($this->getCheckout()->getLastOrderId());
64
- $order->cancel();
65
- $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));
66
- $order->save();
67
- Mage::getSingleton('checkout/session')->addError(Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));#new
68
- $this->_redirect('checkout/cart');#new; ok
69
- }
70
-
71
- public function errornoticeAction() {
72
- $session = $this->getCheckout();
73
- $session->getQuote()->setIsActive(false)->save();
74
- $order = Mage::getModel('sales/order');
75
- $order->load($this->getCheckout()->getLastOrderId());
76
- $order->cancel();
77
- $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));
78
- $order->save();
79
-
80
- Mage::getSingleton('checkout/session')->addError(Mage::helper('novalnetpaypal')->__('Error').' : '.utf8_decode($response['status_text']));#new
81
- $this->_redirect('checkout/cart');#new
82
- }
83
-
84
- /**
85
- * Checking Post variables.
86
- *
87
- */
88
- protected function _checkReturnedData() {
89
- $status = false;
90
- if (!$this->getRequest()->isPost()) {
91
- $this->norouteAction();
92
- return;
93
- }
94
- $session = $this->getCheckout();
95
- //Get response
96
- $response = $this->getRequest()->getParams();
97
- $dataObj = new Varien_Object($this->getRequest()->getPost());
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
- $session->unsNnTestOrder();
114
-
115
- if( $dataObj->hasTestMode() ) {
116
- Mage::getModel( 'sales/quote' )
117
- ->load($session->getNovalnetQuoteId())
118
- ->getPayment()
119
- ->setNnTestorder($this->decode($response['test_mode'], $session->getNovalnetPassword()))
120
- ->save();
121
- $session->setNnPayPalTestOrder($this->decode($response['test_mode'], $session->getNovalnetPassword()));
122
- }
123
- $order->setPayment($payment);
124
- if($paymentObj->getConfigData('createinvoice') == 1){
125
- if ($this->saveInvoice($order)) {
126
- //$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
127
- }
128
- }
129
- $status = true;
130
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
131
- } else {
132
- $payment = $order->getPayment();
133
- $payment->setLastTransId($response["tid"]);# to set TID in the payment info
134
- $payment->setStatus(Novalnet_NovalnetPaypal_Model_NovalnetPaypal::STATUS_DECLINED);
135
- $order->setPayment($payment);
136
- $order->cancel();
137
- $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnetpaypal')->__('Customer aborted payment process'));
138
- $status = false;
139
- }
140
- $order->save();
141
- return $status;
142
- }
143
-
144
- /**
145
- * Save invoice for order
146
- *
147
- * @param Mage_Sales_Model_Order $order
148
- * @return boolean Can save invoice or not
149
- */
150
- protected function saveInvoice (Mage_Sales_Model_Order $order) {
151
- if ($order->canInvoice()) {
152
- $invoice = $order->prepareInvoice();
153
-
154
- $invoice->register();
155
- Mage::getModel('core/resource_transaction')
156
- ->addObject($invoice)
157
- ->addObject($invoice->getOrder())
158
- ->save();
159
- $invoice->sendEmail(true, '');
160
- return true;
161
- }
162
-
163
- return false;
164
- }
165
-
166
- /**
167
- * Get singleton of Checkout Session Model
168
- *
169
- * @return Mage_Checkout_Model_Session
170
- */
171
- public function getCheckout()
172
- {
173
- return Mage::getSingleton('checkout/session');
174
- }
175
-
176
- /**
177
- * checks server response and gets parameters
178
- * @return $data array|string response parameters or ERROR_WRONG_HASH|ERROR_NO_ORDER_DETAILS if error
179
- *
180
- */
181
- public function getNotification($pwd){
182
- $pnSu = Mage::helper('novalnetpaypal');
183
- $pnSu->classSofortueberweisung($pwd);
184
- return $pnSu->getNotification();
185
- }
186
- private function checkParams($response) {
187
- $session = $this->getCheckout();
188
- $status = '100';
189
- if (!$response['hash2']){
190
- $status = '90';
191
- }
192
- if (!$this->checkHash($response, $session->getNovalnetPassword())){
193
- $status = '91';
194
- }
195
- $response['amount'] = $this->decode($response['amount'], $session->getNovalnetPassword());
196
- if (preg_match('/\D/', $response['amount'], $aMatch)){
197
- $status = '92';
198
- }
199
- #Mage::log(__FUNCTION__.': status='.$status);
200
- $this->_status = $status;
201
- return$status;
202
- }
203
- function hash($h, $key)#$h contains encoded data
204
- {
205
- if (!$h) return'Error: no data';
206
- if (!function_exists('md5')){return'Error: func n/a';}
207
- return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
208
- }
209
- function checkHash($request, $key)
210
- {
211
- if (!$request) return false; #'Error: no data';
212
- $h['auth_code'] = $request['auth_code'];#encoded
213
- $h['product_id'] = $request['product']; #encoded
214
- $h['tariff'] = $request['tariff']; #encoded
215
- $h['amount'] = $request['amount']; #encoded
216
- $h['test_mode'] = $request['test_mode'];#encoded
217
- $h['uniqid'] = $request['uniqid']; #encoded
218
-
219
- if ($request['hash2'] != $this->hash($h, $key)){
220
-
221
- Mage::getSingleton('core/session')
222
- ->addError(Mage::helper('novalnetpaypal')->__('Die Hashfunktionen sind nicht verf&uuml;gbar!'));
223
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
224
- Mage::app()->getResponse()->setRedirect($url);
225
- Mage::app()->getResponse()->sendResponse();
226
- exit;
227
- }
228
- return true;
229
- }
230
- function decode($data, $key)
231
- {
232
- $data = trim($data);
233
- if ($data == '') {return'Error: no data';}
234
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
235
-
236
- try {
237
- $data = base64_decode(strrev($data));
238
- $data = pack("H".strlen($data), $data);
239
- $data = substr($data, 0, stripos($data, $key));
240
- $pos = strpos($data, "|");
241
- if ($pos === false){
242
- return("Error: CKSum not found!");
243
- }
244
- $crc = substr($data, 0, $pos);
245
- $value = trim(substr($data, $pos+1));
246
- if ($crc != sprintf('%u', crc32($value))){
247
- return("Error; CKSum invalid!");
248
- }
249
- return $value;
250
- }catch (Exception $e){
251
- echo('Error: '.$e);
252
- }
253
- }
254
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/etc/config.xml DELETED
@@ -1,122 +0,0 @@
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>0</active>
105
- <model>novalnetpaypal/novalnetpaypal</model>
106
- <order_status>1</order_status>
107
- <title>Novalnet PayPal</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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/etc/system.xml DELETED
@@ -1,191 +0,0 @@
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>The password is admin.novalnet.de:Master Data-Paymentzugriffsschluessel view.</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>Novalnet 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
- <min_order_total translate="label">
161
- <label>Minimum Order Total</label>
162
- <frontend_type>text</frontend_type>
163
- <sort_order>180</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>0</show_in_store>
167
- </min_order_total>
168
- <max_order_total translate="label">
169
- <label>Maximum Order Total</label>
170
- <frontend_type>text</frontend_type>
171
- <sort_order>190</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>1</show_in_website>
174
-
175
- <show_in_store>0</show_in_store>
176
- </max_order_total>
177
- <orderscount translate="label">
178
- <label>Minimum Orders Count</label>
179
- <frontend_type>text</frontend_type>
180
- <sort_order>200</sort_order>
181
- <comment>Default: "0" for disabled check.</comment>
182
- <show_in_default>1</show_in_default>
183
- <show_in_website>1</show_in_website>
184
- <show_in_store>0</show_in_store>
185
- </orderscount>
186
- </fields>
187
- </novalnetpaypal>
188
- </groups>
189
- </payment>
190
- </sections>
191
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/NovalnetPaypal/sql/novalnetpaypal_setup/mysql4-install-1.0.0.php DELETED
@@ -1,16 +0,0 @@
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
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Config/Form.php ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Configuration_Wizard_Config_Form extends Mage_Adminhtml_Block_System_Config_Form {
28
+
29
+ /**
30
+ * @var string
31
+ */
32
+ protected $groupName = '';
33
+
34
+ protected function _prepareLayout() {
35
+ $return = parent::_prepareLayout();
36
+ $this->initForm();
37
+ return $return;
38
+ }
39
+
40
+ /**
41
+ *
42
+ * @return Mage_Adminhtml_Block_System_Config_Form
43
+ */
44
+ public function initForm() {
45
+ $this->_initObjects();
46
+ $form = $this->_initForm();
47
+
48
+ $sections = $this->_configFields->getSection(
49
+ $this->getSectionCode(), $this->getWebsiteCode(), $this->getStoreCode()
50
+ );
51
+
52
+ $session = Mage::getSingleton('admin/session');
53
+
54
+ if (!$this->getWebsiteCode() && !$this->getStoreCode()) {
55
+ $session->setNnStoreConfig(Mage::helper('novalnet_payment')->__('Standard'));
56
+ } else if ($this->getWebsiteCode() != '' && !$this->getStoreCode()) {
57
+ $storeConfig = Mage::getModel('core/website')->load($this->getWebsiteCode())->getName();
58
+ Mage::register('webConfig', Mage::getModel('core/website')->load($this->getWebsiteCode())->getId());
59
+ $session->setNnStoreConfig($storeConfig);
60
+ } else {
61
+ $storeConfig = Mage::getModel('core/store')->load($this->getStoreCode())->getName();
62
+ Mage::register('storeConfig', Mage::getModel('core/store')->load($this->getStoreCode())->getId());
63
+ $session->setNnStoreConfig($storeConfig);
64
+ }
65
+
66
+ $groups = $sections->groups;
67
+ $groupName = $this->getGroupName();
68
+ $group = $groups->$groupName;
69
+
70
+ $fieldsetRenderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset');
71
+ $fieldsetConfig = array(
72
+ 'legend' => Mage::helper('novalnet_payment')->__((string) $group->label),
73
+ );
74
+ $fieldset = $form->addFieldset($sections->getName() . '_' . $group->getName(), $fieldsetConfig);
75
+ $fieldsetRenderer->setForm($this);
76
+
77
+ $this->initFields($fieldset, $group, $sections);
78
+
79
+ $fieldset->addField(
80
+ 'page_code', 'hidden', array(
81
+ 'name' => 'page_code',
82
+ 'value' => $this->getPageCode()
83
+ )
84
+ );
85
+ $form->setUseContainer(true);
86
+ $this->setForm($form);
87
+ return $this;
88
+ }
89
+
90
+ /**
91
+ * @return Varien_Data_Form
92
+ */
93
+ protected function _initForm() {
94
+ $form = new Varien_Data_Form(
95
+ array(
96
+ 'id' => 'edit_form',
97
+ 'action' => $this->getSaveUrl(),
98
+ 'method' => 'post',
99
+ 'enctype' => 'multipart/form-data'
100
+ )
101
+ );
102
+ return $form;
103
+ }
104
+
105
+ protected function getSaveUrl() {
106
+ return $this->getUrl('*/*/save', array('_current' => true));
107
+ }
108
+
109
+ /**
110
+ * @return string
111
+ */
112
+ public function getGroupName() {
113
+ return $this->getConfigPage('group_name');
114
+ }
115
+
116
+ /**
117
+ * @return string
118
+ */
119
+ public function getPageCode() {
120
+ return $this->getConfigPage('codes/page');
121
+ }
122
+
123
+ /**
124
+ * @return string
125
+ */
126
+ public function getSectionCode() {
127
+ return $this->getConfigPage('codes/section');
128
+ }
129
+
130
+ /**
131
+ * @return string
132
+ */
133
+ public function getStoreCode() {
134
+ return $this->getConfigPage('codes/store');
135
+ }
136
+
137
+ /**
138
+ * @return string
139
+ */
140
+ public function getWebsiteCode() {
141
+ return $this->getConfigPage('codes/website');
142
+ }
143
+
144
+ /**
145
+ * @param string $path
146
+ * @return mixed
147
+ */
148
+ public function getConfigPage($path) {
149
+ $config = $this->helperWizard()->getConfigPage();
150
+ return $config->getData($path);
151
+ }
152
+
153
+ /**
154
+ * @return Novalnet_Payment_Helper_Wizard
155
+ */
156
+ public function helperWizard() {
157
+ return Mage::helper('novalnet_payment');
158
+ }
159
+
160
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Page/Edit.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Configuration_Wizard_Page_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
28
+
29
+ public function __construct() {
30
+ $this->_mode = '';
31
+ $this->_blockGroup = 'novalnet_payment';
32
+ $this->_controller = 'adminhtml_configuration_wizard_page_edit';
33
+
34
+ $this->_removeButton('delete');
35
+ $this->_removeButton('reset');
36
+ $this->_removeButton('back');
37
+ $this->_removeButton('save');
38
+
39
+ $this->_addButton('back', array(
40
+ 'label' => Mage::helper('novalnet_payment')->__('Back'),
41
+ 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')',
42
+ 'class' => 'default',
43
+ ));
44
+
45
+ $this->_addButton('save', array(
46
+ 'label' => Mage::helper('novalnet_payment')->__('Save'),
47
+ 'onclick' => 'editForm.submit();',
48
+ 'class' => 'default',
49
+ ));
50
+ }
51
+
52
+ public function getHeaderText() {
53
+ $session = Mage::getSingleton('admin/session');
54
+ $storeConfig = $session->getNnStoreConfig();
55
+
56
+ $headerText = $this->getConfigPage('header_text');
57
+ $text = Mage::helper('novalnet_payment')->__($headerText . ' for ' . $storeConfig);
58
+ $session->unsNnStoreConfig();
59
+ return $text;
60
+ }
61
+
62
+ public function getBackUrl() {
63
+ $url = $this->helperWizard()->getPreviousPageUrlAsString();
64
+ return $this->getUrl($url, array('_current' => true));
65
+ }
66
+
67
+ public function getConfigPage($path) {
68
+ $config = $this->helperWizard()->getConfigPage();
69
+ return $config->getData($path);
70
+ }
71
+
72
+ public function helperWizard() {
73
+ return Mage::helper('novalnet_payment');
74
+ }
75
+
76
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Configuration/Wizard/Page/View.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Configuration_Wizard_Page_View extends Mage_Adminhtml_Block_Widget_View_Container {
28
+
29
+ public function __construct() {
30
+ $this->_blockGroup = 'novalnet_payment';
31
+ $this->_controller = 'adminhtml_configuration_wizard_page';
32
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Novalnet Payment Configuration');
33
+
34
+ $this->_removeButton('edit');
35
+ $this->_removeButton('back');
36
+
37
+ $this->_addButton('save', array(
38
+ 'label' => Mage::helper('adminhtml')->__('Continue'),
39
+ 'class' => 'default',
40
+ 'onclick' => 'window.location.href=\'' . $this->getNextUrl() . '\'',
41
+ ));
42
+ }
43
+
44
+ public function getViewHtml() {
45
+ $html = '';
46
+ foreach ($this->getSortedChildren() as $childName) {
47
+
48
+ $child = $this->getChild($childName);
49
+
50
+ $html .= $child->toHtml();
51
+ }
52
+ return $html;
53
+ }
54
+
55
+ protected function getNextUrl() {
56
+ $url = $this->helperWizard()->getNextPageUrlAsString();
57
+ return $this->getUrl($url, array('_current' => true));
58
+ }
59
+
60
+ public function getHeaderText() {
61
+ $headerText = $this->getConfigPage('header_text');
62
+ $text = Mage::helper('novalnet_payment')->__($headerText);
63
+ return $text;
64
+ }
65
+
66
+ public function getConfigPage($path) {
67
+ $config = $this->helperWizard()->getConfigPage();
68
+ return $config->getData($path);
69
+ }
70
+
71
+ public function helperWizard() {
72
+ return Mage::helper('novalnet_payment');
73
+ }
74
+
75
+ protected function _prepareLayout() {
76
+ $this->unsetChild('', '');
77
+ }
78
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Information.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Information extends Mage_Adminhtml_Block_Template
28
+ {
29
+ /**
30
+ * Assign the template to load the novalnet magento module updates
31
+ *
32
+ */
33
+ public function _construct()
34
+ {
35
+ $this->setTemplate("novalnet/information/iframe.phtml");
36
+ }
37
+
38
+ /**
39
+ * Set the Novalnet Magento module path
40
+ *
41
+ * @return string
42
+ */
43
+ public function getNovalnetUrl()
44
+ {
45
+ $url = $this->escapeUrl('http://www.novalnet.de/modul/magento-payment-module');
46
+ return $url;
47
+ }
48
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Order extends Novalnet_Payment_Block_Adminhtml_Widget_Grid_Container {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function __construct() {
33
+ parent::__construct();
34
+
35
+ $this->_blockGroup = 'novalnet_payment';
36
+ $this->_controller = 'adminhtml_sales_order';
37
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Orders');
38
+
39
+ $this->removeButton('add');
40
+ }
41
+
42
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/Grid.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid {
28
+
29
+ var $novalnetPayments = array();
30
+
31
+ /**
32
+ *
33
+ */
34
+ public function __construct() {
35
+ parent::__construct();
36
+ $this->setId('novalnet_sales_order_grid');
37
+ $this->setUseAjax(true);
38
+ $this->setDefaultSort('created_at');
39
+ $this->setDefaultDir('DESC');
40
+ $this->setSaveParametersInSession(true);
41
+
42
+ /* Novalnet */
43
+ $payments = Mage::getSingleton('payment/config')->getAllMethods();
44
+ if (!$this->novalnetPayments) {
45
+ foreach ($payments as $paymentCode => $paymentModel) {
46
+ $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title');
47
+ //$this->novalnetPayments[$paymentCode] = $paymentTitle;
48
+ if (preg_match('/novalnet/i', $paymentCode)) {
49
+ $this->novalnetPayments[$paymentCode] = $paymentTitle;
50
+ }
51
+ }
52
+ }
53
+ /* Novalnet */
54
+ }
55
+
56
+ /**
57
+ * Retrieve collection class
58
+ *
59
+ * @return string
60
+ */
61
+ protected function _getCollectionClass() {
62
+ return 'sales/order_grid_collection';
63
+ }
64
+
65
+ /**
66
+ * @return Mage_Adminhtml_Block_Widget_Grid
67
+ */
68
+ protected function _prepareCollection() {
69
+ $collection = Mage::getResourceModel($this->_getCollectionClass());
70
+ if (version_compare(Mage::helper('novalnet_payment')->getMagentoVersion(), '1.6.0.0', '>')) {
71
+ $collection->join(array('payment' => 'sales/order_payment'), 'main_table.entity_id = parent_id', 'method')
72
+ ->getSelect()->where("`payment`.`method` like '%novalnet%'");
73
+ }else{
74
+ $flat_order_payment = $collection->getTable('sales/order_payment');
75
+ $collection->getSelect()->join(array('payment' => $flat_order_payment), 'main_table.entity_id = payment.parent_id', 'method')
76
+ ->where("`payment`.`method` like '%novalnet%'");
77
+ }
78
+ //$collection->load(true); //debugging
79
+ $this->setCollection($collection);
80
+ return parent::_prepareCollection();
81
+ }
82
+
83
+ /**
84
+ * @return Novalnet_Payment_Block_Adminhtml_Sales_Order_Grid
85
+ */
86
+ public function _prepareColumns() {
87
+ $this->addColumn('real_order_id', array(
88
+ 'header' => Mage::helper('sales')->__('Order #'),
89
+ 'width' => '80px',
90
+ 'type' => 'text',
91
+ 'index' => 'increment_id',
92
+ ));
93
+
94
+ if (!Mage::app()->isSingleStoreMode()) {
95
+ $this->addColumn('store_id', array(
96
+ 'header' => Mage::helper('sales')->__('Purchased From (Store)'),
97
+ 'index' => 'store_id',
98
+ 'type' => 'store',
99
+ 'store_view' => true,
100
+ 'display_deleted' => true,
101
+ ));
102
+ }
103
+
104
+ $this->addColumn('created_at', array(
105
+ 'header' => Mage::helper('sales')->__('Purchased On'),
106
+ 'index' => 'created_at',
107
+ 'type' => 'datetime',
108
+ 'width' => '100px',
109
+ ));
110
+
111
+ $this->addColumn('billing_name', array(
112
+ 'header' => Mage::helper('sales')->__('Bill to Name'),
113
+ 'index' => 'billing_name',
114
+ ));
115
+
116
+ $this->addColumn('shipping_name', array(
117
+ 'header' => Mage::helper('sales')->__('Ship to Name'),
118
+ 'index' => 'shipping_name',
119
+ ));
120
+
121
+ $this->addColumn('base_grand_total', array(
122
+ 'header' => Mage::helper('sales')->__('G.T. (Base)'),
123
+ 'index' => 'base_grand_total',
124
+ 'type' => 'currency',
125
+ 'currency' => 'base_currency_code',
126
+ ));
127
+
128
+ $this->addColumn('grand_total', array(
129
+ 'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
130
+ 'index' => 'grand_total',
131
+ 'type' => 'currency',
132
+ 'currency' => 'order_currency_code',
133
+ ));
134
+
135
+ $this->addColumn('status', array(
136
+ 'header' => Mage::helper('sales')->__('Status'),
137
+ 'index' => 'status',
138
+ 'type' => 'options',
139
+ 'width' => '70px',
140
+ 'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
141
+ ));
142
+
143
+ $this->addColumn('novalnet_method', array(
144
+ 'header' => Mage::helper('sales')->__('Novalnet Method'),
145
+ 'index' => 'method',
146
+ 'type' => 'options',
147
+ 'width' => '70px',
148
+ 'options' => $this->novalnetPayments,
149
+ ), 'method');
150
+
151
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
152
+ $this->addColumn('action', array(
153
+ 'header' => Mage::helper('sales')->__('Action'),
154
+ 'width' => '50px',
155
+ 'type' => 'action',
156
+ 'getter' => 'getId',
157
+ 'actions' => array(
158
+ array(
159
+ 'caption' => Mage::helper('sales')->__('View'),
160
+ 'url' => array('base' => 'adminhtml/sales_order/view'),
161
+ 'field' => 'order_id'
162
+ )
163
+ ),
164
+ 'filter' => false,
165
+ 'sortable' => false,
166
+ 'index' => 'stores',
167
+ 'is_system' => true,
168
+ ));
169
+ }
170
+
171
+ $this->setDefaultSort('created_at');
172
+ $this->setDefaultDir('DESC');
173
+
174
+ $this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
175
+
176
+ parent::_prepareColumns();
177
+ return $this;
178
+ }
179
+
180
+ /**
181
+ * @return Novalnet_Payment_Block_Adminhtml_Sales_Order_Grid
182
+ */
183
+ protected function _prepareMassaction() {
184
+ $this->setMassactionIdField('entity_id');
185
+ $this->getMassactionBlock()->setFormFieldName('order_ids');
186
+ $this->getMassactionBlock()->setUseSelectAll(false);
187
+
188
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
189
+ $this->getMassactionBlock()->addItem('cancel_order', array(
190
+ 'label' => Mage::helper('sales')->__('Cancel'),
191
+ 'url' => $this->getUrl('*/*/massCancel'),
192
+ ));
193
+ }
194
+
195
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
196
+ $this->getMassactionBlock()->addItem('hold_order', array(
197
+ 'label' => Mage::helper('sales')->__('Hold'),
198
+ 'url' => $this->getUrl('*/*/massHold'),
199
+ ));
200
+ }
201
+
202
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
203
+ $this->getMassactionBlock()->addItem('unhold_order', array(
204
+ 'label' => Mage::helper('sales')->__('Unhold'),
205
+ 'url' => $this->getUrl('*/*/massUnhold'),
206
+ ));
207
+ }
208
+
209
+ $this->getMassactionBlock()->addItem('pdfinvoices_order', array(
210
+ 'label' => Mage::helper('sales')->__('Print Invoices'),
211
+ 'url' => $this->getUrl('*/*/pdfinvoices'),
212
+ ));
213
+
214
+ $this->getMassactionBlock()->addItem('pdfshipments_order', array(
215
+ 'label' => Mage::helper('sales')->__('Print Packingslips'),
216
+ 'url' => $this->getUrl('*/*/pdfshipments'),
217
+ ));
218
+
219
+ $this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
220
+ 'label' => Mage::helper('sales')->__('Print Credit Memos'),
221
+ 'url' => $this->getUrl('*/*/pdfcreditmemos'),
222
+ ));
223
+
224
+ $this->getMassactionBlock()->addItem('pdfdocs_order', array(
225
+ 'label' => Mage::helper('sales')->__('Print All'),
226
+ 'url' => $this->getUrl('*/*/pdfdocs'),
227
+ ));
228
+
229
+ $this->getMassactionBlock()->addItem('print_shipping_label', array(
230
+ 'label' => Mage::helper('sales')->__('Print Shipping Labels'),
231
+ 'url' => $this->getUrl('adminhtml/sales_order_shipment/massPrintShippingLabel'),
232
+ ));
233
+
234
+ return $this;
235
+ }
236
+
237
+ /**
238
+ * @param $row
239
+ * @return string
240
+ */
241
+ public function getRowUrl($row) {
242
+ return $this->getUrl('adminhtml/sales_order/view', array('order_id' => $row->getId()));
243
+ }
244
+
245
+ /**
246
+ * @return string
247
+ */
248
+ public function getGridUrl() {
249
+ return $this->getUrl('*/*/grid', array('_current' => true));
250
+ }
251
+
252
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View {
28
+
29
+ public function __construct() {
30
+
31
+ parent::__construct();
32
+
33
+ $order = $this->getOrder();
34
+ $payment = $this->getOrder()->getPayment();
35
+ $paymentMethod = $payment->getMethodInstance()->getCode();
36
+ $helper = Mage::helper('novalnet_payment');
37
+ $getTid = $helper->makeValidNumber($payment->getLastTransId());
38
+ if (preg_match("/novalnet/i", $paymentMethod))
39
+ $this->_removeButton('order_creditmemo');
40
+
41
+ $getTransactionStatus = $helper->loadTransactionStatus($getTid);
42
+
43
+ $this->_updateButton('order_invoice', 'label', Mage::helper('novalnet_payment')->__('Capture'));
44
+ if ($getTransactionStatus->getTransactionStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED)
45
+ $this->_removeButton('void_payment');
46
+
47
+ if ($getTransactionStatus->getTransactionStatus() == Novalnet_Payment_Model_Config::PAYMENT_VOID_STATUS)
48
+ $this->_removeButton('order_invoice');
49
+ }
50
+
51
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View/Tab/TransactionOverview.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Order_View_Tab_TransactionOverview extends Mage_Adminhtml_Block_Widget implements Mage_Adminhtml_Block_Widget_Tab_Interface {
28
+
29
+ public function __construct() {
30
+ //parent::__construct();
31
+ $this->setTemplate('novalnet/sales/order/view/tab/transactionoverview.phtml');
32
+ }
33
+
34
+ public function getTabLabel() {
35
+ return Mage::helper('novalnet_payment')->__('Novalnet - Transaction Log');
36
+ }
37
+
38
+ public function getTabTitle() {
39
+ return Mage::helper('novalnet_payment')->__('Novalnet - Transaction Log');
40
+ }
41
+
42
+ public function canShowTab() {
43
+ return true;
44
+ }
45
+
46
+ public function isHidden() {
47
+ return false;
48
+ }
49
+
50
+ public function getTabClass() {
51
+ return 'ajax novalnet-widget-tab';
52
+ }
53
+
54
+ /**
55
+ * @return Mage_Sales_Model_Order
56
+ */
57
+ public function getOrder() {
58
+ return Mage::registry('current_order');
59
+ }
60
+
61
+ /**
62
+ * @return Novalnet_Payment_Model_TransactionOverview
63
+ */
64
+ public function getTransactionOverview() {
65
+ if (!Mage::registry('novalnet_payment_transactionoverview_collection')) {
66
+ $order = $this->getOrder();
67
+
68
+ // @var $transactionOverview Novalnet_Payment_Model_TransactionOverview
69
+ $transactionOverview = $this->helperNovalnetPayment()->getModelTransactionOverview()->getCollection();
70
+ $transactionOverview->getByOrder($order);
71
+ Mage::register('novalnet_payment_transactionoverview_collection', $transactionOverview);
72
+ }
73
+ return Mage::registry('novalnet_payment_transactionoverview_collection');
74
+ }
75
+
76
+ /**
77
+ *
78
+ * @return Novalnet_Payment_Helper_Data
79
+ */
80
+ protected function helperNovalnetPayment() {
81
+ return Mage::helper('novalnet_payment');
82
+ }
83
+
84
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Order/View/Tab/TransactionStatus.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Order_View_Tab_TransactionStatus extends Mage_Adminhtml_Block_Widget_Grid implements Mage_Adminhtml_Block_Widget_Tab_Interface {
28
+
29
+ public function __construct() {
30
+ parent::__construct();
31
+ //$this->setTemplate('novalnet/sales/order/view/tab/transactionstatus.phtml');
32
+ $this->setId('novalnet_payment_block_adminhtml_sales_order_view_tab_transactionstatus');
33
+ $this->setDefaultSort('created_at');
34
+ $this->setDefaultDir('DESC');
35
+ $this->setSaveParametersInSession(true);
36
+ $this->setUseAjax(true);
37
+ $this->setSkipGenerateContent(true);
38
+ }
39
+
40
+ public function getTabLabel() {
41
+ return Mage::helper('novalnet_payment')->__('Novalnet - Transaction Overview');
42
+ }
43
+
44
+ public function getTabTitle() {
45
+ return Mage::helper('novalnet_payment')->__('Novalnet - Transaction Overview');
46
+ }
47
+
48
+ public function canShowTab() {
49
+ return true;
50
+ }
51
+
52
+ public function isHidden() {
53
+ return false;
54
+ }
55
+
56
+ public function getTabClass() {
57
+ return 'ajax novalnet-widget-tab';
58
+ }
59
+
60
+ /**
61
+ * @return Mage_Sales_Model_Order
62
+ */
63
+ public function getOrder() {
64
+ return Mage::registry('current_order');
65
+ }
66
+
67
+ /**
68
+ * @return Novalnet_Payment_Tab
69
+ * Order left column Tab
70
+ */
71
+ public function getTabUrl() {
72
+ return $this->getUrl('novalnet_payment/adminhtml_sales_order/transactionStatusGrid', array(
73
+ '_current' => true
74
+ )
75
+ );
76
+ }
77
+
78
+ public function getGridUrl() {
79
+ return $this->getUrl('novalnet_payment/adminhtml_sales_order/transactionStatusGrid', array(
80
+ '_current' => true
81
+ )
82
+ );
83
+ }
84
+
85
+ public function getRowUrl($row) {
86
+ return $this->getUrl('novalnet_payment/adminhtml_transaction/view', array(
87
+ 'nntxn_id' => $row->getId()
88
+ )
89
+ );
90
+ }
91
+
92
+ protected function _prepareCollection() {
93
+ $collection = $this->getTransactionStatusCollection();
94
+ $this->setCollection($collection);
95
+ return parent::_prepareCollection();
96
+ }
97
+
98
+ /**
99
+ * @return Novalnet_Payment_Model_TransactionStatus
100
+ */
101
+ public function getTransactionStatusCollection() {
102
+ $order = $this->getOrder();
103
+
104
+ // @var $transactionStatusCollection Novalnet_Payment_Model_TransactionStatus_Collection
105
+ $transactionStatusCollection = $this->helperNovalnetPayment()->getModelTransactionStatus()->getCollection();
106
+ $transactionStatusCollection->getByOrder($order);
107
+ return $transactionStatusCollection;
108
+ }
109
+
110
+ protected function _prepareColumns() {
111
+ $helperNovalnetPayment = $this->helperNovalnetPayment();
112
+ $this->setColumn('txid', array(
113
+ 'header' => $helperNovalnetPayment->__('Transaction no'),
114
+ 'width' => '200px',
115
+ 'type' => 'text',
116
+ 'index' => 'transaction_no',
117
+ )
118
+ );
119
+ $this->setColumn('order_id', array(
120
+ 'header' => $helperNovalnetPayment->__('Order no'),
121
+ 'width' => '200px',
122
+ 'type' => 'text',
123
+ 'index' => 'order_id',
124
+ )
125
+ );
126
+ $this->setColumn('transaction_status', array(
127
+ 'header' => $helperNovalnetPayment->__('Transaction Status'),
128
+ 'width' => '200px',
129
+ 'type' => 'text',
130
+ 'index' => 'transaction_status',
131
+ )
132
+ );
133
+ $this->setColumn('ncno', array(
134
+ 'header' => $helperNovalnetPayment->__('NC No'),
135
+ 'width' => '200px',
136
+ 'type' => 'text',
137
+ 'index' => 'nc_no',
138
+ )
139
+ );
140
+ $this->setColumn('customer_id', array(
141
+ 'header' => $helperNovalnetPayment->__('Customer ID'),
142
+ 'width' => '200px',
143
+ 'type' => 'text',
144
+ 'index' => 'customer_id',
145
+ )
146
+ );
147
+ $this->setColumn('store_id', array(
148
+ 'header' => $helperNovalnetPayment->__('Store ID'),
149
+ 'width' => '200px',
150
+ 'type' => 'text',
151
+ 'index' => 'store_id',
152
+ )
153
+ );
154
+ /* $this->setColumn('shop_url',
155
+ array(
156
+ 'header' => $helperNovalnetPayment->__('Shop URL'),
157
+ 'width' => '200px',
158
+ 'type' => 'text',
159
+ 'index' => 'shop_url',
160
+ )
161
+ ); */
162
+
163
+ return parent::_prepareColumns();
164
+ }
165
+
166
+ private function setColumn($field, $fieldColumnMap) {
167
+ $this->addColumn($field, $fieldColumnMap);
168
+ }
169
+
170
+ /**
171
+ *
172
+ * @return Novalnet_Payment_Helper_Data
173
+ */
174
+ protected function helperNovalnetPayment() {
175
+ return Mage::helper('novalnet_payment');
176
+ }
177
+
178
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Sales/Sales.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Sales_Sales extends Mage_Adminhtml_Block_Widget_Grid_Container {
28
+
29
+ public function __construct() {
30
+ $this->_controller = 'report_sales_sales';
31
+ $this->_headerText = Mage::helper('reports')->__('Total Ordered Report');
32
+ parent::__construct();
33
+ $this->setTemplate('novalnet_payment/container.phtml');
34
+ $this->_removeButton('add');
35
+ $this->addButton('filter_form_submit', array(
36
+ 'label' => Mage::helper('reports')->__('Show Report'),
37
+ 'onclick' => 'filterFormSubmit()'
38
+ ));
39
+ }
40
+
41
+ public function getFilterUrl() {
42
+ $this->getRequest()->setParam('filter', null);
43
+ return $this->getUrl('*/*/sales', array('_current' => true));
44
+ }
45
+
46
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transaction extends Mage_Adminhtml_Block_Widget_Grid_Container {
28
+
29
+ /**
30
+ * Initialize the transaction grid block
31
+ *
32
+ */
33
+ public function __construct() {
34
+ $this->_blockGroup = 'novalnet_payment';
35
+ $this->_controller = 'adminhtml_transaction';
36
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Novalnet Transactions Overview');
37
+ $this->setSaveParametersInSession(true);
38
+
39
+ parent::__construct();
40
+ $this->removeButton('add');
41
+ }
42
+
43
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction/Grid.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transaction_Grid extends Mage_Adminhtml_Block_Widget_Grid {
28
+
29
+ var $novalnetPayments = array();
30
+
31
+ /**
32
+ *
33
+ */
34
+ public function __construct() {
35
+ parent::__construct();
36
+
37
+ $this->setId('novalnet_transaction_grid');
38
+ $this->setUseAjax(true);
39
+ $this->setDefaultSort('order_id');
40
+ $this->setDefaultDir('desc');
41
+ }
42
+
43
+ /**
44
+ * @return Mage_Adminhtml_Block_Widget_Grid
45
+ */
46
+ protected function _prepareCollection() {
47
+ $collection = Mage::getModel('novalnet_payment/transactionstatus')->getCollection();
48
+ $this->setCollection($collection);
49
+ return parent::_prepareCollection();
50
+ }
51
+
52
+ /**
53
+ * @return
54
+ */
55
+ public function _prepareColumns() {
56
+ $this->addColumn('order_id', array(
57
+ 'header' => Mage::helper('sales')->__('Order no #'),
58
+ 'width' => '80px',
59
+ 'type' => 'text',
60
+ 'index' => 'order_id',
61
+ ));
62
+ $this->addColumn('transaction_no', array(
63
+ 'header' => Mage::helper('sales')->__('Transaction #'),
64
+ 'width' => '80px',
65
+ 'type' => 'text',
66
+ 'index' => 'transaction_no',
67
+ ));
68
+ $this->addColumn('store_id', array(
69
+ 'header' => Mage::helper('sales')->__('Store ID #'),
70
+ 'width' => '80px',
71
+ 'type' => 'text',
72
+ 'index' => 'store_id',
73
+ ));
74
+ $this->addColumn('nc_no', array(
75
+ 'header' => Mage::helper('sales')->__('NC No #'),
76
+ 'width' => '80px',
77
+ 'type' => 'text',
78
+ 'index' => 'nc_no',
79
+ ));
80
+ $this->addColumn('transaction_status', array(
81
+ 'header' => Mage::helper('sales')->__('Status #'),
82
+ 'width' => '80px',
83
+ 'type' => 'text',
84
+ 'index' => 'transaction_status',
85
+ ));
86
+ parent::_prepareColumns();
87
+ return $this;
88
+ }
89
+
90
+ /**
91
+ * @param $row
92
+ * @return bool|string
93
+ */
94
+ public function getRowUrl($row) {
95
+ return $this->getUrl('novalnet_payment/adminhtml_transaction/view', array(
96
+ 'nntxn_id' => $row->getId()
97
+ )
98
+ );
99
+ }
100
+
101
+ public function getGridUrl() {
102
+ return $this->getUrl('*/*/grid', array('_current' => true));
103
+ }
104
+
105
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Transaction/View.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transaction_View extends Mage_Adminhtml_Block_Widget_Form_Container {
28
+
29
+ public function __construct() {
30
+ $this->_objectId = 'nntxn_id';
31
+ $this->_mode = 'view';
32
+ $this->_blockGroup = 'novalnet_payment';
33
+ $this->_controller = 'adminhtml_transaction';
34
+
35
+ parent::__construct();
36
+
37
+ $this->setId('transaction_view');
38
+
39
+ $this->_removeButton('reset');
40
+ $this->_removeButton('delete');
41
+ $this->_removeButton('save');
42
+ }
43
+
44
+ /**
45
+ * Retrieve invoice model instance
46
+ *
47
+ * @return Mage_Sales_Model_Order_Invoice
48
+ */
49
+ public function getOrder() {
50
+ return Mage::registry('current_order');
51
+ }
52
+
53
+ public function getNovalnetTransactionStatus() {
54
+ return Mage::registry('novalnet_payment_transactionstatus');
55
+ }
56
+
57
+ public function getCurrencyCode() {
58
+ $order = Mage::getModel("sales/order")->loadByIncrementId(trim($this->getNovalnetTransactionStatus()->getOrderId()));
59
+ return $order->getOrderCurrencyCode();
60
+ }
61
+
62
+ public function getPaymentTitle() {
63
+ $transactionStatus = $this->getNovalnetTransactionStatus();
64
+ $title = Mage::helper("novalnet_payment")->getModel($transactionStatus->getPaymentName())->_getConfigData('title');
65
+ return $title;
66
+ }
67
+
68
+ /**
69
+ * @return string
70
+ */
71
+ public function getHeaderText() {
72
+ $transStatus = $this->getNovalnetTransactionStatus();
73
+ $text = Mage::helper('novalnet_payment')->__(
74
+ 'Order #%s | TID : %s ', $transStatus->getOrderId(), $transStatus->getTransactionNo()
75
+ );
76
+ return $text;
77
+ }
78
+
79
+ }
app/code/community/{Mage/Novalnet/Model/Novalnet/Request.php → Novalnet/Payment/Block/Adminhtml/Transaction/View/Form.php} RENAMED
@@ -1,38 +1,37 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Model_Novalnet_Request extends Varien_Object
30
- {
31
- public function toLatin1(){
32
- $data = $this->toArray();
33
- foreach ($data as $key => $val){
34
- $setKey = "set".ucfirst($key);
35
- $this->$setKey(utf8_decode($val));
36
- }
37
- }
38
- }
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transaction_View_Form extends Mage_Adminhtml_Block_Widget {
28
+
29
+ public function __construct() {
30
+ $this->_blockGroup = 'novalnet_payment';
31
+ $this->_controller = 'adminhtml_transaction';
32
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Transactions');
33
+
34
+ parent::__construct();
35
+ }
36
+
37
+ }
 
app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transactionoverview extends Mage_Adminhtml_Block_Widget_Grid_Container {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function __construct() {
33
+ $this->_blockGroup = 'novalnet_payment';
34
+ $this->_controller = 'adminhtml_transactionoverview';
35
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Novalnet Transactions Log');
36
+ $this->setSaveParametersInSession(true);
37
+
38
+ parent::__construct();
39
+ $this->removeButton('add');
40
+ }
41
+
42
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview/Grid.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transactionoverview_Grid extends Mage_Adminhtml_Block_Widget_Grid {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function __construct() {
33
+ parent::__construct();
34
+ $this->setId('novlanet_transactionoverview_grid');
35
+ $this->setUseAjax(true);
36
+ $this->setDefaultSort('order_id');
37
+ $this->setDefaultDir('DESC');
38
+ }
39
+
40
+ /**
41
+ * @return Mage_Adminhtml_Block_Widget_Grid
42
+ */
43
+ protected function _prepareCollection() {
44
+ $collection = Mage::getModel('novalnet_payment/transactionoverview')->getCollection();
45
+ $this->setCollection($collection);
46
+ return parent::_prepareCollection();
47
+ }
48
+
49
+ /**
50
+ * @return
51
+ */
52
+ protected function _prepareColumns() {
53
+ $helperNovalnetPayment = $this->helperNovalnetPayment();
54
+
55
+ $this->addColumn('order_id', array(
56
+ 'header' => $helperNovalnetPayment->__('Order no #'),
57
+ 'width' => '80px',
58
+ 'type' => 'text',
59
+ 'index' => 'order_id',
60
+ ));
61
+ $this->addColumn('transaction_no', array(
62
+ 'header' => $helperNovalnetPayment->__('Transaction #'),
63
+ 'width' => '80px',
64
+ 'type' => 'text',
65
+ 'index' => 'transaction_id',
66
+ ));
67
+ $this->addColumn('id', array(
68
+ 'header' => $helperNovalnetPayment->__('Store id #'),
69
+ 'width' => '80px',
70
+ 'type' => 'text',
71
+ 'index' => 'store_id',
72
+ ));
73
+
74
+ return parent::_prepareColumns();
75
+ }
76
+
77
+ /**
78
+ *
79
+ * @return Novalnet_Payment_Helper_Data
80
+ */
81
+ protected function helperNovalnetPayment() {
82
+ return Mage::helper('novalnet_payment');
83
+ }
84
+
85
+ /**
86
+ * @param $row
87
+ * @return string
88
+ */
89
+ public function getRowUrl($row) {
90
+ return $this->getUrl('novalnet_payment/adminhtml_transactionoverview/view', array(
91
+ 'nnlog_id' => $row->getId()
92
+ )
93
+ );
94
+ }
95
+
96
+ public function getGridUrl() {
97
+ return $this->getUrl('*/*/grid', array('_current' => true));
98
+ }
99
+
100
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Transactionoverview/View.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transactionoverview_View extends Mage_Adminhtml_Block_Widget_Form_Container {
28
+
29
+ var $novalnetPayments = array();
30
+
31
+ /**
32
+ *
33
+ */
34
+ public function __construct() {
35
+ $this->_objectId = 'nnlog_id';
36
+ $this->_mode = 'view';
37
+ $this->_blockGroup = 'novalnet_payment';
38
+ $this->_controller = 'adminhtml_transaction';
39
+
40
+ parent::__construct();
41
+
42
+ $this->setId('transactionoverview_view');
43
+ $this->setUseAjax(true);
44
+ $this->setDefaultSort('created_date');
45
+ $this->setDefaultDir('DESC');
46
+
47
+ $this->_removeButton('reset');
48
+ $this->_removeButton('delete');
49
+ $this->_removeButton('save');
50
+ }
51
+
52
+ public function getNovalnetTransactionOverview() {
53
+ return Mage::registry('novalnet_payment_transactionoverview');
54
+ ;
55
+ }
56
+
57
+ public function getPaymentTitle() {
58
+ $order = Mage::getModel("sales/order")->loadByIncrementId(trim($this->getNovalnetTransactionOverview()->getOrderId()));
59
+ if($order->getPayment()) {
60
+ $paymentMethod = $order->getPayment()->getMethod();
61
+ $title = Mage::helper("novalnet_payment")->getModel($paymentMethod)->_getConfigData('title');
62
+ } else {
63
+ $title = '';
64
+ }
65
+ return $title;
66
+ }
67
+
68
+ public function getHeaderText() {
69
+ $transStatus = $this->getNovalnetTransactionOverview();
70
+ $text = Mage::helper('novalnet_payment')->__(
71
+ 'Order #%s | TID : %s ', $transStatus->getOrderId(), $transStatus->getTransactionId()
72
+ );
73
+ return $text;
74
+ }
75
+ }
app/code/community/{Mage/Novalnet/Model/NovalnetElvdepci.php → Novalnet/Payment/Block/Adminhtml/Transactionoverview/View/Form.php} RENAMED
@@ -1,34 +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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- class Mage_Novalnet_Model_NovalnetElvdepci extends Mage_Novalnet_Model_NovalnetPciAbstract
28
- {
29
- const PAYMENT_METHOD = 'Direct Debit German PCI';
30
-
31
- protected $_nnPaymentId = 2;
32
-
33
- protected $_code = 'novalnetElvdepci';
34
- }
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Transactionoverview_View_Form extends Mage_Adminhtml_Block_Widget {
28
+
29
+ public function __construct() {
30
+ $this->_headerText = Mage::helper('novalnet_payment')->__('Transaction Overview');
31
+ parent::__construct();
32
+ }
33
+
34
+ }
app/code/community/Novalnet/Payment/Block/Adminhtml/Widget.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Widget extends Mage_Adminhtml_Block_Widget_Form_Container {
28
+
29
+ public function __construct() {
30
+ parent::__construct();
31
+ $this->setTemplate('configuration/wizard/index.phtml');
32
+ }
33
+
34
+ /**
35
+ * Get child form html
36
+ *
37
+ * @return string
38
+ */
39
+ public function getFormHtml() {
40
+ $this->getChild('form')->setData('action1', $this->getSaveUrl());
41
+ return $this->getChildHtml('form');
42
+ }
43
+
44
+ }
app/code/community/{Mage/Novalnet/Model/NovalnetCcpci.php → Novalnet/Payment/Block/Adminhtml/Widget/Grid/Container.php} RENAMED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Magento
4
  *
@@ -12,23 +13,21 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
27
- class Mage_Novalnet_Model_NovalnetCcpci extends Mage_Novalnet_Model_NovalnetPciAbstract
28
  {
29
- const PAYMENT_METHOD = 'Credit Card PCI';
30
-
31
- protected $_nnPaymentId = 6;
32
-
33
- protected $_code = 'novalnetCcpci';
34
  }
1
  <?php
2
+
3
  /**
4
  * Magento
5
  *
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
 
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
27
+ class Novalnet_Payment_Block_Adminhtml_Widget_Grid_Container extends Mage_Adminhtml_Block_Widget_Grid_Container
28
  {
29
+ public function getHeaderCssClass()
30
+ {
31
+ return 'novalnet-adminhtml-head ' . parent::getHeaderCssClass();
32
+ }
 
33
  }
app/code/community/Novalnet/Payment/Block/Adminhtml/Widget/View/Container.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Adminhtml_Widget_View_Container extends Mage_Adminhtml_Block_Widget_View_Container
28
+ {
29
+ public function getHeaderCssClass()
30
+ {
31
+ return 'novalnet-adminhtml-head ' . parent::getHeaderCssClass();
32
+ }
33
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Cc.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Cc extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Cc.phtml');
32
+ }
33
+
34
+ /**
35
+ * Retrieve payment configuration object
36
+ *
37
+ * @return Mage_Payment_Model_Config
38
+ */
39
+ protected function _getConfig() {
40
+ return Mage::getModel('payment/config');
41
+ }
42
+
43
+ /**
44
+ * Retrieve availables credit card types
45
+ *
46
+ * @return array
47
+ */
48
+ public function getCcAvailableTypes() {
49
+ return array('VI', 'MC');
50
+ }
51
+
52
+ /**
53
+ * Get information to end user from config
54
+ *
55
+ * @return string
56
+ */
57
+ public function getUserInfo() {
58
+ return $this->getMethod()->getConfigData('booking_reference');
59
+ }
60
+
61
+ /**
62
+ * Retrieve Novalnet Mode in Configuration
63
+ *
64
+ * @return bool
65
+ */
66
+ public function getLiveMode() {
67
+ return $this->getMethod()->_getConfigData('live_mode');
68
+ }
69
+
70
+ /**
71
+ * Check whether Callback type allowed
72
+ *
73
+ * @return bool
74
+ */
75
+ public function isCallbackTypeCall() {
76
+ return $this->getMethod()->isCallbackTypeCall();
77
+ //return false;
78
+ }
79
+
80
+ /**
81
+ * Novalnet Callback data getter
82
+ *
83
+ * @return string
84
+ */
85
+ public function getCallbackConfigData() {
86
+ return $this->getMethod()->_getConfigData('callback');
87
+ }
88
+
89
+ }
app/code/community/{Mage/Novalnet/Block/Secure/Form.php → Novalnet/Payment/Block/Payment/Method/Form/Ccsecure.php} RENAMED
@@ -1,133 +1,130 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
-
29
- class Mage_Novalnet_Block_Secure_Form extends Mage_Payment_Block_Form
30
- {
31
- private $_localConfig;
32
-
33
- protected function _construct()
34
- {
35
- parent::_construct();
36
- $this->setTemplate('novalnet/secure/form.phtml');
37
- }
38
-
39
- /**
40
- * Retrieve payment configuration object
41
- *
42
- * @return Mage_Payment_Model_Config
43
- */
44
- protected function _getConfig()
45
- {
46
- if (!$this->_localConfig) {
47
- $this->_localConfig = Mage::getModel('payment/config');
48
- }
49
- return $this->_localConfig;
50
- }
51
-
52
- /**
53
- * Retrieve availables credit card types
54
- *
55
- * @return array
56
- */
57
- public function getCcAvailableTypes()
58
- {
59
- $types = $this->_getConfig()->getCcTypes();
60
- if ($method = $this->getMethod()) {
61
- $availableTypes = $method->getConfigData('cctypes');
62
- if ($availableTypes) {
63
- $availableTypes = explode(',', $availableTypes);
64
- foreach ($types as $code=>$name) {
65
- if (!in_array($code, $availableTypes)) {
66
- unset($types[$code]);
67
- }
68
- }
69
- }
70
- }
71
- return $types;
72
- }
73
-
74
- /**
75
- * Retrieve credit card expire months
76
- *
77
- * @return array
78
- */
79
- public function getCcMonths()
80
- {
81
- $months = $this->getData('cc_months');
82
- if (is_null($months)) {
83
- $months[0] = $this->__('Month');
84
- $months = array_merge($months, $this->_getConfig()->getMonths());
85
- $this->setData('cc_months', $months);
86
- }
87
- return $months;
88
- }
89
-
90
- /**
91
- * Retrieve credit card expire years
92
- *
93
- * @return array
94
- */
95
- public function getCcYears()
96
- {
97
- $years = $this->getData('cc_years');
98
- if (is_null($years)) {
99
- $years = $this->_getConfig()->getYears();
100
- $years = array(0=>$this->__('Year'))+$years;
101
- $this->setData('cc_years', $years);
102
- }
103
- return $years;
104
- }
105
-
106
- /**
107
- * Retrive has verification configuration
108
- *
109
- * @return boolean
110
- */
111
- public function hasVerification()
112
- {
113
- if ($this->getMethod()) {
114
- $configData = $this->getMethod()->getConfigData('useccv');
115
- if(is_null($configData)){
116
- return true;
117
- }
118
- return (bool) $configData;
119
- }
120
- return true;
121
- }
122
-
123
- public function checkCustomerAccess() {
124
-
125
- $exludedGroupes = trim($this->getMethod()->getConfigData('user_group_excluded'));
126
- if( strlen( $exludedGroupes ) ) {
127
- $exludedGroupes = explode(',', $exludedGroupes);
128
- $custGrpId = Mage::getSingleton('customer/session')->getCustomerGroupId();
129
- return !in_array($custGrpId, $exludedGroupes);
130
- }
131
- return true;
132
- }
133
- }
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_CcSecure extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Ccsecure.phtml');
32
+ }
33
+
34
+ /**
35
+ * Retrieve payment configuration object
36
+ *
37
+ * @return Mage_Payment_Model_Config
38
+ */
39
+ protected function _getConfig() {
40
+ if (!$this->_localConfig) {
41
+ $this->_localConfig = Mage::getModel('payment/config');
42
+ }
43
+ return $this->_localConfig;
44
+ }
45
+
46
+ /**
47
+ * Retrieve availables credit card types
48
+ *
49
+ * @return array
50
+ */
51
+ public function getCcAvailableTypes() {
52
+ $types = $this->_getConfig()->getCcTypes();
53
+ $method = $this->getMethod();
54
+ if ($method) {
55
+ $availableTypes = $method->getConfigData('cctypes');
56
+ if ($availableTypes) {
57
+ $availableTypes = explode(',', $availableTypes);
58
+ foreach ($types as $code => $name) {
59
+ if (!in_array($code, $availableTypes)) {
60
+ unset($types[$code]);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ return $types;
66
+ }
67
+
68
+ /**
69
+ * Retrieve credit card expire months
70
+ *
71
+ * @return array
72
+ */
73
+ public function getCcMonths() {
74
+ $months = $this->getData('cc_months');
75
+ if (is_null($months)) {
76
+ $months = $this->_getConfig()->getMonths();
77
+ $this->setData('cc_months', $months);
78
+ }
79
+ return $months;
80
+ }
81
+
82
+ /**
83
+ * Retrieve credit card expire years
84
+ *
85
+ * @return array
86
+ */
87
+ public function getCcYears() {
88
+ $years = $this->getData('cc_years');
89
+ if (is_null($years)) {
90
+ $years = $this->_getConfig()->getYears();
91
+ $this->setData('cc_years', $years);
92
+ }
93
+ return $years;
94
+ }
95
+
96
+ /**
97
+ * Retrive has verification configuration
98
+ *
99
+ * @return boolean
100
+ */
101
+ public function hasVerification() {
102
+ if ($this->getMethod()) {
103
+ $configData = $this->getMethod()->getConfigData('useccv');
104
+ if (is_null($configData)) {
105
+ return true;
106
+ }
107
+ return (bool) $configData;
108
+ }
109
+ return true;
110
+ }
111
+
112
+ /**
113
+ * Get information to end user from config
114
+ *
115
+ * @return string
116
+ */
117
+ public function getUserInfo() {
118
+ return $this->getMethod()->getConfigData('booking_reference');
119
+ }
120
+
121
+ /**
122
+ * Retrieve Novalnet Mode in Configuration
123
+ *
124
+ * @return bool
125
+ */
126
+ public function getLiveMode() {
127
+ return $this->getMethod()->_getConfigData('live_mode');
128
+ }
129
+
130
+ }
 
 
 
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Elvaustria.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Elvaustria extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Elvaustria.phtml');
32
+ }
33
+
34
+ /**
35
+ * Get ACDC details from config
36
+ *
37
+ * @return bool
38
+ */
39
+ public function getAcdc() {
40
+ $method = $this->getMethod();
41
+ return $method->getConfigData('acdc_check');
42
+ }
43
+
44
+ /**
45
+ * Check whether Callback type allowed
46
+ *
47
+ * @return bool
48
+ */
49
+ public function isCallbackTypeCall() {
50
+ return $this->getMethod()->isCallbackTypeCall();
51
+ //return false;
52
+ }
53
+
54
+ /**
55
+ * Novalnet Callback data getter
56
+ *
57
+ * @return string
58
+ */
59
+ public function getCallbackConfigData() {
60
+ return $this->getMethod()->_getConfigData('callback');
61
+ }
62
+
63
+ /**
64
+ * Get Customer Telephone no
65
+ *
66
+ * @return int
67
+ */
68
+ public function getCustomersTelephone() {
69
+ $customer = Mage::getSingleton('customer/session')
70
+ ->getCustomer()->getDefaultBillingAddress();
71
+ if ($customer) {
72
+ return $customer->getTelephone();
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Get Customer Email address
78
+ *
79
+ * @return string
80
+ */
81
+ public function getCustomersEmail() {
82
+ $customer = Mage::getSingleton('customer/session')
83
+ ->getCustomer()->getEmail();
84
+ if ($customer) {
85
+ return $customer;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Get information to end user from config
91
+ *
92
+ * @return string
93
+ */
94
+ public function getUserInfo() {
95
+ return $this->getMethod()->getConfigData('booking_reference');
96
+ }
97
+
98
+ /**
99
+ * Retrieve Novalnet Mode in Configuration
100
+ *
101
+ * @return bool
102
+ */
103
+ public function getLiveMode() {
104
+ return $this->getMethod()->_getConfigData('live_mode');
105
+ }
106
+
107
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Elvgerman.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Elvgerman extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Elvgerman.phtml');
32
+ }
33
+
34
+ /**
35
+ * Get ACDC details from config
36
+ *
37
+ * @return bool
38
+ */
39
+ public function getAcdc() {
40
+ $method = $this->getMethod();
41
+ return $method->getConfigData('acdc_check');
42
+ }
43
+
44
+ /**
45
+ * Check whether Callback type allowed
46
+ *
47
+ * @return bool
48
+ */
49
+ public function isCallbackTypeCall() {
50
+ return $this->getMethod()->isCallbackTypeCall();
51
+ //return false;
52
+ }
53
+
54
+ /**
55
+ * Novalnet Callback data getter
56
+ *
57
+ * @return string
58
+ */
59
+ public function getCallbackConfigData() {
60
+ return $this->getMethod()->_getConfigData('callback');
61
+ }
62
+
63
+ /**
64
+ * Get Customer Telephone no
65
+ *
66
+ * @return int
67
+ */
68
+ public function getCustomersTelephone() {
69
+ $customer = Mage::getSingleton('customer/session')
70
+ ->getCustomer()->getDefaultBillingAddress();
71
+ if ($customer) {
72
+ return $customer->getTelephone();
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Get Customer Email address
78
+ *
79
+ * @return string
80
+ */
81
+ public function getCustomersEmail() {
82
+ $customer = Mage::getSingleton('customer/session')
83
+ ->getCustomer()->getEmail();
84
+ if ($customer) {
85
+ return $customer;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Get information to end user from config
91
+ *
92
+ * @return string
93
+ */
94
+ public function getUserInfo() {
95
+ return $this->getMethod()->getConfigData('booking_reference');
96
+ }
97
+
98
+ /**
99
+ * Retrieve Novalnet Mode in Configuration
100
+ *
101
+ * @return bool
102
+ */
103
+ public function getLiveMode() {
104
+ return $this->getMethod()->_getConfigData('live_mode');
105
+ }
106
+
107
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Ideal.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Ideal extends Mage_Payment_Block_Form {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/form/Ideal.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment configuration object
39
+ *
40
+ * @return Mage_Payment_Model_Config
41
+ */
42
+ protected function _getConfig() {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ /**
47
+ * Get information to end user from config
48
+ *
49
+ * @return string
50
+ */
51
+ public function getUserInfo() {
52
+ return $this->getMethod()->getConfigData('booking_reference');
53
+ }
54
+
55
+ /**
56
+ * Retrieve Novalnet Mode in Configuration
57
+ *
58
+ * @return bool
59
+ */
60
+ public function getLiveMode() {
61
+ return $this->getMethod()->_getConfigData('live_mode');
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Invoice.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Invoice extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Invoice.phtml');
32
+ }
33
+
34
+ /**
35
+ * Check whether Callback type allowed
36
+ *
37
+ * @return bool
38
+ */
39
+ public function isCallbackTypeCall() {
40
+ return $this->getMethod()->isCallbackTypeCall();
41
+ }
42
+
43
+ /**
44
+ * Novalnet Callback data getter
45
+ *
46
+ * @return string
47
+ */
48
+ public function getCallbackConfigData() {
49
+ return $this->getMethod()->_getConfigData('callback');
50
+ }
51
+
52
+ /**
53
+ * Get Customer Telephone no
54
+ *
55
+ * @return int
56
+ */
57
+ public function getCustomersTelephone() {
58
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBillingAddress();
59
+ if ($customer) {
60
+ return $customer->getTelephone();
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Get Customer Email address
66
+ *
67
+ * @return string
68
+ */
69
+ public function getCustomersEmail() {
70
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
71
+ if ($customer) {
72
+ return $customer;
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Get information to end user from config
78
+ *
79
+ * @return string
80
+ */
81
+ public function getUserInfo() {
82
+ return $this->getMethod()->getConfigData('booking_reference');
83
+ }
84
+
85
+ /**
86
+ * Retrieve Novalnet Mode in Configuration
87
+ *
88
+ * @return bool
89
+ */
90
+ public function getLiveMode() {
91
+ return $this->getMethod()->_getConfigData('live_mode');
92
+ }
93
+
94
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Paypal.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Paypal extends Mage_Payment_Block_Form {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/form/Paypal.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment configuration object
39
+ *
40
+ * @return Mage_Payment_Model_Config
41
+ */
42
+ protected function _getConfig() {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ /**
47
+ * Get information to end user from config
48
+ *
49
+ * @return string
50
+ */
51
+ public function getUserInfo() {
52
+ return $this->getMethod()->getConfigData('booking_reference');
53
+ }
54
+
55
+ /**
56
+ * Retrieve Novalnet Mode in Configuration
57
+ *
58
+ * @return bool
59
+ */
60
+ public function getLiveMode() {
61
+ return $this->getMethod()->_getConfigData('live_mode');
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Phonepayment.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Phonepayment extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Phonepayment.phtml');
32
+ }
33
+
34
+ /**
35
+ * Check whether Callback type allowed
36
+ *
37
+ * @return bool
38
+ */
39
+ public function isCallbackTypeCall() {
40
+ return $this->getMethod()->isCallbackTypeCall();
41
+ }
42
+
43
+ /**
44
+ * Novalnet Callback data getter
45
+ *
46
+ * @return string
47
+ */
48
+ public function getCallbackConfigData() {
49
+ return $this->getMethod()->getCallbackConfigData();
50
+ }
51
+
52
+ /**
53
+ * Get Customer Telephone no
54
+ *
55
+ * @return int
56
+ */
57
+ public function getCustomersTelephone() {
58
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBillingAddress();
59
+ if ($customer) {
60
+ return $customer->getTelephone();
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Get Customer Email address
66
+ *
67
+ * @return string
68
+ */
69
+ public function getCustomersEmail() {
70
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
71
+ if ($customer) {
72
+ return $customer;
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Get information to end user from config
78
+ *
79
+ * @return string
80
+ */
81
+ public function getUserInfo() {
82
+ return $this->getMethod()->getConfigData('booking_reference');
83
+ }
84
+
85
+ /**
86
+ * Retrieve Novalnet Mode in Configuration
87
+ *
88
+ * @return bool
89
+ */
90
+ public function getLiveMode() {
91
+ return $this->getMethod()->_getConfigData('live_mode');
92
+ }
93
+
94
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Prepayment.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Prepayment extends Mage_Payment_Block_Form {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/form/Prepayment.phtml');
32
+ }
33
+
34
+ /**
35
+ * Check whether Callback type allowed
36
+ *
37
+ * @return bool
38
+ */
39
+ public function isCallbackTypeCall() {
40
+ return $this->getMethod()->isCallbackTypeCall();
41
+ }
42
+
43
+ /**
44
+ * Novalnet Callback data getter
45
+ *
46
+ * @return string
47
+ */
48
+ public function getCallbackConfigData() {
49
+ return $this->getMethod()->getCallbackConfigData();
50
+ }
51
+
52
+ /**
53
+ * Get Customer Telephone no
54
+ *
55
+ * @return int
56
+ */
57
+ public function getCustomersTelephone() {
58
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBillingAddress();
59
+ if ($customer) {
60
+ return $customer->getTelephone();
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Get Customer Email address
66
+ *
67
+ * @return string
68
+ */
69
+ public function getCustomersEmail() {
70
+ $customer = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
71
+ if ($customer) {
72
+ return $customer;
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Get information to end user from config
78
+ *
79
+ * @return string
80
+ */
81
+ public function getUserInfo() {
82
+ return $this->getMethod()->getConfigData('booking_reference');
83
+ }
84
+
85
+ /**
86
+ * Retrieve Novalnet Mode in Configuration
87
+ *
88
+ * @return bool
89
+ */
90
+ public function getLiveMode() {
91
+ return $this->getMethod()->_getConfigData('live_mode');
92
+ }
93
+
94
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Form/Sofortueberweisung.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Form_Sofortueberweisung extends Mage_Payment_Block_Form {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/form/Sofortueberweisung.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment configuration object
39
+ *
40
+ * @return Mage_Payment_Model_Config
41
+ */
42
+ protected function _getConfig() {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ /**
47
+ * Get information to end user from config
48
+ *
49
+ * @return string
50
+ */
51
+ public function getUserInfo() {
52
+ return $this->getMethod()->getConfigData('booking_reference');
53
+ }
54
+
55
+ /**
56
+ * Retrieve Novalnet Mode in Configuration
57
+ *
58
+ * @return bool
59
+ */
60
+ public function getLiveMode() {
61
+ return $this->getMethod()->_getConfigData('live_mode');
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Cc.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Cc extends Mage_Payment_Block_Info {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/info/Cc.phtml');
35
+ }
36
+
37
+ /**
38
+ * Render as PDF
39
+ * @return string
40
+ */
41
+ public function toPdf() {
42
+ $this->setTemplate('novalnet/payment/method/pdf/Cc.phtml');
43
+ return $this->toHtml();
44
+ }
45
+
46
+ /**
47
+ * Get some specific information
48
+ *
49
+ * @return array
50
+ */
51
+ public function getAdditionalData($key) {
52
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
53
+ }
54
+
55
+ /**
56
+ * Retrieve payment method model
57
+ *
58
+ * @return Mage_Payment_Model_Method_Abstract
59
+ */
60
+ public function getMethod() {
61
+ return $this->getInfo()->getMethodInstance();
62
+ }
63
+
64
+ /**
65
+ * @return string
66
+ */
67
+ public function getPaymentMethod() {
68
+ return $this->getMethod()->getConfigData('title');
69
+ }
70
+
71
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Ccsecure.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Ccsecure extends Mage_Payment_Block_Info {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/info/Ccsecure.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve credit card type name
39
+ *
40
+ * @return string
41
+ */
42
+ public function getCcTypeName() {
43
+ $types = Mage::getSingleton('payment/config')->getCcTypes();
44
+ if (isset($types[$this->getInfo()->getCcType()])) {
45
+ return $types[$this->getInfo()->getCcType()];
46
+ }
47
+ return $this->getInfo()->getCcType();
48
+ }
49
+
50
+ /**
51
+ * Retrieve CC expiration month
52
+ *
53
+ * @return string
54
+ */
55
+ public function getCcExpMonth() {
56
+ $month = $this->getInfo()->getCcExpMonth();
57
+ if ($month < 10) {
58
+ $month = '0' . $month;
59
+ }
60
+ return $month;
61
+ }
62
+
63
+ /**
64
+ * Retrieve CC expiration date
65
+ *
66
+ * @return Zend_Date
67
+ */
68
+ public function getCcExpDate() {
69
+ $date = Mage::app()->getLocale()->date(0);
70
+ $date->setYear($this->getInfo()->getCcExpYear());
71
+ $date->setMonth($this->getInfo()->getCcExpMonth());
72
+ return $date;
73
+ }
74
+
75
+ /**
76
+ * Render as PDF
77
+ * @return string
78
+ */
79
+ public function toPdf() {
80
+ $this->setTemplate('novalnet/payment/method/pdf/Ccsecure.phtml');
81
+ return $this->toHtml();
82
+ }
83
+
84
+ /**
85
+ * Retrieve payment method model
86
+ *
87
+ * @return Mage_Payment_Model_Method_Abstract
88
+ */
89
+ public function getMethod() {
90
+ return $this->getInfo()->getMethodInstance();
91
+ // return Mage::helper('novalnet_payment')->getModel('novalnetSecure');
92
+ }
93
+
94
+ /**
95
+ * @return string
96
+ */
97
+ public function getPaymentMethod() {
98
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
99
+ }
100
+
101
+ /**
102
+ * Get some specific information
103
+ *
104
+ * @return array
105
+ */
106
+ public function getAdditionalData($key) {
107
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
108
+ }
109
+
110
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Elvaustria.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Elvaustria extends Mage_Payment_Block_Info {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/info/Elvaustria.phtml');
32
+ }
33
+
34
+ /**
35
+ * Render as PDF
36
+ * @return string
37
+ */
38
+ public function toPdf() {
39
+ $this->setTemplate('novalnet/payment/method/pdf/Elvaustria.phtml');
40
+ return $this->toHtml();
41
+ }
42
+
43
+ /**
44
+ * Retrieve payment method model
45
+ *
46
+ * @return Mage_Payment_Model_Method_Abstract
47
+ */
48
+ public function getMethod() {
49
+ return $this->getInfo()->getMethodInstance();
50
+ }
51
+
52
+ /**
53
+ * @return string
54
+ */
55
+ public function getPaymentMethod() {
56
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
57
+ }
58
+
59
+ /**
60
+ * Retrieve field value data from payment info object
61
+ *
62
+ * @param string $field
63
+ * @return mixed
64
+ */
65
+ public function getInfoData($field) {
66
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
67
+ }
68
+
69
+ /**
70
+ * Get some specific information
71
+ *
72
+ * @return array
73
+ */
74
+ public function getAdditionalData($key) {
75
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
76
+ }
77
+
78
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Elvgerman.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Elvgerman extends Mage_Payment_Block_Info {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/info/Elvgerman.phtml');
32
+ }
33
+
34
+ /**
35
+ * Render as PDF
36
+ * @return string
37
+ */
38
+ public function toPdf() {
39
+ $this->setTemplate('novalnet/payment/method/pdf/Elvgerman.phtml');
40
+ return $this->toHtml();
41
+ }
42
+
43
+ /**
44
+ * Retrieve payment method model
45
+ *
46
+ * @return Mage_Payment_Model_Method_Abstract
47
+ */
48
+ public function getMethod() {
49
+ return $this->getInfo()->getMethodInstance();
50
+ }
51
+
52
+ /**
53
+ * @return string
54
+ */
55
+ public function getPaymentMethod() {
56
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
57
+ }
58
+
59
+ /**
60
+ * Retrieve field value data from payment info object
61
+ *
62
+ * @param string $field
63
+ * @return mixed
64
+ */
65
+ public function getInfoData($field) {
66
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
67
+ }
68
+
69
+ /**
70
+ * Get some specific information
71
+ *
72
+ * @return array
73
+ */
74
+ public function getAdditionalData($key) {
75
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
76
+ }
77
+
78
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Ideal.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Ideal extends Mage_Payment_Block_Info {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/info/Ideal.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment method model
39
+ *
40
+ * @return Mage_Payment_Model_Method_Abstract
41
+ */
42
+ public function getMethod() {
43
+ return $this->getInfo()->getMethodInstance();
44
+ }
45
+
46
+ /**
47
+ * Render as PDF
48
+ * @return string
49
+ */
50
+ public function toPdf() {
51
+ $this->setTemplate('novalnet/payment/method/pdf/Ideal.phtml');
52
+ return $this->toHtml();
53
+ }
54
+
55
+ /**
56
+ * Get some specific information
57
+ *
58
+ * @return array
59
+ */
60
+ public function getAdditionalData($key) {
61
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Invoice.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Invoice extends Mage_Payment_Block_Info {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/info/Invoice.phtml');
32
+ }
33
+
34
+ /**
35
+ * Render as PDF
36
+ * @return string
37
+ */
38
+ public function toPdf() {
39
+ $this->setTemplate('novalnet/payment/method/pdf/Invoice.phtml');
40
+ return $this->toHtml();
41
+ }
42
+
43
+ /**
44
+ * Retrieve payment method model
45
+ *
46
+ * @return Mage_Payment_Model_Method_Abstract
47
+ */
48
+ public function getMethod() {
49
+ return $this->getInfo()->getMethodInstance();
50
+ }
51
+
52
+ /**
53
+ * Retrieve field value data from payment info object
54
+ *
55
+ * @param string $field
56
+ * @return mixed
57
+ */
58
+ public function getInfoData($field) {
59
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
60
+ }
61
+
62
+ /**
63
+ * @return string
64
+ */
65
+ public function getPaymentMethod() {
66
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
67
+ }
68
+
69
+ /**
70
+ * Get some specific information
71
+ *
72
+ * @return array
73
+ */
74
+ public function getAdditionalData($key) {
75
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
76
+ }
77
+
78
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Paypal.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Paypal extends Mage_Payment_Block_Info {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/info/Paypal.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment method model
39
+ *
40
+ * @return Mage_Payment_Model_Method_Abstract
41
+ */
42
+ public function getMethod() {
43
+ return $this->getInfo()->getMethodInstance();
44
+ }
45
+
46
+ /**
47
+ * Render as PDF
48
+ * @return string
49
+ */
50
+ public function toPdf() {
51
+ $this->setTemplate('novalnet/payment/method/pdf/Paypal.phtml');
52
+ return $this->toHtml();
53
+ }
54
+
55
+ /**
56
+ * Get some specific information
57
+ *
58
+ * @return array
59
+ */
60
+ public function getAdditionalData($key) {
61
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Phonepayment.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Phonepayment extends Mage_Payment_Block_Info {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/info/Phonepayment.phtml');
32
+ }
33
+
34
+ /**
35
+ * Render as PDF
36
+ * @return string
37
+ */
38
+ public function toPdf() {
39
+ $this->setTemplate('novalnet/payment/method/pdf/Phonepayment.phtml');
40
+ return $this->toHtml();
41
+ }
42
+
43
+ /**
44
+ * Retrieve payment method model
45
+ *
46
+ * @return Mage_Payment_Model_Method_Abstract
47
+ */
48
+ public function getMethod() {
49
+ return $this->getInfo()->getMethodInstance();
50
+ }
51
+
52
+ /**
53
+ * Retrieve field value data from payment info object
54
+ *
55
+ * @param string $field
56
+ * @return mixed
57
+ */
58
+ public function getInfoData($field) {
59
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
60
+ }
61
+
62
+ /**
63
+ * @return string
64
+ */
65
+ public function getPaymentMethod() {
66
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
67
+ }
68
+
69
+ /**
70
+ * Get some specific information
71
+ *
72
+ * @return array
73
+ */
74
+ public function getAdditionalData($key) {
75
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
76
+ }
77
+
78
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Prepayment.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Prepayment extends Mage_Payment_Block_Info {
28
+
29
+ protected function _construct() {
30
+ parent::_construct();
31
+ $this->setTemplate('novalnet/payment/method/info/Prepayment.phtml');
32
+ }
33
+
34
+ /**
35
+ * Render as PDF
36
+ * @return string
37
+ */
38
+ public function toPdf() {
39
+ $this->setTemplate('novalnet/payment/method/pdf/Prepayment.phtml');
40
+ return $this->toHtml();
41
+ }
42
+
43
+ /**
44
+ * Retrieve payment method model
45
+ *
46
+ * @return Mage_Payment_Model_Method_Abstract
47
+ */
48
+ public function getMethod() {
49
+ return $this->getInfo()->getMethodInstance();
50
+ }
51
+
52
+ /**
53
+ * Retrieve field value data from payment info object
54
+ *
55
+ * @param string $field
56
+ * @return mixed
57
+ */
58
+ public function getInfoData($field) {
59
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
60
+ }
61
+
62
+ /**
63
+ * @return string
64
+ */
65
+ public function getPaymentMethod() {
66
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
67
+ }
68
+
69
+ /**
70
+ * Get some specific information
71
+ *
72
+ * @return array
73
+ */
74
+ public function getAdditionalData($key) {
75
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
76
+ }
77
+
78
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/Info/Sofortueberweisung.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_Info_Sofortueberweisung extends Mage_Payment_Block_Info {
28
+
29
+ /**
30
+ * Init default template for block
31
+ */
32
+ protected function _construct() {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/payment/method/info/Sofortueberweisung.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment method model
39
+ *
40
+ * @return Mage_Payment_Model_Method_Abstract
41
+ */
42
+ public function getMethod() {
43
+ return $this->getInfo()->getMethodInstance();
44
+ }
45
+
46
+ /**
47
+ * Render as PDF
48
+ * @return string
49
+ */
50
+ public function toPdf() {
51
+ $this->setTemplate('novalnet/payment/method/pdf/Sofortueberweisung.phtml');
52
+ return $this->toHtml();
53
+ }
54
+
55
+ /**
56
+ * Get some specific information
57
+ *
58
+ * @return array
59
+ */
60
+ public function getAdditionalData($key) {
61
+ return Mage::helper('novalnet_payment')->getAdditionalData($this->getInfo(), $key);
62
+ }
63
+
64
+ }
app/code/community/Novalnet/Payment/Block/Payment/Method/NovalnetRedirect.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Copyright (c) Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Block_Payment_Method_NovalnetRedirect extends Mage_Core_Block_Abstract {
28
+
29
+ protected function _toHtml() {
30
+ $payment = $this->getOrder()->getPayment()->getMethodInstance();
31
+ $helper = Mage::helper('novalnet_payment');
32
+ if ($payment->_getConfigData('password', true)
33
+ || $payment->getCode() == Novalnet_Payment_Model_Config::NN_CC3D) {
34
+ $form = new Varien_Data_Form();
35
+ $form->setAction($payment->getConfigData('url'))
36
+ ->setId($payment->getCode())
37
+ ->setName($payment->getCode())
38
+ ->setMethod(Novalnet_Payment_Model_Config::NOVALNET_RETURN_METHOD)
39
+ ->setUseContainer(true);
40
+
41
+ $getFormData = $payment->buildRequest()->getData();
42
+ foreach ($getFormData as $field => $value) {
43
+ $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
44
+ }
45
+
46
+ $logFormData = Mage::helper('novalnet_payment/AssignData')->doRemoveSensitiveData($getFormData, $payment->getCode());
47
+
48
+ //Save Transaction request data
49
+ $modNovalTransactionOverview = $helper->getModelTransactionOverview();
50
+ $modNovalTransactionOverview->setOrderId($getFormData['order_no'])
51
+ ->setRequestData(serialize($logFormData))
52
+ ->setCreatedDate($helper->getCurrentDateTime())
53
+ ->save();
54
+
55
+ // IE & Firefox will not submit form if the form is full of hidden fileds.
56
+ $form->addField('continue', 'submit', array('name' => 'Continue', 'value' => $this->__('Continue')));
57
+ $html = '<html><body>';
58
+ $html.= $this->__('You will be redirected to Novalnet AG website when you place an order.');
59
+ $html.= $form->toHtml();
60
+ $html.= '<script type="text/javascript">document.getElementById("' . $payment->getCode() . '").submit();</script>';
61
+ $html.= '</body></html>';
62
+ return $html;
63
+ } else {
64
+ $html = $this->__('Theres no password defined');
65
+ return $html;
66
+ }
67
+ }
68
+
69
+ }
app/code/community/Novalnet/Payment/Helper/AssignData.php ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Helper_AssignData extends Novalnet_Payment_Helper_Data {
28
+
29
+ /**
30
+ * Assign Form Data in quote instance based on payment method
31
+ *
32
+ * @return Mage_Payment_Model_Abstract Object
33
+ */
34
+ public function assignNovalnetData($paymentCode, $data, $infoInstance) {
35
+ if ($paymentCode) {
36
+ if (!($data instanceof Varien_Object)) {
37
+ $data = new Varien_Object($data);
38
+ }
39
+ switch ($paymentCode) {
40
+ case Novalnet_Payment_Model_Config::NN_ELVDE:
41
+ $infoInstance->setNnAccountHolder(trim($data->getAccountHolder()))
42
+ ->setNnAccountNumber(trim($data->getAccountNumber()))
43
+ ->setNnBankSortingCode(trim($data->getBankSortingCode()))
44
+ ->setNnAcdc($data->getAcdc())
45
+ ->setNnElvCountry($data->getElvCountry())
46
+ ->setNnCallbackTelNovalnetElvgerman($data->getCallbackTel())
47
+ ->setNnCallbackPinNovalnetElvgerman(trim($data->getCallbackPin()))
48
+ ->setNnNewCallbackPinNovalnetElvgerman($data->getNewCallbackPin())
49
+ ->setNnCallbackEmailNovalnetElvgerman($data->getCallbackEmail());
50
+ if ($this->getModel($paymentCode)->_getConfigData('acdc_check')) {
51
+ $infoInstance->setAcdcValidationFlag(true);
52
+ }
53
+ if ($this->getModel($paymentCode)->_getConfigData('callback') != 3) {
54
+ $infoInstance->setCallbackPinValidationFlag(true);
55
+ }
56
+ break;
57
+ case Novalnet_Payment_Model_Config::NN_ELVAT:
58
+ $infoInstance->setNnAccountHolder(trim($data->getAccountHolderAt()))
59
+ ->setNnAccountNumber(trim($data->getAccountNumberAt()))
60
+ ->setNnBankSortingCode(trim($data->getBankSortingCodeAt()))
61
+ ->setNnCallbackTelNovalnetElvaustria($data->getCallbackTel())
62
+ ->setNnCallbackPinNovalnetElvaustria(trim($data->getCallbackPin()))
63
+ ->setNnNewCallbackPinNovalnetElvaustria($data->getNewCallbackPin())
64
+ ->setNnCallbackEmailNovalnetElvaustria($data->getCallbackEmail());
65
+ if ($this->getModel($paymentCode)->_getConfigData('callback') != 3) {
66
+ $infoInstance->setCallbackPinValidationFlag(true);
67
+ }
68
+ break;
69
+ case Novalnet_Payment_Model_Config::NN_CC:
70
+ $infoInstance->setPanHash($this->novalnetCardDetails('novalnet_cc_pan_hash'))
71
+ ->setUniqueId($this->novalnetCardDetails('novalnet_cc_unique_id'))
72
+ ->setNnCallbackTelNovalnetCc($data->getCallbackTel())
73
+ ->setNnCallbackPinNovalnetCc(trim($data->getCallbackPin()))
74
+ ->setNnNewCallbackPinNovalnetCc($data->getNewCallbackPin())
75
+ ->setNnCallbackEmailNovalnetCc($data->getCallbackEmail());
76
+ if ($this->getModel($paymentCode)->_getConfigData('callback') != 3) {
77
+ $infoInstance->setCallbackPinValidationFlag(true);
78
+ }
79
+ break;
80
+ case Novalnet_Payment_Model_Config::NN_CC3D:
81
+ $this->_getCheckoutSession()->setNnCcNumber(Mage::helper('core')->encrypt($data->getNnCcNumber()))
82
+ ->setNnCcCvc(Mage::helper('core')->encrypt($data->getNnCcCid()))
83
+ ->setNnCcOwner(Mage::helper('core')->encrypt($data->getNnCcOwner()))
84
+ ->setNnCcExpMonth(Mage::helper('core')->encrypt($data->getNnCcExpMonth()))
85
+ ->setNnCcExpYear(Mage::helper('core')->encrypt($data->getNnCcExpYear()));
86
+ break;
87
+ case Novalnet_Payment_Model_Config::NN_INVOICE:
88
+ $infoInstance->setNnCallbackTelNovalnetInvoice($data->getCallbackTel())
89
+ ->setNnCallbackPinNovalnetInvoice(trim($data->getCallbackPin()))
90
+ ->setNnNewCallbackPinNovalnetInvoice($data->getNewCallbackPin())
91
+ ->setNnCallbackEmailNovalnetInvoice($data->getCallbackEmail());
92
+ if ($this->getModel($paymentCode)->_getConfigData('callback') != 3) {
93
+ $infoInstance->setCallbackPinValidationFlag(true);
94
+ }
95
+ break;
96
+ }
97
+ }
98
+ }
99
+
100
+ /**
101
+ * validate novalnet form data
102
+ *
103
+ * throw Mage Exception
104
+ */
105
+ public function validateNovalnetData($paymentCode, $infoInstance) {
106
+ switch ($paymentCode) {
107
+ case Novalnet_Payment_Model_Config::NN_ELVDE:
108
+ case Novalnet_Payment_Model_Config::NN_ELVAT:
109
+ $nnAccountHolder = $infoInstance->getNnAccountHolder();
110
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $infoInstance->getNnAccountNumber());
111
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $infoInstance->getNnBankSortingCode());
112
+
113
+ if (!$this->checkIsValid($nnAccountHolder)
114
+ || !$this->checkIsNumeric($nnAccountNumber) || !$this->checkIsNumeric($nnBankSortingCode)
115
+ || strlen($nnAccountNumber) < Novalnet_Payment_Model_Config::ACCNO_MIN_LENGTH
116
+ || strlen($nnBankSortingCode) < Novalnet_Payment_Model_Config::BANK_SORTCODE_LENGTH) {
117
+ Mage::throwException($this->__('Please enter valid account details') . '!');
118
+ }
119
+
120
+ if ($paymentCode == Novalnet_Payment_Model_Config::NN_ELVDE
121
+ && $infoInstance->getAcdcValidationFlag() && !$infoInstance->getNnAcdc()) {
122
+ Mage::throwException($this->__('Please enable ACDC Check') . '!');
123
+ }
124
+ break;
125
+ case Novalnet_Payment_Model_Config::NN_CC:
126
+ $ccType = $this->novalnetCardDetails('novalnet_cc_type');
127
+ $ccOwner = $this->novalnetCardDetails('novalnet_cc_owner');
128
+ $expYear = $this->novalnetCardDetails('novalnet_cc_exp_year');
129
+ $expMonth = $this->novalnetCardDetails('novalnet_cc_exp_month');
130
+ $ccid = $this->novalnetCardDetails('novalnet_cc_cid');
131
+ $verifcationRegEx = $this->_getVerificationRegExp();
132
+ $regExp = isset($verifcationRegEx[$ccType]) ? $verifcationRegEx[$ccType] : '';
133
+ if (!$infoInstance->getPanHash() || !$infoInstance->getUniqueId()) {
134
+ Mage::throwException($this->__('Authentication Failed'));
135
+ } elseif (!$this->checkIsValid($ccOwner) || !$this->_validateExpDate($expYear, $expMonth)
136
+ || !$this->checkIsNumeric($ccid)) {
137
+ Mage::throwException($this->__('Please enter valid credit card details') . '!');
138
+ } elseif($this->getModel($paymentCode)->_getConfigData('callback') == '1' && !$infoInstance->getNnCallbackTelNovalnetCc() && !$this->checkIsAdmin()){
139
+ Mage::throwException($this->__('Please enter the Telephone / Mobilenumber') . '!');
140
+ } elseif($this->getModel($paymentCode)->_getConfigData('callback') == '3' && !$this->validateEmail($infoInstance->getNnCallbackEmailNovalnetCc()) && !$this->checkIsAdmin()){
141
+ Mage::throwException($this->__('Please enter the E-Mail Address') . '!');
142
+ }
143
+ break;
144
+ case Novalnet_Payment_Model_Config::NN_CC3D:
145
+ $ccOwner = Mage::helper('core')->decrypt($this->_getCheckoutSession()->getNnCcOwner());
146
+ $expYear = Mage::helper('core')->decrypt($this->_getCheckoutSession()->getNnCcExpYear());
147
+ $expMonth = Mage::helper('core')->decrypt($this->_getCheckoutSession()->getNnCcExpMonth());
148
+
149
+ if (!$this->checkIsValid($ccOwner) || !$this->_validateExpDate($expYear, $expMonth)) {
150
+ Mage::throwException($this->__('Please enter valid credit card details') . '!');
151
+ }
152
+ break;
153
+ case Novalnet_Payment_Model_Config::NN_IDEAL:
154
+ case Novalnet_Payment_Model_Config::NN_PAYPAL:
155
+ case Novalnet_Payment_Model_Config::NN_SOFORT:
156
+ if (!$this->getModel($paymentCode)->_getConfigData('password', true)) {
157
+ Mage::throwException($this->__('Basic Parameter not valid') . '!');
158
+ }
159
+
160
+ if ($paymentCode == Novalnet_Payment_Model_Config::NN_PAYPAL &&
161
+ (!$this->getModel($paymentCode)->_getConfigData('api_sign', true)
162
+ || !$this->getModel($paymentCode)->_getConfigData('api_user', true)
163
+ || !$this->getModel($paymentCode)->_getConfigData('api_password', true))) {
164
+ Mage::throwException($this->__('Basic Parameter not valid') . '!');
165
+ }
166
+
167
+ break;
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Assign novalnet return params for redirect payments
173
+ *
174
+ * @return Mage_Payment_Model_Abstract Object
175
+ */
176
+ public function assignNovalnetReturnData(Varien_Object $request, $paymentCode) {
177
+ $redirectPayment = array(
178
+ Novalnet_Payment_Model_Config::NN_SOFORT,
179
+ Novalnet_Payment_Model_Config::NN_PAYPAL,
180
+ Novalnet_Payment_Model_Config::NN_IDEAL,
181
+ Novalnet_Payment_Model_Config::NN_CC3D
182
+ );
183
+ $request->setUserVariable_0(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB))
184
+ ->setReturnMethod(Novalnet_Payment_Model_Config::NOVALNET_RETURN_METHOD)
185
+ ->setErrorReturnMethod(Novalnet_Payment_Model_Config::NOVALNET_RETURN_METHOD);
186
+ if (in_array($paymentCode, $redirectPayment)) {
187
+ $request->setReturnUrl($this->getUrl(Novalnet_Payment_Model_Config::GATEWAY_RETURN_URL))
188
+ ->setErrorReturnUrl($this->getUrl(Novalnet_Payment_Model_Config::GATEWAY_ERROR_RETURN_URL));
189
+ }
190
+ }
191
+
192
+ /**
193
+ * To get encode data
194
+ *
195
+ * @param Varien_Object $dataObj
196
+ * @param String $key
197
+ * @return String
198
+ */
199
+ public function importNovalnetEncodeData(Varien_Object $dataObj, $key) {
200
+ $encoding = $this->getPciEncodedParam($dataObj, $key);
201
+ if ($encoding != true) {
202
+ Mage::getSingleton('core/session')->addError('Die Methoden f&uuml;r die Verarbeitung von Zeichens&auml;tzen sind nicht verf&uuml;gbar!');
203
+ $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
204
+ Mage::app()->getResponse()->setRedirect($url);
205
+ Mage::app()->getResponse()->sendResponse();
206
+ exit;
207
+ }
208
+ $this->importNovalnetHashData($dataObj, $key);
209
+ return $dataObj;
210
+ }
211
+
212
+ /**
213
+ * To get Hash data
214
+ *
215
+ * @param Varien_Object $dataObj
216
+ * @param String $key
217
+ * @return String
218
+ */
219
+ public function importNovalnetHashData(Varien_Object $dataObj, $key) {
220
+ $hash = $this->generateHash($dataObj, $key);
221
+ if ($hash == false) {
222
+ Mage::getSingleton('core/session')->addError('Die Hashfunktionen sind nicht verf&uuml;gbar!');
223
+ $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
224
+ Mage::app()->getResponse()->setRedirect($url);
225
+ Mage::app()->getResponse()->sendResponse();
226
+ exit;
227
+ }
228
+ $dataObj->setHash($hash);
229
+ return $dataObj;
230
+ }
231
+
232
+ /**
233
+ * Do XML call request to server
234
+ *
235
+ * @param Varien_Object $request_data
236
+ * @param String $request_url
237
+ * @return Mage_Payment_Model_Abstract Object
238
+ */
239
+ public function setRawCallRequest($request_data, $request_url) {
240
+ $httpClientConfig = array('maxredirects' => 0);
241
+ $client = new Varien_Http_Client($request_url, $httpClientConfig);
242
+ $client->setRawData($request_data)->setMethod(Varien_Http_Client::POST);
243
+ $response = $client->request();
244
+ if (!$response->isSuccessful()) {
245
+ Mage::throwException($this->_getHelper()->__('Gateway request error: %s', $response->getMessage()));
246
+ }
247
+ $result = new Varien_Object();
248
+ $result->addData($this->deformatNvp('&', $response->getBody()));
249
+ return $result;
250
+ }
251
+
252
+ /**
253
+ * Retrieve Credit Card Details
254
+ *
255
+ * @param string $param
256
+ * @return string
257
+ */
258
+ public function novalnetCardDetails($param) {
259
+ return Mage::app()->getRequest()->getPost($param);
260
+ }
261
+
262
+ /**
263
+ * remove sensitive data form novalnet log
264
+ *
265
+ * @param Varien_Object $request
266
+ * @param integer $paymentCode
267
+ * @return Mage_Payment_Model_Abstract Object
268
+ */
269
+ public function doRemoveSensitiveData($request, $paymentCode) {
270
+ if ($paymentCode) {
271
+ switch ($paymentCode) {
272
+ case Novalnet_Payment_Model_Config::NN_ELVDE:
273
+ case Novalnet_Payment_Model_Config::NN_ELVAT:
274
+ $request->unsBankAccountHolder()
275
+ ->unsBankAccount()
276
+ ->unsBankCode();
277
+ break;
278
+ case Novalnet_Payment_Model_Config::NN_CC3D:
279
+ unset($request['cc_holder'], $request['cc_no'], $request['cc_exp_month'], $request['cc_exp_year'], $request['cc_cvc2']);
280
+ break;
281
+ case Novalnet_Payment_Model_Config::NN_CC:
282
+ $request->unsCcHolder()
283
+ ->unsCcNo()
284
+ ->unsCcExpMonth()
285
+ ->unsCcExpYear()
286
+ ->unsCcCvc2()
287
+ ->unsCcType();
288
+ break;
289
+ }
290
+ }
291
+ return $request;
292
+ }
293
+
294
+ /**
295
+ * validate credit card expiry date and month
296
+ *
297
+ * @param integer $expYear
298
+ * @param integer $expMonth
299
+ * @return bool
300
+ */
301
+ protected function _validateExpDate($expYear, $expMonth) {
302
+ $date = Mage::app()->getLocale()->date();
303
+ if (!$expYear || !$expMonth || ($date->compareYear($expYear) == 1)
304
+ || ($date->compareYear($expYear) == 0 && ($date->compareMonth($expMonth) == 1))
305
+ ) {
306
+ return false;
307
+ }
308
+ return true;
309
+ }
310
+
311
+ /**
312
+ * Get credit card type regular expression
313
+ *
314
+ * @return array
315
+ */
316
+ protected function _getVerificationRegExp(){
317
+ $verificationExpList = array(
318
+ 'VI' => '/^[0-9]{3}$/', // Visa
319
+ 'MC' => '/^[0-9]{3}$/', // Master Card
320
+ 'AE' => '/^[0-9]{4}$/', // American Express
321
+ 'DI' => '/^[0-9]{3}$/', // Discovery
322
+ 'SS' => '/^[0-9]{3,4}$/',
323
+ 'SM' => '/^[0-9]{3,4}$/', // Switch or Maestro
324
+ 'SO' => '/^[0-9]{3,4}$/', // Solo
325
+ 'OT' => '/^[0-9]{3,4}$/',
326
+ 'JCB' => '/^[0-9]{3,4}$/' //JCB
327
+ );
328
+ return $verificationExpList;
329
+ }
330
+
331
+ /**
332
+ * Get Novalnet Bank Account Details
333
+ *
334
+ * @param array $result
335
+ * @return mixed
336
+ */
337
+ public function getNote($result, $paymentDuration) {
338
+ $dueDate = $this->setDueDate($paymentDuration);
339
+ $note = NULL;
340
+ $note .= "<br /><b>" . $this->__('Please transfer the invoice amount with the following information to our payment provider Novalnet AG') . "</b><br />";
341
+ $note .= ($dueDate) ? ($this->__('Due Date') . ' : <b>' . $dueDate . "</b><br />") : NULL;
342
+ $note .= $this->__('Account Holder2') . " : <b>NOVALNET AG</b><br />";
343
+ $note .= $this->__('Account Number') . " : <b>" . $result->getInvoiceAccount() . "</b><br />";
344
+ $note .= $this->__('Bank Sorting Code') . " : <b>" . $result->getInvoiceBankcode() . "</b><br />";
345
+ $note .= $this->__('NN_Bank') . " : <b>" . $result->getInvoiceBankname() . " " . trim($result->getInvoiceBankplace()) . "</b><br />";
346
+ return $note;
347
+ }
348
+
349
+ /**
350
+ * Return bank details amount
351
+ *
352
+ * @param float $amount
353
+ * @return string
354
+ */
355
+ public function getBankDetailsAmount($amount) {
356
+ return $this->__('NN_Amount') . " : <b>" . Mage::helper('core')->currency($amount, true, false) . "</b><br />";
357
+ }
358
+
359
+ /**
360
+ * Return bank details transaction id
361
+ *
362
+ * @param integer $tid
363
+ * @return string
364
+ */
365
+ public function getBankDetailsTID($tid) {
366
+ return $this->__('NN_Reference') . " : <b>TID " . $tid . "</b><br /><br />";
367
+ }
368
+
369
+ /**
370
+ * Return foreign transfer details
371
+ *
372
+ * @param object $result
373
+ * @return string
374
+ */
375
+ public function getBankDetailsTransfer($result) {
376
+ $note = NULL;
377
+ $note .= "<b>" . $this->__('Only for foreign transfers') . ":</b><br />";
378
+ $note .= "IBAN : <b> " . $result->getInvoiceIban() . " </b><br />";
379
+ $note .= "SWIFT/BIC : <b>" . $result->getInvoiceBic() . " </b><br />";
380
+ return $note;
381
+ }
382
+
383
+ }
app/code/community/Novalnet/Payment/Helper/Data.php ADDED
@@ -0,0 +1,865 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Helper_Data extends Mage_Core_Helper_Abstract {
28
+
29
+ /**
30
+ * Array values to configure global configuration
31
+ */
32
+
33
+ protected $config = array(
34
+ 'index' => array(
35
+ 'header_text' => 'Novalnet Global Configuration',
36
+ 'previous_page' => '',
37
+ 'next_page' => 'generalGlobal',
38
+ ),
39
+ 'generalGlobal' => array(
40
+ 'group_name' => 'novalnet',
41
+ 'header_text' => 'Novalnet Global Configuration',
42
+ 'codes' => array(
43
+ 'page' => 'generalGlobal',
44
+ //'section' => 'payment_config',
45
+ 'section' => 'novalnet_global',
46
+ ),
47
+ 'previous_page' => 'index',
48
+ )
49
+ );
50
+
51
+ /**
52
+ * Initiate configuration
53
+ *
54
+ * @param $actionName
55
+ * @param $request
56
+ * @return Varien_Object
57
+ */
58
+ public function initConfig($actionName, $request) {
59
+ $config = new Varien_Object($this->config);
60
+ $this->registerConfig($config);
61
+
62
+ $configPages = $this->initConfigPage($actionName);
63
+ $configPages = new Varien_Object($configPages);
64
+
65
+ $codes = $configPages->getData('codes');
66
+
67
+ $codes['website'] = $request->getParam('website');
68
+ $codes['store'] = $request->getParam('store');
69
+
70
+ $configPages->setData('codes', $codes);
71
+
72
+ $this->registerConfigPage($configPages);
73
+ return $configPages;
74
+ }
75
+
76
+ /**
77
+ * Get novalnet configure wizard details
78
+ *
79
+ * @return Varien_Object
80
+ */
81
+ public function getConfig() {
82
+ return Mage::registry('novalnet_wizard_config');
83
+ }
84
+
85
+ /**
86
+ * Register novalnet configurtion wizard details
87
+ *
88
+ * @param Varien_Object $config
89
+ */
90
+ public function registerConfig(Varien_Object $config) {
91
+ Mage::register('novalnet_wizard_config', $config);
92
+ }
93
+
94
+ /**
95
+ * Get configuration page
96
+ *
97
+ * @return Varien_Object
98
+ */
99
+ public function getConfigPage() {
100
+ /** @var $config Varien_Object */
101
+ return Mage::registry('novalnet_wizard_config_page');
102
+ }
103
+
104
+ /**
105
+ * Register configuration page
106
+ *
107
+ * @param Varien_Object $config
108
+ */
109
+ public function registerConfigPage(Varien_Object $config) {
110
+ Mage::register('novalnet_wizard_config_page', $config);
111
+ }
112
+
113
+ /**
114
+ * Initiate configuration page process
115
+ *
116
+ * @param $page
117
+ * @return array|null
118
+ */
119
+ public function initConfigPage($page) {
120
+ if (!array_key_exists($page, $this->config)) {
121
+ return null;
122
+ }
123
+ return $this->config[$page];
124
+ }
125
+
126
+ /**
127
+ * @return array
128
+ */
129
+ public function initConfigArray() {
130
+ return $this->config;
131
+ }
132
+
133
+ /**
134
+ * Get configuration wizard next page
135
+ *
136
+ * @return string
137
+ */
138
+ public function getNextPageUrlAsString() {
139
+ $pageName = $this->getConfigPage()->getData('next_page');
140
+ $url = $this->getPageUrlAsString($pageName);
141
+ return $url;
142
+ }
143
+
144
+ /**
145
+ * Get configuration wizard previous page
146
+ *
147
+ * @return string
148
+ */
149
+ public function getPreviousPageUrlAsString() {
150
+ $pageName = $this->getConfigPage()->getData('previous_page');
151
+ $url = $this->getPageUrlAsString($pageName);
152
+ return $url;
153
+ }
154
+
155
+ /**
156
+ * Get current page url
157
+ *
158
+ * @return string
159
+ */
160
+ public function getPageUrlAsString($nextPageName) {
161
+ $config = $this->getConfig();
162
+ $nextPage = $config->getData($nextPageName);
163
+ if ($nextPage && array_key_exists('url', $nextPage)) {
164
+ $url = $nextPage['url'];
165
+ } else {
166
+ $url = '*/adminhtml_configuration_wizard_page/' . $nextPageName;
167
+ }
168
+ return $url;
169
+ }
170
+
171
+ /**
172
+ * Get configuration wizard page code
173
+ *
174
+ * @return string
175
+ */
176
+ public function getNextPageCode($pageCode) {
177
+ $pages = $this->initConfigPage($pageCode);
178
+ if ($pages === null) {
179
+ return 'index';
180
+ }
181
+ if (!array_key_exists('next_page', $pages)) {
182
+ return 'index';
183
+ }
184
+ $nextPageKey = $pages['next_page'];
185
+ return $nextPageKey;
186
+ }
187
+
188
+ /**
189
+ * Check whether logged in as admin
190
+ *
191
+ * @return bool
192
+ */
193
+ public function checkIsAdmin() {
194
+ return (Mage::app()->getStore()->isAdmin()) ? true : false;
195
+ }
196
+
197
+ /**
198
+ * Retrieve Magento version
199
+ *
200
+ * @return mixed
201
+ */
202
+ public function getMagentoVersion() {
203
+ return Mage::getVersion();
204
+ }
205
+
206
+ /**
207
+ * Get current store id
208
+ *
209
+ * @return int
210
+ */
211
+ public function getMagentoStoreId() {
212
+ $storeId = Mage::getModel('sales/quote')->getStoreId();
213
+ if ($this->checkIsAdmin()) {
214
+ $storeId = $this->_getAdminCheckoutSession()->getStoreId();
215
+ }
216
+ return $storeId;
217
+ }
218
+
219
+ /**
220
+ * Get current store details
221
+ *
222
+ * @return Mage_Core_Model_Store
223
+ */
224
+ public function getMagentoStore() {
225
+ return Mage::app()->getStore();
226
+ }
227
+
228
+ /**
229
+ * Get current novalnet version
230
+ *
231
+ * @return string
232
+ */
233
+ public function getNovalnetVersion() {
234
+ $versionInfo = (string) Mage::getConfig()->getNode('modules/Novalnet_Payment/version');
235
+ return "Novalnet CE (v{$versionInfo})";
236
+ }
237
+
238
+ /**
239
+ * Get customer Ip address
240
+ *
241
+ * @return string
242
+ */
243
+ public function getRealIpAddr() {
244
+ $ipAddr = Mage::helper('core/http')->getRemoteAddr();
245
+ if($ipAddr == '::1') {//IPv6 Issue
246
+ return '127.0.0.1';
247
+ }
248
+ return $ipAddr;
249
+ }
250
+
251
+ /**
252
+ * Novalnet web URL generic getter
253
+ *
254
+ * @return string
255
+ */
256
+ public function getNovalnetUrl() {
257
+ if (strtoupper($this->getDefaultLanguage()) == 'DE') {
258
+ $siteUrl = 'https://www.novalnet.de';
259
+ } else {
260
+ $siteUrl = 'http://www.novalnet.com';
261
+ }
262
+ return $siteUrl;
263
+ }
264
+
265
+ /**
266
+ * Getter for Payment form logo images
267
+ *
268
+ * @return string
269
+ */
270
+ public function getNovalnetPaymentFormLogoUrl() {
271
+ $protocol = $this->getMagentoStore()->isCurrentlySecure() ? 'https' : 'http';
272
+ $imageUrl = $protocol . "://www.novalnet.de";
273
+ return $imageUrl;
274
+ }
275
+
276
+ /**
277
+ * Get singleton of Checkout Session Model
278
+ *
279
+ * @return Mage_Checkout_Model_Session
280
+ */
281
+ public function _getCheckoutSession() {
282
+ return Mage::getSingleton('checkout/session');
283
+ }
284
+
285
+ /**
286
+ * Get singleton of admin Checkout Session
287
+ *
288
+ * @return Mage_adminhtml_Model_Session_quote
289
+ */
290
+ public function _getAdminCheckoutSession() {
291
+ return Mage::getSingleton('adminhtml/session_quote');
292
+ }
293
+
294
+ /**
295
+ * Get shop's date and time
296
+ *
297
+ * @return date/time
298
+ */
299
+ public function getCurrentDateTime() {
300
+ return Mage::getModel('core/date')->date('Y-m-d H:i:s');
301
+ }
302
+
303
+ /**
304
+ * Get singleton of customer Session
305
+ *
306
+ * @return Mage_customer_Model_Session
307
+ */
308
+ public function getCustomerSession() {
309
+ return Mage::getSingleton('customer/session');
310
+ }
311
+
312
+ /**
313
+ * Check customer_no for Logged in user
314
+ *
315
+ * @return bool
316
+ */
317
+ public function customerNumberValidation() {
318
+ $getCoreData = $this->getCurrentDateTime();
319
+ try {
320
+ $getCustomerSession = $this->getCustomerSession();
321
+ $order_details = Mage::getModel('checkout/cart')->getQuote()->getData();
322
+
323
+ //Checking custommer loggin status
324
+ $login_check = $getCustomerSession->isLoggedIn();
325
+ if ($login_check) {
326
+ $customer_no = $getCustomerSession->getCustomer()->getId();
327
+ if (empty($customer_no)) {
328
+ $customer_no = $_SESSION['core']['visitor_data']['customer_id']; // Used Only customer id is not assigned in mage session
329
+ }
330
+ //Log customer Order details
331
+ if ($customer_no == "") {
332
+ Mage::log($getCustomerSession->getCustomer(), NULL, "Customerid_Missing_" . $getCoreData . ".log");
333
+ Mage::log("Below are Order Details : ", NULL, "Customerid_Missing_" . $getCoreData . ".log");
334
+ Mage::log($order_details, NULL, "Customerid_Missing_" . $getCoreData . ".log");
335
+ Mage::throwException($this->__('Basic Parameter Missing. Please contact Shop Admin') . '!');
336
+ }
337
+ }
338
+ } catch (Exception $e) {
339
+ Mage::log($e->getMessage(), NULL, "Customerid_Missing_" . $getCoreData . ".log");
340
+ }
341
+ }
342
+
343
+ /**
344
+ * Check whether payment method can be used
345
+ * for Zero subtotal Checkout
346
+ * @return bool
347
+ */
348
+ public function isModuleActive($grandTotal = NULL) {
349
+ if (!$grandTotal || $grandTotal == 0) {
350
+ return false;
351
+ }
352
+ return true;
353
+ }
354
+
355
+ /**
356
+ * Check whether the CallbackTypeCall can be used
357
+ *
358
+ * @return bool
359
+ */
360
+ public function isCallbackTypeAllowed($countryCode) {
361
+ $allowedCountryCode = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('callbackAllowedCountry');
362
+ if (in_array($countryCode, $allowedCountryCode)
363
+ && !(Mage::app()->getStore()->isAdmin())) {
364
+ return true;
365
+ }
366
+ return false;
367
+ }
368
+
369
+ /**
370
+ * Encode special characters
371
+ * @param String $input
372
+ *
373
+ * @return String
374
+ */
375
+ public function nn_utf8_encode($input) {
376
+ return (mb_detect_encoding($input, 'UTF-8', true) == 'UTF-8') ? utf8_decode($input) : $input;
377
+ }
378
+
379
+ /**
380
+ * @return string
381
+ */
382
+ public function getDefaultLanguage() {
383
+ $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
384
+ if (is_array($locale) && !empty($locale)) {
385
+ $locale = $locale[0];
386
+ } else {
387
+ $locale = 'en';
388
+ }
389
+ return $locale;
390
+ }
391
+
392
+ /**
393
+ * Retrieve customer id from current session
394
+ *
395
+ * @return int|null
396
+ */
397
+ public function getCustomerId() {
398
+ $customerNo = '';
399
+ if ($this->checkIsAdmin()) {
400
+ $adminuser = Mage::getSingleton('admin/session');
401
+ $customerNo = $adminuser->getUser()->getUserId();
402
+ } else {
403
+ $loginCheck = $this->getCustomerSession()->isLoggedIn();
404
+ if ($loginCheck) {
405
+ $customerNo = $this->getCustomerSession()->getCustomerId();
406
+ } else {
407
+ $customerNo = 'Guest';
408
+ }
409
+ }
410
+ return $customerNo;
411
+ }
412
+
413
+ /**
414
+ * Set secure url checkout is secure for current store.
415
+ *
416
+ * @param string $route
417
+ * @param array $params
418
+ * @return string
419
+ */
420
+ public function getUrl($route, $params = array()) {
421
+ $params['_type'] = Mage_Core_Model_Store::URL_TYPE_LINK;
422
+ if (isset($params['is_secure'])) {
423
+ $params['_secure'] = (bool) $params['is_secure'];
424
+ } elseif ($this->getMagentoStore()->isCurrentlySecure()) {
425
+ $params['_secure'] = true;
426
+ }
427
+ return parent::_getUrl($route, $params);
428
+ }
429
+
430
+ /**
431
+ * Extract data from additional data array
432
+ *
433
+ * @param string $info
434
+ * @param string $key
435
+ * @return array
436
+ */
437
+ public function getAdditionalData($info, $key = null) {
438
+ $data = array();
439
+ if ($info->getAdditionalData()) {
440
+ $data = unserialize($info->getAdditionalData());
441
+ }
442
+ if (!empty($key) && isset($data[$key])) {
443
+ return $data[$key];
444
+ } else {
445
+ return '';
446
+ }
447
+ }
448
+
449
+ /**
450
+ * Check whether current user have access to the payment method
451
+ *
452
+ * @return bool
453
+ */
454
+ public function checkCustomerAccess($userGroupId = NULL) {
455
+ $exludedGroupes = trim($userGroupId);
456
+ if (strlen($exludedGroupes)) {
457
+ $exludedGroupes = explode(',', $exludedGroupes);
458
+ $custGrpId = $this->getCustomerSession()->getCustomerGroupId();
459
+ return !in_array($custGrpId, $exludedGroupes);
460
+ }
461
+ return true;
462
+ }
463
+
464
+ /**
465
+ * Do encode for novalnet params
466
+ *
467
+ */
468
+ public function setNovalnetEncodedParam(Varien_Object $request, $key) {
469
+ $request->setAuthCode($this->getEncodedParam($request->getAuthCode(), $key))
470
+ ->setProduct($this->getEncodedParam($request->getProduct(), $key))
471
+ ->setTariff($this->getEncodedParam($request->getTariff(), $key))
472
+ ->setTestMode($this->getEncodedParam($request->getTestMode(), $key))
473
+ ->setAmount($this->getEncodedParam($request->getAmount(), $key))
474
+ ->setUniqid($this->getEncodedParam(uniqid(), $key));
475
+ }
476
+
477
+ /**
478
+ * Function to Encode Novalnet data
479
+ *
480
+ * @param string $data
481
+ * @param string $key
482
+ * @return string
483
+ */
484
+ public function getEncodedParam($data, $key) {
485
+ $data = trim($data);
486
+ if ($data == '')
487
+ return'Error: no data';
488
+ if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')) {
489
+ return'Error: func n/a';
490
+ }
491
+ try {
492
+ $crc = sprintf('%u', crc32($data)); // %u is a must for ccrc32 returns a signed value
493
+ $data = $crc . "|" . $data;
494
+ $data = bin2hex($data . $key);
495
+ $data = strrev(base64_encode($data));
496
+ } catch (Exception $e) {
497
+ echo('Error: ' . $e);
498
+ }
499
+ return $data;
500
+ }
501
+
502
+ /**
503
+ * Function to Encode Novalnet PCI data
504
+ *
505
+ * @param string $data
506
+
507
+ * @param string $key
508
+ * @return string
509
+ */
510
+ public function getPciEncodedParam(&$fields, $key) {
511
+ if (!function_exists('base64_encode') || !function_exists('pack') || !function_exists('crc32')) {
512
+ return false;
513
+ }
514
+ $toBeEncoded = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('novalnetEncodeParams');
515
+ foreach ($toBeEncoded as $_value) {
516
+ $data = $fields->$_value;
517
+ if ($this->isEmptyString($data)) {
518
+ return false;
519
+ }
520
+ try {
521
+ $crc = sprintf('%u', crc32($data)); //%u is must
522
+ $data = $crc . "|" . $data;
523
+ $data = bin2hex($data . $key);
524
+ $data = strrev(base64_encode($data));
525
+ $fields->$_value = $data;
526
+ } catch (Exception $e) {
527
+ return false;
528
+ }
529
+ }
530
+ return true;
531
+ }
532
+
533
+ /**
534
+ * Function to Decode Novalnet data
535
+ *
536
+ * @param string $data
537
+ * @param string $key
538
+ * @return string
539
+ */
540
+ public function getDecodedParam($data, $key) {
541
+ $data = trim($data);
542
+ if ($data == '') {
543
+ return'Error: no data';
544
+ }
545
+ if (!function_exists('base64_decode') || !function_exists('pack') || !function_exists('crc32')) {
546
+ return'Error: func n/a';
547
+ }
548
+ try {
549
+ $data = base64_decode(strrev($data));
550
+ $data = pack("H" . strlen($data), $data);
551
+ $data = substr($data, 0, stripos($data, $key));
552
+ $pos = strpos($data, "|");
553
+ if ($pos === false) {
554
+ return("Error: CKSum not found!");
555
+ }
556
+ $crc = substr($data, 0, $pos);
557
+ $value = trim(substr($data, $pos + 1));
558
+ if ($crc != sprintf('%u', crc32($value))) {
559
+ return("Error; CKSum invalid!");
560
+ }
561
+ return $value;
562
+ } catch (Exception $e) {
563
+ echo('Error: ' . $e);
564
+ }
565
+ }
566
+
567
+ /**
568
+ * Check whether there is an Empty string
569
+ *
570
+ * @param string $str
571
+ * @return bool
572
+ */
573
+ public function isEmptyString($str) {
574
+ $str = trim($str);
575
+ return !isset($str[0]);
576
+ }
577
+
578
+ /**
579
+ * Generate Hash value for PCI
580
+ *
581
+ * @param array $data
582
+ * @param string $key
583
+ * @return string
584
+ */
585
+ public function generateHash($data, $key) {
586
+ if (!function_exists('md5') || $this->isEmptyString($key)) {
587
+ return false;
588
+ }
589
+ $hashFields = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('novalnetHashParams');
590
+ $str = NULL;
591
+ foreach ($hashFields as $_value) {
592
+ if ($this->isEmptyString($data->$_value)) {
593
+ return false;
594
+ }
595
+ $str .= $data->$_value;
596
+ }
597
+ return md5($str . strrev($key));
598
+ }
599
+
600
+ /**
601
+ * Generate return Hash value for PCI
602
+ *
603
+ * @param array $data
604
+ * @param string $key
605
+ * @return string
606
+ */
607
+ public function generateHashReturn($data, $key) {
608
+ if (!function_exists('md5') || $this->isEmptyString($key)) {
609
+ return false;
610
+ }
611
+ $hashFields = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('novalnetHashParams');
612
+ $str = NULL;
613
+ foreach ($hashFields as $_value) {
614
+ if ($this->isEmptyString($data[$_value])) {
615
+ return false;
616
+ }
617
+ $str .= $data[$_value];
618
+ }
619
+ return md5($str . strrev($key));
620
+ }
621
+
622
+ /**
623
+ * Hash value getter
624
+ *
625
+ * @param array $h
626
+ * @param string $key
627
+ * @return string
628
+ */
629
+ public function getHash($h, $key) {
630
+ if (empty($h)) {
631
+ return'Error: no data';
632
+ }
633
+ if (!function_exists('md5')) {
634
+ return'Error: func n/a';
635
+ }
636
+ return md5($h['auth_code'] . $h['product'] . $h['tariff'] . $h['amount'] . $h['test_mode'] . $h['uniqid'] . strrev($key));
637
+ }
638
+
639
+ /**
640
+ * Check Hash value
641
+ *
642
+ * @param array $request
643
+ * @param string $key
644
+ * @return bool
645
+ */
646
+ public function checkHash($request, $key) {
647
+ if (!$request)
648
+ return false;
649
+ if ($request['hash2'] != $this->getHash($request, $key)) {
650
+ return false;
651
+ }
652
+ return true;
653
+ }
654
+
655
+ /**
656
+ * Check PCI hash value
657
+ *
658
+ * @param array $response
659
+ * @param string $key
660
+ * @return bool
661
+ */
662
+ public function checkPciHash($response, $key) {
663
+ return isset($response['hash2'])
664
+ && !$this->isEmptyString($response['hash2'])
665
+ && (($tmp = $this->generateHashReturn($response, $key)) !== false)
666
+ && ($response['hash2'] == $tmp);
667
+ }
668
+
669
+ /**
670
+ * Check Novalnet response params
671
+ *
672
+ * @param array $response
673
+ * @param string $password
674
+ * @return int
675
+ */
676
+ public function checkParams($response, $password) {
677
+ $status = $response['status'];
678
+ if (!$response['hash2']) {
679
+ $status = '94';
680
+ }if (!$this->checkHash($response, $password)) {
681
+ $status = '91';
682
+ }
683
+ $response['amount'] = $this->getDecodedParam($response['amount'], $password);
684
+ if (!$this->checkIsNumeric($response['amount'])) {
685
+ $status = '92';
686
+ }
687
+ $this->_status = $status;
688
+ return $status;
689
+ }
690
+
691
+ /**
692
+ * Retrieve Novalnet Payment Key
693
+ * Novalnet Payment Key, is a fixed value, DO NOT CHANGE!!!!!
694
+ *
695
+ * @param string $code
696
+ *
697
+ * @return int
698
+ */
699
+ public function getPaymentId($code) {
700
+ $arrPaymentId = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('novalnetPaymentKey');
701
+ return $arrPaymentId[$code];
702
+ }
703
+
704
+ public function checkOrdersCount($minOrderCount) {
705
+ $customerId = $this->_getCheckoutSession()->getCustomerId();
706
+ // Load orders and check
707
+ $orders = Mage::getResourceModel('sales/order_collection')
708
+ ->addAttributeToSelect('*')
709
+ ->addAttributeToFilter('customer_id', $customerId)
710
+ ->load();
711
+ if (count($orders) < $minOrderCount) {
712
+ return true;
713
+ }
714
+ return false;
715
+ }
716
+
717
+ /**
718
+ * Parse an NVP response string into an associative array
719
+ *
720
+ * @param string $nvpstr
721
+ * @return array
722
+ */
723
+ public function deformatNvp($delim_char, $query) {
724
+ $deformated = array();
725
+ if (strlen($query)) {
726
+ $tmp = explode($delim_char, $query);
727
+ foreach ($tmp as $k) {
728
+ $k = explode('=', $k);
729
+ $deformated[urldecode($k[0])] = isset($k[1]) ? urldecode($k[1]) : NULL;
730
+ }
731
+ }
732
+ return $deformated;
733
+ }
734
+
735
+ /**
736
+ * set due date for invoice payment
737
+ *
738
+ * @return bool
739
+ */
740
+ public function setDueDate($paymentDuration) {
741
+ $dueDate = '';
742
+ if ($paymentDuration && $this->checkIsNumeric($paymentDuration)) {
743
+ $dueDate = date('Y-m-d', strtotime('+' . (int) $paymentDuration . ' days'));
744
+ } elseif ($paymentDuration == "0") {
745
+ $dueDate = date('Y-m-d');
746
+ }
747
+ return $dueDate;
748
+ }
749
+
750
+ /**
751
+ * Get novalnet model class
752
+ *
753
+ * @return Novalnet_Payment_Model_Payment_Method_Abstract
754
+ */
755
+ public function getModel($modelclass) {
756
+ return Mage::getModel('novalnet_payment/payment_method_' . $modelclass);
757
+ }
758
+
759
+ /**
760
+ * Get novalnet transaction status model
761
+ *
762
+ * @return Novalnet_Payment_Model_Transactionstatus_Collection
763
+ */
764
+ public function getModelTransactionStatus() {
765
+ return Mage::getModel('novalnet_payment/transactionstatus');
766
+ }
767
+
768
+ /**
769
+ * Get novalnet transaction overview model
770
+ *
771
+ * @return Novalnet_Payment_Model_Transactionoverview_Collection
772
+ */
773
+ public function getModelTransactionOverview() {
774
+ return Mage::getModel('novalnet_payment/transactionoverview');
775
+ }
776
+
777
+ /**
778
+ * Check the value is numeric
779
+ *
780
+ * @param mixed $value
781
+ * @return bool
782
+ */
783
+ public function checkIsNumeric($value) {
784
+ return preg_match('/^\d+$/', $value) ? true : false;
785
+ }
786
+
787
+ /**
788
+ * Check the value contains special characters
789
+ *
790
+ * @param mixed $value
791
+ * @return bool
792
+ */
793
+ public function checkIsValid($value) {
794
+ return (!$value || preg_match('/[#%\^<>@$=*!]/', $value)) ? false : true;
795
+ }
796
+
797
+ /**
798
+ * Check the email id is valid
799
+ *
800
+ * @param mixed $value
801
+ * @return bool
802
+ */
803
+ public function validateEmail($emailId) {
804
+ return preg_match('/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/', $emailId) ? true : false;
805
+ }
806
+ /**
807
+ * Replace strings from the value passed
808
+ *
809
+ * @param mixed $value
810
+ * @return integer
811
+ */
812
+ public function makeValidNumber($value) {
813
+ return preg_replace('/[^0-9]+/', '', $value);
814
+ }
815
+
816
+ /**
817
+ * Get the formated amount in cents/euro
818
+ *
819
+ * @param float $amount
820
+ * @param string $type
821
+ * @return mixed
822
+ */
823
+ public function getFormatedAmount($amount, $type = 'CENT') {
824
+ return ($type == 'RAW') ? $amount / 100 : round($amount, 2) * 100;
825
+ }
826
+
827
+ /**
828
+ * Load novalnet transaction status based on tid
829
+ *
830
+ * @param integer $txnId
831
+ * @return object Novalnet_Payment_Model_Transactionstatus
832
+ */
833
+ public function loadTransactionStatus($txnId) {
834
+ return $this->getModelTransactionStatus()->loadByAttribute('transaction_no', $txnId);
835
+ }
836
+
837
+ /**
838
+ * Mask payment data
839
+ *
840
+ * @param integer $txnId
841
+ * @return varchar
842
+ */
843
+ public function doMaskPaymentData($data) {
844
+ return substr($data, 0, -4) . '****';
845
+ }
846
+
847
+ /**
848
+ * Get novalnet payment configuration global path
849
+ *
850
+ * @return string
851
+ */
852
+ public function getNovalnetGlobalPath() {
853
+ return 'novalnet_global/novalnet/';
854
+ }
855
+
856
+ /**
857
+ * Get current site url
858
+ *
859
+ * @return string
860
+ */
861
+
862
+ public function getCurrentSiteUrl() {
863
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
864
+ }
865
+ }
app/code/community/Novalnet/Payment/Model/Config.php ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Config {
28
+
29
+ /** ******************************************* */
30
+ /* NOVALNET GLOBAL PARAMS STARTS */
31
+ /* * ******************************************* */
32
+
33
+ const BANK_SORTCODE_LENGTH = 3; //MIN Bank Sortcode
34
+ const CALLBACK_PIN_LENGTH = 4; //PIN Length
35
+ const ACCNO_MIN_LENGTH = 5; //MIN Acc No
36
+ const RESPONSE_CODE_APPROVED = 100; //On Payment Success
37
+ const PAYMENT_VOID_STATUS = 103; //On Payment void
38
+ const CVV_MIN_LENGTH = 3; //MIN CVV No
39
+ const PHONE_PAYMENT_AMOUNT_MIN = 99; //Min amt in cents
40
+ const PHONE_PAYMENT_AMOUNT_MAX = 1000; //Max amt in cents
41
+ const NOVALNET_RETURN_METHOD = 'POST';
42
+ const NOVALNET_REDIRECT_BLOCK = 'novalnet_payment/payment_method_novalnetRedirect';
43
+ const GATEWAY_REDIRECT_URL = 'novalnet_payment/gateway/redirect';
44
+ const GATEWAY_RETURN_URL = 'novalnet_payment/gateway/return';
45
+ const GATEWAY_ERROR_RETURN_URL = 'novalnet_payment/gateway/error';
46
+ const PAYPORT_URL = 'https://payport.novalnet.de/paygate.jsp';
47
+ const INFO_REQUEST_URL = 'https://payport.novalnet.de/nn_infoport.xml';
48
+ const CC_URL = 'https://payport.novalnet.de/direct_form.jsp';
49
+ const INVOICE_PAYMENT_METHOD = 'Invoice';
50
+ const PREPAYMENT_PAYMENT_METHOD = 'Prepayment';
51
+ const TELEPHONE_PAYMENT_METHOD = 'Telephone';
52
+ const NOVALTEL_STATUS = 'NOVALTEL_STATUS';
53
+ const TRANS_STATUS = 'TRANSACTION_STATUS';
54
+ const TRANSMIT_PIN_AGAIN = 'TRANSMIT_PIN_AGAIN';
55
+ const REPLY_EMAIL_STATUS = 'REPLY_EMAIL_STATUS';
56
+ const PIN_STATUS = 'PIN_STATUS';
57
+ const METHOD_DISABLE_CODE = '0529006';
58
+ const PAYPAL_PENDING_CODE = 90;
59
+ const POST_NORMAL = 'normal';
60
+ const POST_CALLBACK = 'callback';
61
+
62
+ static protected $instance;
63
+ protected $_novalnetPaymentKey = array('novalnetCc' => 6, 'novalnetSecure' => 6, 'novalnetElvgerman' => 2, 'novalnetElvaustria' => 8, 'novalnetInvoice' => 27, 'novalnetPrepayment' => 27, 'novalnetPhonepayment' => 18, 'novalnetPaypal' => 34, 'novalnetSofortueberweisung' => 33, 'novalnetIdeal' => 49);
64
+ protected $_callbackAllowedCountry = array('AT', 'DE', 'CH');
65
+ protected $_novalnetEncodeParams = array('auth_code', 'product', 'tariff', 'test_mode', 'uniqid', 'amount');
66
+ protected $_novalnetHashParams = array('auth_code', 'product', 'tariff', 'amount', 'test_mode', 'uniqid');
67
+ protected $_fraudCheckPayment = array('novalnetElvaustria', 'novalnetElvgerman', 'novalnetInvoice', 'novalnetCc');
68
+
69
+ /* * ******************************************* */
70
+ /* NOVALNET CC PARAMS */
71
+ /* * ******************************************* */
72
+
73
+ const NN_CC = 'novalnetCc';
74
+ const NN_CC_CAN_CAPTURE = true;
75
+ const NN_CC_CAN_USE_INTERNAL = true;
76
+ const NN_CC_CAN_USE_MULTISHIPPING = false;
77
+ const NN_CC_FORM_BLOCK = 'novalnet_payment/payment_method_form_Cc';
78
+ const NN_CC_INFO_BLOCK = 'novalnet_payment/payment_method_info_Cc';
79
+
80
+ /* * ******************************************* */
81
+ /* NOVALNET CC3D PARAMS */
82
+ /* * ******************************************* */
83
+ const NN_CC3D = 'novalnetSecure';
84
+ const NN_CC3D_CAN_AUTHORIZE = false;
85
+ const NN_CC3D_CAN_CAPTURE = true;
86
+ const NN_CC3D_CAN_USE_INTERNAL = false;
87
+ const NN_CC3D_CAN_USE_MULTISHIPPING = false;
88
+ const NN_CC3D_FORM_BLOCK = 'novalnet_payment/payment_method_form_Ccsecure';
89
+ const NN_CC3D_INFO_BLOCK = 'novalnet_payment/payment_method_info_Ccsecure';
90
+
91
+ /* * ******************************************* */
92
+ /* NOVALNET ELVAUSTRIA PARAMS */
93
+ /* * ******************************************* */
94
+ const NN_ELVAT = 'novalnetElvaustria';
95
+ const NN_ELVAT_CAN_CAPTURE = true;
96
+ const NN_ELVAT_CAN_USE_MULTISHIPPING = true;
97
+ const NN_ELVAT_FORM_BLOCK = 'novalnet_payment/payment_method_form_Elvaustria';
98
+ const NN_ELVAT_INFO_BLOCK = 'novalnet_payment/payment_method_info_Elvaustria';
99
+
100
+ /* * ******************************************* */
101
+ /* NOVALNET ELVGERMAN PARAMS */
102
+ /* * ******************************************* */
103
+ const NN_ELVDE = 'novalnetElvgerman';
104
+ const NN_ELVDE_CAN_CAPTURE = true;
105
+ const NN_ELVDE_CAN_USE_MULTISHIPPING = true;
106
+ const NN_ELVDE_FORM_BLOCK = 'novalnet_payment/payment_method_form_Elvgerman';
107
+ const NN_ELVDE_INFO_BLOCK = 'novalnet_payment/payment_method_info_Elvgerman';
108
+
109
+ /* * ******************************************* */
110
+ /* NOVALNET INVOICE PARAMS */
111
+ /* * ******************************************* */
112
+ const NN_INVOICE = 'novalnetInvoice';
113
+ const NN_INVOICE_CAN_CAPTURE = true;
114
+ const NN_INVOICE_CAN_USE_MULTISHIPPING = true;
115
+ const NN_INVOICE_FORM_BLOCK = 'novalnet_payment/payment_method_form_Invoice';
116
+ const NN_INVOICE_INFO_BLOCK = 'novalnet_payment/payment_method_info_Invoice';
117
+
118
+ /* * ******************************************* */
119
+ /* NOVALNET PREPAYMENT PARAMS */
120
+ /* * ******************************************* */
121
+ const NN_PREPAYMENT = 'novalnetPrepayment';
122
+ const NN_PREPAYMENT_CAN_CAPTURE = true;
123
+ const NN_PREPAYMENT_CAN_USE_MULTISHIPPING = true;
124
+ const NN_PREPAYMENT_FORM_BLOCK = 'novalnet_payment/payment_method_form_Prepayment';
125
+ const NN_PREPAYMENT_INFO_BLOCK = 'novalnet_payment/payment_method_info_Prepayment';
126
+
127
+ /* * ******************************************* */
128
+ /* NOVALNET IDEAL PARAMS */
129
+ /* * ******************************************* */
130
+ const NN_IDEAL = 'novalnetIdeal';
131
+ const NN_IDEAL_CAN_CAPTURE = true;
132
+ const NN_IDEAL_CAN_USE_INTERNAL = false;
133
+ const NN_IDEAL_CAN_REFUND = false;
134
+ const NN_IDEAL_CAN_USE_MULTISHIPPING = false;
135
+ const NN_IDEAL_FORM_BLOCK = 'novalnet_payment/payment_method_form_Ideal';
136
+ const NN_IDEAL_INFO_BLOCK = 'novalnet_payment/payment_method_info_Ideal';
137
+
138
+ /* * ******************************************* */
139
+ /* NOVALNET PAYPAL PARAMS */
140
+ /* * ******************************************* */
141
+ const NN_PAYPAL = 'novalnetPaypal';
142
+ const NN_PAYPAL_CAN_CAPTURE = true;
143
+ const NN_PAYPAL_CAN_USE_INTERNAL = false;
144
+ const NN_PAYPAL_CAN_REFUND = false;
145
+ const NN_PAYPAL_CAN_USE_MULTISHIPPING = false;
146
+ const NN_PAYPAL_FORM_BLOCK = 'novalnet_payment/payment_method_form_Paypal';
147
+ const NN_PAYPAL_INFO_BLOCK = 'novalnet_payment/payment_method_info_Paypal';
148
+
149
+ /* * ****************************************** */
150
+ /* NOVALNET SOFORT PARAMS */
151
+ /* * ****************************************** */
152
+ const NN_SOFORT = 'novalnetSofortueberweisung';
153
+ const NN_SOFORT_CAN_CAPTURE = true;
154
+ const NN_SOFORT_CAN_USE_INTERNAL = false;
155
+ const NN_SOFORT_CAN_REFUND = false;
156
+ const NN_SOFORT_CAN_USE_MULTISHIPPING = false;
157
+ const NN_SOFORT_FORM_BLOCK = 'novalnet_payment/payment_method_form_Sofortueberweisung';
158
+ const NN_SOFORT_INFO_BLOCK = 'novalnet_payment/payment_method_info_Sofortueberweisung';
159
+
160
+ /* * ****************************************** */
161
+ /* NOVALNET TELEPHONE PARAMS */
162
+ /* * ****************************************** */
163
+ const NN_TELEPHONE = 'novalnetPhonepayment';
164
+ const NN_TELEPHONE_CAN_CAPTURE = true;
165
+ const NN_TELEPHONE_CAN_USE_INTERNAL = false;
166
+ const NN_TELEPHONE_CAN_REFUND = false;
167
+ const NN_TELEPHONE_CAN_USE_MULTISHIPPING = true;
168
+ const NN_TELEPHONE_FORM_BLOCK = 'novalnet_payment/payment_method_form_Phonepayment';
169
+ const NN_TELEPHONE_INFO_BLOCK = 'novalnet_payment/payment_method_info_Phonepayment';
170
+
171
+ /* * ****************************************** */
172
+ /* NOVALNET ABSTARCT FUNCTIONS */
173
+ /* * ****************************************** */
174
+
175
+ static public function getInstance() {
176
+ if (!isset(self::$instance)) {
177
+ self::$instance = new self;
178
+ }
179
+ return self::$instance;
180
+ }
181
+
182
+ public function getNovalnetVariable($key) {
183
+ return $this->{'_'.$key};
184
+ }
185
+
186
+ }
app/code/community/{Mage/Novalnet/Model/Novalnet/Result.php → Novalnet/Payment/Model/Novalnet/Source/Callbacktypes.php} RENAMED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Magento
4
  *
@@ -12,27 +13,25 @@
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
- class Mage_Novalnet_Model_Novalnet_Result extends Varien_Object
29
- {
30
- public function toUtf8(){
31
- $data = $this->toArray();
32
- foreach ($data as $key => $val){
33
- $setKey = "set".ucfirst($key);
34
- $this->$setKey(utf8_encode($val));
35
- }
36
  }
 
37
  }
38
- ?>
1
  <?php
2
+
3
  /**
4
  * Magento
5
  *
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 Paymentmodule of Novalnet AG
17
+ * https://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 Mage
23
+ * @package Mage_Novalnet
24
+ * @copyright Novalnet AG
 
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
27
+ class Novalnet_Payment_Model_Novalnet_Source_Callbacktypes {
28
 
29
+ public function toOptionArray() {
30
+ return array(0 => Mage::helper('novalnet_payment')->__('Nicht aktiv'),
31
+ 1 => Mage::helper('novalnet_payment')->__('Callback (Telefon & Handy)'),
32
+ 2 => Mage::helper('novalnet_payment')->__('SMS (nur Handy)'),
33
+ 3 => Mage::helper('novalnet_payment')->__('Antwort per Email')
34
+ );
 
 
35
  }
36
+
37
  }
 
app/code/community/{Mage/Novalnet → Novalnet/Payment}/Model/Novalnet/Source/Cctype.php RENAMED
@@ -1,36 +1,33 @@
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
-
29
- class Mage_Novalnet_Model_Novalnet_Source_Cctype extends Mage_Payment_Model_Source_Cctype
30
- {
31
- public function getAllowedTypes()
32
- {
33
- //return array('VI', 'MC', 'AE');
34
- return array('VI', 'MC', 'AE');
35
- }
36
- }
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Novalnet_Source_Cctype extends Mage_Payment_Model_Source_Cctype {
28
+
29
+ public function getAllowedTypes() {
30
+ return array('VI', 'MC', 'AE');
31
+ }
32
+
33
+ }
 
 
 
app/code/community/Novalnet/Payment/Model/Novalnet/Source/PendingOrder.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Novalnet_Source_PendingOrder extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
28
+
29
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_NEW;
30
+
31
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/Abstract.php ADDED
@@ -0,0 +1,1344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_Abstract extends Mage_Payment_Model_Method_Abstract {
28
+
29
+ protected $_isGateway = false;
30
+ protected $_canAuthorize = true;
31
+ protected $_canCapture = false;
32
+ protected $_canCapturePartial = false;
33
+ protected $_canRefund = true;
34
+ protected $_canVoid = true;
35
+ protected $_canUseInternal = true;
36
+ protected $_canUseCheckout = true;
37
+ protected $_canUseForMultishipping = false;
38
+ protected $_canSaveCc = false;
39
+ protected $_isInitializeNeeded = false;
40
+ protected $_mustTransimitInvoicingData = false;
41
+ protected $_mustTransimitInvoicingItemTypes = false;
42
+ protected $_canCancelInvoice = false;
43
+ protected $methodType = '';
44
+ protected $redirectUrl = '';
45
+
46
+ var $infoInstance;
47
+ var $_helper;
48
+ var $_dataHelper;
49
+
50
+ /**
51
+ * Load Basic Params in constructor
52
+ *
53
+ * @return
54
+ */
55
+ public function __construct() {
56
+ //Novalnet Basic parameters
57
+ $this->assignUtilities();
58
+ $this->_vendorId = $this->_getConfigData('merchant_id', true);
59
+ $this->_authcode = $this->_getConfigData('auth_code', true);
60
+ $this->_productId = $this->_getConfigData('product_id', true);
61
+ $this->_tariffId = $this->_getConfigData('tariff_id', true);
62
+ }
63
+
64
+ /**
65
+ * Check whether payment method can be used
66
+ *
67
+ * @param Mage_Sales_Model_Quote
68
+ * @return bool
69
+ */
70
+ public function isAvailable($quote = null) {
71
+ $getNnDisableTime = "getNnDisableTime" . ucfirst($this->_code); //Dynamic Getter based on payment methods
72
+ $minOrderCount = $this->_getConfigData('orderscount');
73
+ $userGroupId = $this->_getConfigData('user_group_excluded');
74
+ if ($this->_helper->checkOrdersCount($minOrderCount)) {
75
+ return false;
76
+ } else if (!$this->_helper->checkCustomerAccess($userGroupId)) {
77
+ return false;
78
+ } else if (!empty($quote) && !$this->_helper->isModuleActive($quote->getGrandTotal())) {
79
+ return false;
80
+ } else if (time() < $this->_getMethodSession()->$getNnDisableTime()) {
81
+ return false;
82
+ }
83
+ return parent::isAvailable($quote);
84
+ }
85
+
86
+ /**
87
+ * Assign Form Data in quote instance
88
+ *
89
+ * @return Mage_Payment_Model_Abstract Object
90
+ */
91
+ public function assignData($data) {
92
+ $infoInstance = $this->_getInfoInstance();
93
+ $this->_dataHelper->assignNovalnetData($this->_code, $data, $infoInstance);
94
+ return $this;
95
+ }
96
+
97
+ /**
98
+ * Validate payment method information object
99
+ *
100
+ * @return Mage_Payment_Model_Abstract
101
+ */
102
+ public function validate() {
103
+ parent::validate();
104
+ $infoInstance = $this->_getInfoInstance();
105
+ if (!$this->_isPlaceOrder()) {
106
+
107
+ $this->validateNovalnetParams();
108
+ //customer_no verification
109
+ $this->_helper->customerNumberValidation();
110
+ $this->_dataHelper->validateNovalnetData($this->_code, $infoInstance);
111
+
112
+ //telephone payment data is set
113
+ if ($this->_code != Novalnet_Payment_Model_Config::NN_TELEPHONE &&
114
+ $this->_getMethodSession(Novalnet_Payment_Model_Config::NN_TELEPHONE)->getNnPhoneTid()) {
115
+ $this->_unsetMethodSession(Novalnet_Payment_Model_Config::NN_TELEPHONE);
116
+ }
117
+ }
118
+ $this->doNovalnetPhoneFirstCall();
119
+ $this->_initiateCallbackProcess($this->_code);
120
+ return $this;
121
+ }
122
+
123
+ /**
124
+ * Authorize
125
+ *
126
+ * @param Varien_Object $orderPayment
127
+ * @param float $amount
128
+ * @return Mage_Payment_Model_Abstract
129
+ */
130
+ public function authorize(Varien_Object $payment, $amount) {
131
+ $methodSession = $this->_getMethodSession();
132
+ $redirectPayment = array(
133
+ Novalnet_Payment_Model_Config::NN_IDEAL,
134
+ Novalnet_Payment_Model_Config::NN_PAYPAL,
135
+ Novalnet_Payment_Model_Config::NN_SOFORT,
136
+ Novalnet_Payment_Model_Config::NN_CC3D
137
+ );
138
+ if ($this->canAuthorize() && $this->_code && !in_array($this->_code, $redirectPayment)) {
139
+ switch ($this->_code) {
140
+ case Novalnet_Payment_Model_Config::NN_TELEPHONE:
141
+ $requestData = new Varien_Object();
142
+ $option = '<lang>' . strtoupper($this->_helper->getDefaultLanguage()) . '</lang>';
143
+ $result = $this->doNovalnetStatusCall($methodSession->getNnPhoneTid(),NULL, Novalnet_Payment_Model_Config::NOVALTEL_STATUS, $option, $requestData);
144
+ //$result = $result['result'];
145
+ if ($result) {
146
+ $result->setTid($this->_getMethodSession()->getNnPhoneTid());
147
+ $result->setStatus($result->getNovaltelStatus());
148
+ $result->setStatusDesc($result->getNovaltelStatusMessage());
149
+
150
+ //For Manual Testing
151
+ //$result->setStatus(100);
152
+
153
+ $txnId = $methodSession->getNnPhoneTid();
154
+ /** @@ Update the transaction status and transaction overview **/
155
+ $this->logNovalnetTransactionData($requestData, $result, $txnId);
156
+ $this->_validateSecondCallResponse($result, $payment);
157
+ }
158
+ break;
159
+ default:
160
+ if($this->isCallbackTypeCall()) {
161
+ $result = $methodSession->getNnResponseData();
162
+ } else {
163
+ $storeId = $this->_helper->getMagentoStoreId();
164
+ $request = $this->buildRequest(Novalnet_Payment_Model_Config::POST_NORMAL, $storeId);
165
+ $result = $this->_postRequest($request);
166
+ }
167
+ $this->_validateNovalnetResponse($result, $payment, $request);
168
+ break;
169
+ }
170
+ }
171
+ return $this;
172
+ }
173
+
174
+ /**
175
+ * Capture
176
+ *
177
+ * @param Varien_Object $orderPayment
178
+ * @param float $amount
179
+ * @return Mage_Payment_Model_Abstract
180
+ */
181
+ public function capture(Varien_Object $payment, $amount) {
182
+ $redirectPayment = array(
183
+ Novalnet_Payment_Model_Config::NN_IDEAL,
184
+ Novalnet_Payment_Model_Config::NN_PAYPAL,
185
+ Novalnet_Payment_Model_Config::NN_SOFORT,
186
+ Novalnet_Payment_Model_Config::NN_TELEPHONE,
187
+ );
188
+
189
+ $getTid = $payment->getTransactionId();
190
+ $responseCodeApproved = Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED;
191
+ if ($this->canCapture() && $this->_code && !in_array($this->_code, $redirectPayment) && !is_null($getTid)) {
192
+
193
+ $request = new Varien_Object();
194
+ $storeId = $payment->getOrder()->getStoreId();
195
+ $customerId = $payment->getOrder()->getCustomerId();
196
+ $amount = $this->_helper->getFormatedAmount($payment->getOrder()->getBaseGrandTotal());
197
+ $lastTranId = $this->_helper->makeValidNumber($payment->getLastTransId());
198
+ //$getNovalnetParam = $payment->getMethodInstance();
199
+ $this->_assignNnAuthData($request, $storeId);
200
+ $request->setTid($lastTranId)
201
+ ->setStatus($responseCodeApproved)
202
+ ->setEditStatus(true);
203
+
204
+ $loadTransStatus = $this->_helper->loadTransactionStatus($lastTranId);
205
+ $transStatus = $loadTransStatus->getTransactionStatus();
206
+ if (!in_array(NULL, $request->toArray()) && !empty($transStatus) && $transStatus != $responseCodeApproved) {
207
+
208
+ $buildNovalnetParam = http_build_query($request->getData());
209
+ $response = $this->_dataHelper->setRawCallRequest($buildNovalnetParam, Novalnet_Payment_Model_Config::PAYPORT_URL);
210
+ if ($response->getStatus() == $responseCodeApproved) {
211
+ $loadTransStatus->setTransactionStatus($responseCodeApproved)
212
+ ->save();
213
+ } else {
214
+ $this->showException('Error in you capture request');
215
+ }
216
+ $this->logNovalnetTransactionData($request, $response, $lastTranId, $customerId, $storeId);
217
+ }
218
+ }
219
+ return $this;
220
+ }
221
+
222
+ /**
223
+ * Prepare request to gateway
224
+ *
225
+ * @param string $type
226
+ * @return Mage_Novalnet_Model_Novalnet_Request
227
+ */
228
+ public function buildRequest($type = Novalnet_Payment_Model_Config::POST_NORMAL, $storeId = NULL) {
229
+ $payCode = ucfirst($this->_code);
230
+ $helper = $this->_helper;
231
+ $callbackTelNo = "getNnCallbackTel" . $payCode;
232
+ $callbackEmail = "getNnCallbackEmail" . $payCode;
233
+
234
+ if ($type == Novalnet_Payment_Model_Config::POST_NORMAL
235
+ || $type == Novalnet_Payment_Model_Config::POST_CALLBACK) {
236
+ $request = new Varien_Object();
237
+ $amount = $helper->getFormatedAmount($this->_getAmount());
238
+ $billing = $this->_getInfoObject()->getBillingAddress();
239
+ $this->_assignNnAuthData($request, $storeId);
240
+ $request->setTestMode((!$this->_getConfigData('live_mode')) ? 1 : 0)
241
+ ->setAmount($amount)
242
+ ->setCurrency($this->_getInfoObject()->getBaseCurrencyCode())
243
+ ->setCustomerNo($helper->getCustomerId())
244
+ ->setUseUtf8(1)
245
+ ->setfirstName($billing->getFirstname())
246
+ ->setLastName($billing->getLastname())
247
+ ->setSearchInStreet(1)
248
+ ->setStreet(implode(',', $billing->getStreet()))
249
+ ->setCity($billing->getCity())
250
+ ->setZip($billing->getPostcode())
251
+ ->setCountry($billing->getCountry())
252
+ ->setLanguage(strtoupper($helper->getDefaultLanguage()))
253
+ ->setLang(strtoupper($helper->getDefaultLanguage()))
254
+ ->setTel($billing->getTelephone())
255
+ ->setFax($billing->getFax())
256
+ ->setRemoteIp($helper->getRealIpAddr())
257
+ ->setGender('u')
258
+ ->setEmail($this->_getInfoObject()->getCustomerEmail())
259
+ ->setOrderNo($this->_getOrderId())
260
+ ->setInput1('order_id')
261
+ ->setInputval1($this->_getOrderId())
262
+ ->setInput2('Shopsystem name / version')
263
+ ->setInputval2('Magento / '.$helper->getMagentoVersion())
264
+ ->setInput3('Novalnet module version')
265
+ ->setInputval3($helper->getNovalnetVersion());
266
+ $this->_setNovalnetParam($request, $this->_code);
267
+ }
268
+
269
+ //Callback Method
270
+ if ($type == Novalnet_Payment_Model_Config::POST_CALLBACK) {
271
+ if ($this->getConfigData('callback') == 1) { //PIN By Callback
272
+ $request->setTel($this->getInfoInstance()->$callbackTelNo());
273
+ $request->setPinByCallback(true);
274
+ } else if ($this->getConfigData('callback') == 2) { //PIN By SMS
275
+ $request->setMobile($this->getInfoInstance()->$callbackTelNo());
276
+ $request->setPinBySms(true);
277
+ } else if ($this->getConfigData('callback') == 3) { //Reply By EMail
278
+ $request->setEmail($this->getInfoInstance()->$callbackEmail());
279
+ $request->setReplyEmailCheck(true);
280
+ }
281
+ }
282
+ return $request;
283
+ }
284
+
285
+ /**
286
+ * Post request to gateway and return response
287
+ *
288
+ * @param Varien_Object $request
289
+ * @param string $type
290
+ * @return Varien_Object
291
+ */
292
+ protected function _postRequest($request) {
293
+ $result = new Varien_Object();
294
+ $helper = $this->_helper;
295
+ $paymentKey = $helper->getPaymentId($this->_code);
296
+ if ($this->_validateBasicParams() && $helper->checkIsNumeric($paymentKey)
297
+ && $paymentKey == $request->getKey() && $request->getAmount()
298
+ && $helper->checkIsNumeric($request->getAmount())) {
299
+ $response = $this->_setNovalnetRequestCall($request->getData(), Novalnet_Payment_Model_Config::PAYPORT_URL);
300
+ $result->addData($helper->deformatNvp('&', $response->getBody()));
301
+ } else {
302
+ $this->showException($helper->__('Required parameter not valid') . '!', false);
303
+ }
304
+ return $result;
305
+ }
306
+
307
+ /**
308
+ * Assign Novalnet Authentication Data
309
+ *
310
+ * @param Varien_Object $request
311
+ * @param Decimal $amount
312
+ */
313
+ private function _assignNnAuthData(Varien_Object $request, $storeId = NULL) {
314
+ //Reassign the Basic Params Based on store
315
+ $this->_vendorId = $this->_getConfigData('merchant_id', true, $storeId);
316
+ $this->_authcode = $this->_getConfigData('auth_code', true, $storeId);
317
+
318
+ $this->_manualCheckValidate($storeId);
319
+ $request->setVendor($this->_vendorId)
320
+ ->setAuthCode($this->_authcode)
321
+ ->setProduct($this->_productId)
322
+ ->setTariff($this->_tariffId)
323
+ ->setKey($this->_helper->getPaymentId($this->_code));
324
+ }
325
+
326
+ /**
327
+ * Refund amount
328
+ *
329
+ * @param Varien_Object $invoicePayment
330
+ * @param float $amount
331
+ * @return Mage_Payment_Model_Abstract
332
+ */
333
+ public function refund(Varien_Object $payment, $amount) {
334
+ $orderAmount = $this->_getAmount();
335
+ if($orderAmount !=$amount) {
336
+ $this->showException('Partial amount is not allowed in online refund. Login to Novalnet admin portal to make partial refund');
337
+ }
338
+ if (!$this->canRefund()) {
339
+ $this->showException('Refund action is not available.');
340
+ }
341
+
342
+ if ($payment->getRefundTransactionId() && $amount > 0) {
343
+ $request = new Varien_Object();
344
+ $storeId = $payment->getOrder()->getStoreId();
345
+ $customerId = $payment->getOrder()->getCustomerId();
346
+ $refundAmount = $this->_helper->getFormatedAmount($amount);
347
+ $getTid = $this->_helper->makeValidNumber($payment->getLastTransId());
348
+ $this->_assignNnAuthData($request, $storeId);
349
+ $request->setTid($getTid)
350
+ ->setRefundRequest(true)
351
+ ->setRefundParam($refundAmount);
352
+
353
+ if (!in_array(NULL, $request->toArray())) {
354
+
355
+ $buildNovalnetParam = http_build_query($request->getData());
356
+ $response = $this->_dataHelper->setRawCallRequest($buildNovalnetParam, Novalnet_Payment_Model_Config::PAYPORT_URL);
357
+ if ($response->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
358
+ $getTransactionStatus = $this->doNovalnetStatusCall($getTid, $storeId);
359
+ $loadTransaction = $this->_helper->loadTransactionStatus($getTid);
360
+ $loadTransaction->setTransactionStatus($getTransactionStatus->getStatus())
361
+ ->setAmount($this->_helper->getFormatedAmount($getTransactionStatus->getAmount(), 'RAW'))
362
+ ->save();
363
+
364
+ $txnid = $response->getTid();
365
+ $refund_tid = !empty($txnid) ? $txnid : $payment->getLastTransId() . '-refund';
366
+ if (in_array($this->_code, array(Novalnet_Payment_Model_Config::NN_INVOICE, Novalnet_Payment_Model_Config::NN_PREPAYMENT))) {
367
+ $amountAfterRefund = ($this->_getAmount() - $amount);
368
+ $loadTransaction->setAmount($amountAfterRefund)
369
+ ->save();
370
+ }
371
+ $payment->setTransactionId($refund_tid)
372
+ ->setLastTransId($refund_tid)
373
+ ->save();
374
+
375
+ if ($txnid) { // Only log the novalnet transaction which contains TID
376
+ $getTransactionStatus = $this->doNovalnetStatusCall($txnid, $storeId);
377
+ $response->setStatus($getTransactionStatus->getStatus());
378
+ $amountAfterRefund = $this->_helper->getFormatedAmount($getTransactionStatus->getAmount(), 'RAW');
379
+ $this->logNovalnetStatusData($response, $refund_tid, $customerId, $storeId, $amountAfterRefund);
380
+ }
381
+ } else {
382
+ $this->showException($response->getStatusDesc(), false);
383
+ }
384
+
385
+ $this->logNovalnetTransactionData($request, $response, $payment->getLastTransId(), $customerId, $storeId);
386
+ } else {
387
+ $this->showException('Error in you refund request');
388
+ }
389
+ } else {
390
+ $this->showException('Error in you refund request');
391
+ }
392
+ return $this;
393
+ }
394
+
395
+ /**
396
+ * Void payment
397
+ *
398
+ * @param Varien_Object $invoicePayment
399
+ * @return Mage_Payment_Model_Abstract
400
+ */
401
+ public function void(Varien_Object $payment) {
402
+ if (!$this->canVoid($payment)) {
403
+ $this->showException('Void action is not available.');
404
+ }
405
+
406
+ $request = new Varien_Object();
407
+ $storeId = $payment->getOrder()->getStoreId();
408
+ $customerId = $payment->getOrder()->getCustomerId();
409
+ $getTid = $this->_helper->makeValidNumber($payment->getLastTransId());
410
+ $this->_assignNnAuthData($request, $storeId);
411
+ $request->setTid($getTid)
412
+ ->setStatus(Novalnet_Payment_Model_Config::PAYMENT_VOID_STATUS)
413
+ ->setEditStatus(true);
414
+
415
+ if (!in_array(NULL, $request->toArray())) {
416
+
417
+ $buildNovalnetParam = http_build_query($request->getData());
418
+ $response = $this->_dataHelper->setRawCallRequest($buildNovalnetParam, Novalnet_Payment_Model_Config::PAYPORT_URL);
419
+ if ($response->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
420
+
421
+ $txnid = $response->getTid();
422
+ $void_tid = !empty($txnid) ? $txnid : $payment->getLastTransId() . '-void';
423
+
424
+ if (in_array($this->_code, array(Novalnet_Payment_Model_Config::NN_INVOICE, Novalnet_Payment_Model_Config::NN_PREPAYMENT))) {
425
+ $bank_void_tid = !empty($txnid) ? $txnid : $payment->getLastTransId();
426
+ $data = unserialize($payment->getAdditionalData());
427
+ $data['NnNoteAmount'] = $this->_dataHelper->getBankDetailsAmount($amountAfterRefund);
428
+ $data['NnNoteTID'] = $this->_dataHelper->getBankDetailsTID($bank_void_tid);
429
+ $payment->setAdditionalData(serialize($data));
430
+ }
431
+
432
+ $payment->setTransactionId($void_tid)
433
+ ->setLastTransId($void_tid)
434
+ ->save();
435
+
436
+ $getTransactionStatus = $this->doNovalnetStatusCall($getTid, $storeId);
437
+ $loadTransaction = $this->_helper->loadTransactionStatus($getTid);
438
+ $loadTransaction->setTransactionStatus($getTransactionStatus->getStatus())
439
+ ->setAmount($getTransactionStatus->getAmount()) // void amount is zero so set without formating
440
+ ->save();
441
+ } else {
442
+ $this->showException('Error in you void request');
443
+ }
444
+ $this->logNovalnetTransactionData($request, $response, $payment->getLastTransId(), $customerId, $storeId);
445
+ } else {
446
+ $this->showException('Error in you void request');
447
+ }
448
+ return $this;
449
+ }
450
+
451
+ /**
452
+ * Get Method Session
453
+ *
454
+ * @return Checkout session
455
+ */
456
+ private function _getMethodSession($paymentCode = NULL) {
457
+ $paymentCode = (!empty($paymentCode)) ? $paymentCode : $this->getCode();
458
+ $checkoutSession = $this->_helper->_getCheckoutSession();
459
+ if (!$checkoutSession->hasData($paymentCode)) {
460
+ $checkoutSession->setData($paymentCode, new Varien_Object());
461
+ }
462
+ return $checkoutSession->getData($paymentCode);
463
+ }
464
+
465
+ /**
466
+ * Unset method session
467
+ *
468
+ * @return method session
469
+ */
470
+ private function _unsetMethodSession($paymentCode = NULL) {
471
+ $paymentCode = (!empty($paymentCode)) ? $paymentCode : $this->getCode();
472
+ $this->_helper->_getCheckoutSession()->unsetData($paymentCode);
473
+ return $this;
474
+ }
475
+
476
+ /**
477
+ * Get the novalnet configuration data
478
+ *
479
+ * @return mixed
480
+ */
481
+ public function _getConfigData($field, $globalMode = false, $store_id = NULL) {
482
+ $storeId = is_null($store_id) ? $this->_helper->getMagentoStoreId() : $store_id;
483
+ $path = $this->_helper->getNovalnetGlobalPath() . $field;
484
+ if ($field == 'live_mode') {
485
+ $getTestmodePaymentMethod = Mage::getStoreConfig($path, $storeId);
486
+ if (!preg_match('/' . $this->_code . '/i', $getTestmodePaymentMethod)) {
487
+ return false;
488
+ }
489
+ return true;
490
+ } elseif (!is_null($field)) {
491
+ return ($globalMode == false) ? trim($this->getConfigData($field, $storeId))
492
+ : trim(Mage::getStoreConfig($path, $storeId));
493
+ }
494
+ return null;
495
+ }
496
+
497
+ /**
498
+ * Send order_no to server after the Completion of payment
499
+ *
500
+ * @param array $response
501
+ * @return mixed
502
+ */
503
+ public function doNovalnetPostbackCall($response) {
504
+ //Required Parameters to be passed to the Server
505
+ $request = $result = array();
506
+
507
+ $this->_manualCheckValidate();
508
+ $paymentKey = $this->_helper->getPaymentId($this->_code);
509
+ if ($this->_validateBasicParams() && $this->_helper->checkIsNumeric($paymentKey)) {
510
+ $request['vendor'] = $this->_vendorId;
511
+ $request['auth_code'] = $this->_authcode;
512
+ $request['product'] = $this->_productId;
513
+ $request['tariff'] = $this->_tariffId;
514
+ $request['key'] = $paymentKey;
515
+ $request['tid'] = $response->getTid();
516
+ $request['status'] = Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED;
517
+ $request['order_no'] = $this->_getOrderId();
518
+
519
+ if ($request['key'] == 27) {
520
+ $request['invoice_ref'] = 'BNR-' . $request['product'] . '-' . $request['order_no'];
521
+ }
522
+
523
+ $result = new Varien_Object();
524
+ $response = $this->_setNovalnetRequestCall($request, Novalnet_Payment_Model_Config::PAYPORT_URL);
525
+ $result = $response->getRawBody();
526
+ }
527
+ return $result;
528
+ }
529
+
530
+ /**
531
+ * Check the transaction status using API
532
+ *
533
+ * @param array $request_data
534
+ * @param string $request_url
535
+ * @param string $type
536
+ *
537
+ * @return mixed
538
+ */
539
+ private function _setNovalnetRequestCall($request_data, $request_url, $type = "") {
540
+ if ($request_url == "") {
541
+ $this->showException('Server Request URL is Empty');
542
+ return;
543
+ }
544
+ $httpClientConfig = array('maxredirects' => 0);
545
+ if (((int) $this->_getConfigData('gateway_timeout')) > 0) {
546
+ $httpClientConfig['timeout'] = (int) $this->_getConfigData('gateway_timeout');
547
+ }
548
+ $client = new Varien_Http_Client($request_url, $httpClientConfig);
549
+
550
+ if ($type == 'XML') {
551
+ $client->setUri($request_url);
552
+ $client->setRawData($request_data)->setMethod(Varien_Http_Client::POST);
553
+ } else {
554
+ $client->setParameterPost($request_data)->setMethod(Varien_Http_Client::POST);
555
+ }
556
+ $response = $client->request();
557
+ if (!$response->isSuccessful()) {
558
+ $this->showException($this->_helper->__('Gateway request error: %s', $response->getMessage()), false);
559
+ }
560
+ if ($type == 'XML') {
561
+ $result = new Varien_Simplexml_Element($response->getRawBody());
562
+ $response = new Varien_Object($result->asArray());
563
+ }
564
+ return $response;
565
+ }
566
+
567
+ /**
568
+ * Set the novalnet parameter based on payment code
569
+ *
570
+ * @param Varien object $request
571
+ * @param string $paymentCode
572
+ *
573
+ * @return object
574
+ */
575
+ private function _setNovalnetParam(Varien_Object $request, $paymentCode) {
576
+ $infoInstance = $this->getInfoInstance();
577
+ $helper = $this->_helper;
578
+ $dataHelper = $this->_dataHelper;
579
+ $getPaymentData = $this->_getNnPaymentData();
580
+ if ($paymentCode) {
581
+ switch ($paymentCode) {
582
+ case Novalnet_Payment_Model_Config::NN_ELVDE:
583
+ $request->setBankAccountHolder($getPaymentData->getNnAccountHolder())
584
+ ->setBankAccount($getPaymentData->getNnAccountNumber())
585
+ ->setBankCode($getPaymentData->getNnBankSortingCode())
586
+ ->setAcdc( ($this->_getConfigData('acdc_check') ? $this->_getConfigData('acdc_check') : 0) );
587
+ $infoInstance->setNnAccountNumber($helper->doMaskPaymentData($getPaymentData->getNnAccountNumber()))
588
+ ->setNnBankSortingCode($helper->doMaskPaymentData($getPaymentData->getNnBankSortingCode()));
589
+ break;
590
+ case Novalnet_Payment_Model_Config::NN_ELVAT:
591
+ $request->setBankAccountHolder($getPaymentData->getNnAccountHolder())
592
+ ->setBankAccount($getPaymentData->getNnAccountNumber())
593
+ ->setBankCode($getPaymentData->getNnBankSortingCode());
594
+ $infoInstance->setNnAccountNumber($helper->doMaskPaymentData($getPaymentData->getNnAccountNumber()))
595
+ ->setNnBankSortingCode($helper->doMaskPaymentData($getPaymentData->getNnBankSortingCode()));
596
+ break;
597
+ case Novalnet_Payment_Model_Config::NN_INVOICE:
598
+ $paymentDuration = trim($this->_getConfigData('payment_duration'));
599
+ $dueDate = $helper->setDueDate($paymentDuration);
600
+ if ($dueDate)
601
+ $request->setDueDate($dueDate);
602
+ $request->setInvoiceType(Novalnet_Payment_Model_Config::INVOICE_PAYMENT_METHOD)
603
+ ->setInvoiceRef('BNR-' . $request->getProduct() . '-' . $this->_getOrderId());
604
+ break;
605
+ case Novalnet_Payment_Model_Config::NN_PREPAYMENT:
606
+ $request->setInvoiceType(Novalnet_Payment_Model_Config::PREPAYMENT_PAYMENT_METHOD)
607
+ ->setInvoiceRef('BNR-' . $request->getProduct() . '-' . $this->_getOrderId());
608
+ break;
609
+ case Novalnet_Payment_Model_Config::NN_SOFORT:
610
+ case Novalnet_Payment_Model_Config::NN_PAYPAL:
611
+ case Novalnet_Payment_Model_Config::NN_IDEAL:
612
+ $this->_password = $this->_getConfigData('password', true);
613
+ $request->setUniqid(uniqid())
614
+ ->setCountryCode($request->getCountry())
615
+ ->setSession(session_id());
616
+
617
+ if ($paymentCode == Novalnet_Payment_Model_Config::NN_PAYPAL) {
618
+ $request->setApiSignature($helper->getEncodedParam($this->_getConfigData('api_sign', true), $this->_password))
619
+ ->setApiUser($helper->getEncodedParam($this->_getConfigData('api_user', true), $this->_password))
620
+ ->setApiPw($helper->getEncodedParam($this->_getConfigData('api_password', true), $this->_password));
621
+ }
622
+
623
+ $this->_dataHelper->assignNovalnetReturnData($request, $this->_code);
624
+ $this->_dataHelper->importNovalnetEncodeData($request, $this->_password);
625
+ break;
626
+ case Novalnet_Payment_Model_Config::NN_CC:
627
+ $request->setCcHolder($dataHelper->novalnetCardDetails('novalnet_cc_owner'))
628
+ ->setCcNo()
629
+ ->setCcExpMonth($dataHelper->novalnetCardDetails('novalnet_cc_exp_month'))
630
+ ->setCcExpYear($dataHelper->novalnetCardDetails('novalnet_cc_exp_year'))
631
+ ->setCcCvc2($dataHelper->novalnetCardDetails('novalnet_cc_cid'))
632
+ ->setCcType($dataHelper->novalnetCardDetails('novalnet_cc_type'))
633
+ ->setPanHash($dataHelper->novalnetCardDetails('novalnet_cc_pan_hash'))
634
+ ->setUniqueId($dataHelper->novalnetCardDetails('novalnet_cc_unique_id'));
635
+ break;
636
+ case Novalnet_Payment_Model_Config::NN_CC3D:
637
+ $payment = $infoInstance->getOrder()->getPayment();
638
+ $request->setCountryCode($request->getCountry())
639
+ ->setSession(session_id())
640
+ ->setCcHolder(Mage::helper('core')->decrypt($this->_helper->_getCheckoutSession()->getNnCcOwner()))
641
+ ->setCcNo(Mage::helper('core')->decrypt($this->_helper->_getCheckoutSession()->getNnCcNumber()))
642
+ ->setCcExpMonth(Mage::helper('core')->decrypt($this->_helper->_getCheckoutSession()->getNnCcExpMonth()))
643
+ ->setCcExpYear(Mage::helper('core')->decrypt($this->_helper->_getCheckoutSession()->getNnCcExpYear()))
644
+ ->setCcCvc2(Mage::helper('core')->decrypt($this->_helper->_getCheckoutSession()->getNnCcCvc()));
645
+ $dataHelper->assignNovalnetReturnData($request, $this->_code);
646
+ $request->unsUserVariable_0(); // Unset uservariable as CC3D doesnot requires it
647
+ break;
648
+ }
649
+ }
650
+ return $request;
651
+ }
652
+
653
+ /**
654
+ * Validate the novalnet response
655
+ *
656
+ * @param object $response
657
+ * @param object $payment
658
+ * @param string $request
659
+ *
660
+ * @return mixed
661
+ */
662
+ private function _validateNovalnetResponse($response, $payment, $request = NULL) {
663
+ $result = $response;
664
+ switch ($result->getStatus()) {
665
+ case Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED:
666
+ //set Novalnet Mode
667
+ $ResponseTestMode = $result->getTestMode();
668
+ $txnId = $result->getTid();
669
+ $shopMode = $this->_getConfigData('live_mode');
670
+ $testMode = (((isset($ResponseTestMode) && $ResponseTestMode == 1) || (isset($shopMode) && $shopMode == 0)) ? 1 : 0 );
671
+ $data = array('NnTestOrder' => $testMode);
672
+
673
+ if (in_array($this->_code, array(Novalnet_Payment_Model_Config::NN_INVOICE, Novalnet_Payment_Model_Config::NN_PREPAYMENT))) {
674
+
675
+ $data['NnNote'] = $this->_dataHelper->getNote($response, $this->_getConfigData('payment_duration'));
676
+ $data['NnNoteAmount'] = $this->_dataHelper->getBankDetailsAmount($response->getAmount());
677
+ $data['NnNoteTID'] = $this->_dataHelper->getBankDetailsTID($txnId);
678
+ $data['NnNoteTransfer'] = $this->_dataHelper->getBankDetailsTransfer($response);
679
+ }
680
+
681
+ /** @@ Update the transaction status and transaction overview **/
682
+ $getTransactionStatus = $this->doNovalnetStatusCall($txnId);
683
+ $result->setStatus($getTransactionStatus->getStatus());
684
+ $this->logNovalnetStatusData($result, $txnId);
685
+ $payment->setStatus(self::STATUS_APPROVED)
686
+ ->setIsTransactionClosed(false) // set transaction opend to make payment void
687
+ ->setAdditionalData(serialize($data))
688
+ ->save();
689
+
690
+ // Capture the payment only if status is 100
691
+ if ($getTransactionStatus->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
692
+ $payment->setTransactionId("$txnId-capture") // Add capture text to make the new transaction
693
+ ->setParentTransactionId($txnId)
694
+ ->setIsTransactionClosed(true) // Close the transaction
695
+ ->capture(null)
696
+ ->save();
697
+ }
698
+ $payment->setTransactionId($txnId)
699
+ ->setLastTransId($txnId)
700
+ ->setParentTransactionId(null)
701
+ ->save();
702
+
703
+ $this->doNovalnetPostbackCall($result); //Second Call
704
+ if(!$this->isCallbackTypeCall()) {
705
+ $this->logNovalnetTransactionData($request, $result, $txnId, $this->_helper->getCustomerId(), $this->_helper->getMagentoStoreId());
706
+ }
707
+ $statusText = ($result->getStatusText()) ? $result->getStatusText() : $this->_helper->__('successful');
708
+ Mage::getSingleton('core/session')->addSuccess($statusText);
709
+ return $this;
710
+ default:
711
+ $error = ($result->getStatusDesc()) ? $this->_helper->htmlEscape($result->getStatusDesc()) : $this->_helper->__('Error in capturing the payment');
712
+ if(!$this->isCallbackTypeCall()) {
713
+ $this->logNovalnetTransactionData($request, $result, $result->getTid(), $this->_helper->getCustomerId(), $this->_helper->getMagentoStoreId());
714
+ }
715
+ if ($error !== false) {
716
+ $this->showException($error, false);
717
+ }
718
+ break;
719
+ }
720
+ }
721
+
722
+ /**
723
+ * Make telephone payment first call and display the messages
724
+ *
725
+ * @return
726
+ */
727
+ public function doNovalnetPhoneFirstCall() {
728
+ $methodSession = $this->_getMethodSession();
729
+ $helper = $this->_helper;
730
+ $phoneTid = $methodSession->getNnPhoneTid();
731
+ if ($this->_isPlaceOrder() && ($this->_code == Novalnet_Payment_Model_Config::NN_TELEPHONE)) {
732
+ if (!$this->checkAmountAllowed()) {
733
+ return false;
734
+ }
735
+ if ($phoneTid) {
736
+ $this->_validateSession();
737
+ }
738
+ $methodSession = $this->_getMethodSession(); // Reaasign method session after values unset
739
+ if (!$phoneTid) {
740
+ //invoke first call
741
+ $storeId = $helper->getMagentoStoreId();
742
+ $request = $this->buildRequest(Novalnet_Payment_Model_Config::POST_NORMAL, $storeId);
743
+ $result = $this->_postRequest($request);
744
+ $methodSession->setOrderAmount($request->getAmount())
745
+ ->setNnTelOrderNo($request->getOrderNo());
746
+
747
+ if (!$result) {
748
+ $this->showException('Params (aryResponse) missing');
749
+ }
750
+
751
+ if ($result->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
752
+ // Passing the Error Response from Novalnet's paygate to payment error
753
+ $this->logNovalnetTransactionData($request, $result, $result->getTid(), $helper->getCustomerId(), $helper->getMagentoStoreId());
754
+ $methodSession->setNnPhoneTid($result->getTid());
755
+ $methodSession->setNnPhoneNo($result->getNovaltelNumber());
756
+ $methodSession->setNnPhoneStatusText($result->getStatusDesc());
757
+ $this->_getCheckout()->setNnTelTestOrder($result->getTestMode());
758
+ $text = $helper->__('Following steps are required to complete your payment') . ':' . "\n\n";
759
+ $text .= $helper->__('Step') . ' 1: ';
760
+ $text .= $helper->__('Please call the telephone number displayed') . ': ' . preg_replace('/(\d{4})(\d{4})(\d{4})(\d{4})/', "$1 $2 $3 $4", $methodSession->getNnPhoneNo()) . ".\n";
761
+ $text .= '* ' . $helper->__('This call will cost') . ' ' . str_replace('.', ',', $result->getAmount()) . " " . Mage::app()->getLocale()->currency($result->getCurrency())->getSymbol() . ' (' . $helper->__('inclusive tax') . ') ';
762
+ $text .= $helper->__('and it is possible only for German landline connection') . '!*' . "\n\n";
763
+ $text .= $helper->__('Step') . ' 2: ';
764
+ $text .= $helper->__('Please wait for the beep and then hang up the listeners') . '.' . "\n";
765
+ $text .= $helper->__('After your successful call, please proceed with the payment') . '.' . "\n";
766
+
767
+ $this->text = $text;
768
+ $this->showException($text, false); #show note for client to call...
769
+ }else{
770
+ $this->showException($result->getStatusDesc(), false);
771
+ }
772
+ }
773
+ }
774
+ }
775
+
776
+ /**
777
+ * Validate the novalnet second call response
778
+ *
779
+ * @param object $result
780
+ * @param object $payment
781
+ *
782
+ * @return mixed
783
+ */
784
+ private function _validateSecondCallResponse($result, $payment) {
785
+ $status = $result->getStatus();
786
+ switch ($status) {
787
+ case Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED:
788
+ $serverResponse = $this->_getCheckout()->getNnTelTestOrder();
789
+ $shopMode = $this->_getConfigData('live_mode');
790
+ $testMode = (((isset($serverResponse) && $serverResponse == 1) || (isset($shopMode) && $shopMode == 0)) ? 1 : 0 );
791
+ $data = array('NnTestOrder' => $testMode);
792
+
793
+ $payment->setStatus(self::STATUS_APPROVED)
794
+ ->setLastTransId($result->getTid())
795
+ ->setAdditionalData(serialize($data))
796
+ ->save();
797
+ $this->doNovalnetPostbackCall($result);
798
+ $getTransactionStatus = $this->doNovalnetStatusCall($result->getTid());
799
+ $result->setStatus($getTransactionStatus->getStatus()); // Combine Transaction status in result object
800
+ $this->logNovalnetStatusData($result, $result->getTid());
801
+ $statusText = ($result->getStatusText()) ? $result->getStatusText() : $this->_helper->__('successful');
802
+ Mage::getSingleton('core/session')->addSuccess($statusText);
803
+ $this->_unsetMethodSession();
804
+ return $this;
805
+ break;
806
+ default:
807
+ $error = ($result->getStatusDesc()) ? $this->_helper->htmlEscape($result->getStatusDesc()) : $this->_helper->__('Error in capturing the payment');
808
+ if ($error !== false) {
809
+ $this->showException($error, false);
810
+ }
811
+ }
812
+ }
813
+
814
+ /**
815
+ * Validate the transaction status
816
+ *
817
+ * @param integer $tid
818
+ * @param integer $storeId
819
+ * @param string $reqType
820
+ * @param object $extraOption
821
+ *
822
+ * @return mixed
823
+ */
824
+ public function doNovalnetStatusCall($tid, $storeId = NULL, $reqType = Novalnet_Payment_Model_Config::TRANS_STATUS, $extraOption = NULL, $requestData=NULL) {
825
+ $requestType = ($reqType == Novalnet_Payment_Model_Config::TRANS_STATUS) ? Novalnet_Payment_Model_Config::TRANS_STATUS : $reqType;
826
+ $this->_manualCheckValidate($storeId);
827
+ $request = '<?xml version="1.0" encoding="UTF-8"?>';
828
+ $request .= '<nnxml><info_request>';
829
+ $request .= '<vendor_id>' . $this->_vendorId . '</vendor_id>';
830
+ $request .= '<vendor_authcode>' . $this->_authcode . '</vendor_authcode>';
831
+ $request .= '<request_type>' . $requestType . '</request_type>';
832
+ $request .= '<product_id>' . $this->_productId . '</product_id>';
833
+ $request .= '<tid>' . $tid . '</tid>' . $extraOption;
834
+ $request .= '</info_request></nnxml>';
835
+
836
+ if ($this->_validateBasicParams()) {
837
+ $result = $this->_setNovalnetRequestCall($request, Novalnet_Payment_Model_Config::INFO_REQUEST_URL, 'XML');
838
+ if($requestType == 'NOVALTEL_STATUS') { $requestData->setData($request); }
839
+ return $result;
840
+ }
841
+ }
842
+
843
+ /**
844
+ * Check whether the cart amount and response server API amount is valid
845
+ *
846
+ * @return void
847
+ */
848
+ private function _validateSession() {
849
+ $methodSession = $this->_getMethodSession();
850
+ if ($methodSession->hasNnPhoneTid()) {
851
+ if ($methodSession->getOrderAmount() != $this->_helper->getFormatedAmount($this->_getAmount())) {
852
+ $this->_unsetMethodSession();
853
+ $this->showException('You have changed the order amount after receiving telephone number');
854
+ }
855
+ }
856
+ }
857
+
858
+ /**
859
+ * Get checkout session
860
+ *
861
+ * @return Mage_Sales_Model_Order
862
+ */
863
+ protected function _getCheckout() {
864
+ if (Mage::app()->getStore()->isAdmin()) {
865
+ return $this->_helper->_getAdminCheckoutSession();
866
+ } else {
867
+ return $this->_helper->_getCheckoutSession();
868
+ }
869
+ }
870
+
871
+ /**
872
+ * Check whether the cart amount allowed for this payment
873
+ * Amount between 0.99 & 10.00 EUR
874
+ *
875
+ * @return bool
876
+ */
877
+ public function checkAmountAllowed() {
878
+ $amount = $this->_helper->getFormatedAmount($this->_getAmount());
879
+ if ($amount >= Novalnet_Payment_Model_Config::PHONE_PAYMENT_AMOUNT_MIN and $amount <= Novalnet_Payment_Model_Config::PHONE_PAYMENT_AMOUNT_MAX) {
880
+ return true;
881
+ }
882
+ $this->showException($this->_helper->__('Amounts below 0,99 Euros and above 10,00 Euros cannot be processed and are not accepted') . '!', false);
883
+ return false;
884
+ }
885
+
886
+ /**
887
+ * Post request to gateway to Load CC Iframe
888
+ *
889
+ * @return Varien_Object
890
+ */
891
+ public function getNovalnetIframe() {
892
+
893
+ $amount = ($this->_helper->checkIsAdmin()) ? $this->_helper->_getAdminCheckoutSession()->getQuote()->getBaseGrandTotal() : $this->_helper->_getCheckoutSession()->getQuote()->getBaseGrandTotal();
894
+ $storeId = $this->_helper->getMagentoStoreId();
895
+ $this->_manualCheckValidate($storeId, $amount);
896
+ //Required Parameters to be passed to the Server
897
+ $request = array();
898
+ $request['nn_lang_nn'] = strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2));
899
+ $request['nn_vendor_id_nn'] = $this->_vendorId;
900
+ $request['nn_product_id_nn'] = $this->_productId;
901
+ $request['nn_payment_id_nn'] = $this->_helper->getPaymentId($this->_code);
902
+
903
+ if ($this->_vendorId && $this->_productId) {
904
+ $result = $this->_setNovalnetRequestCall($request, Novalnet_Payment_Model_Config::CC_URL);
905
+ $result = $result->getRawBody();
906
+ } else {
907
+ $result = $this->_helper->__('Basic Parameter is not valid');
908
+ }
909
+ return $result;
910
+ }
911
+
912
+ /**
913
+ * validate novalnet params to proceed checkout
914
+ *
915
+ * @return bool
916
+ */
917
+ public function validateNovalnetParams() {
918
+ $billing = $this->_getInfoObject()->getBillingAddress();
919
+ if (!$this->_validateBasicParams()) {
920
+ $this->showException($this->_helper->__('Basic parameter not valid') . '!', false);
921
+ return false;
922
+ } elseif ($this->_getConfigData('manual_checking_amount') && (!$this->_helper->checkIsNumeric($this->_getConfigData('manual_checking_amount')) || !$this->_helper->checkIsNumeric($this->_getConfigData('second_product_id')) || !$this->_helper->checkIsNumeric($this->_getConfigData('second_tariff_id')))) {
923
+ $this->showException($this->_helper->__('Manual limit amount / Product-ID2 / Tariff-ID2 is not valid') . '!', false);
924
+ return false;
925
+ } elseif (!$this->_helper->validateEmail($this->_getInfoObject()->getCustomerEmail()) || !$billing->getFirstname() || !$billing->getLastname()) {
926
+ $this->showException($this->_helper->__('Customer name/email fields are not valid') . '!', false);
927
+ return false;
928
+ }
929
+ return true;
930
+ }
931
+
932
+ /**
933
+ * validate manual checklimit and reassign product id and tariff id
934
+ *
935
+ * @param integer $storeId
936
+ * @param float $amount
937
+ */
938
+
939
+ private function _manualCheckValidate($storeId = NULL, $amount=NULL) {
940
+ $amount = $this->_helper->getFormatedAmount(($amount) ? $amount : $this->_getAmount());
941
+ $storeId = is_null($storeId) ? $this->_helper->getMagentoStoreId() : $storeId;
942
+ $manualCheckAmt = (int) $this->_getConfigData('manual_checking_amount', false, $storeId);
943
+ $this->_productId = (strlen(trim($this->_getConfigData('second_product_id', false, $storeId))) && $manualCheckAmt && $manualCheckAmt <= $amount) ? trim($this->_getConfigData('second_product_id', false, $storeId)) : trim($this->_getConfigData('product_id', true, $storeId));
944
+ $this->_tariffId = (strlen(trim($this->_getConfigData('second_tariff_id', false, $storeId))) && $manualCheckAmt && $manualCheckAmt <= $amount) ? trim($this->_getConfigData('second_tariff_id', false, $storeId)) : trim($this->_getConfigData('tariff_id', true, $storeId));
945
+ }
946
+
947
+ /**
948
+ * validate novalnet basic params
949
+ *
950
+ * @return bool
951
+ */
952
+ private function _validateBasicParams() {
953
+ $helper = $this->_helper;
954
+ if ($helper->checkIsNumeric($this->_vendorId) && $this->_authcode && $helper->checkIsNumeric($this->_productId) && $helper->checkIsNumeric($this->_tariffId)) {
955
+ return true;
956
+ }
957
+ return false;
958
+ }
959
+
960
+ /**
961
+ * Check whether callback option is enabled
962
+ *
963
+ */
964
+ public function isCallbackTypeCall() {
965
+ $callbackTid = "hasNnCallbackTid" . ucfirst($this->_code);
966
+ $total = $this->_helper->getFormatedAmount($this->_getAmount());
967
+ $callBackMinimum = (int) $this->_getConfigData('callback_minimum_amount');
968
+ $countryCode = strtoupper($this->_getInfoObject()->getBillingAddress()->getCountryId());
969
+
970
+ return $this->_helper->_getCheckoutSession()->$callbackTid()
971
+ || ($this->_getConfigData('callback')
972
+ && ($callBackMinimum ? $total >= $callBackMinimum : true)
973
+ && ($this->_helper->isCallbackTypeAllowed($countryCode)));
974
+ }
975
+
976
+ /**
977
+ * Initiate callback process after selecting payment method
978
+ *
979
+ * @return bool
980
+ */
981
+ private function _initiateCallbackProcess($paymentCode) {
982
+ $infoInstance = $this->getInfoInstance();
983
+ $isCallbackTypeCall = $this->isCallbackTypeCall();
984
+ $isPlaceOrder = $this->_isPlaceOrder();
985
+ $callbackPayment = Novalnet_Payment_Model_Config::getInstance()->getNovalnetVariable('fraudCheckPayment');
986
+ if (in_array($paymentCode, $callbackPayment)) {
987
+ $payCode = ucfirst($paymentCode);
988
+ $callbackTid = "getNnCallbackTid" . $payCode;
989
+ $callbackOrderNo = "getNnCallbackOrderNo" . $payCode;
990
+ $callbackPin = "getNnCallbackPin" . $payCode;
991
+ $callbackNewPin = "getNnNewCallbackPin" . $payCode;
992
+ $setcallbackPin = "setNnCallbackPin" . $payCode;
993
+
994
+ if (!$isPlaceOrder && $isCallbackTypeCall && $this->_getIncrementId() != $this->_getMethodSession()->$callbackOrderNo()) {
995
+ $this->_unsetMethodSession();
996
+ }
997
+ //validate callback session
998
+ $this->_validateCallbackSession();
999
+ $methodSession = $this->_getMethodSession();
1000
+ if ($isCallbackTypeCall && $infoInstance->getCallbackPinValidationFlag() && $methodSession->$callbackTid()) {
1001
+ $nnCallbackPin = $infoInstance->$callbackPin();
1002
+ if (!$infoInstance->$callbackNewPin() && (!$this->_helper->checkIsValid($nnCallbackPin) || empty($nnCallbackPin))) {
1003
+ $this->showException('PIN you have entered is incorrect or empty');
1004
+ }
1005
+ }
1006
+ if ($isCallbackTypeCall && !$isPlaceOrder && $this->_getConfigData('callback') != 3) {
1007
+ if ($methodSession->$callbackTid()) {
1008
+ if ($infoInstance->$callbackNewPin()) {
1009
+ $this->_regenerateCallbackPin();
1010
+ } else {
1011
+ $methodSession->$setcallbackPin($infoInstance->$callbackPin());
1012
+ }
1013
+ } else {
1014
+ $this->_generateCallback();
1015
+ }
1016
+ } elseif ($isCallbackTypeCall && !$isPlaceOrder && $this->_getConfigData('callback') == 3) {
1017
+
1018
+ if (!$methodSession->$callbackTid()) {
1019
+ $this->_generateCallback();
1020
+ }
1021
+ }
1022
+ if ($isPlaceOrder) {
1023
+ $this->_validateCallbackProcess();
1024
+ }
1025
+ }
1026
+ }
1027
+
1028
+ /**
1029
+ * validate order amount is getting changed after callback initiation
1030
+ *
1031
+ * throw Mage Exception
1032
+ */
1033
+ private function _validateCallbackSession() {
1034
+ $payCode = ucfirst($this->_code);
1035
+ $callbackTid = "hasNnCallbackTid" . $payCode;
1036
+ $getNnDisableTime = "getNnDisableTime" . $payCode;
1037
+ $methodSession = $this->_getMethodSession();
1038
+ if ($methodSession->$callbackTid()) {
1039
+ if ($methodSession->$getNnDisableTime() && time() > $methodSession->$getNnDisableTime()) {
1040
+ $this->_unsetMethodSession();
1041
+ } elseif (intval($methodSession->getOrderAmount()) != $this->_helper->getFormatedAmount($this->_getAmount())) {
1042
+ $this->_unsetMethodSession();
1043
+ if (!$this->_isPlaceOrder() && $this->_getConfigData('callback') != 3) {
1044
+ $this->showException('You have changed the order amount after getting PIN number, please try again with a new call');
1045
+ } else if (!$this->_isPlaceOrder() && $this->_getConfigData('callback') == 3) {
1046
+ $this->showException('You have changed the order amount after getting e-mail, please try again with a new call');
1047
+ }
1048
+ }
1049
+ }
1050
+ }
1051
+
1052
+ /**
1053
+ * Get increment id for callback process
1054
+ *
1055
+ * @return mixed
1056
+ */
1057
+ private function _getIncrementId() {
1058
+ $storeId = $this->_getHelper()->getMagentoStoreId();
1059
+ $orders = Mage::getModel('sales/order')->getCollection()
1060
+ ->addAttributeToFilter('store_id', $storeId)
1061
+ ->setOrder('entity_id','DESC');
1062
+ $lastIncrementId = $orders->getFirstItem()->getIncrementId();
1063
+ if($lastIncrementId) {
1064
+ $IncrementId = ++$lastIncrementId;
1065
+ } else {
1066
+ $IncrementId = $storeId.Mage::getModel('eav/entity_increment_numeric')->getNextId();
1067
+ }
1068
+ return $IncrementId;
1069
+ }
1070
+
1071
+ /**
1072
+ * Make callback request and validate response
1073
+ *
1074
+ */
1075
+ private function _generateCallback() {
1076
+ $payCode = ucfirst($this->_code);
1077
+ $callbackTid = "setNnCallbackTid" . $payCode;
1078
+ $callbackOrderNo = "setNnCallbackOrderNo" . $payCode;
1079
+
1080
+ $request = $this->buildRequest(Novalnet_Payment_Model_Config::POST_CALLBACK);
1081
+ $response = $this->_postRequest($request);
1082
+ $this->logNovalnetTransactionData($request, $response, $response->getTid());
1083
+ if ($response->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
1084
+ $this->_getMethodSession()
1085
+ ->$callbackTid(trim($response->getTid()))
1086
+ ->setNnTestMode(trim($response->getTestMode()))
1087
+ ->setNnCallbackTidTimeStamp(time())
1088
+ ->setOrderAmount($request->getAmount())
1089
+ ->setNnCallbackSuccessState(true)
1090
+ ->$callbackOrderNo(trim($response->getOrderNo()))
1091
+ ->setNnResponseData($response);
1092
+ if ($this->_getConfigData('callback') == 3) {
1093
+ $text = $this->_helper->__('Please reply to the e-mail');
1094
+ } elseif ($this->_getConfigData('callback') == 1) {
1095
+ $text = $this->_helper->__('You will shortly receive a PIN by phone / SMS. Please enter the PIN in the appropriate text box');
1096
+ }
1097
+ } else {
1098
+ $text = $this->_helper->htmlEscape($response->getStatusDesc());
1099
+ }
1100
+ $this->showException($text, false);
1101
+ }
1102
+
1103
+ /**
1104
+ * Regenerate new pin for callback process
1105
+ *
1106
+ */
1107
+ private function _regenerateCallbackPin() {
1108
+ $callbackTid = "getNnCallbackTid" . ucfirst($this->_code);
1109
+ $methodSession = $this->_getMethodSession();
1110
+ $response = $this->doNovalnetStatusCall($methodSession->$callbackTid(), NULL, Novalnet_Payment_Model_Config::TRANSMIT_PIN_AGAIN);
1111
+ if ($response->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
1112
+ $text = $this->_helper->__('You will shortly receive a PIN by phone / SMS. Please enter the PIN in the appropriate text box');
1113
+ } else {
1114
+ $text = $this->_helper->htmlEscape($response->getStatusMessage()); //status_message
1115
+ }
1116
+ $this->showException($text, false);
1117
+ }
1118
+
1119
+ /**
1120
+ * validate callback response
1121
+ *
1122
+ */
1123
+ private function _validateCallbackProcess() {
1124
+ $payCode = ucfirst($this->_code);
1125
+ $callbackTid = "getNnCallbackTid" . $payCode;
1126
+ $callbackPin = "getNnCallbackPin" . $payCode;
1127
+ $setNnDisableTime = "setNnDisableTime" . $payCode;
1128
+ $getNnDisableTime = "getNnDisableTime" . $payCode;
1129
+ $methodSession = $this->_getMethodSession();
1130
+ if ($methodSession->getNnCallbackSuccessState()) {
1131
+ if ($this->_getConfigData('callback') == 3) {
1132
+ $type = Novalnet_Payment_Model_Config::REPLY_EMAIL_STATUS;
1133
+ $extraOption = '';
1134
+ } elseif ($this->_getConfigData('callback') == 1) {
1135
+ $type = Novalnet_Payment_Model_Config::PIN_STATUS;
1136
+ $extraOption = '<pin>' . $methodSession->$callbackPin() . '</pin>';
1137
+ }
1138
+ $result = $this->doNovalnetStatusCall($methodSession->$callbackTid(), NULL, $type, $extraOption);
1139
+ $result->setTid($methodSession->$callbackTid());
1140
+ $result->setTestMode($methodSession->getNnTestMode());
1141
+
1142
+ // Analyze the response from Novalnet
1143
+ if ($result->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
1144
+ $methodSession->setNnCallbackSuccessState(false);
1145
+ } else {
1146
+ if ($result->getStatus() == Novalnet_Payment_Model_Config::METHOD_DISABLE_CODE) {
1147
+ $methodSession->$setNnDisableTime(time() + (30 * 60));
1148
+ }
1149
+ $error = ($result->getStatusDesc() || $result->getStatusMessage()) ? $this->_helper->htmlEscape($result->getStatusMessage() . $result->getStatusDesc()) : $this->_helper->htmlEscape($result->pin_status['status_message']);
1150
+ $this->showException($error, false);
1151
+ }
1152
+ }
1153
+ }
1154
+
1155
+ /**
1156
+ * Log novalnet transaction data
1157
+ *
1158
+ */
1159
+ public function logNovalnetTransactionData($request, $response, $txnId, $customerId = NULL, $storeId = NULL) {
1160
+ $this->_dataHelper->doRemoveSensitiveData($request, $this->_code);
1161
+ $shopUrl = ($response->getMemburl()) ? $response->getMemburl() : $this->_helper->getCurrentSiteUrl();
1162
+ $customerId = ($customerId) ? $customerId : $this->_helper->getCustomerId();
1163
+ $storeId = ($storeId) ? $storeId : $this->_helper->getMagentoStoreId();
1164
+ $modNovalTransactionOverview = $this->_helper->getModelTransactionOverview();
1165
+ $modNovalTransactionOverview->setTransactionId($txnId)
1166
+ ->setOrderId($this->_getOrderId())
1167
+ ->setRequestData(serialize($request->getData()))
1168
+ ->setResponseData(serialize($response->getData()))
1169
+ ->setCustomerId($customerId)
1170
+ ->setStatus($response->getStatus())
1171
+ ->setStoreId($storeId)
1172
+ ->setShopUrl($shopUrl)
1173
+ ->setCreatedDate($this->_helper->getCurrentDateTime())
1174
+ ->save();
1175
+ }
1176
+
1177
+ /**
1178
+ * Log novalnet transaction status data
1179
+ *
1180
+ */
1181
+ public function logNovalnetStatusData($response, $txnId, $customerId = NULL, $storeId = NULL, $amount = NULL) {
1182
+ $shopUrl = ($response->getMemburl()) ? $response->getMemburl() : $this->_helper->getCurrentSiteUrl();
1183
+ $customerId = ($customerId) ? $customerId : $this->_helper->getCustomerId();
1184
+ $storeId = ($storeId) ? $storeId : $this->_helper->getMagentoStoreId();
1185
+ $amount = ($amount) ? $amount : $this->_getAmount();
1186
+ $modNovalTransactionStatus = $this->_helper->getModelTransactionStatus();
1187
+ $modNovalTransactionStatus->setTransactionNo($txnId)
1188
+ ->setOrderId($this->_getOrderId()) //order number
1189
+ ->setTransactionStatus($response->getStatus()) //transaction status code
1190
+ ->setNcNo($response->getNcNo())
1191
+ ->setCustomerId($customerId) //customer number
1192
+ ->setPaymentName($this->_code) //payment name
1193
+ ->setAmount($amount) //amount
1194
+ ->setRemoteIp($this->_helper->getRealIpAddr()) //remote ip
1195
+ ->setStoreId($storeId) //store id
1196
+ ->setShopUrl($shopUrl)
1197
+ ->setCreatedDate($this->_helper->getCurrentDateTime()) //created date
1198
+ ->save();
1199
+
1200
+ }
1201
+
1202
+ /**
1203
+ * validate basic params to load Cc Iframe
1204
+ *
1205
+ * @return bool
1206
+ */
1207
+
1208
+ public function validateNovalnetCcParams() {
1209
+ if (!$this->_validateBasicParams()) {
1210
+ return false;
1211
+ } elseif ($this->_getConfigData('manual_checking_amount') && (!$this->_helper->checkIsNumeric($this->_getConfigData('manual_checking_amount')) || !$this->_helper->checkIsNumeric($this->_getConfigData('second_product_id')) || !$this->_helper->checkIsNumeric($this->_getConfigData('second_tariff_id')))) {
1212
+ return false;
1213
+ }
1214
+ return true;
1215
+ }
1216
+
1217
+ /**
1218
+ * Get current infoinstance
1219
+ *
1220
+ * @return Mage_Payment_Model_Method_Abstract
1221
+ */
1222
+
1223
+ private function _getInfoInstance() {
1224
+ if (!isset($this->infoInstance)) {
1225
+ $this->infoInstance = $this->getInfoInstance();
1226
+ }
1227
+ return $this->infoInstance;
1228
+ }
1229
+
1230
+ /**
1231
+ * Get current order/quote object
1232
+ *
1233
+ * @return Mage_Payment_Model_Method_Abstract
1234
+ */
1235
+ private function _getInfoObject() {
1236
+ $info = $this->_getInfoInstance();
1237
+ if ($this->_isPlaceOrder()) {
1238
+ return $info->getOrder();
1239
+ } else {
1240
+ return $info->getQuote();
1241
+ }
1242
+ }
1243
+
1244
+ /**
1245
+ * Whether current operation is order placement
1246
+ *
1247
+ * @return bool
1248
+ */
1249
+ private function _isPlaceOrder() {
1250
+ $info = $this->_getInfoInstance();
1251
+ if ($info instanceof Mage_Sales_Model_Quote_Payment) {
1252
+ return false;
1253
+ } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
1254
+ return true;
1255
+ }
1256
+ }
1257
+
1258
+ /**
1259
+ * Grand total getter
1260
+ *
1261
+ * @return string
1262
+ */
1263
+ private function _getAmount() {
1264
+ $info = $this->_getInfoInstance();
1265
+ if ($this->_isPlaceOrder()) {
1266
+ return (double) $info->getOrder()->getBaseGrandTotal();
1267
+ } else {
1268
+ return (double) $info->getQuote()->getBaseGrandTotal();
1269
+ }
1270
+ }
1271
+
1272
+ /**
1273
+ * Order increment ID getter (either real from order or a reserved from quote)
1274
+ *
1275
+ * @return string
1276
+ */
1277
+ private function _getOrderId() {
1278
+ $info = $this->_getInfoInstance();
1279
+ if ($this->_isPlaceOrder()) {
1280
+ return $info->getOrder()->getIncrementId();
1281
+ } else {
1282
+ return $this->_getIncrementId();
1283
+ }
1284
+ }
1285
+
1286
+ /**
1287
+ * Get payment data for current order
1288
+ *
1289
+ * @return Mage_Payment_Model_Method_Abstract
1290
+ */
1291
+ private function _getNnPaymentData() {
1292
+ $info = $this->_getInfoInstance();
1293
+ if ($this->_isPlaceOrder()) {
1294
+ return $info->getOrder()->getPayment();
1295
+ } else {
1296
+ return $info;
1297
+ }
1298
+ }
1299
+
1300
+ /**
1301
+ * Retrieve model helper
1302
+ *
1303
+ * @return Novalnet_Payment_Helper_Data
1304
+ */
1305
+ protected function _getHelper() {
1306
+ return Mage::helper('novalnet_payment');
1307
+ }
1308
+
1309
+ /**
1310
+ * Retrieve Assign data helper
1311
+ *
1312
+ * @return Novalnet_Payment_Helper_AssignData
1313
+ */
1314
+ protected function _getDataHelper() {
1315
+ return Mage::helper('novalnet_payment/AssignData');
1316
+ }
1317
+
1318
+ /**
1319
+ * Show expection
1320
+ *
1321
+ * @param $string
1322
+ * @param $lang
1323
+ * @return Mage::throwException
1324
+ */
1325
+ public function showException($string, $lang=true){
1326
+ if($lang)
1327
+ $string = $this->_helper->__($string);
1328
+
1329
+ return Mage::throwException($string);
1330
+ }
1331
+
1332
+ /**
1333
+ * Assign helper utilities needed for the payment process
1334
+ *
1335
+ */
1336
+ public function assignUtilities(){
1337
+ if(!$this->_helper){
1338
+ $this->_helper = $this->_getHelper();
1339
+ }
1340
+ if(!$this->_dataHelper){
1341
+ $this->_dataHelper = $this->_getDataHelper();
1342
+ }
1343
+ }
1344
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetCc.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetCc extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_CC;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_CC_CAN_CAPTURE;
31
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_CC_CAN_USE_INTERNAL;
32
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_CC_CAN_USE_MULTISHIPPING;
33
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_CC_FORM_BLOCK;
34
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_CC_INFO_BLOCK;
35
+
36
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetElvaustria.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetElvaustria extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_ELVAT;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_ELVAT_CAN_CAPTURE;
31
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_ELVAT_CAN_USE_MULTISHIPPING;
32
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_ELVAT_FORM_BLOCK;
33
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_ELVAT_INFO_BLOCK;
34
+
35
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetElvgerman.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetElvgerman extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_ELVDE;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_ELVDE_CAN_CAPTURE;
31
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_ELVDE_CAN_USE_MULTISHIPPING;
32
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_ELVDE_FORM_BLOCK;
33
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_ELVDE_INFO_BLOCK;
34
+
35
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetIdeal.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetIdeal extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_IDEAL;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_IDEAL_CAN_CAPTURE;
31
+ protected $_canRefund = Novalnet_Payment_Model_Config::NN_IDEAL_CAN_REFUND;
32
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_IDEAL_CAN_USE_INTERNAL;
33
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_IDEAL_CAN_USE_MULTISHIPPING;
34
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_IDEAL_FORM_BLOCK;
35
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_IDEAL_INFO_BLOCK;
36
+
37
+ /**
38
+ * Get redirect URL
39
+ *
40
+ * @return Mage_Payment_Helper_Data
41
+ */
42
+ public function getOrderPlaceRedirectUrl() {
43
+ return $this->_getHelper()->getUrl(Novalnet_Payment_Model_Config::GATEWAY_REDIRECT_URL);
44
+ }
45
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetInvoice.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetInvoice extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_INVOICE;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_INVOICE_CAN_CAPTURE;
31
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_INVOICE_CAN_USE_MULTISHIPPING;
32
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_INVOICE_FORM_BLOCK;
33
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_INVOICE_INFO_BLOCK;
34
+
35
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPaypal.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetPaypal extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_PAYPAL;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_PAYPAL_CAN_CAPTURE;
31
+ protected $_canRefund = Novalnet_Payment_Model_Config::NN_PAYPAL_CAN_REFUND;
32
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_PAYPAL_CAN_USE_INTERNAL;
33
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_PAYPAL_CAN_USE_MULTISHIPPING;
34
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_PAYPAL_FORM_BLOCK;
35
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_PAYPAL_INFO_BLOCK;
36
+
37
+ /**
38
+ * Get redirect URL
39
+ *
40
+ * @return Mage_Payment_Helper_Data
41
+ */
42
+ public function getOrderPlaceRedirectUrl() {
43
+ return $this->_getHelper()->getUrl(Novalnet_Payment_Model_Config::GATEWAY_REDIRECT_URL);
44
+ }
45
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPhonepayment.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetPhonepayment extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_TELEPHONE;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_TELEPHONE_CAN_CAPTURE;
31
+ protected $_canRefund = Novalnet_Payment_Model_Config::NN_TELEPHONE_CAN_REFUND;
32
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_TELEPHONE_CAN_USE_INTERNAL;
33
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_TELEPHONE_CAN_USE_MULTISHIPPING;
34
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_TELEPHONE_FORM_BLOCK;
35
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_TELEPHONE_INFO_BLOCK;
36
+
37
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetPrepayment.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetPrepayment extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_PREPAYMENT;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_PREPAYMENT_CAN_CAPTURE;
31
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_PREPAYMENT_CAN_USE_MULTISHIPPING;
32
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_PREPAYMENT_FORM_BLOCK;
33
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_PREPAYMENT_INFO_BLOCK;
34
+
35
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetSecure.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetSecure extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_CC3D;
30
+ protected $_canAuthorize = Novalnet_Payment_Model_Config::NN_CC3D_CAN_AUTHORIZE;
31
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_CC3D_CAN_CAPTURE;
32
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_CC3D_CAN_USE_INTERNAL;
33
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_CC3D_CAN_USE_MULTISHIPPING;
34
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_CC3D_FORM_BLOCK;
35
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_CC3D_INFO_BLOCK;
36
+
37
+ /**
38
+ * Get redirect URL
39
+ *
40
+ * @return Mage_Payment_Helper_Data
41
+ */
42
+ public function getOrderPlaceRedirectUrl() {
43
+ return $this->_getHelper()->getUrl(Novalnet_Payment_Model_Config::GATEWAY_REDIRECT_URL);
44
+ }
45
+ }
app/code/community/Novalnet/Payment/Model/Payment/Method/NovalnetSofortueberweisung.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Payment_Method_NovalnetSofortueberweisung extends Novalnet_Payment_Model_Payment_Method_Abstract {
28
+
29
+ protected $_code = Novalnet_Payment_Model_Config::NN_SOFORT;
30
+ protected $_canCapture = Novalnet_Payment_Model_Config::NN_SOFORT_CAN_CAPTURE;
31
+ protected $_canRefund = Novalnet_Payment_Model_Config::NN_SOFORT_CAN_REFUND;
32
+ protected $_canUseInternal = Novalnet_Payment_Model_Config::NN_SOFORT_CAN_USE_INTERNAL;
33
+ protected $_canUseForMultishipping = Novalnet_Payment_Model_Config::NN_SOFORT_CAN_USE_MULTISHIPPING;
34
+ protected $_formBlockType = Novalnet_Payment_Model_Config::NN_SOFORT_FORM_BLOCK;
35
+ protected $_infoBlockType = Novalnet_Payment_Model_Config::NN_SOFORT_INFO_BLOCK;
36
+
37
+ /**
38
+ * Get redirect URL
39
+ *
40
+ * @return Mage_Payment_Helper_Data
41
+ */
42
+ public function getOrderPlaceRedirectUrl() {
43
+ return $this->_getHelper()->getUrl(Novalnet_Payment_Model_Config::GATEWAY_REDIRECT_URL);
44
+ }
45
+ }
app/code/community/Novalnet/Payment/Model/Resource/Transactionoverview.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Resource_Transactionoverview extends Mage_Core_Model_Mysql4_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ $this->_init('novalnet_payment/order_log', 'nn_log_id');
34
+ }
35
+
36
+ }
app/code/community/Novalnet/Payment/Model/Resource/Transactionoverview/Collection.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Resource_Transactionoverview_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ $this->_init('novalnet_payment/transactionoverview');
34
+ }
35
+
36
+ /**
37
+ * @param Mage_Sales_Model_Order $order
38
+ * @return void
39
+ */
40
+ public function getByOrder(Mage_Sales_Model_Order $order) {
41
+ $this->addFieldToFilter('order_id', $order->getIncrementId());
42
+ }
43
+
44
+ }
app/code/community/Novalnet/Payment/Model/Resource/Transactionstatus.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Resource_Transactionstatus extends Mage_Core_Model_Mysql4_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ $this->_init('novalnet_payment/transaction_status', 'nn_txn_id');
34
+ }
35
+
36
+ }
app/code/community/Novalnet/Payment/Model/Resource/Transactionstatus/Collection.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Resource_Transactionstatus_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ $this->_init('novalnet_payment/transactionstatus');
34
+ }
35
+
36
+ /**
37
+ * @param Mage_Sales_Model_Order $order
38
+ * @return void
39
+ */
40
+ public function getByOrder(Mage_Sales_Model_Order $order) {
41
+ $this->addFieldToFilter('order_id', $order->getIncrementId());
42
+ }
43
+
44
+ }
app/code/community/Novalnet/Payment/Model/System/Config/Activemethods.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_System_Config_Activemethods {
28
+
29
+ public function toOptionArray() {
30
+ $methods = array();
31
+ $activePayment = false;
32
+ $inactivePayment = false;
33
+
34
+ if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) { // store level
35
+ $scopeId = Mage::getModel('core/store')->load($code)->getId();
36
+ }
37
+ elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) { // website level
38
+ $website_id = Mage::getModel('core/website')->load($code)->getId();
39
+ $scopeId = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
40
+ }
41
+ else { // default level
42
+ $scopeId = 0;
43
+ }
44
+
45
+ $payments = Mage::getSingleton('payment/config')->getActiveMethods($scopeId);
46
+ foreach ($payments as $paymentCode => $paymentModel) {
47
+
48
+ if (preg_match("/novalnet/i", $paymentCode)) {
49
+
50
+ $paymentActive = Mage::getStoreConfig('payment/' . $paymentCode . '/active', $scopeId);
51
+ if ($paymentActive == true) {
52
+ $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title');
53
+ $methods[$paymentCode] = array(
54
+ 'label' => $paymentTitle,
55
+ 'value' => $paymentCode,
56
+ );
57
+ $activePayment = true;
58
+ }
59
+ } else {
60
+ $inactivePayment = true;
61
+ }
62
+ }
63
+
64
+ if (!$activePayment && $inactivePayment) {
65
+ $methods[$paymentCode] = array(
66
+ 'label' => Mage::helper('novalnet_payment')->__('No active payment method for this store'),
67
+ 'value' => false,
68
+ );
69
+ }
70
+ return $methods;
71
+ }
72
+
73
+ }
app/code/community/Novalnet/Payment/Model/Transactionoverview.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Transactionoverview extends Mage_Core_Model_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ parent::_construct();
34
+ $this->_init('novalnet_payment/transactionoverview');
35
+ }
36
+
37
+ /**
38
+ * Load order transaction status by custom attribute value. Attribute value should be unique
39
+ *
40
+ * @param string $attribute
41
+ * @param string $value
42
+ * @return Novalnet_Payment_Model_Source_Transactionoverview
43
+ */
44
+ public function loadByAttribute($attribute, $value) {
45
+ $this->load($value, $attribute);
46
+ return $this;
47
+ }
48
+
49
+ /**
50
+ * @param Mage_Sales_Model_Order_Payment $payment
51
+ * @return Novalnet_Payment_Model_Transactionoverview
52
+ */
53
+ public function loadByPayment(Mage_Sales_Model_Order_Payment $payment) {
54
+ if ($payment->getOrder()->getIncrementId()) {
55
+ $this->load($payment->getOrder()->getIncrementId(), 'order_id');
56
+ }
57
+ return $this;
58
+ }
59
+
60
+ public function loadByOrderLogId(Novalnet_Payment_Model_Transactionoverview $orderLog) {
61
+ $this->load($orderLog->getNnLogId(), 'nn_log_id');
62
+ return $this;
63
+ }
64
+
65
+ }
app/code/community/Novalnet/Payment/Model/Transactionstatus.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Model_Transactionstatus extends Mage_Core_Model_Abstract {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function _construct() {
33
+ parent::_construct();
34
+ $this->_init('novalnet_payment/transactionstatus');
35
+ }
36
+
37
+ /**
38
+ * Load order transaction status by custom attribute value. Attribute value should be unique
39
+ *
40
+ * @param string $attribute
41
+ * @param string $value
42
+ * @return Novalnet_Payment_Model_Source_Transactionstatus
43
+ */
44
+ public function loadByAttribute($attribute, $value) {
45
+ $this->load($value, $attribute);
46
+ return $this;
47
+ }
48
+
49
+ /**
50
+ * @param Mage_Sales_Model_Order_Payment $payment
51
+ * @return Novalnet_Payment_Model_Transactionstatus
52
+ */
53
+ public function loadByPayment(Mage_Sales_Model_Order_Payment $payment) {
54
+ if ($payment->getOrder()->getIncrementId()) {
55
+ $this->load($payment->getOrder()->getIncrementId(), 'order_id');
56
+ }
57
+ return $this;
58
+ }
59
+
60
+ public function loadByTransactionStatusId(Novalnet_Payment_Model_Transactionstatus $transactionStatus) {
61
+ $this->load($transactionStatus->getNnTxnId(), 'nn_txn_id');
62
+ return $this;
63
+ }
64
+
65
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/Configuration/Wizard/PageController.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Adminhtml_Configuration_Wizard_PageController extends Mage_Adminhtml_Controller_Action {
28
+
29
+ protected function _initAction() {
30
+ $this->loadLayout();
31
+ $this->setUsedModuleName('novalnet_payment');
32
+ $this->_setActiveMenu('novalnet/configuration');
33
+
34
+ $this->_title($this->__('Novalnet'));
35
+ $this->_title($this->__('Configuration'));
36
+
37
+ return $this;
38
+ }
39
+
40
+ public function indexAction() {
41
+ $this->initConfig('index');
42
+
43
+ $this->_initAction();
44
+ $this->renderLayout();
45
+ }
46
+
47
+ protected function initConfig($actionName) {
48
+ return $this->helperWizard()->initConfig($actionName, $this->getRequest());
49
+ }
50
+
51
+ public function helperWizard() {
52
+ return Mage::helper('novalnet_payment');
53
+ }
54
+
55
+ public function generalGlobalAction() {
56
+ $this->_editAction('generalGlobal');
57
+ }
58
+
59
+ protected function _editAction($actionName) {
60
+ $this->initConfig($actionName);
61
+
62
+ $configPage = Mage::registry('novalnet_wizard_config_page');
63
+
64
+ Mage::getSingleton('adminhtml/config_data')
65
+ ->setSection($configPage->getData('codes/section'))
66
+ ->setWebsite($configPage->getData('codes/website'))
67
+ ->setStore($configPage->getData('codes/store'));
68
+
69
+ $this->_initAction();
70
+ $this->renderLayout();
71
+ }
72
+
73
+ public function _redirectByPageConfig() {
74
+ $url = $this->helperWizard()->getNextPageUrlAsString();
75
+ $this->_redirect($url, array('_current' => true));
76
+ }
77
+
78
+ public function saveAction() {
79
+ $pageCode = $this->getRequest()->getParam('page_code');
80
+
81
+ $config = $this->initConfig($pageCode);
82
+
83
+
84
+ $session = Mage::getSingleton('adminhtml/session');
85
+
86
+ try {
87
+
88
+ $section = $config->getData('codes/section');
89
+ $website = $this->getRequest()->getParam('website');
90
+ $store = $this->getRequest()->getParam('store');
91
+ $groups = $this->getRequest()->getPost('groups');
92
+ $configData = Mage::getModel('adminhtml/config_data');
93
+ $configData->setSection($section)
94
+ ->setWebsite($website)
95
+ ->setStore($store)
96
+ ->setGroups($groups)
97
+ ->save();
98
+
99
+ $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));
100
+ } catch (Mage_Core_Exception $e) {
101
+ foreach (explode("\n", $e->getMessage()) as $message) {
102
+ $session->addError($message);
103
+ }
104
+ } catch (Exception $e) {
105
+ $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();
106
+ $session->addException($e, $msg);
107
+ }
108
+
109
+ $this->_redirectByPageConfig();
110
+ }
111
+
112
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/InformationController.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Adminhtml_InformationController extends Mage_Adminhtml_Controller_Action {
28
+
29
+ /**
30
+ *
31
+ */
32
+ public function indexAction() {
33
+ $this->loadLayout();
34
+ $this->setUsedModuleName('novalnet_payment');
35
+ $this->_setActiveMenu('novalnet/information');
36
+ $this->_title($this->__('Novalnet'));
37
+ $this->_title($this->__('Information'));
38
+ $this->renderLayout();
39
+ }
40
+
41
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/NovalnetCcController.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Adminhtml_NovalnetCcController extends Mage_Adminhtml_Controller_Action {
28
+
29
+ public function indexAction() {
30
+ //Loading current layout
31
+ $this->loadLayout();
32
+
33
+ //Creating a new block
34
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'CcForm', array('template' => 'novalnet/payment/method/form/Ccform.phtml'));
35
+ $this->getLayout()->getBlock('content')->append($block);
36
+
37
+ // TO avoid Background and to load our form in empty page
38
+ $this->getLayout()->getBlock('root')->setTemplate('novalnet/payment/method/form/blank.phtml');
39
+
40
+ //Now showing it with rendering of layout
41
+ $this->renderLayout();
42
+ }
43
+
44
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/Sales/OrderController.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ require_once 'Mage' . DS . 'Adminhtml' . DS . 'controllers' . DS . 'Sales' . DS . 'OrderController.php';
28
+
29
+ class Novalnet_Payment_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController {
30
+
31
+ var $module_name = 'novalnet_payment';
32
+
33
+ /**
34
+ * @return Mage_Adminhtml_Sales_OrderController
35
+ */
36
+ protected function _initAction() {
37
+ $this->loadLayout()
38
+ ->setUsedModuleName($this->module_name)
39
+ ->_setActiveMenu('novalnet')
40
+ ->_addBreadcrumb($this->__('Novalnet'), $this->__('Orders'));
41
+
42
+ return $this;
43
+ }
44
+
45
+ /**
46
+ *
47
+ */
48
+ public function indexAction() {
49
+ $this->_title($this->__('Novalnet'))->_title($this->__('Orders'));
50
+
51
+ $this->_initAction()
52
+ ->renderLayout();
53
+ }
54
+
55
+ /**
56
+ *
57
+ */
58
+ public function transactionStatusGridAction() {
59
+ $this->_initOrder();
60
+ $this->getResponse()->setBody(
61
+ Mage::getBlockSingleton('novalnet_payment/adminhtml_sales_order_view_tab_transactionStatus')->toHtml()
62
+ );
63
+ }
64
+
65
+ /**
66
+ *
67
+ */
68
+ public function transactionOverviewGridAction() {
69
+ $this->_initOrder();
70
+ $this->getResponse()->setBody(
71
+ Mage::getBlockSingleton('novalnet_payment/adminhtml_sales_order_view_tab_transactionOverview')->toHtml()
72
+ );
73
+ }
74
+
75
+ /**
76
+ *
77
+ */
78
+ public function gridAction() {
79
+ $this->getResponse()->setBody(
80
+ $this->getLayout()->createBlock('novalnet_payment/adminhtml_sales_order_grid')->toHtml()
81
+ );
82
+ }
83
+
84
+ /**
85
+ * Invoice update order
86
+ */
87
+ public function invoiceupdateAction() {
88
+ $order = $this->_initOrder();
89
+ if ($order) {
90
+ try {
91
+ Mage::helper('novalnet_payment/AssignData')->setNovalnetInvoiceUpdate($order);
92
+ } catch (Mage_Core_Exception $e) {
93
+ $this->_getSession()->addError($e->getMessage());
94
+ } catch (Exception $e) {
95
+ $this->_getSession()->addError($this->__('The Invoice was not updated.'));
96
+ }
97
+ }
98
+ $this->_redirect('*/sales_order/view', array('order_id' => $order->getId()));
99
+ }
100
+
101
+ public function holdAction() {
102
+ $order = $this->_initOrder();
103
+ if ($order) {
104
+ try {
105
+ Mage::helper('novalnet_payment/AssignData')->setNovalnetTidOnHold($order);
106
+ $order->hold()
107
+ ->save();
108
+ $this->_getSession()->addSuccess(
109
+ $this->__('The order has been put on hold.')
110
+ );
111
+ } catch (Mage_Core_Exception $e) {
112
+ $this->_getSession()->addError($e->getMessage());
113
+ } catch (Exception $e) {
114
+ $this->_getSession()->addError($this->__('The order was not put on hold.'));
115
+ }
116
+ $this->_redirect('*/sales_order/view', array('order_id' => $order->getId()));
117
+ }
118
+ }
119
+
120
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/TransactionController.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Adminhtml_TransactionController extends Mage_Adminhtml_Controller_Action {
28
+
29
+ /**
30
+ * @return Novalnet_Payment_Adminhtml_TransactionController
31
+ */
32
+ protected function _initAction() {
33
+ $this->loadLayout();
34
+ $this->setUsedModuleName('novalnet_payment');
35
+ $this->_setActiveMenu('novalnet/transactionstatus');
36
+ $this->_addBreadcrumb(
37
+ $this->__('Novalnet'), $this->__('Novalnet')
38
+ );
39
+
40
+ $this->_title($this->__('Novalnet'));
41
+ $this->_title($this->__('Transaction'));
42
+
43
+ return $this;
44
+ }
45
+
46
+ /**
47
+ *
48
+ */
49
+ public function indexAction() {
50
+ $this->_initAction();
51
+ $this->renderLayout();
52
+ }
53
+
54
+ /**
55
+ *
56
+ */
57
+ public function gridAction() {
58
+ $this->getResponse()->setBody(
59
+ $this->getLayout()->createBlock('novalnet_payment/adminhtml_transaction_grid')->toHtml()
60
+ );
61
+ }
62
+
63
+ public function viewAction() {
64
+ $id = $this->getRequest()->getParam('nntxn_id');
65
+ $modelTransactionStatus = Mage::helper('novalnet_payment')->getModelTransactionStatus()->load($id);
66
+
67
+ if (empty($id) || !$modelTransactionStatus->getNnTxnId()) {
68
+ //$this->_redirect('*/*/');
69
+ $this->_forward('noRoute');
70
+ }
71
+
72
+ $this->_title(sprintf("#%s", $modelTransactionStatus->getTransactionNo()));
73
+
74
+ // @var $modelTransactionStatus Novalnet_Payment_Model_Transactionstatus
75
+ $modelTransaction = Mage::helper('novalnet_payment')->getModelTransactionStatus();
76
+ $modelTransaction->loadByTransactionStatusId($modelTransactionStatus);
77
+
78
+ Mage::register('novalnet_payment_transactionstatus', $modelTransaction);
79
+
80
+ $this->_initAction();
81
+ $this->renderLayout();
82
+ }
83
+
84
+ }
app/code/community/Novalnet/Payment/controllers/Adminhtml/TransactionoverviewController.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_Adminhtml_TransactionoverviewController extends Mage_Adminhtml_Controller_Action {
28
+
29
+ /**
30
+ * @return Novalnet_NovalnetIdeal_Adminhtml_TransactionController
31
+ */
32
+ protected function _initAction() {
33
+ $this->loadLayout();
34
+ $this->setUsedModuleName('novalnet_payment');
35
+ $this->_setActiveMenu('novalnet/transactionoverview');
36
+ $this->_addBreadcrumb($this->__('Novalnet'), $this->__('Novalnet'));
37
+
38
+ $this->_title($this->__('Novalnet'));
39
+ $this->_title($this->__('Transaction Overview'));
40
+
41
+ return $this;
42
+ }
43
+
44
+ /**
45
+ *
46
+ */
47
+ public function indexAction() {
48
+ $this->_initAction();
49
+ $this->renderLayout();
50
+ }
51
+
52
+ /**
53
+ *
54
+ */
55
+ public function gridAction() {
56
+ $this->getResponse()->setBody(
57
+ $this->getLayout()->createBlock('novalnet_payment/adminhtml_transactionoverview_grid')->toHtml()
58
+ );
59
+ }
60
+
61
+ public function viewAction() {
62
+ $id = $this->getRequest()->getParam('nnlog_id');
63
+ $modelTransactionOverview = Mage::helper('novalnet_payment')->getModelTransactionOverview()->load($id);
64
+
65
+ if (empty($id) || !$modelTransactionOverview->getNnLogId()) {
66
+ //$this->_redirect('*/*/');
67
+ $this->_forward('noRoute');
68
+ }
69
+
70
+ $this->_title(sprintf("#%s", $modelTransactionOverview->getTransactionId()));
71
+
72
+ // @var $modelTransactionOverview Novalnet_Payment_Model_Transactionoverview
73
+ $modelTransaction = Mage::helper('novalnet_payment')->getModelTransactionOverview();
74
+ $modelTransaction->loadByOrderLogId($modelTransactionOverview);
75
+
76
+ Mage::register('novalnet_payment_transactionoverview', $modelTransactionOverview);
77
+
78
+ $this->_initAction();
79
+ $this->renderLayout();
80
+ }
81
+
82
+ }
app/code/community/Novalnet/Payment/controllers/GatewayController.php ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_GatewayController extends Mage_Core_Controller_Front_Action {
28
+
29
+ /**
30
+ * when customer select payment method
31
+ */
32
+ public function redirectAction() {
33
+ try {
34
+ $session = $this->_getCheckout();
35
+ $order = $this->_getOrder();
36
+ $items = Mage::getModel('sales/quote')->load($session->getQuoteId())->getItemsQty();
37
+
38
+ //$payment = $this->_getPayment();
39
+ $paymentObj = $this->_getPaymentObject();
40
+
41
+ if ($session->getLastRealOrderId() && $items) {
42
+ if ($order->getPayment()->getAdditionalInformation($paymentObj->getCode() . '_redirectAction') != 1) {
43
+ $order->getPayment()->setAdditionalInformation($paymentObj->getCode() . '_redirectAction', 1);
44
+ $state = Mage_Sales_Model_Order::STATE_HOLDED; //set State,Status to HOLD
45
+ $status = Mage_Sales_Model_Order::STATE_HOLDED;
46
+ $order->setState($state, $status, $this->_getNovalnetHelper()->__('Customer was redirected to Novalnet'), false)->save();
47
+ }
48
+ } else {
49
+ $this->_redirect('checkout/cart');
50
+ }
51
+ $this->getResponse()->setBody(
52
+ $this->getLayout()
53
+ ->createBlock(Novalnet_Payment_Model_Config::NOVALNET_REDIRECT_BLOCK)
54
+ ->setOrder($order)
55
+ ->toHtml()
56
+ );
57
+ } catch (Mage_Core_Exception $e) {
58
+ $this->_getCheckout()->addError($e->getMessage());
59
+ } catch (Exception $e) {
60
+ Mage::logException($e);
61
+ }
62
+ }
63
+
64
+ /**
65
+ * When Novalnet returns after successful payment
66
+ * The order information at this point is in POST
67
+ */
68
+ public function returnAction() {
69
+ $session = $this->_getCheckout();
70
+ $response = $this->getRequest()->getParams();
71
+ $this->doTransactionOrderLog($response);
72
+ $response['orderId'] = $response['inputval1'];
73
+ $status = $this->_checkReturnedData();
74
+
75
+ //OnFailure
76
+ if (!$response['orderId'] || !$status) {
77
+ $session->getQuote()->setIsActive(false)->save();
78
+ Mage::getSingleton('core/session')->addError("Payment error");
79
+ $this->_redirect('checkout/onepage/failure');
80
+ } else {
81
+ //OnSuccess
82
+ $session->getQuote()->setIsActive(false)->save();
83
+ $this->_redirect('checkout/onepage/success');
84
+ }
85
+ }
86
+
87
+ /**
88
+ * When Customer cancelled/error in the payment
89
+ *
90
+ */
91
+ public function errorAction() {
92
+ $order = $this->_getOrder();
93
+ $session = $this->_getCheckout();
94
+ $payment = $order->getPayment();
95
+ $paymentObj = $payment->getMethodInstance();
96
+
97
+ $session->getQuote()->setIsActive(false)->save();
98
+ $response = $this->getRequest()->getParams();
99
+ $this->doTransactionOrderLog($response); // Save return error response
100
+ $statusMessage = $response['status_text'];
101
+ $paystatus = "<b><font color='red'>" . $this->_getNovalnetHelper()->__('Payment Failed') . "</font> - " . $statusMessage . "</b>";
102
+
103
+ //Unhold an order:-
104
+ if ($order->canUnhold()) {
105
+ $order->unhold()->save();
106
+ }
107
+
108
+ if ($paymentObj->_getConfigData('save_cancelled_tid') == 1) {
109
+ $payment->setLastTransId($response["tid"]);
110
+ }
111
+ $data = array('NnComments' => $paystatus);
112
+ $payment->setAdditionalData(serialize($data));
113
+
114
+ //Cancel the order:-
115
+ $order->registerCancellation($statusMessage);
116
+ if ($order->getPayment()->getAdditionalInformation($paymentObj->getCode() . '_errorAction') != 1) {
117
+ $order->getPayment()->setAdditionalInformation($paymentObj->getCode() . '_errorAction', 1);
118
+ Mage::getSingleton('core/session')->addError($statusMessage);
119
+ }
120
+ $order->save();
121
+ $this->unsetNovalnetSessionData($paymentObj->getCode());
122
+ $this->_redirect('checkout/onepage/failure', array('_secure' => true));
123
+ }
124
+
125
+ /**
126
+ * Checking Post variables.
127
+ *
128
+ */
129
+ protected function _checkReturnedData() {
130
+ try {
131
+ $status = false;
132
+ if (!$this->getRequest()->isPost()) {
133
+ $this->norouteAction();
134
+ return;
135
+ }
136
+
137
+ //Get response
138
+ $response = $this->getRequest()->getParams();
139
+ $dataObj = new Varien_Object($response);
140
+ $response['orderId'] = $response['inputval1'];
141
+ $order = $this->_getOrder();
142
+
143
+ //Unhold an order:-
144
+ if ($order->canUnhold()) {
145
+ $order->unhold()->save();
146
+ }
147
+
148
+ $payment = $order->getPayment();
149
+ $paymentObj = $payment->getMethodInstance();
150
+
151
+ $this->unsetNovalnetSessionData($paymentObj->getCode());
152
+ $authorizeKey = $paymentObj->_getConfigData('password', true);
153
+ if ($response['status'] == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED && $paymentObj->getCode() != Novalnet_Payment_Model_Config::NN_CC3D) {
154
+ $response['status'] = $this->_getNovalnetHelper()->checkParams($response, $authorizeKey);
155
+ }
156
+
157
+ //success
158
+ if (($paymentObj->getCode() == Novalnet_Payment_Model_Config::NN_PAYPAL && $response['status'] == Novalnet_Payment_Model_Config::PAYPAL_PENDING_CODE) || $response['status'] == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
159
+ //set Novalnet Mode
160
+ $serverResponse = ($paymentObj->getCode() != Novalnet_Payment_Model_Config::NN_CC3D) ? $this->_getNovalnetHelper()->getDecodedParam($response['test_mode'], $authorizeKey) : $response['test_mode'];
161
+ $shopMode = $paymentObj->_getConfigData('live_mode');
162
+ $testMode = (((isset($serverResponse) && $serverResponse == 1) || (isset($shopMode) && $shopMode == 0)) ? 1 : 0 );
163
+ $data = array('NnTestOrder' => $testMode);
164
+ $amount = is_numeric($response['amount']) ? $response['amount'] : $this->_getNovalnetHelper()->getDecodedParam($response['amount'], $authorizeKey);
165
+ $formatedAmount = $this->_getNovalnetHelper()->getFormatedAmount($amount);
166
+ $transMode = ($paymentObj->getCode() == Novalnet_Payment_Model_Config::NN_CC3D) ? false : true;
167
+
168
+ $payment->setStatus(Novalnet_Payment_Model_Payment_Method_Abstract::STATUS_SUCCESS)
169
+ ->setStatusDescription($this->_getNovalnetHelper()->__('Payment was successful.'))
170
+ ->setAdditionalData(serialize($data))
171
+ ->setIsTransactionClosed($transMode)
172
+ ->save();
173
+ $order->setPayment($payment);
174
+ $order->save(); //Save details in order
175
+
176
+ $txnId = $response['tid'];
177
+ $getAdminTransaction = $this->_getPaymentObject()->doNovalnetStatusCall($response['tid']);
178
+ if ($getAdminTransaction->getStatus() == Novalnet_Payment_Model_Config::RESPONSE_CODE_APPROVED) {
179
+
180
+ $payment->setTransactionId($txnId) // Add capture text to make the new transaction
181
+ ->setParentTransactionId(null)
182
+ ->setIsTransactionClosed(true)
183
+ ->setLastTransId($txnId)
184
+ ->capture(null)
185
+ ->save();
186
+ } else {
187
+
188
+ $payment->setTransactionId($txnId)
189
+ ->setLastTransId($txnId)
190
+ ->setParentTransactionId(null)
191
+ ->authorize(true, $formatedAmount)
192
+ ->save();
193
+ }
194
+
195
+ if ($order->getPayment()->getAdditionalInformation($paymentObj->getCode() . '_successAction') != 1) {
196
+ $order->getPayment()->setAdditionalInformation($paymentObj->getCode() . '_successAction', 1);
197
+ $setOrderAfterStatus = $paymentObj->_getConfigData('order_status_after_payment') ? $paymentObj->_getConfigData('order_status_after_payment') : Mage_Sales_Model_Order::STATE_PROCESSING; // If after status is empty set default status
198
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, $setOrderAfterStatus, $this->_getNovalnetHelper()->__('Customer successfully returned from Novalnet'), true
199
+ )->save();
200
+
201
+ //sendNewOrderEmail
202
+ if (!$order->getEmailSent() && $order->getId()) {
203
+ try {
204
+ $order->sendNewOrderEmail()
205
+ ->setEmailSent(true)
206
+ ->save();
207
+ } catch (Exception $e) {
208
+ Mage::throwException($this->_getNovalnetHelper()->__('Cannot send new order email.'));
209
+ }
210
+ }
211
+
212
+ $paymentObj->doNovalnetPostbackCall($dataObj); //Do Second Call
213
+ $statusText = ($response['status_text']) ? $response['status_text'] : $this->_getNovalnetHelper()->__('successful');
214
+ Mage::getSingleton('core/session')->addSuccess($statusText);
215
+ }
216
+
217
+ $order->save();
218
+ // Get Admin Transaction status via API
219
+ $getAdminTransaction = $this->_getPaymentObject()->doNovalnetStatusCall($response['tid']);
220
+ $this->doTransactionStatusSave($response, $getAdminTransaction); // Save the Transaction status
221
+ $status = true;
222
+ } else {
223
+ $payment->setStatus(Novalnet_Payment_Model_Payment_Method_Abstract::STATUS_DECLINED);
224
+ $order->setPayment($payment);
225
+
226
+ //Cancel the order:-
227
+ $order->registerCancellation($this->_getNovalnetHelper()->__('Payment was not successfull'))
228
+ ->save();
229
+ $status = false;
230
+ }
231
+ $order->save();
232
+ return $status;
233
+ } catch (Mage_Core_Exception $e) {
234
+ $this->_getCheckout()->addError($e->getMessage());
235
+ } catch (Exception $e) {
236
+ Mage::logException($e);
237
+ }
238
+ }
239
+
240
+ public function doTransactionStatusSave($response, $transactionStatus) {
241
+ $order = $this->_getOrder();
242
+ $authorizeKey = $order->getPayment()->getMethodInstance()->_getConfigData('password', true);
243
+ $amount = is_numeric($response['amount']) ? $response['amount'] : $this->_getNovalnetHelper()->getDecodedParam($response['amount'], $authorizeKey);
244
+ $ncNo = (isset($response['nc_no'])) ? $response['nc_no'] : NULL;
245
+ $modNovalTransactionStatus = Mage::getModel('novalnet_payment/transactionstatus');
246
+ $modNovalTransactionStatus->setTransactionNo($response['tid'])
247
+ ->setOrderId($response['order_no'])
248
+ ->setTransactionStatus($transactionStatus->getStatus()) //Novalnet Admin transaction status
249
+ ->setNcNo($ncNo) //nc number
250
+ ->setCustomerId($this->_getNovalnetHelper()->getCustomerId())
251
+ ->setPaymentName($this->_getPaymentObject()->getCode())
252
+ ->setAmount($this->_getNovalnetHelper()->getFormatedAmount($amount, 'RAW'))
253
+ ->setRemoteIp($this->_getNovalnetHelper()->getRealIpAddr())
254
+ ->setStoreId($this->_getNovalnetHelper()->getMagentoStoreId())
255
+ ->setShopUrl($this->_getNovalnetHelper()->getCurrentSiteUrl())
256
+ ->setCreatedDate($this->_getNovalnetHelper()->getCurrentDateTime())
257
+ ->save();
258
+ }
259
+
260
+ public function doTransactionOrderLog($response) {
261
+
262
+ $modNovalTransactionOverview = $this->_getNovalnetHelper()->getModelTransactionOverview()->loadByAttribute('order_id', $response['order_no']);
263
+
264
+ $modNovalTransactionOverview->setTransactionId($response['tid'])
265
+ ->setResponseData(serialize($response))
266
+ ->setCustomerId($this->_getNovalnetHelper()->getCustomerId())
267
+ ->setStatus($response['status']) //transaction status code
268
+ ->setStoreId($this->_getNovalnetHelper()->getMagentoStoreId())
269
+ ->setShopUrl($this->_getNovalnetHelper()->getCurrentSiteUrl())
270
+ ->save();
271
+ }
272
+
273
+ private function unsetNovalnetSessionData($paymentCode) {
274
+ if ($paymentCode == Novalnet_Payment_Model_Config::NN_CC3D) {
275
+ $session = $this->_getCheckout();
276
+ $session->unsNnCcNumber()
277
+ ->unsNnCcCvc()
278
+ ->unsNnCcOwner()
279
+ ->unsNnCcExpMonth()
280
+ ->unsNnCcExpYear();
281
+ }
282
+ }
283
+
284
+ /**
285
+ * Get singleton of Checkout Session Model
286
+ *
287
+ * @return Mage_Checkout_Model_Session
288
+ */
289
+ public function _getCheckout() {
290
+ return Mage::getSingleton('checkout/session');
291
+ }
292
+
293
+ /**
294
+ * Get Novalnet Helper
295
+ *
296
+ * @return Helper data
297
+ */
298
+ private function _getNovalnetHelper() {
299
+ return Mage::helper('novalnet_payment');
300
+ }
301
+
302
+ /**
303
+ * Get Last placed order object
304
+ *
305
+ * @return payment object
306
+ */
307
+ private function _getOrder() {
308
+ return Mage::getModel('sales/order')->loadByIncrementId($this->_getCheckout()->getLastRealOrderId());
309
+ }
310
+
311
+ /**
312
+ * Get Current payment object from placed order
313
+ *
314
+ * @return payment object
315
+ */
316
+ private function _getPayment() {
317
+ return $this->_getOrder()->getPayment();
318
+ }
319
+
320
+ /**
321
+ * Get Current payment method instance
322
+ *
323
+ * @return payment method instance
324
+ */
325
+ private function _getPaymentObject() {
326
+ return $this->_getPayment()->getMethodInstance();
327
+ }
328
+
329
+ }
app/code/community/Novalnet/Payment/controllers/NovalnetCcController.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
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 Paymentmodule of Novalnet AG
17
+ * https://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 Novalnet
23
+ * @package Novalnet_Payment
24
+ * @copyright Novalnet AG
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Novalnet_Payment_NovalnetCcController extends Mage_Core_Controller_Front_Action {
28
+
29
+ public function indexAction() {
30
+ //Loading current layout
31
+ $this->loadLayout();
32
+
33
+ //Creating a new block
34
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'CcForm', array('template' => 'novalnet/payment/method/form/Ccform.phtml'));
35
+ $this->getLayout()->getBlock('content')->append($block);
36
+
37
+ // TO avoid Background and to load our form in empty page
38
+ $this->getLayout()->getBlock('root')->setTemplate('novalnet/payment/method/form/blank.phtml');
39
+
40
+ //Now showing it with rendering of layout
41
+ $this->renderLayout();
42
+ }
43
+
44
+ }
app/code/community/Novalnet/Payment/etc/adminhtml.xml ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <novalnet translate="title" module="novalnet_payment">
5
+ <title>Novalnet</title>
6
+ <sort_order>100</sort_order>
7
+ <children>
8
+ <sales_order module="novalnet_payment">
9
+ <title>Orders</title>
10
+ <sort_order>10</sort_order>
11
+ <action>novalnet_payment/adminhtml_sales_order</action>
12
+ </sales_order>
13
+ <transaction module="novalnet_payment">
14
+ <title>Novalnet Transactions</title>
15
+ <sort_order>20</sort_order>
16
+ <children>
17
+ <transactionStatus module="novalnet_payment">
18
+ <title>Novalnet Transactions Overview</title>
19
+ <sort_order>10</sort_order>
20
+ <action>novalnet_payment/adminhtml_transaction</action>
21
+ </transactionStatus>
22
+ <transactionOverivew module="novalnet_payment">
23
+ <title>Novalnet Transactions Log</title>
24
+ <sort_order>20</sort_order>
25
+ <action>novalnet_payment/adminhtml_transactionoverview</action>
26
+ </transactionOverivew>
27
+ </children>
28
+ </transaction>
29
+ <configuration module="novalnet_payment">
30
+ <title>Configuration</title>
31
+ <sort_order>40</sort_order>
32
+ <children>
33
+ <general module="novalnet_payment">
34
+ <title>General</title>
35
+ <sort_order>10</sort_order>
36
+ <!--action>adminhtml/system_config/edit/section/payment_config/</action-->
37
+ <action>adminhtml/system_config/edit/section/novalnet_global/</action>
38
+ </general>
39
+ <payment module="novalnet_payment">
40
+ <title>Payment Methods</title>
41
+ <sort_order>20</sort_order>
42
+ <!--action>adminhtml/system_config/edit/section/payment/</action-->
43
+ <action>adminhtml/system_config/edit/section/novalnet_paymethods/</action>
44
+ </payment>
45
+ </children>
46
+ </configuration>
47
+ <fraud_prevention module="novalnet_payment">
48
+ <title>Risk and Control</title>
49
+ <sort_order>30</sort_order>
50
+ <action>adminhtml/system_config/edit/section/fraud_prevent/</action>
51
+ </fraud_prevention>
52
+ <configuration_wizard module="novalnet_payment">
53
+ <title>Configuration-wizard</title>
54
+ <sort_order>50</sort_order>
55
+ <action>novalnet_payment/adminhtml_configuration_wizard_page</action>
56
+ </configuration_wizard>
57
+ <information module="novalnet_payment">
58
+ <title>Information</title>
59
+ <sort_order>60</sort_order>
60
+ <action>novalnet_payment/adminhtml_information/</action>
61
+ </information>
62
+ </children>
63
+ </novalnet>
64
+ </menu>
65
+ <acl>
66
+ <resources>
67
+ <admin>
68
+ <children>
69
+ <system>
70
+ <children>
71
+ <config>
72
+ <children>
73
+ <novalnet_global>
74
+ <title>General</title>
75
+ <sort_order>10</sort_order>
76
+ </novalnet_global>
77
+ <novalnet_paymethods>
78
+ <title>Payment</title>
79
+ <sort_order>20</sort_order>
80
+ </novalnet_paymethods>
81
+ <fraud_prevent>
82
+ <title>Payment</title>
83
+ <sort_order>20</sort_order>
84
+ </fraud_prevent>
85
+ </children>
86
+ </config>
87
+ </children>
88
+ </system>
89
+ </children>
90
+ </admin>
91
+ </resources>
92
+ </acl>
93
+ </config>
app/code/community/Novalnet/Payment/etc/config.xml ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Novalnet_Payment>
5
+ <!-- declare module's version information for database updates -->
6
+ <version>5.0.0</version>
7
+ </Novalnet_Payment>
8
+ </modules>
9
+
10
+ <global>
11
+ <!-- IMPORTANT: if you use your own namespace (i.e. CompanyName) you also have to declare blocks group for new module. See topic: http://www.magentocommerce.com/boards/viewthread/22416/#t102732 -->
12
+ <blocks>
13
+ <novalnet_payment>
14
+ <class>Novalnet_Payment_Block</class>
15
+ </novalnet_payment>
16
+ <adminhtml>
17
+ <rewrite>
18
+ <sales_order_view>Novalnet_Payment_Block_Adminhtml_Sales_Order_View</sales_order_view>
19
+ </rewrite>
20
+ </adminhtml>
21
+ </blocks>
22
+
23
+ <!-- declare model group for new module -->
24
+ <models>
25
+ <!-- model group alias to be used in Mage::getModel('newmodule/...') -->
26
+ <novalnet_payment>
27
+ <!-- base class name for the model group -->
28
+ <class>Novalnet_Payment_Model</class>
29
+ <resourceModel>novalnet_resource</resourceModel>
30
+ </novalnet_payment>
31
+ <novalnet_payment_abstract>
32
+ <class>Novalnet_Payment_Model</class>
33
+ </novalnet_payment_abstract>
34
+ <novalnet_resource>
35
+ <class>Novalnet_Payment_Model_Resource</class>
36
+ <entities>
37
+ <transaction_status>
38
+ <table>novalnet_payment_transaction_status</table>
39
+ </transaction_status>
40
+ <order_log>
41
+ <table>novalnet_payment_order_log</table>
42
+ </order_log>
43
+ </entities>
44
+ </novalnet_resource>
45
+ </models>
46
+
47
+ <!-- convert novalnet field values from quote to order to make it available in orderobject -->
48
+ <fieldsets>
49
+ <sales_convert_quote_payment>
50
+ <nn_account_number>
51
+ <to_order_payment>*</to_order_payment>
52
+ </nn_account_number>
53
+ <nn_bank_sorting_code>
54
+ <to_order_payment>*</to_order_payment>
55
+ </nn_bank_sorting_code>
56
+ <nn_account_holder>
57
+ <to_order_payment>*</to_order_payment>
58
+ </nn_account_holder>
59
+ <nn_elv_country>
60
+ <to_order_payment>*</to_order_payment>
61
+ </nn_elv_country>
62
+ <nn_account_number_at>
63
+ <to_order_payment>*</to_order_payment>
64
+ </nn_account_number_at>
65
+ <nn_bank_sorting_code_at>
66
+ <to_order_payment>*</to_order_payment>
67
+ </nn_bank_sorting_code_at>
68
+ <nn_account_holder_at>
69
+ <to_order_payment>*</to_order_payment>
70
+ </nn_account_holder_at>
71
+ <nn_elv_country_at>
72
+ <to_order_payment>*</to_order_payment>
73
+ </nn_elv_country_at>
74
+ <nn_testorder>
75
+ <to_order_payment>*</to_order_payment>
76
+ </nn_testorder>
77
+ <nn_comments>
78
+ <to_order_payment>*</to_order_payment>
79
+ </nn_comments>
80
+ <id>
81
+ <to_order_payment>nn_id</to_order_payment>
82
+ </id>
83
+ </sales_convert_quote_payment>
84
+ <sales_convert_order_payment>
85
+ <nn_account_number>
86
+ <to_quote_payment>*</to_quote_payment>
87
+ </nn_account_number>
88
+ <nn_bank_sorting_code>
89
+ <to_quote_payment>*</to_quote_payment>
90
+ </nn_bank_sorting_code>
91
+ <nn_account_holder>
92
+ <to_quote_payment>*</to_quote_payment>
93
+ </nn_account_holder>
94
+ <nn_elv_country>
95
+ <to_quote_payment>*</to_quote_payment>
96
+ </nn_elv_country>
97
+ <nn_account_number_at>
98
+ <to_quote_payment>*</to_quote_payment>
99
+ </nn_account_number_at>
100
+ <nn_bank_sorting_code_at>
101
+ <to_quote_payment>*</to_quote_payment>
102
+ </nn_bank_sorting_code_at>
103
+ <nn_account_holder_at>
104
+ <to_quote_payment>*</to_quote_payment>
105
+ </nn_account_holder_at>
106
+ <nn_elv_country_at>
107
+ <to_quote_payment>*</to_quote_payment>
108
+ </nn_elv_country_at>
109
+ <nn_testorder>
110
+ <to_quote_payment>*</to_quote_payment>
111
+ </nn_testorder>
112
+ <nn_comments>
113
+ <to_quote_payment>*</to_quote_payment>
114
+ </nn_comments>
115
+ <id>
116
+ <to_quote_payment>nn_id</to_quote_payment>
117
+ </id>
118
+ </sales_convert_order_payment>
119
+ </fieldsets>
120
+
121
+ <resources>
122
+ <!-- resource identifier -->
123
+ <novalnet_setup>
124
+ <!-- specify that this resource is a setup resource and used for upgrades -->
125
+ <setup>
126
+ <!-- which module to look for install/upgrade files in -->
127
+ <module>Novalnet_Payment</module>
128
+ </setup>
129
+ <!-- specify database connection for this resource -->
130
+ <connection>
131
+ <!-- do not create new connection, use predefined core setup connection -->
132
+ <use>core_setup</use>
133
+ </connection>
134
+ <novalnet_payment_write>
135
+ <connection>
136
+ <use>core_write</use>
137
+ </connection>
138
+ </novalnet_payment_write>
139
+ <novalnet_payment_read>
140
+ <connection>
141
+ <use>core_read</use>
142
+ </connection>
143
+ </novalnet_payment_read>
144
+ </novalnet_setup>
145
+ </resources>
146
+
147
+ <helpers>
148
+ <novalnet_payment>
149
+ <class>Novalnet_Payment_Helper</class>
150
+ </novalnet_payment>
151
+ </helpers>
152
+ </global>
153
+
154
+ <adminhtml>
155
+ <layout>
156
+ <updates>
157
+ <novalnet_payment>
158
+ <file>novalnet/configuration.xml</file>
159
+ </novalnet_payment>
160
+ </updates>
161
+ </layout>
162
+ <translate>
163
+ <modules>
164
+ <novalnet_Payment>
165
+ <files>
166
+ <default>Novalnet_Payment.csv</default>
167
+ </files>
168
+ </novalnet_Payment>
169
+ </modules>
170
+ </translate>
171
+ </adminhtml>
172
+
173
+ <frontend>
174
+ <routers>
175
+ <novalnet_payment>
176
+ <use>standard</use>
177
+ <args>
178
+ <module>Novalnet_Payment</module>
179
+ <frontName>novalnet_payment</frontName>
180
+ </args>
181
+ </novalnet_payment>
182
+ </routers>
183
+ <translate>
184
+ <modules>
185
+ <novalnet_Payment>
186
+ <files>
187
+ <default>Novalnet_Payment.csv</default>
188
+ </files>
189
+ </novalnet_Payment>
190
+ </modules>
191
+ </translate>
192
+ <layout>
193
+ <updates>
194
+ <novalnet>
195
+ <file>novalnet.xml</file>
196
+ </novalnet>
197
+ </updates>
198
+ </layout>
199
+ </frontend>
200
+
201
+ <admin>
202
+ <routers>
203
+ <novalnet_payment>
204
+ <use>admin</use>
205
+ <args>
206
+ <module>Novalnet_Payment</module>
207
+ <frontName>novalnet_payment</frontName>
208
+ </args>
209
+ </novalnet_payment>
210
+ <adminhtml>
211
+ <args>
212
+ <modules>
213
+ <novalnet_payment after="Mage_Adminhtml">Novalnet_Payment_Adminhtml</novalnet_payment>
214
+ </modules>
215
+ </args>
216
+ </adminhtml>
217
+ </routers>
218
+ </admin>
219
+
220
+ <default>
221
+ <!-- 'payment' configuration section (tab) -->
222
+ <payment>
223
+ <!-- 'newmodule' configuration group (fieldset) -->
224
+ <novalnetElvgerman translate="title" module="novalnet_payment">
225
+ <!-- by default this payment method is inactive -->
226
+ <active>0</active>
227
+ <!-- model to handle logic for this payment method -->
228
+ <model>novalnet_payment/payment_method_novalnetElvgerman</model>
229
+ <!-- default title for payment checkout page and order view page -->
230
+ <title>Novalnet Lastschrift Deutschland</title>
231
+ <payment_action>authorize</payment_action>
232
+ <allowspecific>0</allowspecific>
233
+ </novalnetElvgerman>
234
+ <novalnetElvaustria translate="title" module="novalnet_payment">
235
+ <!-- by default this payment method is inactive -->
236
+ <active>0</active>
237
+ <!-- model to handle logic for this payment method -->
238
+ <model>novalnet_payment/payment_method_novalnetElvaustria</model>
239
+ <!-- default title for payment checkout page and order view page -->
240
+ <title>Novalnet Lastschrift Österreich</title>
241
+ <payment_action>authorize</payment_action>
242
+ <allowspecific>0</allowspecific>
243
+ </novalnetElvaustria>
244
+ <novalnetInvoice translate="title" module="novalnet_payment">
245
+ <!-- by default this payment method is inactive -->
246
+ <active>0</active>
247
+ <!-- model to handle logic for this payment method -->
248
+ <model>novalnet_payment/payment_method_novalnetInvoice</model>
249
+ <!-- default title for payment checkout page and order view page -->
250
+ <title>Novalnet Kauf auf Rechnung</title>
251
+ <payment_action>authorize</payment_action>
252
+ <allowspecific>0</allowspecific>
253
+ </novalnetInvoice>
254
+ <novalnetPrepayment translate="title" module="novalnet_payment">
255
+ <!-- by default this payment method is inactive -->
256
+ <active>0</active>
257
+ <!-- model to handle logic for this payment method -->
258
+ <model>novalnet_payment/payment_method_novalnetPrepayment</model>
259
+ <!-- default title for payment checkout page and order view page -->
260
+ <title>Novalnet Vorauskasse</title>
261
+ <payment_action>authorize</payment_action>
262
+ <allowspecific>0</allowspecific>
263
+ </novalnetPrepayment>
264
+ <novalnetSofortueberweisung translate="title" module="novalnet_payment">
265
+ <active>0</active>
266
+ <url>https://payport.novalnet.de/online_transfer_payport</url>
267
+ <model>novalnet_payment/payment_method_novalnetSofortueberweisung</model>
268
+ <title>Novalnet Sofortueberweisung</title>
269
+ <allowspecific>0</allowspecific>
270
+ <createinvoice>0</createinvoice>
271
+ </novalnetSofortueberweisung>
272
+ <novalnetPaypal translate="title" module="novalnet_payment">
273
+ <active>0</active>
274
+ <url>https://payport.novalnet.de/paypal_payport</url>
275
+ <model>novalnet_payment/payment_method_novalnetPaypal</model>
276
+ <title>Novalnet PayPal</title>
277
+ <allowspecific>0</allowspecific>
278
+ <createinvoice>0</createinvoice>
279
+ </novalnetPaypal>
280
+ <novalnetIdeal translate="title" module="novalnet_payment">
281
+ <active>0</active>
282
+ <url>https://payport.novalnet.de/online_transfer_payport</url>
283
+ <model>novalnet_payment/payment_method_novalnetIdeal</model>
284
+ <title>Novalnet iDEAL</title>
285
+ <allowspecific>0</allowspecific>
286
+ <createinvoice>0</createinvoice>
287
+ </novalnetIdeal>
288
+ <novalnetCc translate="title" module="novalnet_payment">
289
+ <active>0</active>
290
+ <model>novalnet_payment/payment_method_novalnetCc</model>
291
+ <payment_action>authorize</payment_action>
292
+ <allowspecific>0</allowspecific>
293
+ <title>Novalnet Kreditkarte</title>
294
+ <gateway_timeout>90</gateway_timeout>
295
+ </novalnetCc>
296
+ <novalnetSecure translate="title" module="novalnet_payment">
297
+ <cctypes>VI,MC</cctypes>
298
+ <active>0</active>
299
+ <model>novalnet_payment/payment_method_novalnetSecure</model>
300
+ <order_status>0</order_status>
301
+ <url>https://payport.novalnet.de/global_pci_payport</url>
302
+ <allowspecific>0</allowspecific>
303
+ <title>Novalnet Kreditkarte 3D Secure</title>
304
+ </novalnetSecure>
305
+ <novalnetPhonepayment translate="title" module="novalnet_payment">
306
+ <active>0</active>
307
+ <Phonepaymentcountries>DE,AT</Phonepaymentcountries>
308
+ <model>novalnet_payment/payment_method_novalnetPhonepayment</model>
309
+ <payment_action>authorize</payment_action>
310
+ <allowspecific>0</allowspecific>
311
+ <title>Novalnet Telefonpayment</title>
312
+ <gateway_timeout>90</gateway_timeout>
313
+ </novalnetPhonepayment>
314
+ <!-- 'newmodule' configuration group (fieldset) -->
315
+ </payment>
316
+ </default>
317
+ </config>
app/code/community/{Mage/Novalnet → Novalnet/Payment}/etc/system.xml RENAMED
@@ -1,1849 +1,1800 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <sections>
4
- <!-- payment tab -->
5
- <payment>
6
- <groups>
7
- <novalnetElvgerman translate="label" module="novalnet">
8
- <!-- will have title 'New Module' -->
9
- <label>Novalnet Direct Debit German</label>
10
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
11
- <!-- position between other payment methods -->
12
- <sort_order>680</sort_order>
13
- <!-- do not show this configuration options in store scope -->
14
- <show_in_default>1</show_in_default>
15
- <show_in_website>1</show_in_website>
16
- <show_in_store>1</show_in_store>
17
- <fields>
18
- <!-- is this payment method active for the website? -->
19
- <active translate="label">
20
- <!-- label for the field -->
21
- <label>Enabled</label>
22
- <!-- input type for configuration value -->
23
- <frontend_type>select</frontend_type>
24
- <!-- model to take the option values from -->
25
- <source_model>adminhtml/system_config_source_yesno</source_model>
26
- <!-- field position -->
27
- <sort_order>1</sort_order>
28
- <!-- do not show this field in store scope -->
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
- </active>
33
- <title translate="label">
34
- <label>Title</label>
35
- <frontend_type>text</frontend_type>
36
- <sort_order>2</sort_order>
37
- <show_in_default>1</show_in_default>
38
- <show_in_website>1</show_in_website>
39
- <show_in_store>1</show_in_store>
40
- </title>
41
- <order_status translate="label">
42
- <label>New order status</label>
43
- <frontend_type>select</frontend_type>
44
- <source_model>adminhtml/system_config_source_order_status</source_model>
45
- <sort_order>3</sort_order>
46
- <show_in_default>1</show_in_default>
47
- <show_in_website>1</show_in_website>
48
- <show_in_store>1</show_in_store>
49
- </order_status>
50
- <merchant_id translate="label">
51
- <label>Novalnet Merchant ID</label>
52
- <frontend_type>text</frontend_type>
53
- <sort_order>4</sort_order>
54
- <show_in_default>1</show_in_default>
55
- <show_in_website>1</show_in_website>
56
- <show_in_store>1</show_in_store>
57
- </merchant_id>
58
- <auth_code translate="label">
59
- <label>Novalnet Auth Code</label>
60
- <frontend_type>text</frontend_type>
61
- <sort_order>5</sort_order>
62
- <show_in_default>1</show_in_default>
63
- <show_in_website>1</show_in_website>
64
- <show_in_store>1</show_in_store>
65
- </auth_code>
66
- <product_id translate="label">
67
- <label>Novalnet Product ID</label>
68
- <frontend_type>text</frontend_type>
69
- <sort_order>6</sort_order>
70
- <show_in_default>1</show_in_default>
71
- <show_in_website>1</show_in_website>
72
- <show_in_store>1</show_in_store>
73
- </product_id>
74
- <tariff_id translate="label">
75
- <label>Novalnet Tariff Id</label>
76
- <frontend_type>text</frontend_type>
77
- <sort_order>7</sort_order>
78
- <show_in_default>1</show_in_default>
79
- <show_in_website>1</show_in_website>
80
- <show_in_store>1</show_in_store>
81
- </tariff_id>
82
- <manual_checking_amount tranlate="label" >
83
- <label>Manual checking amount in cents</label>
84
- <frontend_type>text</frontend_type>
85
- <sort_order>8</sort_order>
86
- <show_in_default>1</show_in_default>
87
- <show_in_website>1</show_in_website>
88
- <show_in_store>1</show_in_store>
89
- </manual_checking_amount>
90
- <second_product_id translate="label">
91
- <label>Second Novalnet Product ID</label>
92
- <frontend_type>text</frontend_type>
93
- <sort_order>9</sort_order>
94
- <show_in_default>1</show_in_default>
95
- <show_in_website>1</show_in_website>
96
- <show_in_store>1</show_in_store>
97
- </second_product_id>
98
- <second_tariff_id translate="label">
99
- <label>Second Novalnet Tariff Id</label>
100
- <frontend_type>text</frontend_type>
101
- <sort_order>10</sort_order>
102
- <show_in_default>1</show_in_default>
103
- <show_in_website>1</show_in_website>
104
- <show_in_store>1</show_in_store>
105
- </second_tariff_id>
106
- <acdc_check translate="label">
107
- <label>ACDC-Check</label>
108
- <frontend_type>select</frontend_type>
109
- <source_model>adminhtml/system_config_source_yesno</source_model>
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
- </acdc_check>
115
- <callback translate="label">
116
- <comment>When activated by PIN Callback / SMS</comment>
117
- <label>PIN by Callback/SMS/E-Mail</label>
118
- <frontend_type>select</frontend_type>
119
- <source_model>novalnet/novalnet_source_callbacktypes</source_model>
120
- <sort_order>12</sort_order>
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
- </callback>
125
- <callback_minimum_amount>
126
- <label>Minimum Amount For Callback (in cents)</label>
127
- <frontend_type>text</frontend_type>
128
- <sort_order>13</sort_order>
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
- </callback_minimum_amount>
133
- <user_group_excluded translate="label">
134
- <comment>To exclude groups of customers.</comment>
135
- <label>User Group Excluded</label>
136
- <frontend_type>text</frontend_type>
137
- <sort_order>14</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
- </user_group_excluded>
142
- <comment translate="label">
143
- <label>Notice for Clients</label>
144
- <frontend_type>textarea</frontend_type>
145
- <sort_order>15</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
- </comment>
150
- <live_mode translate="label">
151
- <label>Live Mode</label>
152
- <frontend_type>select</frontend_type>
153
- <source_model>adminhtml/system_config_source_yesno</source_model>
154
- <sort_order>16</sort_order>
155
- <show_in_default>1</show_in_default>
156
- <show_in_website>1</show_in_website>
157
- <show_in_store>1</show_in_store>
158
- </live_mode>
159
- <gateway_timeout translate="label">
160
- <comment>Gateway Timeout in seconds</comment>
161
- <label>Gateway Timeout</label>
162
- <frontend_type>text</frontend_type>
163
- <sort_order>17</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
- </gateway_timeout>
168
- <sort_order translate="label">
169
- <label>Sort Order</label>
170
- <frontend_type>text</frontend_type>
171
- <sort_order>100</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>1</show_in_website>
174
- <show_in_store>1</show_in_store>
175
- </sort_order>
176
- <allowspecific translate="label">
177
- <label>Payment from applicable countries</label>
178
- <frontend_type>allowspecific</frontend_type>
179
- <sort_order>18</sort_order>
180
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
181
- <show_in_default>1</show_in_default>
182
- <show_in_website>1</show_in_website>
183
- <show_in_store>1</show_in_store>
184
- </allowspecific>
185
- <specificcountry translate="label">
186
- <label>Payment from Specific countries</label>
187
- <frontend_type>multiselect</frontend_type>
188
- <sort_order>19</sort_order>
189
- <source_model>adminhtml/system_config_source_country</source_model>
190
- <show_in_default>1</show_in_default>
191
- <show_in_website>1</show_in_website>
192
- <show_in_store>1</show_in_store>
193
- </specificcountry>
194
- <min_order_total translate="label">
195
- <label>Minimum Order Total</label>
196
- <frontend_type>text</frontend_type>
197
- <sort_order>180</sort_order>
198
- <show_in_default>1</show_in_default>
199
- <show_in_website>1</show_in_website>
200
- <show_in_store>1</show_in_store>
201
- </min_order_total>
202
- <max_order_total translate="label">
203
- <label>Maximum Order Total</label>
204
- <frontend_type>text</frontend_type>
205
- <sort_order>190</sort_order>
206
- <show_in_default>1</show_in_default>
207
- <show_in_website>1</show_in_website>
208
- <show_in_store>1</show_in_store>
209
- </max_order_total>
210
- <orderscount translate="label">
211
- <label>Minimum Orders Count</label>
212
- <frontend_type>text</frontend_type>
213
- <sort_order>200</sort_order>
214
- <comment>Default: "0" for disabled check.</comment>
215
- <show_in_default>1</show_in_default>
216
- <show_in_website>1</show_in_website>
217
- <show_in_store>1</show_in_store>
218
- </orderscount>
219
- </fields>
220
- </novalnetElvgerman>
221
- <novalnetElvaustria translate="label" module="novalnet">
222
- <label>Novalnet Direct Debit Austria</label>
223
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
224
- <sort_order>681</sort_order>
225
- <show_in_default>1</show_in_default>
226
- <show_in_website>1</show_in_website>
227
- <show_in_store>1</show_in_store>
228
- <fields>
229
- <active translate="label">
230
- <label>Enabled</label>
231
- <frontend_type>select</frontend_type>
232
- <source_model>adminhtml/system_config_source_yesno</source_model>
233
- <sort_order>1</sort_order>
234
- <show_in_default>1</show_in_default>
235
- <show_in_website>1</show_in_website>
236
- <show_in_store>1</show_in_store>
237
- </active>
238
- <title translate="label">
239
- <label>Title</label>
240
- <frontend_type>text</frontend_type>
241
- <sort_order>2</sort_order>
242
- <show_in_default>1</show_in_default>
243
- <show_in_website>1</show_in_website>
244
- <show_in_store>1</show_in_store>
245
- </title>
246
- <order_status translate="label">
247
- <label>New order status</label>
248
- <frontend_type>select</frontend_type>
249
- <source_model>adminhtml/system_config_source_order_status</source_model>
250
- <sort_order>3</sort_order>
251
- <show_in_default>1</show_in_default>
252
- <show_in_website>1</show_in_website>
253
- <show_in_store>1</show_in_store>
254
- </order_status>
255
- <merchant_id translate="label">
256
- <label>Novalnet Merchant ID</label>
257
- <frontend_type>text</frontend_type>
258
- <sort_order>4</sort_order>
259
- <show_in_default>1</show_in_default>
260
- <show_in_website>1</show_in_website>
261
- <show_in_store>1</show_in_store>
262
- </merchant_id>
263
- <auth_code translate="label">
264
- <label>Novalnet Auth Code</label>
265
- <frontend_type>text</frontend_type>
266
- <sort_order>5</sort_order>
267
- <show_in_default>1</show_in_default>
268
- <show_in_website>1</show_in_website>
269
- <show_in_store>1</show_in_store>
270
- </auth_code>
271
- <product_id translate="label">
272
- <label>Novalnet Product ID</label>
273
- <frontend_type>text</frontend_type>
274
- <sort_order>6</sort_order>
275
- <show_in_default>1</show_in_default>
276
- <show_in_website>1</show_in_website>
277
- <show_in_store>1</show_in_store>
278
- </product_id>
279
- <tariff_id translate="label">
280
- <label>Novalnet Tariff Id</label>
281
- <frontend_type>text</frontend_type>
282
- <sort_order>7</sort_order>
283
- <show_in_default>1</show_in_default>
284
- <show_in_website>1</show_in_website>
285
- <show_in_store>1</show_in_store>
286
- </tariff_id>
287
- <manual_checking_amount tranlate="label" >
288
- <label>Manual checking amount in cents</label>
289
- <frontend_type>text</frontend_type>
290
- <sort_order>8</sort_order>
291
- <show_in_default>1</show_in_default>
292
- <show_in_website>1</show_in_website>
293
- <show_in_store>1</show_in_store>
294
- </manual_checking_amount>
295
- <second_product_id translate="label">
296
- <label>Second Novalnet Product ID</label>
297
- <frontend_type>text</frontend_type>
298
- <sort_order>9</sort_order>
299
- <show_in_default>1</show_in_default>
300
- <show_in_website>1</show_in_website>
301
- <show_in_store>1</show_in_store>
302
- </second_product_id>
303
- <second_tariff_id translate="label">
304
- <label>Second Novalnet Tariff Id</label>
305
- <frontend_type>text</frontend_type>
306
- <sort_order>10</sort_order>
307
- <show_in_default>1</show_in_default>
308
- <show_in_website>1</show_in_website>
309
- <show_in_store>1</show_in_store>
310
- </second_tariff_id>
311
- <callback translate="label">
312
- <comment>When activated by PIN Callback / SMS</comment>
313
- <label>PIN by Callback/SMS/E-Mail</label>
314
- <frontend_type>select</frontend_type>
315
- <source_model>novalnet/novalnet_source_callbacktypes</source_model>
316
- <sort_order>11</sort_order>
317
- <show_in_default>1</show_in_default>
318
- <show_in_website>1</show_in_website>
319
- <show_in_store>1</show_in_store>
320
- </callback>
321
- <callback_minimum_amount>
322
- <label>Minimum Amount For Callback (in cents)</label>
323
- <frontend_type>text</frontend_type>
324
- <sort_order>12</sort_order>
325
- <show_in_default>1</show_in_default>
326
- <show_in_website>1</show_in_website>
327
- <show_in_store>1</show_in_store>
328
- </callback_minimum_amount>
329
- <user_group_excluded translate="label">
330
- <comment>To exclude groups of customers.</comment>
331
- <label>User Group Excluded</label>
332
- <frontend_type>text</frontend_type>
333
- <sort_order>13</sort_order>
334
- <show_in_default>1</show_in_default>
335
- <show_in_website>1</show_in_website>
336
- <show_in_store>1</show_in_store>
337
- </user_group_excluded>
338
- <comment translate="label">
339
- <label>Notice for Clients</label>
340
- <frontend_type>textarea</frontend_type>
341
- <sort_order>14</sort_order>
342
- <show_in_default>1</show_in_default>
343
- <show_in_website>1</show_in_website>
344
- <show_in_store>1</show_in_store>
345
- </comment>
346
- <live_mode translate="label">
347
- <label>Live Mode</label>
348
- <frontend_type>select</frontend_type>
349
- <source_model>adminhtml/system_config_source_yesno</source_model>
350
- <sort_order>15</sort_order>
351
- <show_in_default>1</show_in_default>
352
- <show_in_website>1</show_in_website>
353
- <show_in_store>1</show_in_store>
354
- </live_mode>
355
- <gateway_timeout translate="label">
356
- <comment>Gateway Timeout in seconds</comment>
357
- <label>Gateway Timeout</label>
358
- <frontend_type>text</frontend_type>
359
- <sort_order>16</sort_order>
360
- <show_in_default>1</show_in_default>
361
- <show_in_website>1</show_in_website>
362
- <show_in_store>1</show_in_store>
363
- </gateway_timeout>
364
- <sort_order translate="label">
365
- <label>Sort Order</label>
366
- <frontend_type>text</frontend_type>
367
- <sort_order>100</sort_order>
368
- <show_in_default>1</show_in_default>
369
- <show_in_website>1</show_in_website>
370
- <show_in_store>1</show_in_store>
371
- </sort_order>
372
- <allowspecific translate="label">
373
- <label>Payment from applicable countries</label>
374
- <frontend_type>allowspecific</frontend_type>
375
- <sort_order>18</sort_order>
376
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
377
- <show_in_default>1</show_in_default>
378
- <show_in_website>1</show_in_website>
379
- <show_in_store>1</show_in_store>
380
- </allowspecific>
381
- <specificcountry translate="label">
382
- <label>Payment from Specific countries</label>
383
- <frontend_type>multiselect</frontend_type>
384
- <sort_order>19</sort_order>
385
- <source_model>adminhtml/system_config_source_country</source_model>
386
- <show_in_default>1</show_in_default>
387
- <show_in_website>1</show_in_website>
388
- <show_in_store>1</show_in_store>
389
- </specificcountry>
390
- <min_order_total translate="label">
391
- <label>Minimum Order Total</label>
392
- <frontend_type>text</frontend_type>
393
- <sort_order>180</sort_order>
394
- <show_in_default>1</show_in_default>
395
- <show_in_website>1</show_in_website>
396
- <show_in_store>1</show_in_store>
397
- </min_order_total>
398
- <max_order_total translate="label">
399
- <label>Maximum Order Total</label>
400
- <frontend_type>text</frontend_type>
401
- <sort_order>190</sort_order>
402
- <show_in_default>1</show_in_default>
403
- <show_in_website>1</show_in_website>
404
- <show_in_store>1</show_in_store>
405
- </max_order_total>
406
- <orderscount translate="label">
407
- <label>Minimum Orders Count</label>
408
- <frontend_type>text</frontend_type>
409
- <sort_order>200</sort_order>
410
- <comment>Default: "0" for disabled check.</comment>
411
- <show_in_default>1</show_in_default>
412
- <show_in_website>1</show_in_website>
413
- <show_in_store>1</show_in_store>
414
- </orderscount>
415
- </fields>
416
- </novalnetElvaustria>
417
- <novalnetCc translate="label" module="novalnet">
418
- <label>Novalnet Credit Card</label>
419
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
420
- <sort_order>682</sort_order>
421
- <show_in_default>1</show_in_default>
422
- <show_in_website>1</show_in_website>
423
- <show_in_store>1</show_in_store>
424
- <fields>
425
- <active translate="label">
426
- <label>Enabled</label>
427
- <frontend_type>select</frontend_type>
428
- <source_model>adminhtml/system_config_source_yesno</source_model>
429
- <sort_order>1</sort_order>
430
- <show_in_default>1</show_in_default>
431
- <show_in_website>1</show_in_website>
432
- <show_in_store>1</show_in_store>
433
- </active>
434
- <title translate="label">
435
- <label>Title</label>
436
- <frontend_type>text</frontend_type>
437
- <sort_order>2</sort_order>
438
- <show_in_default>1</show_in_default>
439
- <show_in_website>1</show_in_website>
440
- <show_in_store>1</show_in_store>
441
- </title>
442
- <order_status translate="label">
443
- <label>New order status</label>
444
- <frontend_type>select</frontend_type>
445
- <source_model>adminhtml/system_config_source_order_status</source_model>
446
- <sort_order>3</sort_order>
447
- <show_in_default>1</show_in_default>
448
- <show_in_website>1</show_in_website>
449
- <show_in_store>1</show_in_store>
450
- </order_status>
451
- <merchant_id translate="label">
452
- <label>Novalnet Merchant ID</label>
453
- <frontend_type>text</frontend_type>
454
- <sort_order>5</sort_order>
455
- <show_in_default>1</show_in_default>
456
- <show_in_website>1</show_in_website>
457
- <show_in_store>1</show_in_store>
458
- </merchant_id>
459
- <auth_code translate="label">
460
- <label>Novalnet Auth Code</label>
461
- <frontend_type>text</frontend_type>
462
- <sort_order>6</sort_order>
463
- <show_in_default>1</show_in_default>
464
- <show_in_website>1</show_in_website>
465
- <show_in_store>1</show_in_store>
466
- </auth_code>
467
- <product_id translate="label">
468
- <label>Novalnet Product ID</label>
469
- <frontend_type>text</frontend_type>
470
- <sort_order>7</sort_order>
471
- <show_in_default>1</show_in_default>
472
- <show_in_website>1</show_in_website>
473
- <show_in_store>1</show_in_store>
474
- </product_id>
475
- <tariff_id translate="label">
476
- <label>Novalnet Tariff Id</label>
477
- <frontend_type>text</frontend_type>
478
- <sort_order>8</sort_order>
479
- <show_in_default>1</show_in_default>
480
- <show_in_website>1</show_in_website>
481
- <show_in_store>1</show_in_store>
482
- </tariff_id>
483
- <password translate="label">
484
- <label>Novalnet Password</label>
485
- <frontend_type>text</frontend_type>
486
- <sort_order>9</sort_order>
487
- <show_in_default>1</show_in_default>
488
- <show_in_website>1</show_in_website>
489
- <show_in_store>1</show_in_store>
490
- </password>
491
- <manual_checking_amount tranlate="label" >
492
- <label>Manual checking amount in cents</label>
493
- <frontend_type>text</frontend_type>
494
- <sort_order>10</sort_order>
495
- <show_in_default>1</show_in_default>
496
- <show_in_website>1</show_in_website>
497
- <show_in_store>1</show_in_store>
498
- </manual_checking_amount>
499
- <second_product_id translate="label">
500
- <label>Second Novalnet Product ID</label>
501
- <frontend_type>text</frontend_type>
502
- <sort_order>11</sort_order>
503
- <show_in_default>1</show_in_default>
504
- <show_in_website>1</show_in_website>
505
- <show_in_store>1</show_in_store>
506
- </second_product_id>
507
- <second_tariff_id translate="label">
508
- <label>Second Novalnet Tariff Id</label>
509
- <frontend_type>text</frontend_type>
510
- <sort_order>12</sort_order>
511
- <show_in_default>1</show_in_default>
512
- <show_in_website>1</show_in_website>
513
- <show_in_store>1</show_in_store>
514
- </second_tariff_id>
515
- <booking_reference translate="label">
516
- <label>Booking Reference</label>
517
- <frontend_type>text</frontend_type>
518
- <sort_order>14</sort_order>
519
- <show_in_default>1</show_in_default>
520
- <show_in_website>1</show_in_website>
521
- <show_in_store>1</show_in_store>
522
- </booking_reference>
523
- <user_group_excluded translate="label">
524
- <comment>To exclude groups of customers.</comment>
525
- <label>User Group Excluded</label>
526
- <frontend_type>text</frontend_type>
527
- <sort_order>15</sort_order>
528
- <show_in_default>1</show_in_default>
529
- <show_in_website>1</show_in_website>
530
- <show_in_store>1</show_in_store>
531
- </user_group_excluded>
532
- <createinvoice translate="label">
533
- <label>Create Invoice</label>
534
- <frontend_type>select</frontend_type>
535
- <source_model>adminhtml/system_config_source_yesno</source_model>
536
- <sort_order>18</sort_order>
537
- <show_in_default>1</show_in_default>
538
- <show_in_website>1</show_in_website>
539
- <show_in_store>1</show_in_store>
540
- </createinvoice>
541
- <live_mode translate="label">
542
- <label>Live Mode</label>
543
- <frontend_type>select</frontend_type>
544
- <source_model>adminhtml/system_config_source_yesno</source_model>
545
- <sort_order>16</sort_order>
546
- <show_in_default>1</show_in_default>
547
- <show_in_website>1</show_in_website>
548
- <show_in_store>1</show_in_store>
549
- </live_mode>
550
- <gateway_timeout translate="label">
551
- <comment>Gateway Timeout in seconds</comment>
552
- <label>Gateway Timeout</label>
553
- <frontend_type>text</frontend_type>
554
- <sort_order>17</sort_order>
555
- <show_in_default>1</show_in_default>
556
- <show_in_website>1</show_in_website>
557
- <show_in_store>1</show_in_store>
558
- </gateway_timeout>
559
- <sort_order translate="label">
560
- <label>Sort Order</label>
561
- <frontend_type>text</frontend_type>
562
- <sort_order>100</sort_order>
563
- <show_in_default>1</show_in_default>
564
- <show_in_website>1</show_in_website>
565
- <show_in_store>1</show_in_store>
566
- </sort_order>
567
- <allowspecific translate="label">
568
- <label>Payment from applicable countries</label>
569
- <frontend_type>allowspecific</frontend_type>
570
- <sort_order>18</sort_order>
571
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
572
- <show_in_default>1</show_in_default>
573
- <show_in_website>1</show_in_website>
574
- <show_in_store>1</show_in_store>
575
- </allowspecific>
576
- <specificcountry translate="label">
577
- <label>Payment from Specific countries</label>
578
- <frontend_type>multiselect</frontend_type>
579
- <sort_order>19</sort_order>
580
- <source_model>adminhtml/system_config_source_country</source_model>
581
- <show_in_default>1</show_in_default>
582
- <show_in_website>1</show_in_website>
583
- <show_in_store>1</show_in_store>
584
- </specificcountry>
585
- <min_order_total translate="label">
586
- <label>Minimum Order Total</label>
587
- <frontend_type>text</frontend_type>
588
- <sort_order>180</sort_order>
589
- <show_in_default>1</show_in_default>
590
- <show_in_website>1</show_in_website>
591
- <show_in_store>1</show_in_store>
592
- </min_order_total>
593
- <max_order_total translate="label">
594
- <label>Maximum Order Total</label>
595
- <frontend_type>text</frontend_type>
596
- <sort_order>190</sort_order>
597
- <show_in_default>1</show_in_default>
598
- <show_in_website>1</show_in_website>
599
- <show_in_store>1</show_in_store>
600
- </max_order_total>
601
- <orderscount translate="label">
602
- <label>Minimum Orders Count</label>
603
- <frontend_type>text</frontend_type>
604
- <sort_order>200</sort_order>
605
- <comment>Default: "0" for disabled check.</comment>
606
- <show_in_default>1</show_in_default>
607
- <show_in_website>1</show_in_website>
608
- <show_in_store>1</show_in_store>
609
- </orderscount>
610
- </fields>
611
- </novalnetCc>
612
- <novalnet_secure translate="label" module="novalnet">
613
- <label>Novalnet Credit Card 3D-Secure</label>
614
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
615
- <sort_order>683</sort_order>
616
- <show_in_default>1</show_in_default>
617
- <show_in_website>1</show_in_website>
618
- <show_in_store>1</show_in_store>
619
- <fields>
620
- <active translate="label">
621
- <label>Enabled</label>
622
- <frontend_type>select</frontend_type>
623
- <source_model>adminhtml/system_config_source_yesno</source_model>
624
- <sort_order>1</sort_order>
625
- <show_in_default>1</show_in_default>
626
- <show_in_website>1</show_in_website>
627
- <show_in_store>1</show_in_store>
628
- </active>
629
- <title translate="label">
630
- <label>Title</label>
631
- <frontend_type>text</frontend_type>
632
- <sort_order>2</sort_order>
633
- <show_in_default>1</show_in_default>
634
- <show_in_website>1</show_in_website>
635
- <show_in_store>1</show_in_store>
636
- </title>
637
- <order_status translate="label">
638
- <label>New order status</label>
639
- <frontend_type>select</frontend_type>
640
- <source_model>adminhtml/system_config_source_order_status</source_model>
641
- <sort_order>3</sort_order>
642
- <show_in_default>1</show_in_default>
643
- <show_in_website>1</show_in_website>
644
- <show_in_store>1</show_in_store>
645
- </order_status>
646
- <cctypes translate="label">
647
- <label>Credit Card Types</label>
648
- <frontend_type>multiselect</frontend_type>
649
- <source_model>novalnet/novalnet_source_cctype</source_model>
650
- <sort_order>4</sort_order>
651
- <show_in_default>1</show_in_default>
652
- <show_in_website>1</show_in_website>
653
- <show_in_store>1</show_in_store>
654
- </cctypes>
655
- <merchant_id translate="label">
656
- <label>Novalnet Merchant ID</label>
657
- <frontend_type>text</frontend_type>
658
- <sort_order>5</sort_order>
659
- <show_in_default>1</show_in_default>
660
- <show_in_website>1</show_in_website>
661
- <show_in_store>1</show_in_store>
662
- </merchant_id>
663
- <auth_code translate="label">
664
- <label>Novalnet Auth Code</label>
665
- <frontend_type>text</frontend_type>
666
- <sort_order>6</sort_order>
667
- <show_in_default>1</show_in_default>
668
- <show_in_website>1</show_in_website>
669
- <show_in_store>1</show_in_store>
670
- </auth_code>
671
- <product_id translate="label">
672
- <label>Novalnet Product ID</label>
673
- <frontend_type>text</frontend_type>
674
- <sort_order>7</sort_order>
675
- <show_in_default>1</show_in_default>
676
- <show_in_website>1</show_in_website>
677
- <show_in_store>1</show_in_store>
678
- </product_id>
679
- <tariff_id translate="label">
680
- <label>Novalnet Tariff Id</label>
681
- <frontend_type>text</frontend_type>
682
- <sort_order>8</sort_order>
683
- <show_in_default>1</show_in_default>
684
- <show_in_website>1</show_in_website>
685
- <show_in_store>1</show_in_store>
686
- </tariff_id>
687
- <manual_checking_amount tranlate="label" >
688
- <label>Manual checking amount in cents</label>
689
- <frontend_type>text</frontend_type>
690
- <sort_order>9</sort_order>
691
- <show_in_default>1</show_in_default>
692
- <show_in_website>1</show_in_website>
693
- <show_in_store>1</show_in_store>
694
- </manual_checking_amount>
695
- <second_product_id translate="label">
696
- <label>Second Novalnet Product ID</label>
697
- <frontend_type>text</frontend_type>
698
- <sort_order>10</sort_order>
699
- <show_in_default>1</show_in_default>
700
- <show_in_website>1</show_in_website>
701
- <show_in_store>1</show_in_store>
702
- </second_product_id>
703
- <second_tariff_id translate="label">
704
- <label>Second Novalnet Tariff Id</label>
705
- <frontend_type>text</frontend_type>
706
- <sort_order>11</sort_order>
707
- <show_in_default>1</show_in_default>
708
- <show_in_website>1</show_in_website>
709
- <show_in_store>1</show_in_store>
710
- </second_tariff_id>
711
- <booking_reference translate="label">
712
- <label>Booking Reference</label>
713
- <frontend_type>text</frontend_type>
714
- <sort_order>12</sort_order>
715
- <show_in_default>1</show_in_default>
716
- <show_in_website>1</show_in_website>
717
- <show_in_store>1</show_in_store>
718
- </booking_reference>
719
- <user_group_excluded translate="label">
720
- <comment>To exclude groups of customers.</comment>
721
- <label>User Group Excluded</label>
722
- <frontend_type>text</frontend_type>
723
- <sort_order>13</sort_order>
724
- <show_in_default>1</show_in_default>
725
- <show_in_website>1</show_in_website>
726
- <show_in_store>1</show_in_store>
727
- </user_group_excluded>
728
- <live_mode translate="label">
729
- <label>Live Mode</label>
730
- <frontend_type>select</frontend_type>
731
- <source_model>adminhtml/system_config_source_yesno</source_model>
732
- <sort_order>14</sort_order>
733
- <show_in_default>1</show_in_default>
734
- <show_in_website>1</show_in_website>
735
- <show_in_store>1</show_in_store>
736
- </live_mode>
737
- <gateway_timeout translate="label">
738
- <comment>Gateway Timeout in seconds</comment>
739
- <label>Gateway Timeout</label>
740
- <frontend_type>text</frontend_type>
741
- <sort_order>17</sort_order>
742
- <show_in_default>1</show_in_default>
743
- <show_in_website>1</show_in_website>
744
- <show_in_store>1</show_in_store>
745
- </gateway_timeout>
746
- <sort_order translate="label">
747
- <label>Sort Order</label>
748
- <frontend_type>text</frontend_type>
749
- <sort_order>100</sort_order>
750
- <show_in_default>1</show_in_default>
751
- <show_in_website>1</show_in_website>
752
- <show_in_store>1</show_in_store>
753
- </sort_order>
754
- <allowspecific translate="label">
755
- <label>Payment from applicable countries</label>
756
- <frontend_type>allowspecific</frontend_type>
757
- <sort_order>18</sort_order>
758
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
759
- <show_in_default>1</show_in_default>
760
- <show_in_website>1</show_in_website>
761
- <show_in_store>1</show_in_store>
762
- </allowspecific>
763
- <specificcountry translate="label">
764
- <label>Payment from Specific countries</label>
765
- <frontend_type>multiselect</frontend_type>
766
- <sort_order>19</sort_order>
767
- <source_model>adminhtml/system_config_source_country</source_model>
768
- <show_in_default>1</show_in_default>
769
- <show_in_website>1</show_in_website>
770
- <show_in_store>1</show_in_store>
771
- </specificcountry>
772
- <min_order_total translate="label">
773
- <label>Minimum Order Total</label>
774
- <frontend_type>text</frontend_type>
775
- <sort_order>180</sort_order>
776
- <show_in_default>1</show_in_default>
777
- <show_in_website>1</show_in_website>
778
- <show_in_store>1</show_in_store>
779
- </min_order_total>
780
- <max_order_total translate="label">
781
- <label>Maximum Order Total</label>
782
- <frontend_type>text</frontend_type>
783
- <sort_order>190</sort_order>
784
- <show_in_default>1</show_in_default>
785
- <show_in_website>1</show_in_website>
786
- <show_in_store>1</show_in_store>
787
- </max_order_total>
788
- <orderscount translate="label">
789
- <label>Minimum Orders Count</label>
790
- <frontend_type>text</frontend_type>
791
- <sort_order>200</sort_order>
792
- <comment>Default: "0" for disabled check.</comment>
793
- <show_in_default>1</show_in_default>
794
- <show_in_website>1</show_in_website>
795
- <show_in_store>1</show_in_store>
796
- </orderscount>
797
- </fields>
798
- </novalnet_secure>
799
- <novalnetPrepayment translate="label" module="novalnet">
800
- <label>Novalnet Prepayment</label>
801
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
802
- <sort_order>690</sort_order>
803
- <show_in_default>1</show_in_default>
804
- <show_in_website>1</show_in_website>
805
- <show_in_store>1</show_in_store>
806
- <fields>
807
- <active translate="label">
808
- <label>Enabled</label>
809
- <frontend_type>select</frontend_type>
810
- <source_model>adminhtml/system_config_source_yesno</source_model>
811
- <sort_order>1</sort_order>
812
- <show_in_default>1</show_in_default>
813
- <show_in_website>1</show_in_website>
814
- <show_in_store>1</show_in_store>
815
- </active>
816
- <title translate="label">
817
- <label>Title</label>
818
- <frontend_type>text</frontend_type>
819
- <sort_order>2</sort_order>
820
- <show_in_default>1</show_in_default>
821
- <show_in_website>1</show_in_website>
822
- <show_in_store>1</show_in_store>
823
- </title>
824
- <order_status translate="label">
825
- <label>New order status</label>
826
- <frontend_type>select</frontend_type>
827
- <source_model>adminhtml/system_config_source_order_status</source_model>
828
- <sort_order>3</sort_order>
829
- <show_in_default>1</show_in_default>
830
- <show_in_website>1</show_in_website>
831
- <show_in_store>1</show_in_store>
832
- </order_status>
833
- <merchant_id translate="label">
834
- <label>Novalnet Merchant ID</label>
835
- <frontend_type>text</frontend_type>
836
- <sort_order>4</sort_order>
837
- <show_in_default>1</show_in_default>
838
- <show_in_website>1</show_in_website>
839
- <show_in_store>1</show_in_store>
840
- </merchant_id>
841
- <auth_code translate="label">
842
- <label>Novalnet Auth Code</label>
843
- <frontend_type>text</frontend_type>
844
- <sort_order>5</sort_order>
845
- <show_in_default>1</show_in_default>
846
- <show_in_website>1</show_in_website>
847
- <show_in_store>1</show_in_store>
848
- </auth_code>
849
- <product_id translate="label">
850
- <label>Novalnet Product ID</label>
851
- <frontend_type>text</frontend_type>
852
- <sort_order>6</sort_order>
853
- <show_in_default>1</show_in_default>
854
- <show_in_website>1</show_in_website>
855
- <show_in_store>1</show_in_store>
856
- </product_id>
857
- <tariff_id translate="label">
858
- <label>Novalnet Tariff Id</label>
859
- <frontend_type>text</frontend_type>
860
- <sort_order>7</sort_order>
861
- <show_in_default>1</show_in_default>
862
- <show_in_website>1</show_in_website>
863
- <show_in_store>1</show_in_store>
864
- </tariff_id>
865
- <user_group_excluded translate="label">
866
- <comment>To exclude groups of customers.</comment>
867
- <label>User Group Excluded</label>
868
- <frontend_type>text</frontend_type>
869
- <sort_order>8</sort_order>
870
- <show_in_default>1</show_in_default>
871
- <show_in_website>1</show_in_website>
872
- <show_in_store>1</show_in_store>
873
- </user_group_excluded>
874
- <live_mode translate="label">
875
- <label>Live Mode</label>
876
- <frontend_type>select</frontend_type>
877
- <source_model>adminhtml/system_config_source_yesno</source_model>
878
- <sort_order>9</sort_order>
879
- <show_in_default>1</show_in_default>
880
- <show_in_website>1</show_in_website>
881
- <show_in_store>1</show_in_store>
882
- </live_mode>
883
- <gateway_timeout translate="label">
884
- <comment>Gateway Timeout in seconds</comment>
885
- <label>Gateway Timeout</label>
886
- <frontend_type>text</frontend_type>
887
- <sort_order>10</sort_order>
888
- <show_in_default>1</show_in_default>
889
- <show_in_website>1</show_in_website>
890
- <show_in_store>1</show_in_store>
891
- </gateway_timeout>
892
- <sort_order translate="label">
893
- <label>Sort Order</label>
894
- <frontend_type>text</frontend_type>
895
- <sort_order>100</sort_order>
896
- <show_in_default>1</show_in_default>
897
- <show_in_website>1</show_in_website>
898
- <show_in_store>1</show_in_store>
899
- </sort_order>
900
- <allowspecific translate="label">
901
- <label>Payment from applicable countries</label>
902
- <frontend_type>allowspecific</frontend_type>
903
- <sort_order>18</sort_order>
904
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
905
- <show_in_default>1</show_in_default>
906
- <show_in_website>1</show_in_website>
907
- <show_in_store>1</show_in_store>
908
- </allowspecific>
909
- <specificcountry translate="label">
910
- <label>Payment from Specific countries</label>
911
- <frontend_type>multiselect</frontend_type>
912
- <sort_order>19</sort_order>
913
- <source_model>adminhtml/system_config_source_country</source_model>
914
- <show_in_default>1</show_in_default>
915
- <show_in_website>1</show_in_website>
916
- <show_in_store>1</show_in_store>
917
- </specificcountry>
918
- <min_order_total translate="label">
919
- <label>Minimum Order Total</label>
920
- <frontend_type>text</frontend_type>
921
- <sort_order>180</sort_order>
922
- <show_in_default>1</show_in_default>
923
- <show_in_website>1</show_in_website>
924
- <show_in_store>1</show_in_store>
925
- </min_order_total>
926
- <max_order_total translate="label">
927
- <label>Maximum Order Total</label>
928
- <frontend_type>text</frontend_type>
929
- <sort_order>190</sort_order>
930
- <show_in_default>1</show_in_default>
931
- <show_in_website>1</show_in_website>
932
- <show_in_store>1</show_in_store>
933
- </max_order_total>
934
- <orderscount translate="label">
935
- <label>Minimum Orders Count</label>
936
- <frontend_type>text</frontend_type>
937
- <sort_order>200</sort_order>
938
- <comment>Default: "0" for disabled check.</comment>
939
- <show_in_default>1</show_in_default>
940
- <show_in_website>1</show_in_website>
941
- <show_in_store>1</show_in_store>
942
- </orderscount>
943
- </fields>
944
- </novalnetPrepayment>
945
- <novalnetInvoice translate="label" module="novalnet">
946
- <label>Novalnet Invoice</label>
947
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
948
- <sort_order>689</sort_order>
949
- <show_in_default>1</show_in_default>
950
- <show_in_website>1</show_in_website>
951
- <show_in_store>1</show_in_store>
952
- <fields>
953
- <active translate="label">
954
- <label>Enabled</label>
955
- <frontend_type>select</frontend_type>
956
- <source_model>adminhtml/system_config_source_yesno</source_model>
957
- <sort_order>1</sort_order>
958
- <show_in_default>1</show_in_default>
959
- <show_in_website>1</show_in_website>
960
- <show_in_store>1</show_in_store>
961
- </active>
962
- <title translate="label">
963
- <label>Title</label>
964
- <frontend_type>text</frontend_type>
965
- <sort_order>2</sort_order>
966
- <show_in_default>1</show_in_default>
967
- <show_in_website>1</show_in_website>
968
- <show_in_store>1</show_in_store>
969
- </title>
970
- <order_status translate="label">
971
- <label>New order status</label>
972
- <frontend_type>select</frontend_type>
973
- <source_model>adminhtml/system_config_source_order_status</source_model>
974
- <sort_order>3</sort_order>
975
- <show_in_default>1</show_in_default>
976
- <show_in_website>1</show_in_website>
977
- <show_in_store>1</show_in_store>
978
- </order_status>
979
- <merchant_id translate="label">
980
- <label>Novalnet Merchant ID</label>
981
- <frontend_type>text</frontend_type>
982
- <sort_order>4</sort_order>
983
- <show_in_default>1</show_in_default>
984
- <show_in_website>1</show_in_website>
985
- <show_in_store>1</show_in_store>
986
- </merchant_id>
987
- <auth_code translate="label">
988
- <label>Novalnet Auth Code</label>
989
- <frontend_type>text</frontend_type>
990
- <sort_order>5</sort_order>
991
- <show_in_default>1</show_in_default>
992
- <show_in_website>1</show_in_website>
993
- <show_in_store>1</show_in_store>
994
- </auth_code>
995
- <product_id translate="label">
996
- <label>Novalnet Product ID</label>
997
- <frontend_type>text</frontend_type>
998
- <sort_order>6</sort_order>
999
- <show_in_default>1</show_in_default>
1000
- <show_in_website>1</show_in_website>
1001
- <show_in_store>1</show_in_store>
1002
- </product_id>
1003
- <tariff_id translate="label">
1004
- <label>Novalnet Tariff Id</label>
1005
- <frontend_type>text</frontend_type>
1006
- <sort_order>7</sort_order>
1007
- <show_in_default>1</show_in_default>
1008
- <show_in_website>1</show_in_website>
1009
- <show_in_store>1</show_in_store>
1010
- </tariff_id>
1011
- <callback translate="label">
1012
- <comment>When activated by PIN Callback / SMS</comment>
1013
- <label>PIN by Callback/SMS/E-Mail</label>
1014
- <frontend_type>select</frontend_type>
1015
- <source_model>novalnet/novalnet_source_callbacktypes</source_model>
1016
- <sort_order>8</sort_order>
1017
- <show_in_default>1</show_in_default>
1018
- <show_in_website>1</show_in_website>
1019
- <show_in_store>1</show_in_store>
1020
- </callback>
1021
- <callback_minimum_amount>
1022
- <label>Minimum Amount For Callback (in cents)</label>
1023
- <frontend_type>text</frontend_type>
1024
- <sort_order>9</sort_order>
1025
- <show_in_default>1</show_in_default>
1026
- <show_in_website>1</show_in_website>
1027
- <show_in_store>1</show_in_store>
1028
- </callback_minimum_amount>
1029
- <payment_duration translate="label">
1030
- <label>Payment Duration</label>
1031
- <frontend_type>text</frontend_type>
1032
- <sort_order>10</sort_order>
1033
- <show_in_default>1</show_in_default>
1034
- <show_in_website>1</show_in_website>
1035
- <show_in_store>1</show_in_store>
1036
- </payment_duration>
1037
- <user_group_excluded translate="label">
1038
- <comment>To exclude groups of customers.</comment>
1039
- <label>User Group Excluded</label>
1040
- <frontend_type>text</frontend_type>
1041
- <sort_order>11</sort_order>
1042
- <show_in_default>1</show_in_default>
1043
- <show_in_website>1</show_in_website>
1044
- <show_in_store>1</show_in_store>
1045
- </user_group_excluded>
1046
- <live_mode translate="label">
1047
- <label>Live Mode</label>
1048
- <frontend_type>select</frontend_type>
1049
- <source_model>adminhtml/system_config_source_yesno</source_model>
1050
- <sort_order>12</sort_order>
1051
- <show_in_default>1</show_in_default>
1052
- <show_in_website>1</show_in_website>
1053
- <show_in_store>1</show_in_store>
1054
- </live_mode>
1055
- <gateway_timeout translate="label">
1056
- <comment>Gateway Timeout in seconds</comment>
1057
- <label>Gateway Timeout</label>
1058
- <frontend_type>text</frontend_type>
1059
- <sort_order>13</sort_order>
1060
- <show_in_default>1</show_in_default>
1061
- <show_in_website>1</show_in_website>
1062
- <show_in_store>1</show_in_store>
1063
- </gateway_timeout>
1064
- <sort_order translate="label">
1065
- <label>Sort Order</label>
1066
- <frontend_type>text</frontend_type>
1067
- <sort_order>100</sort_order>
1068
- <show_in_default>1</show_in_default>
1069
- <show_in_website>1</show_in_website>
1070
- <show_in_store>1</show_in_store>
1071
- </sort_order>
1072
- <allowspecific translate="label">
1073
- <label>Payment from applicable countries</label>
1074
- <frontend_type>allowspecific</frontend_type>
1075
- <sort_order>18</sort_order>
1076
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1077
- <show_in_default>1</show_in_default>
1078
- <show_in_website>1</show_in_website>
1079
- <show_in_store>1</show_in_store>
1080
- </allowspecific>
1081
- <specificcountry translate="label">
1082
- <label>Payment from Specific countries</label>
1083
- <frontend_type>multiselect</frontend_type>
1084
- <sort_order>19</sort_order>
1085
- <source_model>adminhtml/system_config_source_country</source_model>
1086
- <show_in_default>1</show_in_default>
1087
- <show_in_website>1</show_in_website>
1088
- <show_in_store>1</show_in_store>
1089
- </specificcountry>
1090
- <min_order_total translate="label">
1091
- <label>Minimum Order Total</label>
1092
- <frontend_type>text</frontend_type>
1093
- <sort_order>180</sort_order>
1094
- <show_in_default>1</show_in_default>
1095
- <show_in_website>1</show_in_website>
1096
- <show_in_store>1</show_in_store>
1097
- </min_order_total>
1098
- <max_order_total translate="label">
1099
- <label>Maximum Order Total</label>
1100
- <frontend_type>text</frontend_type>
1101
- <sort_order>190</sort_order>
1102
- <show_in_default>1</show_in_default>
1103
- <show_in_website>1</show_in_website>
1104
- <show_in_store>1</show_in_store>
1105
- </max_order_total>
1106
- <orderscount translate="label">
1107
- <label>Minimum Orders Count</label>
1108
- <frontend_type>text</frontend_type>
1109
- <sort_order>200</sort_order>
1110
- <comment>Default: "0" for disabled check.</comment>
1111
- <show_in_default>1</show_in_default>
1112
- <show_in_website>1</show_in_website>
1113
- <show_in_store>1</show_in_store>
1114
- </orderscount>
1115
- </fields>
1116
- </novalnetInvoice>
1117
- <novalnetPhonepayment translate="label" module="novalnet">
1118
- <label>Novalnet Phonepayment</label>
1119
- <comment>Wenn Sie Telefonpayment testen wollen, kontaktieren Sie bitte die Novalnet AG (Tel.: 0049 89 923068320). If you like to test phonepayment contact Novalnet AG (Phone: 0049 89 923068320), please!</comment>
1120
- <sort_order>691</sort_order>
1121
- <show_in_default>1</show_in_default>
1122
- <show_in_website>1</show_in_website>
1123
- <show_in_store>1</show_in_store>
1124
- <fields>
1125
- <active translate="label">
1126
- <label>Enabled</label>
1127
- <frontend_type>select</frontend_type>
1128
- <source_model>adminhtml/system_config_source_yesno</source_model>
1129
- <sort_order>1</sort_order>
1130
- <show_in_default>1</show_in_default>
1131
- <show_in_website>1</show_in_website>
1132
- <show_in_store>1</show_in_store>
1133
- </active>
1134
- <title translate="label">
1135
- <label>Title</label>
1136
- <frontend_type>text</frontend_type>
1137
- <sort_order>2</sort_order>
1138
- <show_in_default>1</show_in_default>
1139
- <show_in_website>1</show_in_website>
1140
- <show_in_store>1</show_in_store>
1141
- </title>
1142
- <order_status translate="label">
1143
- <label>New order status</label>
1144
- <frontend_type>select</frontend_type>
1145
- <source_model>adminhtml/system_config_source_order_status</source_model>
1146
- <sort_order>3</sort_order>
1147
-
1148
- <show_in_default>1</show_in_default>
1149
- <show_in_website>1</show_in_website>
1150
- <show_in_store>1</show_in_store>
1151
- </order_status>
1152
- <merchant_id translate="label">
1153
- <label>Novalnet Merchant ID</label>
1154
- <frontend_type>text</frontend_type>
1155
- <sort_order>4</sort_order>
1156
- <show_in_default>1</show_in_default>
1157
- <show_in_website>1</show_in_website>
1158
- <show_in_store>1</show_in_store>
1159
- </merchant_id>
1160
- <auth_code translate="label">
1161
- <label>Novalnet Auth Code</label>
1162
- <frontend_type>text</frontend_type>
1163
- <sort_order>5</sort_order>
1164
- <show_in_default>1</show_in_default>
1165
- <show_in_website>1</show_in_website>
1166
- <show_in_store>1</show_in_store>
1167
- </auth_code>
1168
- <product_id translate="label">
1169
- <label>Novalnet Product ID</label>
1170
- <frontend_type>text</frontend_type>
1171
- <sort_order>6</sort_order>
1172
- <show_in_default>1</show_in_default>
1173
- <show_in_website>1</show_in_website>
1174
- <show_in_store>1</show_in_store>
1175
- </product_id>
1176
- <tariff_id translate="label">
1177
- <label>Novalnet Tariff Id</label>
1178
- <frontend_type>text</frontend_type>
1179
- <sort_order>7</sort_order>
1180
- <show_in_default>1</show_in_default>
1181
- <show_in_website>1</show_in_website>
1182
- <show_in_store>1</show_in_store>
1183
- </tariff_id>
1184
- <user_group_excluded translate="label">
1185
- <comment>To exclude groups of customers.</comment>
1186
- <label>User Group Excluded</label>
1187
- <frontend_type>text</frontend_type>
1188
- <sort_order>8</sort_order>
1189
- <show_in_default>1</show_in_default>
1190
- <show_in_website>1</show_in_website>
1191
- <show_in_store>1</show_in_store>
1192
- </user_group_excluded>
1193
- <gateway_timeout translate="label">
1194
- <comment>Gateway Timeout in seconds</comment>
1195
- <label>Gateway Timeout</label>
1196
- <frontend_type>text</frontend_type>
1197
- <sort_order>9</sort_order>
1198
- <show_in_default>1</show_in_default>
1199
- <show_in_website>1</show_in_website>
1200
- <show_in_store>1</show_in_store>
1201
- </gateway_timeout>
1202
- <sort_order translate="label">
1203
- <label>Sort Order</label>
1204
- <frontend_type>text</frontend_type>
1205
- <sort_order>100</sort_order>
1206
- <show_in_default>1</show_in_default>
1207
- <show_in_website>1</show_in_website>
1208
- <show_in_store>1</show_in_store>
1209
- </sort_order>
1210
- <allowspecific translate="label">
1211
- <label>Payment from applicable countries</label>
1212
- <frontend_type>allowspecific</frontend_type>
1213
- <sort_order>18</sort_order>
1214
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1215
- <show_in_default>1</show_in_default>
1216
- <show_in_website>1</show_in_website>
1217
- <show_in_store>1</show_in_store>
1218
- </allowspecific>
1219
- <specificcountry translate="label">
1220
- <label>Payment from Specific countries</label>
1221
- <frontend_type>multiselect</frontend_type>
1222
- <sort_order>19</sort_order>
1223
- <source_model>adminhtml/system_config_source_country</source_model>
1224
- <show_in_default>1</show_in_default>
1225
- <show_in_website>1</show_in_website>
1226
- <show_in_store>1</show_in_store>
1227
- </specificcountry>
1228
- <min_order_total translate="label">
1229
- <label>Minimum Order Total</label>
1230
- <frontend_type>text</frontend_type>
1231
- <sort_order>180</sort_order>
1232
- <show_in_default>1</show_in_default>
1233
- <show_in_website>1</show_in_website>
1234
- <show_in_store>1</show_in_store>
1235
- </min_order_total>
1236
- <max_order_total translate="label">
1237
- <label>Maximum Order Total</label>
1238
- <frontend_type>text</frontend_type>
1239
- <sort_order>190</sort_order>
1240
- <show_in_default>1</show_in_default>
1241
- <show_in_website>1</show_in_website>
1242
- <show_in_store>1</show_in_store>
1243
- </max_order_total>
1244
- <orderscount translate="label">
1245
- <label>Minimum Orders Count</label>
1246
- <frontend_type>text</frontend_type>
1247
- <sort_order>200</sort_order>
1248
- <comment>Default: "0" for disabled check.</comment>
1249
- <show_in_default>1</show_in_default>
1250
- <show_in_website>1</show_in_website>
1251
- <show_in_store>1</show_in_store>
1252
- </orderscount>
1253
- </fields>
1254
- </novalnetPhonepayment>
1255
- <!-- ccpci-start -->
1256
- <novalnetCcpci translate="label" module="novalnet">
1257
- <label>Novalnet Credit Card PCI</label>
1258
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
1259
- <sort_order>687</sort_order>
1260
- <show_in_default>1</show_in_default>
1261
- <show_in_website>1</show_in_website>
1262
- <show_in_store>1</show_in_store>
1263
- <fields>
1264
- <active translate="label">
1265
- <label>Enabled</label>
1266
- <frontend_type>select</frontend_type>
1267
- <source_model>adminhtml/system_config_source_yesno</source_model>
1268
- <sort_order>1</sort_order>
1269
- <show_in_default>1</show_in_default>
1270
- <show_in_website>1</show_in_website>
1271
- <show_in_store>1</show_in_store>
1272
- </active>
1273
- <title translate="label">
1274
- <label>Title</label>
1275
- <frontend_type>text</frontend_type>
1276
- <sort_order>2</sort_order>
1277
- <show_in_default>1</show_in_default>
1278
- <show_in_website>1</show_in_website>
1279
- <show_in_store>1</show_in_store>
1280
- </title>
1281
- <order_status translate="label">
1282
- <label>New order status</label>
1283
- <frontend_type>select</frontend_type>
1284
- <source_model>adminhtml/system_config_source_order_status</source_model>
1285
- <sort_order>3</sort_order>
1286
- <show_in_default>1</show_in_default>
1287
- <show_in_website>1</show_in_website>
1288
- <show_in_store>1</show_in_store>
1289
- </order_status>
1290
- <merchant_id translate="label">
1291
- <label>Novalnet Merchant ID</label>
1292
- <frontend_type>text</frontend_type>
1293
- <sort_order>4</sort_order>
1294
- <show_in_default>1</show_in_default>
1295
- <show_in_website>1</show_in_website>
1296
- <show_in_store>1</show_in_store>
1297
- </merchant_id>
1298
- <auth_code translate="label">
1299
- <label>Novalnet Auth Code</label>
1300
- <frontend_type>text</frontend_type>
1301
- <sort_order>5</sort_order>
1302
- <show_in_default>1</show_in_default>
1303
- <show_in_website>1</show_in_website>
1304
- <show_in_store>1</show_in_store>
1305
- </auth_code>
1306
- <product_id translate="label">
1307
- <label>Novalnet Product ID</label>
1308
- <frontend_type>text</frontend_type>
1309
- <sort_order>6</sort_order>
1310
- <show_in_default>1</show_in_default>
1311
- <show_in_website>1</show_in_website>
1312
- <show_in_store>1</show_in_store>
1313
- </product_id>
1314
- <tariff_id translate="label">
1315
- <label>Novalnet Tariff Id</label>
1316
- <frontend_type>text</frontend_type>
1317
- <sort_order>7</sort_order>
1318
- <show_in_default>1</show_in_default>
1319
- <show_in_website>1</show_in_website>
1320
- <show_in_store>1</show_in_store>
1321
- </tariff_id>
1322
- <manual_checking_amount tranlate="label" >
1323
- <label>Manual checking amount in cents</label>
1324
- <frontend_type>text</frontend_type>
1325
- <sort_order>9</sort_order>
1326
- <show_in_default>1</show_in_default>
1327
- <show_in_website>1</show_in_website>
1328
- <show_in_store>1</show_in_store>
1329
- </manual_checking_amount>
1330
- <second_product_id translate="label">
1331
- <label>Second Novalnet Product ID</label>
1332
- <frontend_type>text</frontend_type>
1333
- <sort_order>10</sort_order>
1334
- <show_in_default>1</show_in_default>
1335
- <show_in_website>1</show_in_website>
1336
- <show_in_store>1</show_in_store>
1337
- </second_product_id>
1338
- <second_tariff_id translate="label">
1339
- <label>Second Novalnet Tariff Id</label>
1340
- <frontend_type>text</frontend_type>
1341
- <sort_order>11</sort_order>
1342
- <show_in_default>1</show_in_default>
1343
- <show_in_website>1</show_in_website>
1344
- <show_in_store>1</show_in_store>
1345
- </second_tariff_id>
1346
- <password translate="label">
1347
- <label>Novalnet Password</label>
1348
- <frontend_type>text</frontend_type>
1349
- <sort_order>8</sort_order>
1350
- <show_in_default>1</show_in_default>
1351
- <show_in_website>1</show_in_website>
1352
- <show_in_store>1</show_in_store>
1353
- </password>
1354
- <booking_reference translate="label">
1355
- <label>Booking Reference</label>
1356
- <frontend_type>text</frontend_type>
1357
- <sort_order>12</sort_order>
1358
- <show_in_default>1</show_in_default>
1359
- <show_in_website>1</show_in_website>
1360
- <show_in_store>1</show_in_store>
1361
- </booking_reference>
1362
- <user_group_excluded translate="label">
1363
- <comment>To exclude groups of customers.</comment>
1364
- <label>User Group Excluded</label>
1365
- <frontend_type>text</frontend_type>
1366
- <sort_order>13</sort_order>
1367
- <show_in_default>1</show_in_default>
1368
- <show_in_website>1</show_in_website>
1369
- <show_in_store>1</show_in_store>
1370
- </user_group_excluded>
1371
- <live_mode translate="label">
1372
- <label>Live Mode</label>
1373
- <frontend_type>select</frontend_type>
1374
- <source_model>adminhtml/system_config_source_yesno</source_model>
1375
- <sort_order>14</sort_order>
1376
- <show_in_default>1</show_in_default>
1377
- <show_in_website>1</show_in_website>
1378
- <show_in_store>1</show_in_store>
1379
- </live_mode>
1380
- <gateway_timeout translate="label">
1381
- <comment>Gateway Timeout in seconds</comment>
1382
- <label>Gateway Timeout</label>
1383
- <frontend_type>text</frontend_type>
1384
- <sort_order>17</sort_order>
1385
- <show_in_default>1</show_in_default>
1386
- <show_in_website>1</show_in_website>
1387
- <show_in_store>1</show_in_store>
1388
- </gateway_timeout>
1389
- <sort_order translate="label">
1390
- <label>Sort Order</label>
1391
- <frontend_type>text</frontend_type>
1392
- <sort_order>100</sort_order>
1393
- <show_in_default>1</show_in_default>
1394
- <show_in_website>1</show_in_website>
1395
- <show_in_store>1</show_in_store>
1396
- </sort_order>
1397
- <createinvoice translate="label">
1398
- <label>Create Invoice</label>
1399
- <frontend_type>select</frontend_type>
1400
- <source_model>adminhtml/system_config_source_yesno</source_model>
1401
- <sort_order>18</sort_order>
1402
- <show_in_default>1</show_in_default>
1403
- <show_in_website>1</show_in_website>
1404
- <show_in_store>1</show_in_store>
1405
- </createinvoice>
1406
- <allowspecific translate="label">
1407
- <label>Payment from applicable countries</label>
1408
- <frontend_type>allowspecific</frontend_type>
1409
- <sort_order>19</sort_order>
1410
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1411
- <show_in_default>1</show_in_default>
1412
- <show_in_website>1</show_in_website>
1413
- <show_in_store>1</show_in_store>
1414
- </allowspecific>
1415
- <specificcountry translate="label">
1416
- <label>Payment from Specific countries</label>
1417
- <frontend_type>multiselect</frontend_type>
1418
- <sort_order>20</sort_order>
1419
- <source_model>adminhtml/system_config_source_country</source_model>
1420
- <show_in_default>1</show_in_default>
1421
- <show_in_website>1</show_in_website>
1422
- <show_in_store>1</show_in_store>
1423
- </specificcountry>
1424
- <min_order_total translate="label">
1425
- <label>Minimum Order Total</label>
1426
- <frontend_type>text</frontend_type>
1427
- <sort_order>180</sort_order>
1428
- <show_in_default>1</show_in_default>
1429
- <show_in_website>1</show_in_website>
1430
- <show_in_store>1</show_in_store>
1431
- </min_order_total>
1432
- <max_order_total translate="label">
1433
- <label>Maximum Order Total</label>
1434
- <frontend_type>text</frontend_type>
1435
- <sort_order>190</sort_order>
1436
- <show_in_default>1</show_in_default>
1437
- <show_in_website>1</show_in_website>
1438
- <show_in_store>1</show_in_store>
1439
- </max_order_total>
1440
- <orderscount translate="label">
1441
- <label>Minimum Orders Count</label>
1442
- <frontend_type>text</frontend_type>
1443
- <sort_order>200</sort_order>
1444
- <comment>Default: "0" for disabled check.</comment>
1445
- <show_in_default>1</show_in_default>
1446
- <show_in_website>1</show_in_website>
1447
- <show_in_store>1</show_in_store>
1448
- </orderscount>
1449
- </fields>
1450
- </novalnetCcpci>
1451
- <!-- ccpci-end -->
1452
- <!-- elvdepci-start -->
1453
- <novalnetElvdepci translate="label" module="novalnet">
1454
- <label>Novalnet Direct Debit German PCI</label>
1455
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
1456
- <sort_order>689</sort_order>
1457
- <show_in_default>1</show_in_default>
1458
- <show_in_website>1</show_in_website>
1459
- <show_in_store>1</show_in_store>
1460
- <fields>
1461
- <active translate="label">
1462
- <label>Enabled</label>
1463
- <frontend_type>select</frontend_type>
1464
- <source_model>adminhtml/system_config_source_yesno</source_model>
1465
- <sort_order>1</sort_order>
1466
- <show_in_default>1</show_in_default>
1467
- <show_in_website>1</show_in_website>
1468
- <show_in_store>1</show_in_store>
1469
- </active>
1470
- <title translate="label">
1471
- <label>Title</label>
1472
- <frontend_type>text</frontend_type>
1473
- <sort_order>2</sort_order>
1474
- <show_in_default>1</show_in_default>
1475
- <show_in_website>1</show_in_website>
1476
- <show_in_store>1</show_in_store>
1477
- </title>
1478
- <order_status translate="label">
1479
- <label>New order status</label>
1480
- <frontend_type>select</frontend_type>
1481
- <source_model>adminhtml/system_config_source_order_status</source_model>
1482
- <sort_order>3</sort_order>
1483
- <show_in_default>1</show_in_default>
1484
- <show_in_website>1</show_in_website>
1485
- <show_in_store>1</show_in_store>
1486
- </order_status>
1487
- <merchant_id translate="label">
1488
- <label>Novalnet Merchant ID</label>
1489
- <frontend_type>text</frontend_type>
1490
- <sort_order>4</sort_order>
1491
- <show_in_default>1</show_in_default>
1492
- <show_in_website>1</show_in_website>
1493
- <show_in_store>1</show_in_store>
1494
- </merchant_id>
1495
- <auth_code translate="label">
1496
- <label>Novalnet Auth Code</label>
1497
- <frontend_type>text</frontend_type>
1498
- <sort_order>5</sort_order>
1499
- <show_in_default>1</show_in_default>
1500
- <show_in_website>1</show_in_website>
1501
- <show_in_store>1</show_in_store>
1502
- </auth_code>
1503
- <product_id translate="label">
1504
- <label>Novalnet Product ID</label>
1505
- <frontend_type>text</frontend_type>
1506
- <sort_order>6</sort_order>
1507
- <show_in_default>1</show_in_default>
1508
- <show_in_website>1</show_in_website>
1509
- <show_in_store>1</show_in_store>
1510
- </product_id>
1511
- <tariff_id translate="label">
1512
- <label>Novalnet Tariff Id</label>
1513
- <frontend_type>text</frontend_type>
1514
- <sort_order>7</sort_order>
1515
- <show_in_default>1</show_in_default>
1516
- <show_in_website>1</show_in_website>
1517
- <show_in_store>1</show_in_store>
1518
- </tariff_id>
1519
- <password translate="label">
1520
- <label>Novalnet Password</label>
1521
- <frontend_type>text</frontend_type>
1522
- <sort_order>9</sort_order>
1523
- <show_in_default>1</show_in_default>
1524
- <show_in_website>1</show_in_website>
1525
- <show_in_store>1</show_in_store>
1526
- </password>
1527
- <manual_checking_amount tranlate="label" >
1528
- <label>Manual checking amount in cents</label>
1529
- <frontend_type>text</frontend_type>
1530
- <sort_order>10</sort_order>
1531
- <show_in_default>1</show_in_default>
1532
- <show_in_website>1</show_in_website>
1533
- <show_in_store>1</show_in_store>
1534
- </manual_checking_amount>
1535
- <second_product_id translate="label">
1536
- <label>Second Novalnet Product ID</label>
1537
- <frontend_type>text</frontend_type>
1538
- <sort_order>11</sort_order>
1539
- <show_in_default>1</show_in_default>
1540
- <show_in_website>1</show_in_website>
1541
- <show_in_store>1</show_in_store>
1542
- </second_product_id>
1543
- <second_tariff_id translate="label">
1544
- <label>Second Novalnet Tariff Id</label>
1545
- <frontend_type>text</frontend_type>
1546
- <sort_order>12</sort_order>
1547
- <show_in_default>1</show_in_default>
1548
- <show_in_website>1</show_in_website>
1549
- <show_in_store>1</show_in_store>
1550
- </second_tariff_id>
1551
- <booking_reference translate="label">
1552
- <label>Booking Reference</label>
1553
- <frontend_type>text</frontend_type>
1554
- <sort_order>13</sort_order>
1555
- <show_in_default>1</show_in_default>
1556
- <show_in_website>1</show_in_website>
1557
- <show_in_store>1</show_in_store>
1558
- </booking_reference>
1559
- <user_group_excluded translate="label">
1560
- <comment>To exclude groups of customers.</comment>
1561
- <label>User Group Excluded</label>
1562
- <frontend_type>text</frontend_type>
1563
- <sort_order>14</sort_order>
1564
- <show_in_default>1</show_in_default>
1565
- <show_in_website>1</show_in_website>
1566
- <show_in_store>1</show_in_store>
1567
- </user_group_excluded>
1568
- <live_mode translate="label">
1569
- <label>Live Mode</label>
1570
- <frontend_type>select</frontend_type>
1571
- <source_model>adminhtml/system_config_source_yesno</source_model>
1572
- <sort_order>15</sort_order>
1573
- <show_in_default>1</show_in_default>
1574
- <show_in_website>1</show_in_website>
1575
- <show_in_store>1</show_in_store>
1576
- </live_mode>
1577
- <gateway_timeout translate="label">
1578
- <comment>Gateway Timeout in seconds</comment>
1579
- <label>Gateway Timeout</label>
1580
- <frontend_type>text</frontend_type>
1581
- <sort_order>17</sort_order>
1582
- <show_in_default>1</show_in_default>
1583
- <show_in_website>1</show_in_website>
1584
- <show_in_store>1</show_in_store>
1585
- </gateway_timeout>
1586
- <sort_order translate="label">
1587
- <label>Sort Order</label>
1588
- <frontend_type>text</frontend_type>
1589
- <sort_order>100</sort_order>
1590
- <show_in_default>1</show_in_default>
1591
- <show_in_website>1</show_in_website>
1592
- <show_in_store>1</show_in_store>
1593
- </sort_order>
1594
- <createinvoice translate="label">
1595
- <label>Create Invoice</label>
1596
- <frontend_type>select</frontend_type>
1597
- <source_model>adminhtml/system_config_source_yesno</source_model>
1598
- <sort_order>18</sort_order>
1599
- <show_in_default>1</show_in_default>
1600
- <show_in_website>1</show_in_website>
1601
- <show_in_store>1</show_in_store>
1602
- </createinvoice>
1603
- <allowspecific translate="label">
1604
- <label>Payment from applicable countries</label>
1605
- <frontend_type>allowspecific</frontend_type>
1606
- <sort_order>19</sort_order>
1607
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1608
- <show_in_default>1</show_in_default>
1609
- <show_in_website>1</show_in_website>
1610
- <show_in_store>1</show_in_store>
1611
- </allowspecific>
1612
- <specificcountry translate="label">
1613
- <label>Payment from Specific countries</label>
1614
- <frontend_type>multiselect</frontend_type>
1615
- <sort_order>20</sort_order>
1616
- <source_model>adminhtml/system_config_source_country</source_model>
1617
- <show_in_default>1</show_in_default>
1618
- <show_in_website>1</show_in_website>
1619
- <show_in_store>1</show_in_store>
1620
- </specificcountry>
1621
- <min_order_total translate="label">
1622
- <label>Minimum Order Total</label>
1623
- <frontend_type>text</frontend_type>
1624
- <sort_order>180</sort_order>
1625
- <show_in_default>1</show_in_default>
1626
- <show_in_website>1</show_in_website>
1627
- <show_in_store>1</show_in_store>
1628
- </min_order_total>
1629
- <max_order_total translate="label">
1630
- <label>Maximum Order Total</label>
1631
- <frontend_type>text</frontend_type>
1632
- <sort_order>190</sort_order>
1633
- <show_in_default>1</show_in_default>
1634
- <show_in_website>1</show_in_website>
1635
- <show_in_store>1</show_in_store>
1636
- </max_order_total>
1637
- <orderscount translate="label">
1638
- <label>Minimum Orders Count</label>
1639
- <frontend_type>text</frontend_type>
1640
- <sort_order>200</sort_order>
1641
- <comment>Default: "0" for disabled check.</comment>
1642
- <show_in_default>1</show_in_default>
1643
- <show_in_website>1</show_in_website>
1644
- <show_in_store>1</show_in_store>
1645
- </orderscount>
1646
- </fields>
1647
- </novalnetElvdepci>
1648
- <!-- elvdepci-end -->
1649
- <!-- elvatpci-start -->
1650
- <novalnetElvatpci translate="label" module="novalnet">
1651
- <label>Novalnet Direct Debit Austria PCI</label>
1652
- <comment>You have to set the live mode to 'yes' for real payments.</comment>
1653
- <sort_order>691</sort_order>
1654
- <show_in_default>1</show_in_default>
1655
- <show_in_website>1</show_in_website>
1656
- <show_in_store>1</show_in_store>
1657
- <fields>
1658
- <active translate="label">
1659
- <label>Enabled</label>
1660
- <frontend_type>select</frontend_type>
1661
- <source_model>adminhtml/system_config_source_yesno</source_model>
1662
- <sort_order>1</sort_order>
1663
- <show_in_default>1</show_in_default>
1664
- <show_in_website>1</show_in_website>
1665
- <show_in_store>1</show_in_store>
1666
- </active>
1667
- <title translate="label">
1668
- <label>Title</label>
1669
- <frontend_type>text</frontend_type>
1670
- <sort_order>2</sort_order>
1671
- <show_in_default>1</show_in_default>
1672
- <show_in_website>1</show_in_website>
1673
- <show_in_store>1</show_in_store>
1674
- </title>
1675
- <order_status translate="label">
1676
- <label>New order status</label>
1677
- <frontend_type>select</frontend_type>
1678
- <source_model>adminhtml/system_config_source_order_status</source_model>
1679
- <sort_order>3</sort_order>
1680
- <show_in_default>1</show_in_default>
1681
- <show_in_website>1</show_in_website>
1682
- <show_in_store>1</show_in_store>
1683
- </order_status>
1684
- <merchant_id translate="label">
1685
- <label>Novalnet Merchant ID</label>
1686
- <frontend_type>text</frontend_type>
1687
- <sort_order>4</sort_order>
1688
- <show_in_default>1</show_in_default>
1689
- <show_in_website>1</show_in_website>
1690
- <show_in_store>1</show_in_store>
1691
- </merchant_id>
1692
- <auth_code translate="label">
1693
- <label>Novalnet Auth Code</label>
1694
- <frontend_type>text</frontend_type>
1695
- <sort_order>5</sort_order>
1696
- <show_in_default>1</show_in_default>
1697
- <show_in_website>1</show_in_website>
1698
- <show_in_store>1</show_in_store>
1699
- </auth_code>
1700
- <product_id translate="label">
1701
- <label>Novalnet Product ID</label>
1702
- <frontend_type>text</frontend_type>
1703
- <sort_order>6</sort_order>
1704
- <show_in_default>1</show_in_default>
1705
- <show_in_website>1</show_in_website>
1706
- <show_in_store>1</show_in_store>
1707
- </product_id>
1708
- <tariff_id translate="label">
1709
- <label>Novalnet Tariff Id</label>
1710
- <frontend_type>text</frontend_type>
1711
- <sort_order>7</sort_order>
1712
- <show_in_default>1</show_in_default>
1713
- <show_in_website>1</show_in_website>
1714
- <show_in_store>1</show_in_store>
1715
- </tariff_id>
1716
- <password translate="label">
1717
- <label>Novalnet Password</label>
1718
- <frontend_type>text</frontend_type>
1719
- <sort_order>8</sort_order>
1720
- <show_in_default>1</show_in_default>
1721
- <show_in_website>1</show_in_website>
1722
- <show_in_store>1</show_in_store>
1723
- </password>
1724
- <manual_checking_amount tranlate="label" >
1725
- <label>Manual checking amount in cents</label>
1726
- <frontend_type>text</frontend_type>
1727
- <sort_order>9</sort_order>
1728
- <show_in_default>1</show_in_default>
1729
- <show_in_website>1</show_in_website>
1730
- <show_in_store>1</show_in_store>
1731
- </manual_checking_amount>
1732
- <second_product_id translate="label">
1733
- <label>Second Novalnet Product ID</label>
1734
- <frontend_type>text</frontend_type>
1735
- <sort_order>10</sort_order>
1736
- <show_in_default>1</show_in_default>
1737
- <show_in_website>1</show_in_website>
1738
- <show_in_store>1</show_in_store>
1739
- </second_product_id>
1740
- <second_tariff_id translate="label">
1741
- <label>Second Novalnet Tariff Id</label>
1742
- <frontend_type>text</frontend_type>
1743
- <sort_order>11</sort_order>
1744
- <show_in_default>1</show_in_default>
1745
- <show_in_website>1</show_in_website>
1746
- <show_in_store>1</show_in_store>
1747
- </second_tariff_id>
1748
- <booking_reference translate="label">
1749
- <label>Booking Reference</label>
1750
- <frontend_type>text</frontend_type>
1751
- <sort_order>12</sort_order>
1752
- <show_in_default>1</show_in_default>
1753
- <show_in_website>1</show_in_website>
1754
- <show_in_store>1</show_in_store>
1755
- </booking_reference>
1756
- <user_group_excluded translate="label">
1757
- <comment>To exclude groups of customers.</comment>
1758
- <label>User Group Excluded</label>
1759
- <frontend_type>text</frontend_type>
1760
- <sort_order>13</sort_order>
1761
- <show_in_default>1</show_in_default>
1762
- <show_in_website>1</show_in_website>
1763
- <show_in_store>1</show_in_store>
1764
- </user_group_excluded>
1765
- <live_mode translate="label">
1766
- <label>Live Mode</label>
1767
- <frontend_type>select</frontend_type>
1768
- <source_model>adminhtml/system_config_source_yesno</source_model>
1769
- <sort_order>14</sort_order>
1770
- <show_in_default>1</show_in_default>
1771
- <show_in_website>1</show_in_website>
1772
- <show_in_store>1</show_in_store>
1773
- </live_mode>
1774
- <gateway_timeout translate="label">
1775
- <comment>Gateway Timeout in seconds</comment>
1776
- <label>Gateway Timeout</label>
1777
- <frontend_type>text</frontend_type>
1778
- <sort_order>17</sort_order>
1779
- <show_in_default>1</show_in_default>
1780
- <show_in_website>1</show_in_website>
1781
- <show_in_store>1</show_in_store>
1782
- </gateway_timeout>
1783
- <sort_order translate="label">
1784
- <label>Sort Order</label>
1785
- <frontend_type>text</frontend_type>
1786
- <sort_order>100</sort_order>
1787
- <show_in_default>1</show_in_default>
1788
- <show_in_website>1</show_in_website>
1789
- <show_in_store>1</show_in_store>
1790
- </sort_order>
1791
- <createinvoice translate="label">
1792
- <label>Create Invoice</label>
1793
- <frontend_type>select</frontend_type>
1794
- <source_model>adminhtml/system_config_source_yesno</source_model>
1795
- <sort_order>18</sort_order>
1796
- <show_in_default>1</show_in_default>
1797
- <show_in_website>1</show_in_website>
1798
- <show_in_store>1</show_in_store>
1799
- </createinvoice>
1800
- <allowspecific translate="label">
1801
- <label>Payment from applicable countries</label>
1802
- <frontend_type>allowspecific</frontend_type>
1803
- <sort_order>19</sort_order>
1804
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1805
- <show_in_default>1</show_in_default>
1806
- <show_in_website>1</show_in_website>
1807
- <show_in_store>1</show_in_store>
1808
- </allowspecific>
1809
- <specificcountry translate="label">
1810
- <label>Payment from Specific countries</label>
1811
- <frontend_type>multiselect</frontend_type>
1812
- <sort_order>20</sort_order>
1813
- <source_model>adminhtml/system_config_source_country</source_model>
1814
- <show_in_default>1</show_in_default>
1815
- <show_in_website>1</show_in_website>
1816
- <show_in_store>1</show_in_store>
1817
- </specificcountry>
1818
- <min_order_total translate="label">
1819
- <label>Minimum Order Total</label>
1820
- <frontend_type>text</frontend_type>
1821
- <sort_order>180</sort_order>
1822
- <show_in_default>1</show_in_default>
1823
- <show_in_website>1</show_in_website>
1824
- <show_in_store>1</show_in_store>
1825
- </min_order_total>
1826
- <max_order_total translate="label">
1827
- <label>Maximum Order Total</label>
1828
- <frontend_type>text</frontend_type>
1829
- <sort_order>190</sort_order>
1830
- <show_in_default>1</show_in_default>
1831
- <show_in_website>1</show_in_website>
1832
- <show_in_store>1</show_in_store>
1833
- </max_order_total>
1834
- <orderscount translate="label">
1835
- <label>Minimum Orders Count</label>
1836
- <frontend_type>text</frontend_type>
1837
- <sort_order>200</sort_order>
1838
- <comment>Default: "0" for disabled check.</comment>
1839
- <show_in_default>1</show_in_default>
1840
- <show_in_website>1</show_in_website>
1841
- <show_in_store>1</show_in_store>
1842
- </orderscount>
1843
- </fields>
1844
- </novalnetElvatpci>
1845
- <!-- elvatpci-end -->
1846
- </groups>
1847
- </payment>
1848
- </sections>
1849
- </config>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <novalnet translate="label" module="novalnet_payment">
5
+ <label>NOVALNET</label>
6
+ <class>tab-novalnet</class>
7
+ <sort_order>401</sort_order>
8
+ </novalnet>
9
+ </tabs>
10
+ <sections>
11
+
12
+ <!--{{{ Global tab-->
13
+ <novalnet_global translate="label" module="novalnet_payment">
14
+ <label>Global</label>
15
+ <tab>novalnet</tab>
16
+ <frontend_type>text</frontend_type>
17
+ <sort_order>20</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ <groups>
22
+ <novalnet translate="label" module="novalnet_payment">
23
+ <label>Novalnet Payment</label>
24
+ <frontend_type>text</frontend_type>
25
+ <sort_order>10</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <fields>
30
+ <merchant_id translate="label">
31
+ <label>Novalnet Merchant ID</label>
32
+ <comment>Enter your Novalnet Merchant ID</comment>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>10</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ </merchant_id>
39
+ <auth_code translate="label">
40
+ <label>Novalnet Auth Code</label>
41
+ <comment>Enter your Novalnet Merchant Authorisation code</comment>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>20</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ </auth_code>
48
+ <product_id translate="label">
49
+ <label>Novalnet Product ID</label>
50
+ <comment>Enter your Novalnet Product ID</comment>
51
+ <frontend_type>text</frontend_type>
52
+ <sort_order>30</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </product_id>
57
+ <tariff_id translate="label">
58
+ <label>Novalnet Tariff ID</label>
59
+ <comment>Enter your Novalnet Tariff ID</comment>
60
+ <frontend_type>text</frontend_type>
61
+ <sort_order>40</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>1</show_in_store>
65
+ </tariff_id>
66
+ <password translate="label">
67
+ <label>Novalnet Password</label>
68
+ <comment>Enter your Novalnet Password</comment>
69
+ <frontend_type>text</frontend_type>
70
+ <sort_order>50</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>1</show_in_store>
74
+ </password>
75
+ <live_mode translate="label">
76
+ <label>Novalnet Live Mode</label>
77
+ <comment>Selected payment methods will be in Live Mode</comment>
78
+ <frontend_type>multiselect</frontend_type>
79
+ <source_model>novalnet_payment/system_config_activemethods</source_model>
80
+ <can_be_empty>1</can_be_empty>
81
+ <sort_order>60</sort_order>
82
+ <show_in_default>1</show_in_default>
83
+ <show_in_website>1</show_in_website>
84
+ <show_in_store>1</show_in_store>
85
+ </live_mode>
86
+ <api_user translate="label">
87
+ <label>PAYPAL API User Name</label>
88
+ <comment>Please enter your PayPal API username</comment>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>70</sort_order>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>1</show_in_store>
94
+ </api_user>
95
+ <api_password translate="label">
96
+ <label>PAYPAL API Password</label>
97
+ <comment>Please enter your PayPal API password</comment>
98
+ <frontend_type>text</frontend_type>
99
+ <sort_order>80</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ </api_password>
104
+ <api_sign translate="label">
105
+ <label>PAYPAL API Signature</label>
106
+ <comment>Please enter your PayPal API signature</comment>
107
+ <frontend_type>text</frontend_type>
108
+ <sort_order>90</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </api_sign>
113
+ </fields>
114
+ </novalnet>
115
+ </groups>
116
+ </novalnet_global>
117
+ <!--}}} Global tab-->
118
+ <!-- Novalnet paymethods -->
119
+ <novalnet_paymethods translate="label" module="novalnet_payment">
120
+ <label>Payment Methods</label>
121
+ <tab>novalnet</tab>
122
+ <frontend_type>text</frontend_type>
123
+ <sort_order>30</sort_order>
124
+ <show_in_default>1</show_in_default>
125
+ <show_in_website>1</show_in_website>
126
+ <show_in_store>1</show_in_store>
127
+ <groups>
128
+ <!--{{{ Novalnet Credit Card-->
129
+ <novalnetCc translate="label" module="novalnet_payment">
130
+ <label>Novalnet Credit Card</label>
131
+ <sort_order>680</sort_order>
132
+ <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
+ <fields>
136
+ <active translate="label">
137
+ <label>Enable Novalnet Module</label>
138
+ <frontend_type>select</frontend_type>
139
+ <source_model>adminhtml/system_config_source_yesno</source_model>
140
+ <config_path>payment/novalnetCc/active</config_path>
141
+ <sort_order>1</sort_order>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <show_in_store>1</show_in_store>
145
+ </active>
146
+ <title translate="label">
147
+ <label>Novalnet Title</label>
148
+ <frontend_type>text</frontend_type>
149
+ <config_path>payment/novalnetCc/title</config_path>
150
+ <sort_order>2</sort_order>
151
+ <show_in_default>1</show_in_default>
152
+ <show_in_website>1</show_in_website>
153
+ <show_in_store>1</show_in_store>
154
+ </title>
155
+ <order_status translate="label">
156
+ <label>Set order Status</label>
157
+ <comment>Set the status of orders made with this payment module to this value</comment>
158
+ <frontend_type>select</frontend_type>
159
+ <config_path>payment/novalnetCc/order_status</config_path>
160
+ <source_model>adminhtml/system_config_source_order_status</source_model>
161
+ <sort_order>3</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ </order_status>
166
+ <manual_checking_amount tranlate="label" >
167
+ <label>Manual checking amount in cents</label>
168
+ <comment>Please enter the amount in cents</comment>
169
+ <frontend_type>text</frontend_type>
170
+ <config_path>payment/novalnetCc/manual_checking_amount</config_path>
171
+ <sort_order>10</sort_order>
172
+ <show_in_default>1</show_in_default>
173
+ <show_in_website>1</show_in_website>
174
+ <show_in_store>1</show_in_store>
175
+ </manual_checking_amount>
176
+ <second_product_id translate="label">
177
+ <label>Second Novalnet Product ID</label>
178
+ <comment>for the manual checking</comment>
179
+ <frontend_type>text</frontend_type>
180
+ <config_path>payment/novalnetCc/second_product_id</config_path>
181
+ <sort_order>11</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>1</show_in_store>
185
+ </second_product_id>
186
+ <second_tariff_id translate="label">
187
+ <label>Second Novalnet Tariff Id</label>
188
+ <comment>for the manual checking</comment>
189
+ <frontend_type>text</frontend_type>
190
+ <config_path>payment/novalnetCc/second_tariff_id</config_path>
191
+ <sort_order>12</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <show_in_store>1</show_in_store>
195
+ </second_tariff_id>
196
+ <booking_reference translate="label">
197
+ <label>Information to the end customer</label>
198
+ <comment>will appear in the payment form</comment>
199
+ <frontend_type>text</frontend_type>
200
+ <config_path>payment/novalnetCc/booking_reference</config_path>
201
+ <sort_order>13</sort_order>
202
+ <show_in_default>1</show_in_default>
203
+ <show_in_website>1</show_in_website>
204
+ <show_in_store>1</show_in_store>
205
+ </booking_reference>
206
+ <user_group_excluded translate="label">
207
+ <comment>Excluded User Group Desc</comment>
208
+ <label>User Group Excluded</label>
209
+ <frontend_type>text</frontend_type>
210
+ <config_path>payment/novalnetCc/user_group_excluded</config_path>
211
+ <sort_order>14</sort_order>
212
+ <show_in_default>1</show_in_default>
213
+ <show_in_website>1</show_in_website>
214
+ <show_in_store>1</show_in_store>
215
+ </user_group_excluded>
216
+ <gateway_timeout translate="label">
217
+ <comment>Gateway Timeout in seconds</comment>
218
+ <label>Gateway Timeout</label>
219
+ <frontend_type>text</frontend_type>
220
+ <config_path>payment/novalnetCc/gateway_timeout</config_path>
221
+ <sort_order>17</sort_order>
222
+ <show_in_default>1</show_in_default>
223
+ <show_in_website>1</show_in_website>
224
+ <show_in_store>1</show_in_store>
225
+ </gateway_timeout>
226
+ <allowspecific translate="label">
227
+ <label>Payment from applicable countries</label>
228
+ <frontend_type>allowspecific</frontend_type>
229
+ <config_path>payment/novalnetCc/allowspecific</config_path>
230
+ <sort_order>18</sort_order>
231
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
232
+ <show_in_default>1</show_in_default>
233
+ <show_in_website>1</show_in_website>
234
+ <show_in_store>1</show_in_store>
235
+ </allowspecific>
236
+ <specificcountry translate="label">
237
+ <label>Payment from Specific countries</label>
238
+ <frontend_type>multiselect</frontend_type>
239
+ <config_path>payment/novalnetCc/specificcountry</config_path>
240
+ <sort_order>19</sort_order>
241
+ <source_model>adminhtml/system_config_source_country</source_model>
242
+ <show_in_default>1</show_in_default>
243
+ <show_in_website>1</show_in_website>
244
+ <show_in_store>1</show_in_store>
245
+ <depends><allowspecific>1</allowspecific></depends>
246
+ </specificcountry>
247
+ <min_order_total translate="label">
248
+ <label>Novalnet Minimum Order Total</label>
249
+ <frontend_type>text</frontend_type>
250
+ <config_path>payment/novalnetCc/min_order_total</config_path>
251
+ <sort_order>20</sort_order>
252
+ <show_in_default>1</show_in_default>
253
+ <show_in_website>1</show_in_website>
254
+ <show_in_store>1</show_in_store>
255
+ </min_order_total>
256
+ <max_order_total translate="label">
257
+ <label>Novalnet Maximum Order Total</label>
258
+ <frontend_type>text</frontend_type>
259
+ <config_path>payment/novalnetCc/max_order_total</config_path>
260
+ <sort_order>21</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>1</show_in_website>
263
+ <show_in_store>1</show_in_store>
264
+ </max_order_total>
265
+ <orderscount translate="label">
266
+ <label>Novalnet Minimum Orders Count</label>
267
+ <frontend_type>text</frontend_type>
268
+ <config_path>payment/novalnetCc/orderscount</config_path>
269
+ <sort_order>22</sort_order>
270
+ <comment>Novalnet Minimum Orders Count Desc</comment>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>1</show_in_store>
274
+ </orderscount>
275
+ <sort_order translate="label">
276
+ <label>Novalnet Sort Order</label>
277
+ <comment>Sort order of display. Lowest is displayed first.</comment>
278
+ <frontend_type>text</frontend_type>
279
+ <config_path>payment/novalnetCc/sort_order</config_path>
280
+ <sort_order>23</sort_order>
281
+ <show_in_default>1</show_in_default>
282
+ <show_in_website>1</show_in_website>
283
+ <show_in_store>1</show_in_store>
284
+ </sort_order>
285
+ </fields>
286
+ </novalnetCc>
287
+ <!--}}} Novalnet Credit Card-->
288
+ <!--{{{ Novalnet Elvgerman-->
289
+ <novalnetElvgerman translate="label" module="novalnet_payment">
290
+ <label>Novalnet Direct Debit German</label>
291
+ <sort_order>683</sort_order>
292
+ <show_in_default>1</show_in_default>
293
+ <show_in_website>1</show_in_website>
294
+ <show_in_store>1</show_in_store>
295
+ <fields>
296
+ <active translate="label">
297
+ <label>Enable Novalnet Module</label>
298
+ <frontend_type>select</frontend_type>
299
+ <config_path>payment/novalnetElvgerman/active</config_path>
300
+ <source_model>adminhtml/system_config_source_yesno</source_model>
301
+ <sort_order>1</sort_order>
302
+ <show_in_default>1</show_in_default>
303
+ <show_in_website>1</show_in_website>
304
+ <show_in_store>1</show_in_store>
305
+ </active>
306
+ <title translate="label">
307
+ <label>Novalnet Title</label>
308
+ <frontend_type>text</frontend_type>
309
+ <config_path>payment/novalnetElvgerman/title</config_path>
310
+ <sort_order>2</sort_order>
311
+ <show_in_default>1</show_in_default>
312
+ <show_in_website>1</show_in_website>
313
+ <show_in_store>1</show_in_store>
314
+ </title>
315
+ <order_status translate="label">
316
+ <label>Set order Status</label>
317
+ <comment>Set the status of orders made with this payment module to this value</comment>
318
+ <frontend_type>select</frontend_type>
319
+ <config_path>payment/novalnetElvgerman/order_status</config_path>
320
+ <source_model>adminhtml/system_config_source_order_status</source_model>
321
+ <sort_order>3</sort_order>
322
+ <show_in_default>1</show_in_default>
323
+ <show_in_website>1</show_in_website>
324
+ <show_in_store>1</show_in_store>
325
+ </order_status>
326
+ <manual_checking_amount tranlate="label" >
327
+ <label>Manual checking amount in cents</label>
328
+ <comment>Please enter the amount in cents</comment>
329
+ <frontend_type>text</frontend_type>
330
+ <config_path>payment/novalnetElvgerman/manual_checking_amount</config_path>
331
+ <sort_order>9</sort_order>
332
+ <show_in_default>1</show_in_default>
333
+ <show_in_website>1</show_in_website>
334
+ <show_in_store>1</show_in_store>
335
+ </manual_checking_amount>
336
+ <second_product_id translate="label">
337
+ <label>Second Novalnet Product ID</label>
338
+ <comment>for the manual checking</comment>
339
+ <frontend_type>text</frontend_type>
340
+ <config_path>payment/novalnetElvgerman/second_product_id</config_path>
341
+ <sort_order>10</sort_order>
342
+ <show_in_default>1</show_in_default>
343
+ <show_in_website>1</show_in_website>
344
+ <show_in_store>1</show_in_store>
345
+ </second_product_id>
346
+ <second_tariff_id translate="label">
347
+ <label>Second Novalnet Tariff Id</label>
348
+ <comment>for the manual checking</comment>
349
+ <frontend_type>text</frontend_type>
350
+ <config_path>payment/novalnetElvgerman/second_tariff_id</config_path>
351
+ <sort_order>11</sort_order>
352
+ <show_in_default>1</show_in_default>
353
+ <show_in_website>1</show_in_website>
354
+ <show_in_store>1</show_in_store>
355
+ </second_tariff_id>
356
+ <acdc_check translate="label">
357
+ <label>Enable credit rating check</label>
358
+ <frontend_type>select</frontend_type>
359
+ <config_path>payment/novalnetElvgerman/acdc_check</config_path>
360
+ <source_model>adminhtml/system_config_source_yesno</source_model>
361
+ <sort_order>12</sort_order>
362
+ <show_in_default>1</show_in_default>
363
+ <show_in_website>1</show_in_website>
364
+ <show_in_store>1</show_in_store>
365
+ </acdc_check>
366
+ <user_group_excluded translate="label">
367
+ <comment>Excluded User Group Desc</comment>
368
+ <label>User Group Excluded</label>
369
+ <frontend_type>text</frontend_type>
370
+ <config_path>payment/novalnetElvgerman/user_group_excluded</config_path>
371
+ <sort_order>15</sort_order>
372
+ <show_in_default>1</show_in_default>
373
+ <show_in_website>1</show_in_website>
374
+ <show_in_store>1</show_in_store>
375
+ </user_group_excluded>
376
+ <booking_reference translate="label">
377
+ <label>Information to the end customer</label>
378
+ <comment>will appear in the payment form</comment>
379
+ <frontend_type>text</frontend_type>
380
+ <config_path>payment/novalnetElvgerman/booking_reference</config_path>
381
+ <sort_order>16</sort_order>
382
+ <show_in_default>1</show_in_default>
383
+ <show_in_website>1</show_in_website>
384
+ <show_in_store>1</show_in_store>
385
+ </booking_reference>
386
+ <gateway_timeout translate="label">
387
+ <comment>Gateway Timeout in seconds</comment>
388
+ <label>Gateway Timeout</label>
389
+ <frontend_type>text</frontend_type>
390
+ <config_path>payment/novalnetElvgerman/gateway_timeout</config_path>
391
+ <sort_order>18</sort_order>
392
+ <show_in_default>1</show_in_default>
393
+ <show_in_website>1</show_in_website>
394
+ <show_in_store>1</show_in_store>
395
+ </gateway_timeout>
396
+ <allowspecific translate="label">
397
+ <label>Payment from applicable countries</label>
398
+ <frontend_type>allowspecific</frontend_type>
399
+ <config_path>payment/novalnetElvgerman/allowspecific</config_path>
400
+ <sort_order>19</sort_order>
401
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
402
+ <show_in_default>1</show_in_default>
403
+ <show_in_website>1</show_in_website>
404
+ <show_in_store>1</show_in_store>
405
+ </allowspecific>
406
+ <specificcountry translate="label">
407
+ <label>Payment from Specific countries</label>
408
+ <frontend_type>multiselect</frontend_type>
409
+ <config_path>payment/novalnetElvgerman/specificcountry</config_path>
410
+ <sort_order>20</sort_order>
411
+ <source_model>adminhtml/system_config_source_country</source_model>
412
+ <show_in_default>1</show_in_default>
413
+ <show_in_website>1</show_in_website>
414
+ <show_in_store>1</show_in_store>
415
+ <depends><allowspecific>1</allowspecific></depends>
416
+ </specificcountry>
417
+ <min_order_total translate="label">
418
+ <label>Novalnet Minimum Order Total</label>
419
+ <frontend_type>text</frontend_type>
420
+ <config_path>payment/novalnetElvgerman/min_order_total</config_path>
421
+ <sort_order>21</sort_order>
422
+ <show_in_default>1</show_in_default>
423
+ <show_in_website>1</show_in_website>
424
+ <show_in_store>1</show_in_store>
425
+ </min_order_total>
426
+ <max_order_total translate="label">
427
+ <label>Novalnet Maximum Order Total</label>
428
+ <frontend_type>text</frontend_type>
429
+ <config_path>payment/novalnetElvgerman/max_order_total</config_path>
430
+ <sort_order>22</sort_order>
431
+ <show_in_default>1</show_in_default>
432
+ <show_in_website>1</show_in_website>
433
+ <show_in_store>1</show_in_store>
434
+ </max_order_total>
435
+ <orderscount translate="label">
436
+ <label>Novalnet Minimum Orders Count</label>
437
+ <frontend_type>text</frontend_type>
438
+ <config_path>payment/novalnetElvgerman/orderscount</config_path>
439
+ <sort_order>23</sort_order>
440
+ <comment>Novalnet Minimum Orders Count Desc</comment>
441
+ <show_in_default>1</show_in_default>
442
+ <show_in_website>1</show_in_website>
443
+ <show_in_store>1</show_in_store>
444
+ </orderscount>
445
+ <sort_order translate="label">
446
+ <label>Novalnet Sort Order</label>
447
+ <comment>Sort order of display. Lowest is displayed first.</comment>
448
+ <frontend_type>text</frontend_type>
449
+ <config_path>payment/novalnetElvgerman/sort_order</config_path>
450
+ <sort_order>24</sort_order>
451
+ <show_in_default>1</show_in_default>
452
+ <show_in_website>1</show_in_website>
453
+ <show_in_store>1</show_in_store>
454
+ </sort_order>
455
+ </fields>
456
+ </novalnetElvgerman>
457
+ <!--}}} Novalnet Elvgerman-->
458
+ <!--{{{ Novalnet Elvaustria-->
459
+ <novalnetElvaustria translate="label" module="novalnet_payment">
460
+ <label>Novalnet Direct Debit Austria</label>
461
+ <sort_order>685</sort_order>
462
+ <show_in_default>1</show_in_default>
463
+ <show_in_website>1</show_in_website>
464
+ <show_in_store>1</show_in_store>
465
+ <fields>
466
+ <active translate="label">
467
+ <label>Enable Novalnet Module</label>
468
+ <frontend_type>select</frontend_type>
469
+ <config_path>payment/novalnetElvaustria/active</config_path>
470
+ <source_model>adminhtml/system_config_source_yesno</source_model>
471
+ <sort_order>1</sort_order>
472
+ <show_in_default>1</show_in_default>
473
+ <show_in_website>1</show_in_website>
474
+ <show_in_store>1</show_in_store>
475
+ </active>
476
+ <title translate="label">
477
+ <label>Novalnet Title</label>
478
+ <frontend_type>text</frontend_type>
479
+ <config_path>payment/novalnetElvaustria/title</config_path>
480
+ <sort_order>2</sort_order>
481
+ <show_in_default>1</show_in_default>
482
+ <show_in_website>1</show_in_website>
483
+ <show_in_store>1</show_in_store>
484
+ </title>
485
+ <order_status translate="label">
486
+ <label>Set order Status</label>
487
+ <comment>Set the status of orders made with this payment module to this value</comment>
488
+ <frontend_type>select</frontend_type>
489
+ <config_path>payment/novalnetElvaustria/order_status</config_path>
490
+ <source_model>adminhtml/system_config_source_order_status</source_model>
491
+ <sort_order>3</sort_order>
492
+ <show_in_default>1</show_in_default>
493
+ <show_in_website>1</show_in_website>
494
+ <show_in_store>1</show_in_store>
495
+ </order_status>
496
+ <manual_checking_amount tranlate="label" >
497
+ <label>Manual checking amount in cents</label>
498
+ <comment>Please enter the amount in cents</comment>
499
+ <frontend_type>text</frontend_type>
500
+ <config_path>payment/novalnetElvaustria/manual_checking_amount</config_path>
501
+ <sort_order>8</sort_order>
502
+ <show_in_default>1</show_in_default>
503
+ <show_in_website>1</show_in_website>
504
+ <show_in_store>1</show_in_store>
505
+ </manual_checking_amount>
506
+ <second_product_id translate="label">
507
+ <label>Second Novalnet Product ID</label>
508
+ <comment>for the manual checking</comment>
509
+ <frontend_type>text</frontend_type>
510
+ <config_path>payment/novalnetElvaustria/second_product_id</config_path>
511
+ <sort_order>9</sort_order>
512
+ <show_in_default>1</show_in_default>
513
+ <show_in_website>1</show_in_website>
514
+ <show_in_store>1</show_in_store>
515
+ </second_product_id>
516
+ <second_tariff_id translate="label">
517
+ <label>Second Novalnet Tariff Id</label>
518
+ <comment>for the manual checking</comment>
519
+ <frontend_type>text</frontend_type>
520
+ <config_path>payment/novalnetElvaustria/second_tariff_id</config_path>
521
+ <sort_order>10</sort_order>
522
+ <show_in_default>1</show_in_default>
523
+ <show_in_website>1</show_in_website>
524
+ <show_in_store>1</show_in_store>
525
+ </second_tariff_id>
526
+ <user_group_excluded translate="label">
527
+ <comment>Excluded User Group Desc</comment>
528
+ <label>User Group Excluded</label>
529
+ <frontend_type>text</frontend_type>
530
+ <config_path>payment/novalnetElvaustria/user_group_excluded</config_path>
531
+ <sort_order>13</sort_order>
532
+ <show_in_default>1</show_in_default>
533
+ <show_in_website>1</show_in_website>
534
+ <show_in_store>1</show_in_store>
535
+ </user_group_excluded>
536
+ <booking_reference translate="label">
537
+ <label>Information to the end customer</label>
538
+ <comment>will appear in the payment form</comment>
539
+ <frontend_type>text</frontend_type>
540
+ <config_path>payment/novalnetElvaustria/booking_reference</config_path>
541
+ <sort_order>14</sort_order>
542
+ <show_in_default>1</show_in_default>
543
+ <show_in_website>1</show_in_website>
544
+ <show_in_store>1</show_in_store>
545
+ </booking_reference>
546
+ <gateway_timeout translate="label">
547
+ <comment>Gateway Timeout in seconds</comment>
548
+ <label>Gateway Timeout</label>
549
+ <frontend_type>text</frontend_type>
550
+ <config_path>payment/novalnetElvaustria/gateway_timeout</config_path>
551
+ <sort_order>16</sort_order>
552
+ <show_in_default>1</show_in_default>
553
+ <show_in_website>1</show_in_website>
554
+ <show_in_store>1</show_in_store>
555
+ </gateway_timeout>
556
+ <allowspecific translate="label">
557
+ <label>Payment from applicable countries</label>
558
+ <frontend_type>allowspecific</frontend_type>
559
+ <config_path>payment/novalnetElvaustria/allowspecific</config_path>
560
+ <sort_order>17</sort_order>
561
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
562
+ <show_in_default>1</show_in_default>
563
+ <show_in_website>1</show_in_website>
564
+ <show_in_store>1</show_in_store>
565
+ </allowspecific>
566
+ <specificcountry translate="label">
567
+ <label>Payment from Specific countries</label>
568
+ <frontend_type>multiselect</frontend_type>
569
+ <config_path>payment/novalnetElvaustria/specificcountry</config_path>
570
+ <sort_order>18</sort_order>
571
+ <source_model>adminhtml/system_config_source_country</source_model>
572
+ <show_in_default>1</show_in_default>
573
+ <show_in_website>1</show_in_website>
574
+ <show_in_store>1</show_in_store>
575
+ <depends><allowspecific>1</allowspecific></depends>
576
+ </specificcountry>
577
+ <min_order_total translate="label">
578
+ <label>Novalnet Minimum Order Total</label>
579
+ <frontend_type>text</frontend_type>
580
+ <config_path>payment/novalnetElvaustria/min_order_total</config_path>
581
+ <sort_order>19</sort_order>
582
+ <show_in_default>1</show_in_default>
583
+ <show_in_website>1</show_in_website>
584
+ <show_in_store>1</show_in_store>
585
+ </min_order_total>
586
+ <max_order_total translate="label">
587
+ <label>Novalnet Maximum Order Total</label>
588
+ <frontend_type>text</frontend_type>
589
+ <config_path>payment/novalnetElvaustria/max_order_total</config_path>
590
+ <sort_order>20</sort_order>
591
+ <show_in_default>1</show_in_default>
592
+ <show_in_website>1</show_in_website>
593
+ <show_in_store>1</show_in_store>
594
+ </max_order_total>
595
+ <orderscount translate="label">
596
+ <label>Novalnet Minimum Orders Count</label>
597
+ <frontend_type>text</frontend_type>
598
+ <config_path>payment/novalnetElvaustria/orderscount</config_path>
599
+ <sort_order>21</sort_order>
600
+ <comment>Novalnet Minimum Orders Count Desc</comment>
601
+ <show_in_default>1</show_in_default>
602
+ <show_in_website>1</show_in_website>
603
+ <show_in_store>1</show_in_store>
604
+ </orderscount>
605
+ <sort_order translate="label">
606
+ <label>Novalnet Sort Order</label>
607
+ <comment>Sort order of display. Lowest is displayed first.</comment>
608
+ <frontend_type>text</frontend_type>
609
+ <config_path>payment/novalnetElvaustria/sort_order</config_path>
610
+ <sort_order>22</sort_order>
611
+ <show_in_default>1</show_in_default>
612
+ <show_in_website>1</show_in_website>
613
+ <show_in_store>1</show_in_store>
614
+ </sort_order>
615
+ </fields>
616
+ </novalnetElvaustria>
617
+ <!--}}} Novalnet Elvaustria-->
618
+ <!--{{{ Novalnet Invoice-->
619
+ <novalnetInvoice translate="label" module="novalnet_payment">
620
+ <label>Novalnet Invoice</label>
621
+ <sort_order>687</sort_order>
622
+ <show_in_default>1</show_in_default>
623
+ <show_in_website>1</show_in_website>
624
+ <show_in_store>1</show_in_store>
625
+ <fields>
626
+ <active translate="label">
627
+ <label>Enable Novalnet Module</label>
628
+ <frontend_type>select</frontend_type>
629
+ <config_path>payment/novalnetInvoice/active</config_path>
630
+ <source_model>adminhtml/system_config_source_yesno</source_model>
631
+ <sort_order>1</sort_order>
632
+ <show_in_default>1</show_in_default>
633
+ <show_in_website>1</show_in_website>
634
+ <show_in_store>1</show_in_store>
635
+ </active>
636
+ <title translate="label">
637
+ <label>Novalnet Title</label>
638
+ <frontend_type>text</frontend_type>
639
+ <config_path>payment/novalnetInvoice/title</config_path>
640
+ <sort_order>2</sort_order>
641
+ <show_in_default>1</show_in_default>
642
+ <show_in_website>1</show_in_website>
643
+ <show_in_store>1</show_in_store>
644
+ </title>
645
+ <order_status translate="label">
646
+ <label>Set order Status</label>
647
+ <comment>Set the status of orders made with this payment module to this value</comment>
648
+ <frontend_type>select</frontend_type>
649
+ <config_path>payment/novalnetInvoice/order_status</config_path>
650
+ <source_model>adminhtml/system_config_source_order_status</source_model>
651
+ <sort_order>3</sort_order>
652
+ <show_in_default>1</show_in_default>
653
+ <show_in_website>1</show_in_website>
654
+ <show_in_store>1</show_in_store>
655
+ </order_status>
656
+ <booking_reference translate="label">
657
+ <label>Information to the end customer</label>
658
+ <comment>will appear in the payment form</comment>
659
+ <frontend_type>text</frontend_type>
660
+ <config_path>payment/novalnetInvoice/booking_reference</config_path>
661
+ <sort_order>8</sort_order>
662
+ <show_in_default>1</show_in_default>
663
+ <show_in_website>1</show_in_website>
664
+ <show_in_store>1</show_in_store>
665
+ </booking_reference>
666
+ <payment_duration translate="label">
667
+ <label>Payment Duration</label>
668
+ <frontend_type>text</frontend_type>
669
+ <config_path>payment/novalnetInvoice/payment_duration</config_path>
670
+ <sort_order>11</sort_order>
671
+ <show_in_default>1</show_in_default>
672
+ <show_in_website>1</show_in_website>
673
+ <show_in_store>1</show_in_store>
674
+ </payment_duration>
675
+ <user_group_excluded translate="label">
676
+ <comment>Excluded User Group Desc</comment>
677
+ <label>User Group Excluded</label>
678
+ <frontend_type>text</frontend_type>
679
+ <config_path>payment/novalnetInvoice/user_group_excluded</config_path>
680
+ <sort_order>12</sort_order>
681
+ <show_in_default>1</show_in_default>
682
+ <show_in_website>1</show_in_website>
683
+ <show_in_store>1</show_in_store>
684
+ </user_group_excluded>
685
+ <gateway_timeout translate="label">
686
+ <comment>Gateway Timeout in seconds</comment>
687
+ <label>Gateway Timeout</label>
688
+ <frontend_type>text</frontend_type>
689
+ <config_path>payment/novalnetInvoice/gateway_timeout</config_path>
690
+ <sort_order>14</sort_order>
691
+ <show_in_default>1</show_in_default>
692
+ <show_in_website>1</show_in_website>
693
+ <show_in_store>1</show_in_store>
694
+ </gateway_timeout>
695
+ <allowspecific translate="label">
696
+ <label>Payment from applicable countries</label>
697
+ <frontend_type>allowspecific</frontend_type>
698
+ <config_path>payment/novalnetInvoice/allowspecific</config_path>
699
+ <sort_order>15</sort_order>
700
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
701
+ <show_in_default>1</show_in_default>
702
+ <show_in_website>1</show_in_website>
703
+ <show_in_store>1</show_in_store>
704
+ </allowspecific>
705
+ <specificcountry translate="label">
706
+ <label>Payment from Specific countries</label>
707
+ <frontend_type>multiselect</frontend_type>
708
+ <config_path>payment/novalnetInvoice/specificcountry</config_path>
709
+ <sort_order>16</sort_order>
710
+ <source_model>adminhtml/system_config_source_country</source_model>
711
+ <show_in_default>1</show_in_default>
712
+ <show_in_website>1</show_in_website>
713
+ <show_in_store>1</show_in_store>
714
+ <depends><allowspecific>1</allowspecific></depends>
715
+ </specificcountry>
716
+ <min_order_total translate="label">
717
+ <label>Novalnet Minimum Order Total</label>
718
+ <frontend_type>text</frontend_type>
719
+ <config_path>payment/novalnetInvoice/min_order_total</config_path>
720
+ <sort_order>17</sort_order>
721
+ <show_in_default>1</show_in_default>
722
+ <show_in_website>1</show_in_website>
723
+ <show_in_store>1</show_in_store>
724
+ </min_order_total>
725
+ <max_order_total translate="label">
726
+ <label>Novalnet Maximum Order Total</label>
727
+ <frontend_type>text</frontend_type>
728
+ <config_path>payment/novalnetInvoice/max_order_total</config_path>
729
+ <sort_order>18</sort_order>
730
+ <show_in_default>1</show_in_default>
731
+ <show_in_website>1</show_in_website>
732
+ <show_in_store>1</show_in_store>
733
+ </max_order_total>
734
+ <orderscount translate="label">
735
+ <label>Novalnet Minimum Orders Count</label>
736
+ <frontend_type>text</frontend_type>
737
+ <config_path>payment/novalnetInvoice/orderscount</config_path>
738
+ <sort_order>19</sort_order>
739
+ <comment>Novalnet Minimum Orders Count Desc</comment>
740
+ <show_in_default>1</show_in_default>
741
+ <show_in_website>1</show_in_website>
742
+ <show_in_store>1</show_in_store>
743
+ </orderscount>
744
+ <sort_order translate="label">
745
+ <label>Novalnet Sort Order</label>
746
+ <comment>Sort order of display. Lowest is displayed first.</comment>
747
+ <frontend_type>text</frontend_type>
748
+ <config_path>payment/novalnetInvoice/sort_order</config_path>
749
+ <sort_order>20</sort_order>
750
+ <show_in_default>1</show_in_default>
751
+ <show_in_website>1</show_in_website>
752
+ <show_in_store>1</show_in_store>
753
+ </sort_order>
754
+ </fields>
755
+ </novalnetInvoice>
756
+ <!--}}} Novalnet Invoice-->
757
+ <!--{{{ Novalnet Prepayment-->
758
+ <novalnetPrepayment translate="label" module="novalnet_payment">
759
+ <label>Novalnet Prepayment</label>
760
+ <sort_order>688</sort_order>
761
+ <show_in_default>1</show_in_default>
762
+ <show_in_website>1</show_in_website>
763
+ <show_in_store>1</show_in_store>
764
+ <fields>
765
+ <active translate="label">
766
+ <label>Enable Novalnet Module</label>
767
+ <frontend_type>select</frontend_type>
768
+ <config_path>payment/novalnetPrepayment/active</config_path>
769
+ <source_model>adminhtml/system_config_source_yesno</source_model>
770
+ <sort_order>1</sort_order>
771
+ <show_in_default>1</show_in_default>
772
+ <show_in_website>1</show_in_website>
773
+ <show_in_store>1</show_in_store>
774
+ </active>
775
+ <title translate="label">
776
+ <label>Novalnet Title</label>
777
+ <frontend_type>text</frontend_type>
778
+ <config_path>payment/novalnetPrepayment/title</config_path>
779
+ <sort_order>2</sort_order>
780
+ <show_in_default>1</show_in_default>
781
+ <show_in_website>1</show_in_website>
782
+ <show_in_store>1</show_in_store>
783
+ </title>
784
+ <order_status translate="label">
785
+ <label>Set order Status</label>
786
+ <comment>Set the status of orders made with this payment module to this value</comment>
787
+ <frontend_type>select</frontend_type>
788
+ <config_path>payment/novalnetPrepayment/order_status</config_path>
789
+ <source_model>adminhtml/system_config_source_order_status</source_model>
790
+ <sort_order>3</sort_order>
791
+ <show_in_default>1</show_in_default>
792
+ <show_in_website>1</show_in_website>
793
+ <show_in_store>1</show_in_store>
794
+ </order_status>
795
+ <booking_reference translate="label">
796
+ <label>Information to the end customer</label>
797
+ <comment>will appear in the payment form</comment>
798
+ <frontend_type>text</frontend_type>
799
+ <config_path>payment/novalnetPrepayment/booking_reference</config_path>
800
+ <sort_order>8</sort_order>
801
+ <show_in_default>1</show_in_default>
802
+ <show_in_website>1</show_in_website>
803
+ <show_in_store>1</show_in_store>
804
+ </booking_reference>
805
+ <user_group_excluded translate="label">
806
+ <comment>Excluded User Group Desc</comment>
807
+ <label>User Group Excluded</label>
808
+ <frontend_type>text</frontend_type>
809
+ <config_path>payment/novalnetPrepayment/user_group_excluded</config_path>
810
+ <sort_order>9</sort_order>
811
+ <show_in_default>1</show_in_default>
812
+ <show_in_website>1</show_in_website>
813
+ <show_in_store>1</show_in_store>
814
+ </user_group_excluded>
815
+ <gateway_timeout translate="label">
816
+ <comment>Gateway Timeout in seconds</comment>
817
+ <label>Gateway Timeout</label>
818
+ <frontend_type>text</frontend_type>
819
+ <config_path>payment/novalnetPrepayment/gateway_timeout</config_path>
820
+ <sort_order>11</sort_order>
821
+ <show_in_default>1</show_in_default>
822
+ <show_in_website>1</show_in_website>
823
+ <show_in_store>1</show_in_store>
824
+ </gateway_timeout>
825
+ <allowspecific translate="label">
826
+ <label>Payment from applicable countries</label>
827
+ <frontend_type>allowspecific</frontend_type>
828
+ <config_path>payment/novalnetPrepayment/allowspecific</config_path>
829
+ <sort_order>12</sort_order>
830
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
831
+ <show_in_default>1</show_in_default>
832
+ <show_in_website>1</show_in_website>
833
+ <show_in_store>1</show_in_store>
834
+ </allowspecific>
835
+ <specificcountry translate="label">
836
+ <label>Payment from Specific countries</label>
837
+ <frontend_type>multiselect</frontend_type>
838
+ <config_path>payment/novalnetPrepayment/specificcountry</config_path>
839
+ <sort_order>13</sort_order>
840
+ <source_model>adminhtml/system_config_source_country</source_model>
841
+ <show_in_default>1</show_in_default>
842
+ <show_in_website>1</show_in_website>
843
+ <show_in_store>1</show_in_store>
844
+ <depends><allowspecific>1</allowspecific></depends>
845
+ </specificcountry>
846
+ <min_order_total translate="label">
847
+ <label>Novalnet Minimum Order Total</label>
848
+ <frontend_type>text</frontend_type>
849
+ <config_path>payment/novalnetPrepayment/min_order_total</config_path>
850
+ <sort_order>14</sort_order>
851
+ <show_in_default>1</show_in_default>
852
+ <show_in_website>1</show_in_website>
853
+ <show_in_store>1</show_in_store>
854
+ </min_order_total>
855
+ <max_order_total translate="label">
856
+ <label>Novalnet Maximum Order Total</label>
857
+ <frontend_type>text</frontend_type>
858
+ <config_path>payment/novalnetPrepayment/max_order_total</config_path>
859
+ <sort_order>15</sort_order>
860
+ <show_in_default>1</show_in_default>
861
+ <show_in_website>1</show_in_website>
862
+ <show_in_store>1</show_in_store>
863
+ </max_order_total>
864
+ <orderscount translate="label">
865
+ <label>Novalnet Minimum Orders Count</label>
866
+ <frontend_type>text</frontend_type>
867
+ <config_path>payment/novalnetPrepayment/orderscount</config_path>
868
+ <sort_order>16</sort_order>
869
+ <comment>Novalnet Minimum Orders Count Desc</comment>
870
+ <show_in_default>1</show_in_default>
871
+ <show_in_website>1</show_in_website>
872
+ <show_in_store>1</show_in_store>
873
+ </orderscount>
874
+ <sort_order translate="label">
875
+ <label>Novalnet Sort Order</label>
876
+ <comment>Sort order of display. Lowest is displayed first.</comment>
877
+ <frontend_type>text</frontend_type>
878
+ <config_path>payment/novalnetPrepayment/sort_order</config_path>
879
+ <sort_order>17</sort_order>
880
+ <show_in_default>1</show_in_default>
881
+ <show_in_website>1</show_in_website>
882
+ <show_in_store>1</show_in_store>
883
+ </sort_order>
884
+ </fields>
885
+ </novalnetPrepayment>
886
+ <!--}}} Novalnet Prepayment-->
887
+ <!--{{{ Novalnet Instant-->
888
+ <novalnetSofortueberweisung translate="label" module="novalnet_payment">
889
+ <label>Novalnet Instant Bank Transfer</label>
890
+ <sort_order>688</sort_order>
891
+ <show_in_default>1</show_in_default>
892
+ <show_in_website>1</show_in_website>
893
+ <show_in_store>1</show_in_store>
894
+ <fields>
895
+ <active translate="label">
896
+ <label>Enable Novalnet Module</label>
897
+ <frontend_type>select</frontend_type>
898
+ <config_path>payment/novalnetSofortueberweisung/active</config_path>
899
+ <source_model>adminhtml/system_config_source_yesno</source_model>
900
+ <sort_order>0</sort_order>
901
+ <show_in_default>1</show_in_default>
902
+ <show_in_website>1</show_in_website>
903
+ <show_in_store>1</show_in_store>
904
+ </active>
905
+ <title translate="label">
906
+ <label>Novalnet Title</label>
907
+ <frontend_type>text</frontend_type>
908
+ <config_path>payment/novalnetSofortueberweisung/title</config_path>
909
+ <sort_order>2</sort_order>
910
+ <show_in_default>1</show_in_default>
911
+ <show_in_website>1</show_in_website>
912
+ <show_in_store>1</show_in_store>
913
+ </title>
914
+ <order_status translate="label">
915
+ <label>Order Status Before Payment</label>
916
+ <frontend_type>select</frontend_type>
917
+ <config_path>payment/novalnetSofortueberweisung/order_status</config_path>
918
+ <source_model>adminhtml/system_config_source_order_status</source_model>
919
+ <sort_order>3</sort_order>
920
+ <show_in_default>1</show_in_default>
921
+ <show_in_website>1</show_in_website>
922
+ <show_in_store>1</show_in_store>
923
+ </order_status>
924
+ <order_status_after_payment translate="label">
925
+ <label>Order Status After Successful Payment</label>
926
+ <frontend_type>select</frontend_type>
927
+ <config_path>payment/novalnetSofortueberweisung/order_status_after_payment</config_path>
928
+ <source_model>adminhtml/system_config_source_order_status</source_model>
929
+ <sort_order>4</sort_order>
930
+ <show_in_default>1</show_in_default>
931
+ <show_in_website>1</show_in_website>
932
+ <show_in_store>1</show_in_store>
933
+ </order_status_after_payment>
934
+ <booking_reference translate="label">
935
+ <label>Information to the end customer</label>
936
+ <comment>will appear in the payment form</comment>
937
+ <frontend_type>text</frontend_type>
938
+ <config_path>payment/novalnetSofortueberweisung/booking_reference</config_path>
939
+ <sort_order>10</sort_order>
940
+ <show_in_default>1</show_in_default>
941
+ <show_in_website>1</show_in_website>
942
+ <show_in_store>1</show_in_store>
943
+ </booking_reference>
944
+ <user_group_excluded translate="label">
945
+ <comment>Excluded User Group Desc</comment>
946
+ <label>User Group Excluded</label>
947
+ <frontend_type>text</frontend_type>
948
+ <config_path>payment/novalnetSofortueberweisung/user_group_excluded</config_path>
949
+ <sort_order>11</sort_order>
950
+ <show_in_default>1</show_in_default>
951
+ <show_in_website>1</show_in_website>
952
+ <show_in_store>1</show_in_store>
953
+ </user_group_excluded>
954
+ <save_cancelled_tid translate="label">
955
+ <label>Display Novalnet Transaction ID for Cancelled Order</label>
956
+ <frontend_type>select</frontend_type>
957
+ <config_path>payment/novalnetSofortueberweisung/save_cancelled_tid</config_path>
958
+ <source_model>adminhtml/system_config_source_yesno</source_model>
959
+ <sort_order>14</sort_order>
960
+ <show_in_default>1</show_in_default>
961
+ <show_in_website>1</show_in_website>
962
+ <show_in_store>1</show_in_store>
963
+ </save_cancelled_tid>
964
+ <gateway_timeout translate="label">
965
+ <comment>Gateway Timeout in seconds</comment>
966
+ <label>Gateway Timeout</label>
967
+ <frontend_type>text</frontend_type>
968
+ <config_path>payment/novalnetSofortueberweisung/gateway_timeout</config_path>
969
+ <sort_order>15</sort_order>
970
+ <show_in_default>1</show_in_default>
971
+ <show_in_website>1</show_in_website>
972
+ <show_in_store>1</show_in_store>
973
+ </gateway_timeout>
974
+ <allowspecific translate="label">
975
+ <label>Payment from applicable countries</label>
976
+ <frontend_type>allowspecific</frontend_type>
977
+ <config_path>payment/novalnetSofortueberweisung/allowspecific</config_path>
978
+ <sort_order>16</sort_order>
979
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
980
+ <show_in_default>1</show_in_default>
981
+ <show_in_website>1</show_in_website>
982
+ <show_in_store>1</show_in_store>
983
+ </allowspecific>
984
+ <specificcountry translate="label">
985
+ <label>Payment from Specific countries</label>
986
+ <frontend_type>multiselect</frontend_type>
987
+ <config_path>payment/novalnetSofortueberweisung/specificcountry</config_path>
988
+ <sort_order>17</sort_order>
989
+ <source_model>adminhtml/system_config_source_country</source_model>
990
+ <show_in_default>1</show_in_default>
991
+ <show_in_website>1</show_in_website>
992
+ <show_in_store>1</show_in_store>
993
+ <depends><allowspecific>1</allowspecific></depends>
994
+ </specificcountry>
995
+ <min_order_total translate="label">
996
+ <label>Novalnet Minimum Order Total</label>
997
+ <frontend_type>text</frontend_type>
998
+ <config_path>payment/novalnetSofortueberweisung/min_order_total</config_path>
999
+ <sort_order>18</sort_order>
1000
+ <show_in_default>1</show_in_default>
1001
+ <show_in_website>1</show_in_website>
1002
+ <show_in_store>1</show_in_store>
1003
+ </min_order_total>
1004
+ <max_order_total translate="label">
1005
+ <label>Novalnet Maximum Order Total</label>
1006
+ <frontend_type>text</frontend_type>
1007
+ <config_path>payment/novalnetSofortueberweisung/max_order_total</config_path>
1008
+ <sort_order>19</sort_order>
1009
+ <show_in_default>1</show_in_default>
1010
+ <show_in_website>1</show_in_website>
1011
+ <show_in_store>1</show_in_store>
1012
+ </max_order_total>
1013
+ <orderscount translate="label">
1014
+ <label>Novalnet Minimum Orders Count</label>
1015
+ <frontend_type>text</frontend_type>
1016
+ <config_path>payment/novalnetSofortueberweisung/orderscount</config_path>
1017
+ <sort_order>20</sort_order>
1018
+ <comment>Novalnet Minimum Orders Count Desc</comment>
1019
+ <show_in_default>1</show_in_default>
1020
+ <show_in_website>1</show_in_website>
1021
+ <show_in_store>1</show_in_store>
1022
+ </orderscount>
1023
+ <sort_order translate="label">
1024
+ <label>Novalnet Sort Order</label>
1025
+ <comment>Sort order of display. Lowest is displayed first.</comment>
1026
+ <frontend_type>text</frontend_type>
1027
+ <config_path>payment/novalnetSofortueberweisung/sort_order</config_path>
1028
+ <sort_order>21</sort_order>
1029
+ <show_in_default>1</show_in_default>
1030
+ <show_in_website>1</show_in_website>
1031
+ <show_in_store>1</show_in_store>
1032
+ </sort_order>
1033
+ </fields>
1034
+ </novalnetSofortueberweisung>
1035
+ <!--}}} Novalnet Instant-->
1036
+ <!--{{{ Novalnet Paypal-->
1037
+ <novalnetPaypal translate="label" module="novalnet_payment">
1038
+ <label>Novalnet PayPal</label>
1039
+ <frontend_type>text</frontend_type>
1040
+ <sort_order>689</sort_order>
1041
+ <show_in_default>1</show_in_default>
1042
+ <show_in_website>1</show_in_website>
1043
+ <show_in_store>1</show_in_store>
1044
+ <fields>
1045
+ <active translate="label">
1046
+ <label>Enable Novalnet Module</label>
1047
+ <frontend_type>select</frontend_type>
1048
+ <config_path>payment/novalnetPaypal/active</config_path>
1049
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1050
+ <sort_order>1</sort_order>
1051
+ <show_in_default>1</show_in_default>
1052
+ <show_in_website>1</show_in_website>
1053
+ <show_in_store>1</show_in_store>
1054
+ </active>
1055
+ <title translate="label">
1056
+ <label>Novalnet Title</label>
1057
+ <frontend_type>text</frontend_type>
1058
+ <config_path>payment/novalnetPaypal/title</config_path>
1059
+ <sort_order>2</sort_order>
1060
+ <show_in_default>1</show_in_default>
1061
+ <show_in_website>1</show_in_website>
1062
+ <show_in_store>1</show_in_store>
1063
+ </title>
1064
+ <order_status translate="label">
1065
+ <label>Order Status Before Payment</label>
1066
+ <frontend_type>select</frontend_type>
1067
+ <config_path>payment/novalnetPaypal/order_status</config_path>
1068
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1069
+ <sort_order>3</sort_order>
1070
+ <show_in_default>1</show_in_default>
1071
+ <show_in_website>1</show_in_website>
1072
+ <show_in_store>1</show_in_store>
1073
+ </order_status>
1074
+ <order_status_after_payment translate="label">
1075
+ <label>Order Status After Successful Payment</label>
1076
+ <frontend_type>select</frontend_type>
1077
+ <config_path>payment/novalnetPaypal/order_status_after_payment</config_path>
1078
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1079
+ <sort_order>4</sort_order>
1080
+ <show_in_default>1</show_in_default>
1081
+ <show_in_website>1</show_in_website>
1082
+ <show_in_store>1</show_in_store>
1083
+ </order_status_after_payment>
1084
+ <booking_reference translate="label">
1085
+ <label>Information to the end customer</label>
1086
+ <comment>will appear in the payment form</comment>
1087
+ <frontend_type>text</frontend_type>
1088
+ <config_path>payment/novalnetPaypal/booking_reference</config_path>
1089
+ <sort_order>10</sort_order>
1090
+ <show_in_default>1</show_in_default>
1091
+ <show_in_website>1</show_in_website>
1092
+ <show_in_store>1</show_in_store>
1093
+ </booking_reference>
1094
+ <user_group_excluded translate="label">
1095
+ <comment>Excluded User Group Desc</comment>
1096
+ <label>User Group Excluded</label>
1097
+ <frontend_type>text</frontend_type>
1098
+ <config_path>payment/novalnetPaypal/user_group_excluded</config_path>
1099
+ <sort_order>11</sort_order>
1100
+ <show_in_default>1</show_in_default>
1101
+ <show_in_website>1</show_in_website>
1102
+ <show_in_store>1</show_in_store>
1103
+ </user_group_excluded>
1104
+ <save_cancelled_tid translate="label">
1105
+ <label>Display Novalnet Transaction ID for Cancelled Order</label>
1106
+ <frontend_type>select</frontend_type>
1107
+ <config_path>payment/novalnetPaypal/save_cancelled_tid</config_path>
1108
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1109
+ <sort_order>14</sort_order>
1110
+ <show_in_default>1</show_in_default>
1111
+ <show_in_website>1</show_in_website>
1112
+ <show_in_store>1</show_in_store>
1113
+ </save_cancelled_tid>
1114
+ <gateway_timeout translate="label">
1115
+ <comment>Gateway Timeout in seconds</comment>
1116
+ <label>Gateway Timeout</label>
1117
+ <frontend_type>text</frontend_type>
1118
+ <config_path>payment/novalnetPaypal/gateway_timeout</config_path>
1119
+ <sort_order>15</sort_order>
1120
+ <show_in_default>1</show_in_default>
1121
+ <show_in_website>1</show_in_website>
1122
+ <show_in_store>1</show_in_store>
1123
+ </gateway_timeout>
1124
+ <allowspecific translate="label">
1125
+ <label>Payment from applicable countries</label>
1126
+ <frontend_type>allowspecific</frontend_type>
1127
+ <config_path>payment/novalnetPaypal/allowspecific</config_path>
1128
+ <sort_order>16</sort_order>
1129
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1130
+ <show_in_default>1</show_in_default>
1131
+ <show_in_website>1</show_in_website>
1132
+ <show_in_store>1</show_in_store>
1133
+ </allowspecific>
1134
+ <specificcountry translate="label">
1135
+ <label>Payment from Specific countries</label>
1136
+ <frontend_type>multiselect</frontend_type>
1137
+ <config_path>payment/novalnetPaypal/specificcountry</config_path>
1138
+ <sort_order>17</sort_order>
1139
+ <source_model>adminhtml/system_config_source_country</source_model>
1140
+ <show_in_default>1</show_in_default>
1141
+ <show_in_website>1</show_in_website>
1142
+ <show_in_store>1</show_in_store>
1143
+ <depends><allowspecific>1</allowspecific></depends>
1144
+ </specificcountry>
1145
+ <model>
1146
+ </model>
1147
+ <min_order_total translate="label">
1148
+ <label>Novalnet Minimum Order Total</label>
1149
+ <frontend_type>text</frontend_type>
1150
+ <config_path>payment/novalnetPaypal/min_order_total</config_path>
1151
+ <sort_order>21</sort_order>
1152
+ <show_in_default>1</show_in_default>
1153
+ <show_in_website>1</show_in_website>
1154
+ <show_in_store>1</show_in_store>
1155
+ </min_order_total>
1156
+ <max_order_total translate="label">
1157
+ <label>Novalnet Maximum Order Total</label>
1158
+ <frontend_type>text</frontend_type>
1159
+ <config_path>payment/novalnetPaypal/max_order_total</config_path>
1160
+ <sort_order>22</sort_order>
1161
+ <show_in_default>1</show_in_default>
1162
+ <show_in_website>1</show_in_website>
1163
+ <show_in_store>1</show_in_store>
1164
+ </max_order_total>
1165
+ <orderscount translate="label">
1166
+ <label>Novalnet Minimum Orders Count</label>
1167
+ <frontend_type>text</frontend_type>
1168
+ <config_path>payment/novalnetPaypal/orderscount</config_path>
1169
+ <sort_order>23</sort_order>
1170
+ <comment>Novalnet Minimum Orders Count Desc</comment>
1171
+ <show_in_default>1</show_in_default>
1172
+ <show_in_website>1</show_in_website>
1173
+ <show_in_store>1</show_in_store>
1174
+ </orderscount>
1175
+ <sort_order translate="label">
1176
+ <label>Novalnet Sort Order</label>
1177
+ <comment>Sort order of display. Lowest is displayed first.</comment>
1178
+ <frontend_type>text</frontend_type>
1179
+ <config_path>payment/novalnetPaypal/sort_order</config_path>
1180
+ <sort_order>24</sort_order>
1181
+ <show_in_default>1</show_in_default>
1182
+ <show_in_website>1</show_in_website>
1183
+ <show_in_store>1</show_in_store>
1184
+ </sort_order>
1185
+ </fields>
1186
+ </novalnetPaypal>
1187
+ <!--}}} Novalnet Paypal-->
1188
+ <!--{{{ Novalnet Ideal-->
1189
+ <novalnetIdeal translate="label" module="novalnet_payment">
1190
+ <label>Novalnet iDEAL</label>
1191
+ <frontend_type>text</frontend_type>
1192
+ <sort_order>690</sort_order>
1193
+ <show_in_default>1</show_in_default>
1194
+ <show_in_website>1</show_in_website>
1195
+ <show_in_store>1</show_in_store>
1196
+ <fields>
1197
+ <active translate="label">
1198
+ <label>Enable Novalnet Module</label>
1199
+ <frontend_type>select</frontend_type>
1200
+ <config_path>payment/novalnetIdeal/active</config_path>
1201
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1202
+ <sort_order>1</sort_order>
1203
+ <show_in_default>1</show_in_default>
1204
+ <show_in_website>1</show_in_website>
1205
+ <show_in_store>1</show_in_store>
1206
+ </active>
1207
+ <title translate="label">
1208
+ <label>Novalnet Title</label>
1209
+ <frontend_type>text</frontend_type>
1210
+ <config_path>payment/novalnetIdeal/title</config_path>
1211
+ <sort_order>2</sort_order>
1212
+ <show_in_default>1</show_in_default>
1213
+ <show_in_website>1</show_in_website>
1214
+ <show_in_store>1</show_in_store>
1215
+ </title>
1216
+ <order_status translate="label">
1217
+ <label>Order Status Before Payment</label>
1218
+ <frontend_type>select</frontend_type>
1219
+ <config_path>payment/novalnetIdeal/order_status</config_path>
1220
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1221
+ <sort_order>3</sort_order>
1222
+ <show_in_default>1</show_in_default>
1223
+ <show_in_website>1</show_in_website>
1224
+ <show_in_store>1</show_in_store>
1225
+ </order_status>
1226
+ <order_status_after_payment translate="label">
1227
+ <label>Order Status After Successful Payment</label>
1228
+ <frontend_type>select</frontend_type>
1229
+ <config_path>payment/novalnetIdeal/order_status_after_payment</config_path>
1230
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1231
+ <sort_order>4</sort_order>
1232
+ <show_in_default>1</show_in_default>
1233
+ <show_in_website>1</show_in_website>
1234
+ <show_in_store>1</show_in_store>
1235
+ </order_status_after_payment>
1236
+ <booking_reference translate="label">
1237
+ <label>Information to the end customer</label>
1238
+ <comment>will appear in the payment form</comment>
1239
+ <frontend_type>text</frontend_type>
1240
+ <config_path>payment/novalnetIdeal/booking_reference</config_path>
1241
+ <sort_order>10</sort_order>
1242
+ <show_in_default>1</show_in_default>
1243
+ <show_in_website>1</show_in_website>
1244
+ <show_in_store>1</show_in_store>
1245
+ </booking_reference>
1246
+ <user_group_excluded translate="label">
1247
+ <comment>Excluded User Group Desc</comment>
1248
+ <label>User Group Excluded</label>
1249
+ <frontend_type>text</frontend_type>
1250
+ <config_path>payment/novalnetIdeal/user_group_excluded</config_path>
1251
+ <sort_order>11</sort_order>
1252
+ <show_in_default>1</show_in_default>
1253
+ <show_in_website>1</show_in_website>
1254
+ <show_in_store>1</show_in_store>
1255
+ </user_group_excluded>
1256
+ <save_cancelled_tid translate="label">
1257
+ <label>Display Novalnet Transaction ID for Cancelled Order</label>
1258
+ <frontend_type>select</frontend_type>
1259
+ <config_path>payment/novalnetIdeal/save_cancelled_tid</config_path>
1260
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1261
+ <sort_order>14</sort_order>
1262
+ <show_in_default>1</show_in_default>
1263
+ <show_in_website>1</show_in_website>
1264
+ <show_in_store>1</show_in_store>
1265
+ </save_cancelled_tid>
1266
+ <gateway_timeout translate="label">
1267
+ <comment>Gateway Timeout in seconds</comment>
1268
+ <label>Gateway Timeout</label>
1269
+ <frontend_type>text</frontend_type>
1270
+ <config_path>payment/novalnetIdeal/gateway_timeout</config_path>
1271
+ <sort_order>15</sort_order>
1272
+ <show_in_default>1</show_in_default>
1273
+ <show_in_website>1</show_in_website>
1274
+ <show_in_store>1</show_in_store>
1275
+ </gateway_timeout>
1276
+ <allowspecific translate="label">
1277
+ <label>Payment from applicable countries</label>
1278
+ <frontend_type>allowspecific</frontend_type>
1279
+ <config_path>payment/novalnetIdeal/allowspecific</config_path>
1280
+ <sort_order>16</sort_order>
1281
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1282
+ <show_in_default>1</show_in_default>
1283
+ <show_in_website>1</show_in_website>
1284
+ <show_in_store>1</show_in_store>
1285
+ </allowspecific>
1286
+ <specificcountry translate="label">
1287
+ <label>Payment from Specific countries</label>
1288
+ <frontend_type>multiselect</frontend_type>
1289
+ <config_path>payment/novalnetIdeal/specificcountry</config_path>
1290
+ <sort_order>17</sort_order>
1291
+ <source_model>adminhtml/system_config_source_country</source_model>
1292
+ <show_in_default>1</show_in_default>
1293
+ <show_in_website>1</show_in_website>
1294
+ <show_in_store>1</show_in_store>
1295
+ <depends><allowspecific>1</allowspecific></depends>
1296
+ </specificcountry>
1297
+ <min_order_total translate="label">
1298
+ <label>Novalnet Minimum Order Total</label>
1299
+ <frontend_type>text</frontend_type>
1300
+ <config_path>payment/novalnetIdeal/min_order_total</config_path>
1301
+ <sort_order>18</sort_order>
1302
+ <show_in_default>1</show_in_default>
1303
+ <show_in_website>1</show_in_website>
1304
+ <show_in_store>1</show_in_store>
1305
+ </min_order_total>
1306
+ <max_order_total translate="label">
1307
+ <label>Novalnet Maximum Order Total</label>
1308
+ <frontend_type>text</frontend_type>
1309
+ <config_path>payment/novalnetIdeal/max_order_total</config_path>
1310
+ <sort_order>19</sort_order>
1311
+ <show_in_default>1</show_in_default>
1312
+ <show_in_website>1</show_in_website>
1313
+ <show_in_store>1</show_in_store>
1314
+ </max_order_total>
1315
+ <orderscount translate="label">
1316
+ <label>Novalnet Minimum Orders Count</label>
1317
+ <frontend_type>text</frontend_type>
1318
+ <config_path>payment/novalnetIdeal/orderscount</config_path>
1319
+ <sort_order>20</sort_order>
1320
+ <comment>Novalnet Minimum Orders Count Desc</comment>
1321
+ <show_in_default>1</show_in_default>
1322
+ <show_in_website>1</show_in_website>
1323
+ <show_in_store>1</show_in_store>
1324
+ </orderscount>
1325
+ <sort_order translate="label">
1326
+ <label>Novalnet Sort Order</label>
1327
+ <comment>Sort order of display. Lowest is displayed first.</comment>
1328
+ <frontend_type>text</frontend_type>
1329
+ <config_path>payment/novalnetIdeal/sort_order</config_path>
1330
+ <sort_order>21</sort_order>
1331
+ <show_in_default>1</show_in_default>
1332
+ <show_in_website>1</show_in_website>
1333
+ <show_in_store>1</show_in_store>
1334
+ </sort_order>
1335
+ </fields>
1336
+ </novalnetIdeal>
1337
+ <!--}}} Novalnet Ideal-->
1338
+ <!--{{{ Novalnet Phonepayment-->
1339
+ <novalnetPhonepayment translate="label" module="novalnet_payment">
1340
+ <label>Novalnet Phonepayment</label>
1341
+ <sort_order>691</sort_order>
1342
+ <show_in_default>1</show_in_default>
1343
+ <show_in_website>1</show_in_website>
1344
+ <show_in_store>1</show_in_store>
1345
+ <fields>
1346
+ <active translate="label">
1347
+ <label>Enable Novalnet Module</label>
1348
+ <frontend_type>select</frontend_type>
1349
+ <config_path>payment/novalnetPhonepayment/active</config_path>
1350
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1351
+ <sort_order>1</sort_order>
1352
+ <show_in_default>1</show_in_default>
1353
+ <show_in_website>1</show_in_website>
1354
+ <show_in_store>1</show_in_store>
1355
+ </active>
1356
+ <title translate="label">
1357
+ <label>Novalnet Title</label>
1358
+ <frontend_type>text</frontend_type>
1359
+ <config_path>payment/novalnetPhonepayment/title</config_path>
1360
+ <sort_order>2</sort_order>
1361
+ <show_in_default>1</show_in_default>
1362
+ <show_in_website>1</show_in_website>
1363
+ <show_in_store>1</show_in_store>
1364
+ </title>
1365
+ <order_status translate="label">
1366
+ <label>Set order Status</label>
1367
+ <frontend_type>select</frontend_type>
1368
+ <config_path>payment/novalnetPhonepayment/order_status</config_path>
1369
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1370
+ <sort_order>3</sort_order>
1371
+ <show_in_default>1</show_in_default>
1372
+ <show_in_website>1</show_in_website>
1373
+ <show_in_store>1</show_in_store>
1374
+ </order_status>
1375
+ <booking_reference translate="label">
1376
+ <label>Information to the end customer</label>
1377
+ <comment>will appear in the payment form</comment>
1378
+ <frontend_type>text</frontend_type>
1379
+ <config_path>payment/novalnetPhonepayment/booking_reference</config_path>
1380
+ <sort_order>9</sort_order>
1381
+ <show_in_default>1</show_in_default>
1382
+ <show_in_website>1</show_in_website>
1383
+ <show_in_store>1</show_in_store>
1384
+ </booking_reference>
1385
+ <user_group_excluded translate="label">
1386
+ <comment>Excluded User Group Desc</comment>
1387
+ <label>User Group Excluded</label>
1388
+ <frontend_type>text</frontend_type>
1389
+ <config_path>payment/novalnetPhonepayment/user_group_excluded</config_path>
1390
+ <sort_order>10</sort_order>
1391
+ <show_in_default>1</show_in_default>
1392
+ <show_in_website>1</show_in_website>
1393
+ <show_in_store>1</show_in_store>
1394
+ </user_group_excluded>
1395
+ <gateway_timeout translate="label">
1396
+ <comment>Gateway Timeout in seconds</comment>
1397
+ <label>Gateway Timeout</label>
1398
+ <frontend_type>text</frontend_type>
1399
+ <config_path>payment/novalnetPhonepayment/gateway_timeout</config_path>
1400
+ <sort_order>12</sort_order>
1401
+ <show_in_default>1</show_in_default>
1402
+ <show_in_website>1</show_in_website>
1403
+ <show_in_store>1</show_in_store>
1404
+ </gateway_timeout>
1405
+ <allowspecific translate="label">
1406
+ <label>Payment from applicable countries</label>
1407
+ <frontend_type>allowspecific</frontend_type>
1408
+ <config_path>payment/novalnetPhonepayment/allowspecific</config_path>
1409
+ <sort_order>13</sort_order>
1410
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1411
+ <show_in_default>1</show_in_default>
1412
+ <show_in_website>1</show_in_website>
1413
+ <show_in_store>1</show_in_store>
1414
+ </allowspecific>
1415
+ <specificcountry translate="label">
1416
+ <label>Payment from Specific countries</label>
1417
+ <frontend_type>multiselect</frontend_type>
1418
+ <config_path>payment/novalnetPhonepayment/specificcountry</config_path>
1419
+ <sort_order>14</sort_order>
1420
+ <source_model>adminhtml/system_config_source_country</source_model>
1421
+ <show_in_default>1</show_in_default>
1422
+ <show_in_website>1</show_in_website>
1423
+ <show_in_store>1</show_in_store>
1424
+ <depends><allowspecific>1</allowspecific></depends>
1425
+ </specificcountry>
1426
+ <min_order_total translate="label">
1427
+ <label>Novalnet Minimum Order Total</label>
1428
+ <frontend_type>text</frontend_type>
1429
+ <config_path>payment/novalnetPhonepayment/min_order_total</config_path>
1430
+ <sort_order>15</sort_order>
1431
+ <show_in_default>1</show_in_default>
1432
+ <show_in_website>1</show_in_website>
1433
+ <show_in_store>1</show_in_store>
1434
+ </min_order_total>
1435
+ <max_order_total translate="label">
1436
+ <label>Novalnet Maximum Order Total</label>
1437
+ <frontend_type>text</frontend_type>
1438
+ <config_path>payment/novalnetPhonepayment/max_order_total</config_path>
1439
+ <sort_order>16</sort_order>
1440
+ <show_in_default>1</show_in_default>
1441
+ <show_in_website>1</show_in_website>
1442
+ <show_in_store>1</show_in_store>
1443
+ </max_order_total>
1444
+ <orderscount translate="label">
1445
+ <label>Novalnet Minimum Orders Count</label>
1446
+ <frontend_type>text</frontend_type>
1447
+ <config_path>payment/novalnetPhonepayment/orderscount</config_path>
1448
+ <sort_order>17</sort_order>
1449
+ <comment>Novalnet Minimum Orders Count Desc</comment>
1450
+ <show_in_default>1</show_in_default>
1451
+ <show_in_website>1</show_in_website>
1452
+ <show_in_store>1</show_in_store>
1453
+ </orderscount>
1454
+ <sort_order translate="label">
1455
+ <label>Novalnet Sort Order</label>
1456
+ <comment>Sort order of display. Lowest is displayed first.</comment>
1457
+ <frontend_type>text</frontend_type>
1458
+ <config_path>payment/novalnetPhonepayment/sort_order</config_path>
1459
+ <sort_order>18</sort_order>
1460
+ <show_in_default>1</show_in_default>
1461
+ <show_in_website>1</show_in_website>
1462
+ <show_in_store>1</show_in_store>
1463
+ </sort_order>
1464
+ </fields>
1465
+ </novalnetPhonepayment>
1466
+ <!--}}} Novalnet Phonepayment-->
1467
+ <!--{{{ Novalnet Secure-->
1468
+ <novalnetSecure translate="label" module="novalnet_payment">
1469
+ <label>Novalnet Credit Card 3D-Secure</label>
1470
+ <sort_order>681</sort_order>
1471
+ <show_in_default>1</show_in_default>
1472
+ <show_in_website>1</show_in_website>
1473
+ <show_in_store>1</show_in_store>
1474
+ <fields>
1475
+ <active translate="label">
1476
+ <label>Enable Novalnet Module</label>
1477
+ <frontend_type>select</frontend_type>
1478
+ <config_path>payment/novalnetSecure/active</config_path>
1479
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1480
+ <sort_order>1</sort_order>
1481
+ <show_in_default>1</show_in_default>
1482
+ <show_in_website>1</show_in_website>
1483
+ <show_in_store>1</show_in_store>
1484
+ </active>
1485
+ <title translate="label">
1486
+ <label>Novalnet Title</label>
1487
+ <frontend_type>text</frontend_type>
1488
+ <config_path>payment/novalnetSecure/title</config_path>
1489
+ <sort_order>2</sort_order>
1490
+ <show_in_default>1</show_in_default>
1491
+ <show_in_website>1</show_in_website>
1492
+ <show_in_store>1</show_in_store>
1493
+ </title>
1494
+ <order_status translate="label">
1495
+ <label>Order Status Before Payment</label>
1496
+ <frontend_type>select</frontend_type>
1497
+ <config_path>payment/novalnetSecure/order_status</config_path>
1498
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1499
+ <sort_order>3</sort_order>
1500
+ <show_in_default>1</show_in_default>
1501
+ <show_in_website>1</show_in_website>
1502
+ <show_in_store>1</show_in_store>
1503
+ </order_status>
1504
+ <order_status_after_payment translate="label">
1505
+ <label>Order Status After Successful Payment</label>
1506
+ <frontend_type>select</frontend_type>
1507
+ <config_path>payment/novalnetSecure/order_status_after_payment</config_path>
1508
+ <source_model>adminhtml/system_config_source_order_status</source_model>
1509
+ <sort_order>4</sort_order>
1510
+ <show_in_default>1</show_in_default>
1511
+ <show_in_website>1</show_in_website>
1512
+ <show_in_store>1</show_in_store>
1513
+ </order_status_after_payment>
1514
+ <cctypes translate="label">
1515
+ <label>Credit Card Types</label>
1516
+ <frontend_type>multiselect</frontend_type>
1517
+ <config_path>payment/novalnetSecure/cctypes</config_path>
1518
+ <source_model>novalnet_payment/novalnet_source_cctype</source_model>
1519
+ <sort_order>5</sort_order>
1520
+ <show_in_default>1</show_in_default>
1521
+ <show_in_website>1</show_in_website>
1522
+ <show_in_store>1</show_in_store>
1523
+ </cctypes>
1524
+ <manual_checking_amount tranlate="label" >
1525
+ <label>Manual checking amount in cents</label>
1526
+ <comment>Please enter the amount in cents</comment>
1527
+ <frontend_type>text</frontend_type>
1528
+ <config_path>payment/novalnetSecure/manual_checking_amount</config_path>
1529
+ <sort_order>10</sort_order>
1530
+ <show_in_default>1</show_in_default>
1531
+ <show_in_website>1</show_in_website>
1532
+ <show_in_store>1</show_in_store>
1533
+ </manual_checking_amount>
1534
+ <second_product_id translate="label">
1535
+ <label>Second Novalnet Product ID</label>
1536
+ <comment>for the manual checking</comment>
1537
+ <frontend_type>text</frontend_type>
1538
+ <config_path>payment/novalnetSecure/second_product_id</config_path>
1539
+ <sort_order>11</sort_order>
1540
+ <show_in_default>1</show_in_default>
1541
+ <show_in_website>1</show_in_website>
1542
+ <show_in_store>1</show_in_store>
1543
+ </second_product_id>
1544
+ <second_tariff_id translate="label">
1545
+ <label>Second Novalnet Tariff Id</label>
1546
+ <comment>for the manual checking</comment>
1547
+ <frontend_type>text</frontend_type>
1548
+ <config_path>payment/novalnetSecure/second_tariff_id</config_path>
1549
+ <sort_order>12</sort_order>
1550
+ <show_in_default>1</show_in_default>
1551
+ <show_in_website>1</show_in_website>
1552
+ <show_in_store>1</show_in_store>
1553
+ </second_tariff_id>
1554
+ <booking_reference translate="label">
1555
+ <label>Information to the end customer</label>
1556
+ <comment>will appear in the payment form</comment>
1557
+ <frontend_type>text</frontend_type>
1558
+ <config_path>payment/novalnetSecure/booking_reference</config_path>
1559
+ <sort_order>13</sort_order>
1560
+ <show_in_default>1</show_in_default>
1561
+ <show_in_website>1</show_in_website>
1562
+ <show_in_store>1</show_in_store>
1563
+ </booking_reference>
1564
+ <user_group_excluded translate="label">
1565
+ <comment>Excluded User Group Desc</comment>
1566
+ <label>User Group Excluded</label>
1567
+ <frontend_type>text</frontend_type>
1568
+ <config_path>payment/novalnetSecure/user_group_excluded</config_path>
1569
+ <sort_order>14</sort_order>
1570
+ <show_in_default>1</show_in_default>
1571
+ <show_in_website>1</show_in_website>
1572
+ <show_in_store>1</show_in_store>
1573
+ </user_group_excluded>
1574
+ <save_cancelled_tid translate="label">
1575
+ <label>Display Novalnet Transaction ID for Cancelled Order</label>
1576
+ <frontend_type>select</frontend_type>
1577
+ <config_path>payment/novalnetSecure/save_cancelled_tid</config_path>
1578
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1579
+ <sort_order>16</sort_order>
1580
+ <show_in_default>1</show_in_default>
1581
+ <show_in_website>1</show_in_website>
1582
+ <show_in_store>1</show_in_store>
1583
+ </save_cancelled_tid>
1584
+ <gateway_timeout translate="label">
1585
+ <comment>Gateway Timeout in seconds</comment>
1586
+ <label>Gateway Timeout</label>
1587
+ <frontend_type>text</frontend_type>
1588
+ <config_path>payment/novalnetSecure/gateway_timeout</config_path>
1589
+ <sort_order>17</sort_order>
1590
+ <show_in_default>1</show_in_default>
1591
+ <show_in_website>1</show_in_website>
1592
+ <show_in_store>1</show_in_store>
1593
+ </gateway_timeout>
1594
+ <allowspecific translate="label">
1595
+ <label>Payment from applicable countries</label>
1596
+ <frontend_type>allowspecific</frontend_type>
1597
+ <config_path>payment/novalnetSecure/allowspecific</config_path>
1598
+ <sort_order>18</sort_order>
1599
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1600
+ <show_in_default>1</show_in_default>
1601
+ <show_in_website>1</show_in_website>
1602
+ <show_in_store>1</show_in_store>
1603
+ </allowspecific>
1604
+ <specificcountry translate="label">
1605
+ <label>Payment from Specific countries</label>
1606
+ <frontend_type>multiselect</frontend_type>
1607
+ <config_path>payment/novalnetSecure/specificcountry</config_path>
1608
+ <sort_order>19</sort_order>
1609
+ <source_model>adminhtml/system_config_source_country</source_model>
1610
+ <show_in_default>1</show_in_default>
1611
+ <show_in_website>1</show_in_website>
1612
+ <show_in_store>1</show_in_store>
1613
+ <depends><allowspecific>1</allowspecific></depends>
1614
+ </specificcountry>
1615
+ <min_order_total translate="label">
1616
+ <label>Novalnet Minimum Order Total</label>
1617
+ <frontend_type>text</frontend_type>
1618
+ <config_path>payment/novalnetSecure/min_order_total</config_path>
1619
+ <sort_order>20</sort_order>
1620
+ <show_in_default>1</show_in_default>
1621
+ <show_in_website>1</show_in_website>
1622
+ <show_in_store>1</show_in_store>
1623
+ </min_order_total>
1624
+ <max_order_total translate="label">
1625
+ <label>Novalnet Maximum Order Total</label>
1626
+ <frontend_type>text</frontend_type>
1627
+ <config_path>payment/novalnetSecure/max_order_total</config_path>
1628
+ <sort_order>21</sort_order>
1629
+ <show_in_default>1</show_in_default>
1630
+ <show_in_website>1</show_in_website>
1631
+ <show_in_store>1</show_in_store>
1632
+ </max_order_total>
1633
+ <orderscount translate="label">
1634
+ <label>Novalnet Minimum Orders Count</label>
1635
+ <frontend_type>text</frontend_type>
1636
+ <config_path>payment/novalnetSecure/orderscount</config_path>
1637
+ <sort_order>22</sort_order>
1638
+ <comment>Novalnet Minimum Orders Count Desc</comment>
1639
+ <show_in_default>1</show_in_default>
1640
+ <show_in_website>1</show_in_website>
1641
+ <show_in_store>1</show_in_store>
1642
+ </orderscount>
1643
+ <sort_order translate="label">
1644
+ <label>Novalnet Sort Order</label>
1645
+ <comment>Sort order of display. Lowest is displayed first.</comment>
1646
+ <frontend_type>text</frontend_type>
1647
+ <config_path>payment/novalnetSecure/sort_order</config_path>
1648
+ <sort_order>23</sort_order>
1649
+ <show_in_default>1</show_in_default>
1650
+ <show_in_website>1</show_in_website>
1651
+ <show_in_store>1</show_in_store>
1652
+ </sort_order>
1653
+ </fields>
1654
+ </novalnetSecure>
1655
+ <!--}}} Novalnet Secure-->
1656
+ </groups>
1657
+ </novalnet_paymethods>
1658
+ <!-- novalnet paymethods -->
1659
+
1660
+ <!-- Fraud prevention -->
1661
+ <fraud_prevent translate="label" module="novalnet_payment">
1662
+ <label>Risk and Control</label>
1663
+ <tab>novalnet</tab>
1664
+ <frontend_type>text</frontend_type>
1665
+ <sort_order>30</sort_order>
1666
+ <show_in_default>1</show_in_default>
1667
+ <show_in_website>1</show_in_website>
1668
+ <show_in_store>1</show_in_store>
1669
+ <groups>
1670
+ <novalnetCc translate="label" module="novalnet_payment">
1671
+ <label>Novalnet Credit Card</label>
1672
+ <comment>Enable the payment Method and activate the Risk and Control option</comment>
1673
+ <frontend_type>text</frontend_type>
1674
+ <sort_order>10</sort_order>
1675
+ <show_in_default>1</show_in_default>
1676
+ <show_in_website>1</show_in_website>
1677
+ <show_in_store>1</show_in_store>
1678
+ <fields>
1679
+ <callback translate="label">
1680
+ <comment>PIN by Callback/SMS/E-Mail Desc</comment>
1681
+ <label>PIN by Callback/SMS/E-Mail</label>
1682
+ <frontend_type>select</frontend_type>
1683
+ <config_path>payment/novalnetCc/callback</config_path>
1684
+ <source_model>novalnet_payment/novalnet_source_callbacktypes</source_model>
1685
+ <sort_order>13</sort_order>
1686
+ <show_in_default>1</show_in_default>
1687
+ <show_in_website>1</show_in_website>
1688
+ <show_in_store>1</show_in_store>
1689
+ </callback>
1690
+ <callback_minimum_amount>
1691
+ <label>Minimum Amount For Callback (in cents)</label>
1692
+ <frontend_type>text</frontend_type>
1693
+ <config_path>payment/novalnetCc/callback_minimum_amount</config_path>
1694
+ <sort_order>14</sort_order>
1695
+ <show_in_default>1</show_in_default>
1696
+ <show_in_website>1</show_in_website>
1697
+ <show_in_store>1</show_in_store>
1698
+ </callback_minimum_amount>
1699
+ </fields>
1700
+ </novalnetCc>
1701
+ <novalnetElvaustria translate="label" module="novalnet_payment">
1702
+ <label>Novalnet Direct Debit Austria</label>
1703
+ <comment>Enable the payment Method and activate the Risk and Control option</comment>
1704
+ <frontend_type>text</frontend_type>
1705
+ <sort_order>10</sort_order>
1706
+ <show_in_default>1</show_in_default>
1707
+ <show_in_website>1</show_in_website>
1708
+ <show_in_store>1</show_in_store>
1709
+ <fields>
1710
+ <callback translate="label">
1711
+ <comment>PIN by Callback/SMS/E-Mail Desc</comment>
1712
+ <label>PIN by Callback/SMS/E-Mail</label>
1713
+ <frontend_type>select</frontend_type>
1714
+ <config_path>payment/novalnetElvaustria/callback</config_path>
1715
+ <source_model>novalnet_payment/novalnet_source_callbacktypes</source_model>
1716
+ <sort_order>13</sort_order>
1717
+ <show_in_default>1</show_in_default>
1718
+ <show_in_website>1</show_in_website>
1719
+ <show_in_store>1</show_in_store>
1720
+ </callback>
1721
+ <callback_minimum_amount>
1722
+ <label>Minimum Amount For Callback (in cents)</label>
1723
+ <frontend_type>text</frontend_type>
1724
+ <config_path>payment/novalnetElvaustria/callback_minimum_amount</config_path>
1725
+ <sort_order>14</sort_order>
1726
+ <show_in_default>1</show_in_default>
1727
+ <show_in_website>1</show_in_website>
1728
+ <show_in_store>1</show_in_store>
1729
+ </callback_minimum_amount>
1730
+ </fields>
1731
+ </novalnetElvaustria>
1732
+ <novalnetElvgerman translate="label" module="novalnet_payment">
1733
+ <label>Novalnet Direct Debit German</label>
1734
+ <comment>Enable the payment Method and activate the Risk and Control option</comment>
1735
+ <frontend_type>text</frontend_type>
1736
+ <sort_order>10</sort_order>
1737
+ <show_in_default>1</show_in_default>
1738
+ <show_in_website>1</show_in_website>
1739
+ <show_in_store>1</show_in_store>
1740
+ <fields>
1741
+ <callback translate="label">
1742
+ <comment>PIN by Callback/SMS/E-Mail Desc</comment>
1743
+ <label>PIN by Callback/SMS/E-Mail</label>
1744
+ <frontend_type>select</frontend_type>
1745
+ <config_path>payment/novalnetElvgerman/callback</config_path>
1746
+ <source_model>novalnet_payment/novalnet_source_callbacktypes</source_model>
1747
+ <sort_order>13</sort_order>
1748
+ <show_in_default>1</show_in_default>
1749
+ <show_in_website>1</show_in_website>
1750
+ <show_in_store>1</show_in_store>
1751
+ </callback>
1752
+ <callback_minimum_amount>
1753
+ <label>Minimum Amount For Callback (in cents)</label>
1754
+ <frontend_type>text</frontend_type>
1755
+ <config_path>payment/novalnetElvgerman/callback_minimum_amount</config_path>
1756
+ <sort_order>14</sort_order>
1757
+ <show_in_default>1</show_in_default>
1758
+ <show_in_website>1</show_in_website>
1759
+ <show_in_store>1</show_in_store>
1760
+ </callback_minimum_amount>
1761
+
1762
+ </fields>
1763
+ </novalnetElvgerman>
1764
+ <novalnetInvoice translate="label" module="novalnet_payment">
1765
+ <label>Novalnet Invoice</label>
1766
+ <comment>Enable the payment Method and activate the Risk and Control option</comment>
1767
+ <frontend_type>text</frontend_type>
1768
+ <sort_order>10</sort_order>
1769
+ <show_in_default>1</show_in_default>
1770
+ <show_in_website>1</show_in_website>
1771
+ <show_in_store>1</show_in_store>
1772
+ <fields>
1773
+ <callback translate="label">
1774
+ <comment>PIN by Callback/SMS/E-Mail Desc</comment>
1775
+ <label>PIN by Callback/SMS/E-Mail</label>
1776
+ <frontend_type>select</frontend_type>
1777
+ <config_path>payment/novalnetInvoice/callback</config_path>
1778
+ <source_model>novalnet_payment/novalnet_source_callbacktypes</source_model>
1779
+ <sort_order>13</sort_order>
1780
+ <show_in_default>1</show_in_default>
1781
+ <show_in_website>1</show_in_website>
1782
+ <show_in_store>1</show_in_store>
1783
+ </callback>
1784
+ <callback_minimum_amount>
1785
+ <label>Minimum Amount For Callback (in cents)</label>
1786
+ <frontend_type>text</frontend_type>
1787
+ <config_path>payment/novalnetInvoice/callback_minimum_amount</config_path>
1788
+ <sort_order>14</sort_order>
1789
+ <show_in_default>1</show_in_default>
1790
+ <show_in_website>1</show_in_website>
1791
+ <show_in_store>1</show_in_store>
1792
+ </callback_minimum_amount>
1793
+
1794
+ </fields>
1795
+ </novalnetInvoice>
1796
+ </groups>
1797
+ </fraud_prevent>
1798
+ <!-- Fraud prevention -->
1799
+ </sections>
1800
+ </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Payment/sql/novalnet_setup/install.sql ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DROP TABLE IF EXISTS `{{novalnet_order_log}}` ;
2
+ CREATE TABLE `{{novalnet_order_log}}` (
3
+ `nn_log_id` int(11) UNSIGNED NOT NULL auto_increment,
4
+ `request_data` TEXT NOT NULL DEFAULT '',
5
+ `response_data` TEXT NOT NULL DEFAULT '',
6
+ `order_id` VARCHAR(50) NOT NULL DEFAULT '',
7
+ `customer_id` int(11) NOT NULL,
8
+ `status` VARCHAR(20) NOT NULL DEFAULT '',
9
+ `failed_reason` TEXT NOT NULL DEFAULT '',
10
+ `store_id` int(11) UNSIGNED NOT NULL,
11
+ `shop_url` VARCHAR(255) NOT NULL DEFAULT '',
12
+ `transaction_id` VARCHAR(50) NOT NULL,
13
+ `additional_data` TEXT NOT NULL DEFAULT '',
14
+ `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
15
+ PRIMARY KEY (`nn_log_id`)
16
+ ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;
17
+
18
+
19
+ DROP TABLE IF EXISTS `{{novalnet_transaction_status}}` ;
20
+ CREATE TABLE `{{novalnet_transaction_status}}` (
21
+ `nn_txn_id` int(11) UNSIGNED NOT NULL auto_increment,
22
+ `transaction_no` VARCHAR(50) NOT NULL,
23
+ `order_id` VARCHAR(50) NOT NULL DEFAULT '',
24
+ `transaction_status` VARCHAR(20) NOT NULL DEFAULT 0,
25
+ `nc_no` VARCHAR(11) NOT NULL,
26
+ `customer_id` int(11) NOT NULL,
27
+ `payment_name` VARCHAR(50) NOT NULL DEFAULT '',
28
+ `amount` decimal(12,4) NOT NULL,
29
+ `remote_ip` VARCHAR(20) NOT NULL,
30
+ `store_id` int(11) UNSIGNED NOT NULL,
31
+ `shop_url` VARCHAR(255) NOT NULL DEFAULT '',
32
+ `additional_data` TEXT NOT NULL DEFAULT '',
33
+ `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
34
+ PRIMARY KEY (`nn_txn_id`)
35
+ ) ENGINE = INNODB CHARACTER SET utf8 COLLATE utf8_unicode_ci;
app/code/community/Novalnet/Payment/sql/novalnet_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** novalnet tables */
4
+ $tableOrderLog = $this->getTable('novalnet_payment/order_log');
5
+ $tableTransactionStatus = $this->getTable('novalnet_payment/transaction_status');
6
+
7
+ $installer = $this;
8
+ $installer->startSetup();
9
+ $helper = Mage::helper('novalnet_payment');
10
+
11
+ $magentoVersion = Mage::getVersion();
12
+
13
+ $useOldVersion = false;
14
+ if (version_compare($magentoVersion, '1.6', '<'))
15
+ $useOldVersion = true;
16
+
17
+ if ($useOldVersion) {
18
+
19
+ $datetime = 'datetime';
20
+ $sql = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'install.sql');
21
+
22
+ $installSqlConfig = array(
23
+ '{{novalnet_order_log}}' => $tableOrderLog,
24
+ '{{novalnet_transaction_status}}' => $tableTransactionStatus
25
+ );
26
+
27
+ $installSql = str_replace(array_keys($installSqlConfig), array_values($installSqlConfig), $sql);
28
+ $installer->run($installSql);
29
+ } else {
30
+ $connection = $installer->getConnection();
31
+ $table = $connection->newTable($tableOrderLog);
32
+
33
+ $table->addColumn('nn_log_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
34
+ 'unsigned' => true,
35
+ 'nullable' => false,
36
+ 'primary' => true,
37
+ 'identity' => true,
38
+ 'auto_increment' => true)
39
+ );
40
+ $table->addColumn('request_data', Varien_Db_Ddl_Table::TYPE_TEXT, NULL, array(
41
+ 'nullable' => false)
42
+ );
43
+ $table->addColumn('response_data', Varien_Db_Ddl_Table::TYPE_TEXT, NULL, array(
44
+ 'nullable' => false)
45
+ );
46
+ $table->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50, array(
47
+ 'unsigned' => false,
48
+ 'nullable' => false)
49
+ );
50
+ $table->addColumn('customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
51
+ 'unsigned' => true,
52
+ 'nullable' => false)
53
+ );
54
+ $table->addColumn('status', Varien_Db_Ddl_Table::TYPE_VARCHAR, 20, array('nullable' => false)
55
+ );
56
+ $table->addColumn('failed_reason', Varien_Db_Ddl_Table::TYPE_TEXT, NULL, array(
57
+ 'unsigned' => true,
58
+ 'nullable' => false)
59
+ );
60
+ $table->addColumn('store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
61
+ 'unsigned' => true,
62
+ 'nullable' => false)
63
+ );
64
+ $table->addColumn('shop_url', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array('nullable' => false)
65
+ );
66
+ $table->addColumn('transaction_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50, array('nullable' => false)
67
+ );
68
+ $table->addColumn('additional_data', Varien_Db_Ddl_Table::TYPE_TEXT, NULL, array(
69
+ 'unsigned' => true,
70
+ 'nullable' => false)
71
+ );
72
+ $table->addColumn('created_date', Varien_Db_Ddl_Table::TYPE_DATETIME, NULL, array(
73
+ 'unsigned' => true,
74
+ 'nullable' => false)
75
+ );
76
+
77
+ //Set Engine to MyISAM
78
+ $table->setOption('type', 'MyISAM');
79
+
80
+ // Create table 'novalnet_order_log'
81
+ $connection->createTable($table);
82
+
83
+ // Create table 'novalnet_transaction_status'
84
+ $table = $connection->newTable($tableTransactionStatus);
85
+
86
+ $table->addColumn('nn_txn_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
87
+ 'unsigned' => true,
88
+ 'nullable' => false,
89
+ 'primary' => true,
90
+ 'identity' => true,
91
+ 'auto_increment' => true)
92
+ );
93
+ $table->addColumn('transaction_no', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50, array(
94
+ 'nullable' => false)
95
+ );
96
+ $table->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50, array(
97
+ 'unsigned' => false,
98
+ 'nullable' => false)
99
+ );
100
+ $table->addColumn('transaction_status', Varien_Db_Ddl_Table::TYPE_VARCHAR, 20, array(
101
+ 'unsigned' => true,
102
+ 'nullable' => false)
103
+ );
104
+ $table->addColumn('nc_no', Varien_Db_Ddl_Table::TYPE_VARCHAR, 10, array(
105
+ 'unsigned' => true,
106
+ 'nullable' => false)
107
+ );
108
+ $table->addColumn('customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
109
+ 'unsigned' => true,
110
+ 'nullable' => false)
111
+ );
112
+ $table->addColumn('payment_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50, array(
113
+ 'unsigned' => true,
114
+ 'nullable' => false)
115
+ );
116
+ $table->addColumn('amount', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array(
117
+ 'unsigned' => true,
118
+ 'nullable' => false)
119
+ );
120
+ $table->addColumn('remote_ip', Varien_Db_Ddl_Table::TYPE_VARCHAR, 20, array(
121
+ 'unsigned' => true,
122
+ 'nullable' => false)
123
+ );
124
+ $table->addColumn('store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL, array(
125
+ 'unsigned' => true,
126
+ 'nullable' => false)
127
+ );
128
+ $table->addColumn('shop_url', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
129
+ 'unsigned' => true,
130
+ 'nullable' => false)
131
+ );
132
+ $table->addColumn('additional_data', Varien_Db_Ddl_Table::TYPE_TEXT, NULL, array(
133
+ 'unsigned' => true,
134
+ 'nullable' => false)
135
+ );
136
+ $table->addColumn('created_date', Varien_Db_Ddl_Table::TYPE_DATETIME, NULL, array(
137
+ 'unsigned' => true,
138
+ 'nullable' => false)
139
+ );
140
+ //Set Engine to InnoDB
141
+ $table->setOption('type', 'InnoDB');
142
+ // Create table 'novalnet_transaction_status'
143
+ $connection->createTable($table);
144
+ }
145
+
146
+ $installer->endSetup();
app/code/community/Novalnet/Sofortueberweisung/Block/Form/Sofortueberweisung.php DELETED
@@ -1,44 +0,0 @@
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('novalnetsofortueberweisung/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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Block/Info/Sofortueberweisung.php DELETED
@@ -1,69 +0,0 @@
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('novalnetsofortueberweisung/info/sofortueberweisung.phtml');
11
- }
12
-
13
- /**
14
- * Retrieve info model
15
- *
16
- * @return Mage_Sofortueberweisung_Model_Info
17
- */
18
- public function getInfo()
19
- {
20
- if (!$this->_localInfo) {
21
- $this->_localInfo = $this->getData('info');
22
- $this->loadNovalnetData();
23
- if($this->getNnTestorder())
24
- $this->_localInfo->setNnTestorder($this->getNnTestorder());
25
- }
26
- if (!($this->_localInfo instanceof Mage_Payment_Model_Info)) {
27
- Mage::throwException($this->__('Can not retrieve payment info model object.'));
28
- }
29
- return $this->_localInfo;
30
- }
31
-
32
- /**
33
- * Retrieve payment method model
34
- *
35
- * @return Mage_Payment_Model_Method_Abstract
36
- */
37
- public function getMethod()
38
- {
39
- return $this->getInfo()->getMethodInstance();
40
- }
41
-
42
- public function toPdf()
43
- {
44
- $this->setTemplate('novalnetsofortueberweisung/info/pdf/sofortueberweisung.phtml');
45
- return $this->toHtml();
46
- }
47
- public function loadNovalnetData() {
48
- $order_id = $this->getRequest()->getParam('order_id');
49
- $obj = NULL;
50
- if( $order_id ) {
51
- $objOrder = Mage::getModel('sales/order')->load($order_id);
52
- $objQuote = Mage::getModel( 'sales/quote' );
53
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())
54
- ->load($objOrder->getQuoteId())
55
- ->getPayment();
56
- }else if( $this->getRequest()->getParam('invoice_id') ) {
57
- $invoice_id = $this->getRequest()->getParam('invoice_id') ;
58
- $invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
59
- $objOrder = $invoice->getOrder();
60
- $objQuote = Mage::getModel( 'sales/quote' );
61
- $obj = $objQuotePayment = $objQuote->setStoreId($objOrder->getStoreId())->load($objOrder->getQuoteId())->getPayment();
62
- }else {
63
- $obj = $this->_localInfo;
64
- }
65
- $this->setNnTestorder($obj->getNnTestorder());
66
- $this->setNnComments($obj->getNnComments());
67
- return $this;
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Block/Sofortueberweisung.php DELETED
@@ -1,33 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Helper/Data.php DELETED
@@ -1,326 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Order.php DELETED
@@ -1,25 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Convert/Quote.php DELETED
@@ -1,26 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Data/Form/Element/Link.php DELETED
@@ -1,19 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Setup.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- class Novalnet_Sofortueberweisung_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
3
- {
4
-
5
- }
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung.php DELETED
@@ -1,10 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Mysql4/Sofortueberweisung/Collection.php DELETED
@@ -1,10 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/Model/Sofortueberweisung.php DELETED
@@ -1,353 +0,0 @@
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
- if(!trim($this->getConfigData('merchant_id')) || !trim($this->getConfigData('auth_code')) || !trim($this->getConfigData('product_id')) || !trim($this->getConfigData('tariff_id')) || !trim($this->getConfigData('password'))) {
89
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing').'!');
90
- }
91
- //Customer_id verification
92
- try{
93
- $login_check = Mage::getSingleton('customer/session')->isLoggedIn();
94
- if($login_check){
95
- $customer_no = Mage::getSingleton('customer/session')->getCustomer()->getId();
96
- if (empty($customer_no)){
97
- $customer_no = $_SESSION['core']['visitor_data']['customer_id'];
98
- }
99
- if($customer_no==""){
100
- Mage::log(Mage::getSingleton('customer/session')->getCustomer(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
101
- Mage::log("Below are Order Details : ",NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
102
- $order = Mage::getModel('checkout/cart')->getQuote()->getData();
103
- Mage::log($order,NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
104
- Mage::throwException(Mage::helper('novalnet')->__('Basic Parameter Missing. Please contact Shop Admin').'!');
105
- }
106
- }
107
- }catch(Exception $e){
108
- Mage::log($e->getMessage(),NULL,"Customerid_Missing_".Mage::getModel('core/date')->date('d-m-Y h:i:s').".log");
109
- }
110
- return $this;
111
- }
112
-
113
- public function isAvailable($quote = null) {
114
- $minOrderCount = trim($this->getConfigData('orderscount'));
115
- $customerId = Mage::getSingleton('customer/session')->getCustomerId();
116
-
117
- // Load orders and check
118
- $orders = Mage::getResourceModel('sales/order_collection')
119
- ->addAttributeToSelect('*')
120
- ->addAttributeToFilter('customer_id', $customerId)
121
- ->load();
122
- if (count($orders) < $minOrderCount) {
123
- return false;
124
- }
125
- return parent::isAvailable();
126
- }
127
-
128
- public function getFormFields()
129
- {
130
- $billing = $this->getOrder()->getBillingAddress();
131
- $security = $this->getSecurityKey();
132
-
133
- $this->getOrder()->getPayment()->setSuSecurity($security)->save();
134
-
135
- $pnSu = Mage::helper('sofortueberweisung');
136
- $pnSu->classSofortueberweisung($this->getConfigData('project_pswd'));
137
-
138
- $order = $this->getOrder();
139
-
140
- $payment = $this->getOrder()->getPayment();
141
- $this->password = trim($this->getConfigData('password'));
142
- $_SESSION['mima'] = $this->password;#todo: ?????
143
- $session = Mage::getSingleton('checkout/session');
144
- $paymentInfo = $this->getInfoInstance();
145
-
146
- $fieldsArr = array();
147
- $note = $order->getCustomerNote();
148
- if ($note){
149
- $note = '<br />'.Mage::helper('sofortueberweisung')->__('Comment').': '.$note;
150
- }
151
- if ( !$this->getConfigData('live_mode') ){
152
- $note .= '<br /><b><font color="red">'.strtoupper(Mage::helper('sofortueberweisung')->__('Testorder')).'</font></b>';
153
- }
154
- $order->setComment($note);
155
- $order->setCustomerNote($note);
156
- $order->setCustomerNoteNotify(true);
157
-
158
- $fieldsArr['key'] = self::KEY;
159
- $fieldsArr['vendor'] = trim($this->getConfigData('merchant_id'));
160
- $fieldsArr['auth_code'] = $this->encode(trim($this->getConfigData('auth_code')), $this->password);
161
- $fieldsArr['product'] = $this->encode(trim($this->getConfigData('product_id')), $this->password);
162
- $fieldsArr['tariff'] = $this->encode(trim($this->getConfigData('tariff_id')), $this->password);
163
- $fieldsArr['amount'] = $this->encode( ( round($order->getBaseGrandTotal(), 2) * 100), $this->password);
164
- $fieldsArr['test_mode'] = $this->encode((!$this->getConfigData('live_mode'))? 1: 0, $this->password);
165
- $fieldsArr['uniqid'] = $this->encode(uniqid(), $this->password);
166
-
167
- $hParams['auth_code'] = $fieldsArr['auth_code'];
168
- $hParams['product_id']= $fieldsArr['product'];
169
- $hParams['tariff'] = $fieldsArr['tariff'];
170
- $hParams['amount'] = $fieldsArr['amount'];
171
- $hParams['test_mode'] = $fieldsArr['test_mode'];
172
- $hParams['uniqid'] = $fieldsArr['uniqid'];
173
-
174
- $fieldsArr['hash'] = $this->hash($hParams, $this->password);
175
- $fieldsArr['currency'] = $order->getOrderCurrencyCode();
176
- $fieldsArr['customer_no']= Mage::getSingleton('customer/session')->getCustomerId();
177
- $fieldsArr['use_utf8'] = '1';
178
- $fieldsArr['first_name'] = $billing->getFirstname();
179
- $fieldsArr['last_name'] = $billing->getLastname();
180
- $fieldsArr['email'] = $this->getOrder()->getCustomerEmail();
181
- $fieldsArr['street'] = $billing->getStreet(1);
182
- $fieldsArr['search_in_street'] = 1;
183
- $fieldsArr['city'] = $billing->getCity();
184
- $fieldsArr['zip'] = $billing->getPostcode();
185
- $fieldsArr['country_code'] = $billing->getCountry();
186
- $fieldsArr['country'] = $billing->getCountry();
187
- $fieldsArr['lang'] = strtoupper(substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2));
188
- $fieldsArr['remote_ip'] = $this->getRealIpAddr();
189
- $fieldsArr['tel'] = $billing->getTelephone();
190
- $fieldsArr['fax'] = $billing->getFax();
191
- $fieldsArr['session'] = session_id();
192
- $fieldsArr['return_url'] = Mage::getUrl('sofortueberweisung/sofortueberweisung/return', array('_instantbanktransfer' => true));
193
- $fieldsArr['return_method'] = 'POST';
194
- $fieldsArr['error_return_url'] = Mage::getUrl('sofortueberweisung/sofortueberweisung/error', array('_instantbanktransfer' => true));
195
- $fieldsArr['error_return_method'] = 'POST';
196
- $fieldsArr['input1'] = 'order_id';
197
- $fieldsArr['order_no'] = $paymentInfo->getOrder()->getRealOrderId();
198
- $fieldsArr['inputval1'] = $paymentInfo->getOrder()->getRealOrderId();
199
- $fieldsArr['user_variable_0'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
200
-
201
- $request = '';
202
- foreach ($fieldsArr as $k => $v) {
203
-
204
- $request .= '<' . $k . '>' . $v . '</' . $k . '>';
205
- }
206
- return $fieldsArr;
207
- }
208
-
209
- /**
210
- * Get quote
211
- * @return Mage_Sales_Model_Order
212
- */
213
- public function getQuote()
214
- {
215
- if (empty($this->_quote)) {
216
- $this->_quote = $this->getCheckout()->getQuote();
217
- }
218
- return $this->_quote;
219
- }
220
-
221
- /**
222
- * Get checkout
223
- * @return Mage_Sales_Model_Order
224
- */
225
- public function getCheckout()
226
- {
227
- if (empty($this->_checkout)) {
228
- $this->_checkout = Mage::getSingleton('checkout/session');
229
- }
230
- return $this->_checkout;
231
- }
232
-
233
- /**
234
- * Get order model
235
- * @return Mage_Sales_Model_Order
236
- */
237
- public function getOrder()
238
- {
239
- if (!$this->_order) {
240
- $paymentInfo = $this->getInfoInstance();
241
- $this->_order = Mage::getModel('sales/order')
242
- ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
243
- }
244
- return $this->_order;
245
- }
246
- public function isPublicIP($value)
247
- {
248
- if(!$value || count(explode('.',$value))!=4)
249
- {
250
- return false;
251
- }
252
- return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
253
- }
254
- public function getRealIpAddr()
255
- {
256
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
257
- {
258
- return $_SERVER['HTTP_X_FORWARDED_FOR'];
259
- }
260
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
261
- {
262
- if($this->isPublicIP($iplist[0])) return $iplist[0];
263
- }
264
- if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
265
- {
266
- return $_SERVER['HTTP_CLIENT_IP'];
267
- }
268
- if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
269
- {
270
- return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
271
- }
272
- if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
273
- {
274
- return $_SERVER['HTTP_FORWARDED_FOR'];
275
- }
276
- return $_SERVER['REMOTE_ADDR'];
277
- }
278
-
279
- private function debug2($object, $filename, $debug = false)
280
- {
281
- if (!$this->debug and !$debug){return;}
282
- $fh = fopen("/tmp/$filename", 'a+');
283
- if (gettype($object) == 'object' or gettype($object) == 'array'){
284
- fwrite($fh, serialize($object));
285
- }else{
286
- fwrite($fh, date('H:i:s').' '.$object);
287
- }
288
- fwrite($fh, "<hr />\n");
289
- fclose($fh);
290
- }
291
- function encode($data, $key)
292
- {
293
- $data = trim($data);
294
- if ($data == '') return'Error: no data';
295
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
296
-
297
- try {
298
- $crc = sprintf('%u', crc32($data));# %u is a must for ccrc32 returns a signed value
299
- $data = $crc."|".$data;
300
- $data = bin2hex($data.$key);
301
- $data = strrev(base64_encode($data));
302
- }catch (Exception $e){
303
- echo('Error: '.$e);
304
- }
305
- return $data;
306
- }
307
- function decode($data, $key)
308
- {
309
- $data = trim($data);
310
- if ($data == '') {return'Error: no data';}
311
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
312
-
313
- try {
314
- $data = base64_decode(strrev($data));
315
- $data = pack("H".strlen($data), $data);
316
- $data = substr($data, 0, stripos($data, $key));
317
- $pos = strpos($data, "|");
318
- if ($pos === false){
319
- return("Error: CKSum not found!");
320
- }
321
- $crc = substr($data, 0, $pos);
322
- $value = trim(substr($data, $pos+1));
323
- if ($crc != sprintf('%u', crc32($value))){
324
- return("Error; CKSum invalid!");
325
- }
326
- return $value;
327
- }catch (Exception $e){
328
- echo('Error: '.$e);
329
- }
330
- }
331
- function hash($h, $key)#$h contains encoded data
332
- {
333
- if (!$h) return'Error: no data';
334
- if (!function_exists('md5')){return'Error: func n/a';}
335
- #Mage::throwException(Mage::helper('novalnet')->__("$h[auth_code].$h[product_id].$h[tariff].$h[amount].$h[test_mode].$h[uniqid].strrev($key)").'!');
336
- return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
337
- }
338
- function checkHash($request, $key)
339
- {
340
- if (!$request) return false; #'Error: no data';
341
- $h['auth_code'] = $request['auth_code'];#encoded
342
- $h['product_id'] = $request['product'];#encoded
343
- $h['tariff'] = $request['tariff'];#encoded
344
- $h['amount'] = $request['amount'];#encoded
345
- $h['test_mode'] = $request['test_mode'];#encoded
346
- $h['uniqid'] = $request['uniqid'];#encoded
347
-
348
- if ($request['hash2'] != $this->hash($h, $key)){
349
- return false;
350
- }
351
- return true;
352
- }
353
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/controllers/Adminhtml/SofortueberweisungController.php DELETED
@@ -1,88 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/controllers/PcsofortueberweisungController.php DELETED
@@ -1,154 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/controllers/SofortueberweisungController.php DELETED
@@ -1,298 +0,0 @@
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
- $session->unsNnInstantTestOrder();
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 canceled 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 canceled payment'));
100
- $order->save();
101
- $response = $this->getRequest()->getParams();
102
- Mage::getSingleton('checkout/session')->addError($response['status_text']);#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
- $session->setNnInstantTestOrder($this->decode($response['test_mode'], $_SESSION['mima']));
161
- }
162
-
163
- $order->setPayment($payment);
164
-
165
- if($paymentObj->getConfigData('createinvoice') == 1){
166
- if ($this->saveInvoice($order)) {
167
- //$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
168
- }
169
- }
170
-
171
- $status = true;
172
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('novalnet')->__('successful'));
173
- } else {
174
- $payment = $order->getPayment();
175
- $payment->setLastTransId($response["tid"]);# to set TID in the payment info
176
- $payment->setStatus(Novalnet_Sofortueberweisung_Model_Sofortueberweisung::STATUS_DECLINED);
177
-
178
- $order->setPayment($payment);
179
- $order->cancel();
180
- $order->addStatusToHistory($order->getStatus(), Mage::helper('sofortueberweisung')->__('Payment was not successfull'));
181
- $status = false;
182
- }
183
-
184
- $order->save();
185
- return $status;
186
- }
187
-
188
- /**
189
- * Save invoice for order
190
- *
191
- * @param Mage_Sales_Model_Order $order
192
- * @return boolean Can save invoice or not
193
- */
194
- protected function saveInvoice (Mage_Sales_Model_Order $order) {
195
- if ($order->canInvoice()) {
196
- $invoice = $order->prepareInvoice();
197
-
198
- $invoice->register();
199
- Mage::getModel('core/resource_transaction')
200
- ->addObject($invoice)
201
- ->addObject($invoice->getOrder())
202
- ->save();
203
-
204
- $invoice->sendEmail(true, '');
205
- return true;
206
- }
207
-
208
- return false;
209
- }
210
-
211
- /**
212
- * Get singleton of Checkout Session Model
213
- *
214
- * @return Mage_Checkout_Model_Session
215
- */
216
- public function getCheckout()
217
- {
218
- return Mage::getSingleton('checkout/session');
219
- }
220
-
221
- /**
222
- * checks server response and gets parameters
223
- * @return $data array|string response parameters or ERROR_WRONG_HASH|ERROR_NO_ORDER_DETAILS if error
224
- *
225
- */
226
- public function getNotification($pwd){
227
- $pnSu = Mage::helper('sofortueberweisung');
228
- $pnSu->classSofortueberweisung($pwd);
229
- return $pnSu->getNotification();
230
- }
231
- private function checkParams($response) {
232
- $status = '100';
233
- if (!$response['hash2']){
234
- $status = '90';
235
- }
236
- if (!$this->checkHash($response, $_SESSION['mima'])){
237
- $status = '91';
238
- }
239
- $response['amount'] = $this->decode($response['amount'], $_SESSION['mima']);
240
- if (preg_match('/\D/', $response['amount'], $aMatch)){
241
- $status = '92';
242
- }
243
- #Mage::log(__FUNCTION__.': status='.$status);
244
- $this->_status = $status;
245
- return $status;
246
- }
247
- function hash($h, $key)#$h contains encoded data
248
- {
249
- if (!$h) return'Error: no data';
250
- if (!function_exists('md5')){return'Error: func n/a';}
251
- return md5($h['auth_code'].$h['product_id'].$h['tariff'].$h['amount'].$h['test_mode'].$h['uniqid'].strrev($key));
252
- }
253
- function checkHash($request, $key)
254
- {
255
- if (!$request) return false; #'Error: no data';
256
- $h['auth_code'] = $request['auth_code'];#encoded
257
- $h['product_id'] = $request['product']; #encoded
258
- $h['tariff'] = $request['tariff']; #encoded
259
- $h['amount'] = $request['amount']; #encoded
260
- $h['test_mode'] = $request['test_mode'];#encoded
261
- $h['uniqid'] = $request['uniqid']; #encoded
262
-
263
- if ($request['hash2'] != $this->hash($h, $key)){
264
-
265
- Mage::getSingleton('core/session')
266
- ->addError(Mage::helper('sofortueberweisung')->__('Die Hashfunktionen sind nicht verf&uuml;gbar!'));
267
- $url = Mage::getModel('core/url')->getUrl("checkout/onepage/failure");
268
- Mage::app()->getResponse()->setRedirect($url);
269
- Mage::app()->getResponse()->sendResponse();
270
- exit;
271
- }
272
- return true;
273
- }
274
- function decode($data, $key)
275
- {
276
- $data = trim($data);
277
- if ($data == '') {return'Error: no data';}
278
- if (!function_exists('base64_decode') or !function_exists('pack') or !function_exists('crc32')){return'Error: func n/a';}
279
-
280
- try {
281
- $data = base64_decode(strrev($data));
282
- $data = pack("H".strlen($data), $data);
283
- $data = substr($data, 0, stripos($data, $key));
284
- $pos = strpos($data, "|");
285
- if ($pos === false){
286
- return("Error: CKSum not found!");
287
- }
288
- $crc = substr($data, 0, $pos);
289
- $value = trim(substr($data, $pos+1));
290
- if ($crc != sprintf('%u', crc32($value))){
291
- return("Error; CKSum invalid!");
292
- }
293
- return $value;
294
- }catch (Exception $e){
295
- echo('Error: '.$e);
296
- }
297
- }
298
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/etc/config.xml DELETED
@@ -1,235 +0,0 @@
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
-
21
- <translate>
22
- <modules>
23
- <Novalnet_Sofortueberweisung>
24
- <files>
25
- <default>Novalnet_Sofortueberweisung.csv</default>
26
- </files>
27
- </Novalnet_Sofortueberweisung>
28
- </modules>
29
- </translate>
30
- <secure_url>
31
- <sofortueberweisung_sofortueberweisung>/sofortueberweisung/sofortueberweisung/</sofortueberweisung_sofortueberweisung>
32
- </secure_url>
33
- </frontend>
34
-
35
- <admin>
36
- <routers>
37
- <sofortueberweisung>
38
- <use>admin</use>
39
- <args>
40
- <module>Novalnet_Sofortueberweisung</module>
41
- <frontName>sofortueberweisung</frontName>
42
- </args>
43
- </sofortueberweisung>
44
- </routers>
45
- </admin>
46
-
47
- <adminhtml>
48
-
49
- <translate>
50
- <modules>
51
- <Novalnet_Sofortueberweisung>
52
- <files>
53
- <default>Novalnet_Sofortueberweisung.csv</default>
54
- </files>
55
- </Novalnet_Sofortueberweisung>
56
- </modules>
57
- </translate>
58
- </adminhtml>
59
-
60
- <global>
61
- <blocks>
62
- <sofortueberweisung>
63
- <class>Novalnet_Sofortueberweisung_Block</class>
64
- </sofortueberweisung>
65
- </blocks>
66
-
67
- <helpers>
68
- <sofortueberweisung>
69
- <class>Novalnet_Sofortueberweisung_Helper</class>
70
- </sofortueberweisung>
71
- </helpers>
72
-
73
- <params_pnso>
74
- <types>
75
- <backlink>
76
- <param>backlink</param>
77
- <value><![CDATA[sofortueberweisung/adminhtml_sofortueberweisung/saveConfig]]></value>
78
- </backlink>
79
- <debug>
80
- <param>debug</param>
81
- <value>0</value>
82
- </debug>
83
- <input_hash>
84
- <param>projectssetting_interface_input_hash_check_enabled</param>
85
- <value>1</value>
86
- </input_hash>
87
- <projectssetting_project_password>
88
- <param>projectssetting_project_password</param>
89
- <value></value>
90
- </projectssetting_project_password>
91
- <project_notification_password>
92
- <param>project_notification_password</param>
93
- <value></value>
94
- </project_notification_password>
95
- <user_partner_id>
96
- <param>user_partner_id</param>
97
- <value>x</value>
98
- </user_partner_id>
99
- <project_shop_system_id>
100
- <param>project_shop_system_id</param>
101
- <value>121</value>
102
- </project_shop_system_id>
103
- <projectssetting_interface_success_link>
104
- <param>projectssetting_interface_success_link</param>
105
- <value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/return/orderId/-USER_VARIABLE_0-/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]></value>
106
- </projectssetting_interface_success_link>
107
- <projectssetting_interface_success_link_redirect>
108
- <param>projectssetting_interface_success_link_redirect</param>
109
- <value>1</value>
110
- </projectssetting_interface_success_link_redirect>
111
- <projectssetting_interface_cancel_link>
112
- <param>projectssetting_interface_cancel_link</param>
113
- <value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/error/orderId/-USER_VARIABLE_0-]]></value>
114
- </projectssetting_interface_cancel_link>
115
- <projectssetting_interface_timeout_link>
116
- <param>projectssetting_interface_timeout_link</param>
117
- <value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/error/orderId/-USER_VARIABLE_0-]]></value>
118
- </projectssetting_interface_timeout_link>
119
- <projectssetting_interface_timeout>
120
- <param>projectssetting_interface_timeout</param>
121
- <value>600</value>
122
- </projectssetting_interface_timeout>
123
- <projectssetting_locked_amount>
124
- <param>projectssetting_locked_amount</param>
125
- <value>1</value>
126
- </projectssetting_locked_amount>
127
- <projectssetting_locked_reason_1>
128
- <param>projectssetting_locked_reason_1</param>
129
- <value>1</value>
130
- </projectssetting_locked_reason_1>
131
- <projectsnotification_http_activated>
132
- <param>projectsnotification_http_activated</param>
133
- <value>1</value>
134
- </projectsnotification_http_activated>
135
- <projectsnotification_http_url>
136
- <param>projectsnotification_http_url</param>
137
- <value><![CDATA[index.php/sofortueberweisung/sofortueberweisung/returnhttp/orderId/-USER_VARIABLE_0-/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]></value>
138
- </projectsnotification_http_url>
139
- <projectsnotification_http_method>
140
- <param>projectsnotification_http_method</param>
141
- <value>1</value>
142
- </projectsnotification_http_method>
143
- <project_hash_algorithm>
144
- <param>project_hash_algorithm</param>
145
- <value>sha1</value>
146
- </project_hash_algorithm>
147
- <projectsnotification_email_email>
148
- <param>projectsnotification_email_email</param>
149
- <value></value>
150
- </projectsnotification_email_email>
151
- <projectsnotification_email_activated>
152
- <param>projectsnotification_email_activated</param>
153
- <value>1</value>
154
- </projectsnotification_email_activated>
155
- <projectsnotification_email_language_id>
156
- <param>projectsnotification_email_language_id</param>
157
- <value>DE</value>
158
- </projectsnotification_email_language_id>
159
- <project_name>
160
- <param>project_name</param>
161
- <value>Magento</value>
162
- </project_name>
163
- </types>
164
- </params_pnso>
165
-
166
- <models>
167
- <sofortueberweisung>
168
- <class>Novalnet_Sofortueberweisung_Model</class>
169
- <resourceModel>sofortueberweisung_mysql4</resourceModel>
170
- </sofortueberweisung>
171
- <sales>
172
- <rewrite>
173
- <convert_order>Novalnet_Sofortueberweisung_Model_Convert_Order</convert_order>
174
- <convert_quote>Novalnet_Sofortueberweisung_Model_Convert_Quote</convert_quote>
175
- </rewrite>
176
- </sales>
177
- <sofortueberweisung_mysql4>
178
- <class>Novalnet_Sofortueberweisung_Model_Mysql4</class>
179
- <entities>
180
- <sofortueberweisung>
181
- <table>sofortueberweisung</table>
182
- </sofortueberweisung>
183
- </entities>
184
- </sofortueberweisung_mysql4>
185
- </models>
186
-
187
- <resources>
188
- <!-- resource identifier -->
189
- <sofortueberweisung_setup>
190
- <!-- specify that this resource is a setup resource and used for upgrades -->
191
- <setup>
192
- <module>Novalnet_Sofortueberweisung</module>
193
- <class>Novalnet_Sofortueberweisung_Model_Mysql4_Setup</class>
194
- </setup>
195
- <!-- specify database connection for this resource -->
196
- <connection>
197
- <use>core_setup</use>
198
- </connection>
199
- </sofortueberweisung_setup>
200
- <sofortueberweisung_write>
201
- <connection>
202
- <use>core_write</use>
203
- </connection>
204
- </sofortueberweisung_write>
205
- <sofortueberweisung_read>
206
- <connection>
207
- <use>core_read</use>
208
- </connection>
209
- </sofortueberweisung_read>
210
- </resources>
211
- </global>
212
-
213
- <!-- declare default configuration values for this module -->
214
- <default>
215
- <payment>
216
- <sofortueberweisung>
217
- <active>0</active>
218
- <model>sofortueberweisung/sofortueberweisung</model>
219
- <order_status>1</order_status>
220
- <title>Novalnet Sofortüberweisung</title>
221
- <allowspecific>0</allowspecific>
222
- <url>https://payport.novalnet.de/online_transfer_payport</url>
223
- <customer></customer>
224
- <project></project>
225
- <project_pswd></project_pswd>
226
- <notification_pswd></notification_pswd>
227
- <check_input_yesno>1</check_input_yesno>
228
- <createinvoice>0</createinvoice>
229
- <fast><![CDATA[<a href="%s">Zum automatischen Einrichten hier klicken.</a>]]></fast>
230
- <url_new><![CDATA[https://www.sofortueberweisung.de/payment/createNew/]]></url_new>
231
- <netherlands>0</netherlands>
232
- </sofortueberweisung>
233
- </payment>
234
- </default>
235
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/etc/system.xml DELETED
@@ -1,214 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <sections>
4
- <payment>
5
- <groups>
6
- <sofortueberweisung translate="label" module="paygate">
7
- <label>Novalnet Instant Bank Transfer</label>
8
- <comment>The password is admin.novalnet.de:Master Data-Paymentzugriffsschluessel view.</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>Novalnet 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
- <min_order_total translate="label">
185
- <label>Minimum Order Total</label>
186
- <frontend_type>text</frontend_type>
187
- <sort_order>180</sort_order>
188
- <show_in_default>1</show_in_default>
189
- <show_in_website>1</show_in_website>
190
- <show_in_store>0</show_in_store>
191
- </min_order_total>
192
- <max_order_total translate="label">
193
- <label>Maximum Order Total</label>
194
- <frontend_type>text</frontend_type>
195
- <sort_order>190</sort_order>
196
- <show_in_default>1</show_in_default>
197
- <show_in_website>1</show_in_website>
198
- <show_in_store>0</show_in_store>
199
- </max_order_total>
200
- <orderscount translate="label">
201
- <label>Minimum Orders Count</label>
202
- <frontend_type>text</frontend_type>
203
- <sort_order>200</sort_order>
204
- <comment>Default: "0" for disabled check.</comment>
205
- <show_in_default>1</show_in_default>
206
- <show_in_website>1</show_in_website>
207
- <show_in_store>0</show_in_store>
208
- </orderscount>
209
- </fields>
210
- </sofortueberweisung>
211
- </groups>
212
- </payment>
213
- </sections>
214
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Novalnet/Sofortueberweisung/sql/sofortueberweisung_setup/mysql4-install-1.0.0.php DELETED
@@ -1,10 +0,0 @@
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
- ?>
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/layout/novalnet/configuration.xml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_sales_order_create_index>
4
+ <reference name="head">
5
+ <action method="addJs">
6
+ <script>novalnet/novalnetcc.js</script>
7
+ </action>
8
+ </reference>
9
+ </adminhtml_sales_order_create_index>
10
+
11
+ <novalnet_payment_adminhtml_sales_order_index>
12
+ <reference name="content">
13
+ <block type="novalnet_payment/adminhtml_sales_order" name="novalnet_payment_sales_order" />
14
+ </reference>
15
+ </novalnet_payment_adminhtml_sales_order_index>
16
+
17
+ <!--
18
+ Sales Order View
19
+ -->
20
+ <adminhtml_sales_order_view>
21
+ <reference name="sales_order_tabs">
22
+ <!-- template="novalnet/novalnetideal/sales/order/view/tab/transaction.phtml"-->
23
+ <block type="novalnet_payment/adminhtml_sales_order_view_tab_transactionStatus"
24
+ name="novalnet_payment_adminhtml_sales_order_view_tab_transactionStatus">
25
+ </block>
26
+ <action method="addTab">
27
+ <name>novalnet_payment_adminhtml_sales_order_view_tab_transactionStatus</name>
28
+ <block>novalnet_payment/adminhtml_sales_order_view_tab_transactionStatus</block>
29
+ </action>
30
+ <block type="novalnet_payment/adminhtml_sales_order_view_tab_transactionOverview"
31
+ name="novalnet_payment_adminhtml_sales_order_view_tab_transactionOverview">
32
+ </block>
33
+ <action method="addTab">
34
+ <name>novalnet_payment_adminhtml_sales_order_view_tab_transactionOverview</name>
35
+ <block>novalnet_payment/adminhtml_sales_order_view_tab_transactionOverview</block>
36
+ </action>
37
+ </reference>
38
+ </adminhtml_sales_order_view>
39
+
40
+ <!--
41
+ Novalnet transaction
42
+ -->
43
+ <novalnet_payment_adminhtml_transaction_index>
44
+ <reference name="content">
45
+ <block type="novalnet_payment/adminhtml_transaction" name="novalnet_payment_transaction" />
46
+ </reference>
47
+ </novalnet_payment_adminhtml_transaction_index>
48
+
49
+ <!--
50
+ Novalnet transaction view
51
+ -->
52
+ <novalnet_payment_adminhtml_transaction_view>
53
+ <reference name="content">
54
+ <block type="novalnet_payment/adminhtml_transaction_view" name="novalnet_payment_transaction_view" template="novalnet/transaction/view/form.phtml">
55
+ <!--block type="novalnet_payment/adminhtml_transaction_view_form" name="novalnet_payment_transaction_view_form" template="novalnet/transaction/view/form.phtml" /-->
56
+ </block>
57
+ </reference>
58
+ </novalnet_payment_adminhtml_transaction_view>
59
+
60
+ <!--
61
+ Novalnet transaction overview / order log
62
+ -->
63
+ <novalnet_payment_adminhtml_transactionoverview_index>
64
+ <reference name="content">
65
+ <block type="novalnet_payment/adminhtml_transactionoverview" name="novalnet_payment_transactionoverview" />
66
+ </reference>
67
+ </novalnet_payment_adminhtml_transactionoverview_index>
68
+
69
+ <!--
70
+ Novalnet transaction overview / order log
71
+ -->
72
+ <novalnet_payment_adminhtml_transactionoverview_view>
73
+ <reference name="content">
74
+ <block type="novalnet_payment/adminhtml_transactionoverview_view" name="novalnet_payment_transactionoverview_view" template="novalnet/transaction/overview/view/form.phtml"/>
75
+ </reference>
76
+ </novalnet_payment_adminhtml_transactionoverview_view>
77
+
78
+ <!-- Global Configuration -->
79
+
80
+ <novalnet_payment_adminhtml_configuration_wizard_page_index>
81
+ <update handle="novalnet_payment_adminhtml_configuration_wizard_page_view" />
82
+ <reference name="novalnet.config.wizard.page.view">
83
+ <block type="adminhtml/system_config_switcher"
84
+ name="novalnet.config.wizard.page.switcher"
85
+ before="-"
86
+ template="novalnet/payment/configuration/wizard/page/store_switcher.phtml" />
87
+
88
+ </reference>
89
+ </novalnet_payment_adminhtml_configuration_wizard_page_index>
90
+
91
+ <novalnet_payment_adminhtml_configuration_wizard_page_view>
92
+ <reference name="content">
93
+ <block type="novalnet_payment/adminhtml_configuration_wizard_page_view"
94
+ name="novalnet.config.wizard.page.view"
95
+ template="novalnet/payment/configuration/wizard/page/view/container.phtml" />
96
+ </reference>
97
+ </novalnet_payment_adminhtml_configuration_wizard_page_view>
98
+
99
+ <novalnet_payment_adminhtml_configuration_wizard_page_generalglobal>
100
+ <reference name="content">
101
+ <block type="novalnet_payment/adminhtml_configuration_wizard_page_edit"
102
+ name="novalnet.config.wizard.page.edit" template="novalnet/payment/configuration/wizard/page/form/container.phtml">
103
+ <block type="novalnet_payment/adminhtml_configuration_wizard_config_form"
104
+ name="form" >
105
+ </block>
106
+ </block>
107
+ </reference>
108
+ </novalnet_payment_adminhtml_configuration_wizard_page_generalglobal>
109
+
110
+ <!--
111
+ Novalnet information index overview / order log
112
+ -->
113
+ <novalnet_payment_adminhtml_information_index>
114
+ <reference name="content">
115
+ <block type="novalnet_payment/adminhtml_information"
116
+ name="novalnet_payment_information" />
117
+ </reference>
118
+ </novalnet_payment_adminhtml_information_index>
119
+ </layout>
app/design/adminhtml/default/default/template/novalnet/cc/form.phtml DELETED
@@ -1,115 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- ?>
28
- <?php
29
- $code = $this->getMethodCode();
30
- $baseUrl = Mage::getBaseUrl('skin')
31
- ?>
32
- <?php if ($this->checkCustomerAccess()): ?>
33
- <fieldset class="form-list">
34
- <div style="width:100px;">
35
- <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
36
- <?php $imgpath = "images/novalnet/". $_typeCode ."_Logo.png"; ?>
37
- <img style="height:20px;" 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>
42
- <div class="input-box">
43
- <label for="<?php echo $code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
44
- <select id="<?php echo $code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
45
- <option value=""><?php echo $this->__('--Please Select--')?></option>
46
- <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
47
- <option value="<?php echo $_typeCode ?>"><?php echo $_typeName ?></option>
48
- <?php endforeach; ?>
49
- </select>
50
- </div>
51
- </li>
52
- <li>
53
- <div class="input-box">
54
- <label for="<?php echo $code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
55
- <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $code ?>_cc_owner" name="payment[cc_owner]" value=""/>
56
- </div>
57
- </li>
58
- <li>
59
- <div class="input-box">
60
- <label for="<?php echo $code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
61
- <input type="text" id="<?php echo $code ?>_cc_number" name="payment[cc_number]" title="<?php $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
62
- </div>
63
- </li>
64
- <li>
65
- <div class="input-box">
66
- <label for="<?php echo $code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
67
- <div class="v-fix">
68
- <select id="<?php echo $code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
69
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
70
- <option value="<?php echo $k ?>"><?php echo $v ?></option>
71
- <?php endforeach ?>
72
- </select>
73
- </div>
74
- <div class="v-fix" style="padding-left:5px;">
75
- <select id="<?php echo $code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
76
- <?php foreach ($this->getCcYears() as $k=>$v): ?>
77
- <option value="<?php echo $k ?>"><?php echo $v ?></option>
78
- <?php endforeach ?>
79
- </select>
80
- </div>
81
- </div>
82
- </li>
83
- <?php if($this->hasVerification()): ?>
84
- <li>
85
- <div class="input-box">
86
- <label for="<?php echo $code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
87
- <div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="" /></div>
88
- &nbsp;
89
- <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
90
- </div>
91
- </li>
92
- <?php endif; ?>
93
- <li>
94
- <?php echo $this->__('The amount will be booked immediately from your credit card<BR>with <B>%s</B> note.',$this->getMethod()->getBookingReference());?>
95
- </li>
96
- </ul>
97
- </fieldset>
98
- <?php else: ?>
99
- <script type="text/javascript">
100
- function hideMe(payment_code){
101
- t = 'p_method_' + payment_code.toString();
102
- document.getElementById(t).style.visibility = 'hidden';
103
- aTags = document.getElementsByTagName("label");
104
- if (aTags && aTags.length) {
105
- for (i=0; i<aTags.length; i++){
106
- if (aTags[i].htmlFor == t){
107
- aTags[i].style.visibility = 'hidden';
108
- i = aTags.length;
109
- }
110
- }
111
- }
112
- }
113
- <?php echo "hideMe('$code');"; ?>
114
- </script>
115
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/cc/info.phtml DELETED
@@ -1,33 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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 endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/elvaustria/form.phtml DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
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
- <?php if ($this->checkCustomerAccess()): ?>
34
- <fieldset class="form-list">
35
- <div style="width:100px;">
36
- <?php $imgpath = "images/novalnet/ELV_Logo.png"; ?>
37
- <img style="height:20px;" 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" 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" 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" 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->show_comment()): ?>
60
- <li>
61
- <div class="input-box">
62
- <?php echo $this->show_comment()?>
63
- </div>
64
- </li>
65
- <?php endif ?>
66
- </ul>
67
-
68
- </fieldset>
69
- <?php else: ?>
70
- <script type="text/javascript">
71
- function hideMe(payment_code){
72
- t = 'p_method_' + payment_code.toString();
73
- document.getElementById(t).style.visibility = 'hidden';
74
- aTags = document.getElementsByTagName("label");
75
- if (aTags && aTags.length) {
76
- for (i=0; i<aTags.length; i++){
77
- if (aTags[i].htmlFor == t){
78
- aTags[i].style.visibility = 'hidden';
79
- i = aTags.length;
80
- }
81
- }
82
- }
83
- }
84
- <?php echo "hideMe('$code');"; ?>
85
- </script>
86
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/elvaustria/info.phtml DELETED
@@ -1,37 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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 #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
32
- <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getNnAccountHolder())) ?><br />
33
- <?php echo $this->__('Account Number: %s', $this->htmlEscape(substr($this->getNnAccountNumber(), 0, -4) . '****')) ?><br />
34
- <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape(substr($this->getNnBankSortingCode(), 0, -4) . '****')) ?><br />
35
- <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
36
- <?php else: ?>
37
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/elvgerman/form.phtml DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
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
- <?php if ($this->checkCustomerAccess()): ?>
34
- <fieldset class="form-list">
35
- <div style="width:100px;">
36
- <?php $imgpath = "images/novalnet/ELV_Logo.png"; ?>
37
- <img style="height:20px;" 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" id="<?php echo $code ?>_account_holder" name="payment[account_holder]" 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" id="<?php echo $code ?>_account_number" name="payment[account_number]" 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" id="<?php echo $code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="" />
56
- </div>
57
- </li>
58
- <?php if($this->acdc_check()): ?>
59
- <li>
60
- <div class="input-box">
61
- <input type="checkbox" id="<?php echo $code ?>_acdc" name="payment[acdc]" title="<?php echo $this->__('acdc') ?>" class="required-entry" />
62
- <label for="<?php echo $code ?>_acdc"><?php echo $this->__('The') ?> <b><a href='javascript:show_acdc_info()' ONMOUSEOVER='show_acdc_info()'><?php echo $this->__('ACDC-Check') ?></a></b> <?php echo $this->__('accepted') ?> <span class="required">*</span></label>
63
- </div>
64
- </li>
65
- <?php endif ?>
66
- <?php if($this->show_comment()): ?>
67
- <li>
68
- <div class="input-box">
69
- <?php echo $this->show_comment()?>
70
- </div>
71
- </li>
72
- <?php endif ?>
73
- </ul>
74
- <script type="text/javascript">
75
- var showbaby;
76
- function show_acdc_info(){
77
- var url=parent.location.href;
78
- url='<?php echo $baseUrl?>frontend/default/default/images/novalnet/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
79
- showbaby=window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
80
- showbaby.focus();
81
- }
82
- function hide_acdc_info(){showbaby.close();}
83
- </script>
84
- </fieldset>
85
- <?php else: ?>
86
- <script type="text/javascript">
87
- function hideMe(payment_code){
88
- t = 'p_method_' + payment_code.toString();
89
- document.getElementById(t).style.visibility = 'hidden';
90
- aTags = document.getElementsByTagName("label");
91
- if (aTags && aTags.length) {
92
- for (i=0; i<aTags.length; i++){
93
- if (aTags[i].htmlFor == t){
94
- aTags[i].style.visibility = 'hidden';
95
- i = aTags.length;
96
- }
97
- }
98
- }
99
- }
100
- <?php echo "hideMe('$code');"; ?>
101
- </script>
102
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/elvgerman/info.phtml DELETED
@@ -1,37 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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 #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
32
- <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getNnAccountHolder())) ?><br />
33
- <?php echo $this->__('Account Number: %s', $this->htmlEscape(substr($this->getNnAccountNumber(), 0, -4) . '****')) ?><br />
34
- <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape(substr($this->getNnBankSortingCode(), 0, -3) . '***')) ?><br />
35
- <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
36
- <?php else: ?>
37
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/{code/community/Mage/Novalnet/Model/NovalnetElvatpci.php → design/adminhtml/default/default/template/novalnet/information/iframe.phtml} RENAMED
@@ -1,34 +1,35 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- class Mage_Novalnet_Model_NovalnetElvatpci extends Mage_Novalnet_Model_NovalnetPciAbstract
28
- {
29
- const PAYMENT_METHOD = 'Direct Debit Austria PCI';
30
-
31
- protected $_nnPaymentId = 8;
32
-
33
- protected $_code = 'novalnetElvatpci';
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ /**
27
+ * @var $this Novalnet_NovalnetIdeal_Block_Adminhtml_Information_Abstract
28
+ */
29
+ $url = $this->getNovalnetUrl();
30
+ ?>
31
+ <div style="width:100%;">
32
+ <iframe src="<?php echo $url ?>" width="100%" frameborder="0" border="0"
33
+ style="min-height:1300px; height: 100%; overflow: hidden;">
34
+ </iframe>
35
+ </div>
app/design/adminhtml/default/default/template/novalnet/invoice/form.phtml DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- ?>
30
- <?php
31
- $code = $this->getMethodCode();
32
- $baseUrl = Mage::getBaseUrl('skin')
33
- ?>
34
- <?php if ($this->checkCustomerAccess()):?>
35
- <fieldset class="form-list">
36
- <ul id="payment_form_<?php echo $code ?>" style="display:none">
37
- <li>
38
- <div class="input-box">
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
- </ul>
43
- </fieldset>
44
- <?php else: ?>
45
- <script type="text/javascript">
46
- function hideMe(payment_code){
47
- t = 'p_method_' + payment_code.toString();
48
- document.getElementById(t).style.visibility = 'hidden';
49
- aTags = document.getElementsByTagName("label");
50
- if (aTags && aTags.length) {
51
- for (i=0; i<aTags.length; i++){
52
- if (aTags[i].htmlFor == t){
53
- aTags[i].style.visibility = 'hidden';
54
- i = aTags.length;
55
- }
56
- }
57
- }
58
- }
59
- <?php echo "hideMe('$code');"; ?>
60
- </script>
61
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/invoice/info.phtml DELETED
@@ -1,36 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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( $this->getDuedate() ): echo $this->__('Due at').': '.$this->__($this->htmlEscape($this->getDuedate())) ?><br /> <?php endif; ?>
32
- <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?>
33
- <?php if (strlen($this->getNnComments())) { echo '<br>', nl2br($this->getNnComments()); } ?>
34
- <?php else: ?>
35
-
36
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/form/container.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo $this->getFormInitScripts() ?>
2
+ <div class="content-header">
3
+ <?php echo $this->getHeaderHtml() ?>
4
+ </div>
5
+ <?php echo $this->getFormHtml() ?>
6
+ <div class="content-header">
7
+ <p class="form-buttons"><?php echo $this->getButtonsHtml('header') ?></p>
8
+ </div>
9
+ <script type="text/javascript">
10
+ editForm = new varienForm('edit_form', '<?php echo $this->getValidationUrl() ?>');
11
+ </script>
12
+ <?php echo $this->getFormScripts() ?>
app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/store_switcher.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="switcher">
3
+ <label for="store_switcher"><?php echo $this->__('Current Configuration Scope:') ?></label>
4
+ <select id="store_switcher" class="system-config-store-switcher" onchange="location.href=this.options[this.selectedIndex].getAttribute('url')">
5
+ <?php foreach ($this->getStoreSelectOptions() as $_value=>$_option): ?>
6
+ <?php if (isset($_option['is_group'])): ?>
7
+ <?php if ($_option['is_close']): ?>
8
+ </optgroup>
9
+ <?php else: ?>
10
+ <optgroup label="<?php echo $_option['label'] ?>" style="<?php echo $_option['style'] ?>">
11
+ <?php endif; ?>
12
+ <?php continue ?>
13
+ <?php endif; ?>
14
+ <option value="<?php echo $_value ?>" url="<?php echo $_option['url'] ?>" <?php echo $_option['selected']?'selected="selected"':'' ?> style="<?php echo $_option['style'] ?>">
15
+ <?php echo $_option['label'] ?>
16
+ </option>
17
+ <?php endforeach ?>
18
+ </select>
19
+ </div>
app/design/adminhtml/default/default/template/novalnet/payment/configuration/wizard/page/view/container.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td><h3><?php echo $this->getHeaderText() ?></h3></td>
5
+ </tr>
6
+ </table>
7
+ </div>
8
+
9
+ <?php echo $this->getViewHtml() ?>
10
+
11
+ <div class="content-header" id="novalnet_wizard_form_buttons">
12
+ <table cellspacing="0">
13
+ <tr>
14
+ <td class="form-buttons">
15
+ <?php echo $this->getButtonsHtml() ?>
16
+ </td>
17
+ </tr>
18
+ </table>
19
+ </div>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Cc.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+
31
+ ?>
32
+ <fieldset class="form-list" id="fieldset_<?php echo $code ?>">
33
+ <!--{{{ Payment Logo -->
34
+ <div>
35
+ <a href="<?php echo $helper->getNovalnetUrl() ?>" target="_new" style="text-decoration:none;">
36
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl() . "/img/creditcard_small.jpg" ?>
37
+ <img style="height:20px;" src="<?php echo $imgpath ?>" alt="<?php echo $this->getMethod()->_getConfigData('title') ?>" title="<?php echo $this->getMethod()->getConfigData('title') ?>" />
38
+ </a>
39
+ </div>
40
+ <!--}}} Payment Logo -->
41
+ <!--{{{ Novalnet Cc Form -->
42
+ <div id="payment_form_<?php echo $code ?>" style="display:none;">
43
+ <?php if(!$this->getMethod()->validateNovalnetCcParams()): ?>
44
+ <div style="font-weight:bold;color:red;font-size:12px;">
45
+ <?php echo $this->__('Basic parameter not valid').'!' ?>
46
+ </div>
47
+ <?php else:?>
48
+ <div id="loading">
49
+ <img src="<?php echo $helper->getNovalnetPaymentFormLogoUrl() ?>/img/novalnet-loading-icon.gif" alt="Loading" />
50
+ </div>
51
+ <iframe frameborder="0" name="ifm_payment_form_<?php echo $code ?>" id="ifm_payment_form_<?php echo $code ?>"
52
+ style="width: 420px; height: 370px; border: none; display: block; margin-top: 5px;" onload="document.getElementById('loading').style.display = 'none'" src="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/NovalnetCc/index') ?>" >
53
+ </iframe>
54
+ <?php endif; ?>
55
+ </div>
56
+
57
+ <input type="hidden" id="original_vendor_id" value="<?php echo trim($this->getMethod()->_getConfigData('merchant_id', true)) ?>" />
58
+ <input type="hidden" id="original_vendor_authcode" value="<?php echo trim($this->getMethod()->_getConfigData('auth_code', true)) ?>" />
59
+
60
+ <input type="hidden" name="novalnet_cc_owner" id="novalnet_cc_owner" value="" />
61
+ <input type="hidden" name="novalnet_cc_type" id="novalnet_cc_type" value="" />
62
+ <input type="hidden" name="novalnet_cc_exp_month" id="novalnet_cc_exp_month" value="" />
63
+ <input type="hidden" name="novalnet_cc_exp_year" id="novalnet_cc_exp_year" value="" />
64
+ <input type="hidden" name="novalnet_cc_cid" id="novalnet_cc_cid" value="" />
65
+ <input type="hidden" name="novalnet_cc_pan_hash" id="novalnet_cc_pan_hash" value="" />
66
+ <input type="hidden" name="novalnet_cc_unique_id" id="novalnet_cc_unique_id" value="" />
67
+
68
+
69
+
70
+ <!--}}} Novalnet Cc Form -->
71
+ </fieldset>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Ccform.phtml ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $_code = Novalnet_Payment_Model_Config::NN_CC;
29
+ ?>
30
+ <script type="text/javascript">
31
+ function updateHiddenElements(elements) {
32
+
33
+ for (var i=0; i<elements.length; i++) {
34
+ switch (elements[i].name) {
35
+ case 'novalnet_cc_owner':
36
+ elements[i].value = document.getElementById('<?php echo $_code ?>_cc_owner').value;
37
+ break;
38
+ case 'novalnet_cc_type':
39
+ elements[i].value = document.getElementById('<?php echo $_code ?>_cc_type').value;
40
+ break;
41
+ case 'novalnet_cc_pan_hash':
42
+ elements[i].value = document.getElementById('nncc_cardno_id').value;
43
+ break;
44
+ case 'novalnet_cc_unique_id':
45
+ elements[i].value = document.getElementById('nncc_unique_id').value;
46
+ break;
47
+ case 'novalnet_cc_exp_month':
48
+ elements[i].value = document.getElementById('<?php echo $_code ?>_expiration').value;
49
+ break;
50
+ case 'novalnet_cc_exp_year':
51
+ elements[i].value = document.getElementById('<?php echo $_code ?>_expiration_yr').value;
52
+ break;
53
+ case 'novalnet_cc_cid':
54
+ elements[i].value = document.getElementById('<?php echo $_code ?>_cc_cid').value;
55
+ break;
56
+ }
57
+ }
58
+ return true;
59
+ }
60
+ </script>
61
+ <!--{{{ Payment Description -->
62
+ <ul>
63
+ <li style="margin: 0 0 8px;">
64
+ <?php echo $this->__('The amount will be booked immediately from your credit card.');?>
65
+ </li>
66
+ <li style="margin: 0 0 8px;">
67
+ <?php echo Mage::helper('novalnet_payment')->getModel('novalnetCc')->_getConfigData('booking_reference') ?>
68
+ </li>
69
+ <?php if(Mage::helper('novalnet_payment')->getModel('novalnetCc')->_getConfigData('live_mode', true) == 0): ?>
70
+ <li style="margin: 0 0 8px;">
71
+ <div style="font-weight:bold;color:red;font-size:12px;">
72
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
73
+ </div>
74
+ </li>
75
+ <?php endif ?>
76
+ </ul>
77
+ <!--}}} Payment Description -->
78
+
79
+ <!--{{{ Novalnet Iframe -->
80
+ <?php echo Mage::helper('novalnet_payment')->getModel('novalnetCc')->getNovalnetIframe() ?>
81
+ <!--}}} Novalnet Iframe -->
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Ccsecure.phtml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+ ?>
31
+ <fieldset class="form-list">
32
+ <!--{{{ Payment Logo -->
33
+ <div>
34
+ <a href="<?php echo $helper->getNovalnetUrl();?>" target="_new" style="text-decoration:none;">
35
+ <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
36
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl()."/img/". $_typeCode ."_Logo.png"; ?>
37
+ <img style="height:20px;" src="<?php echo $imgpath ?>" alt="<?php echo $this->getMethod()->getConfigData('title') ?>" title="<?php echo $this->getMethod()->getConfigData('title') ?>" />
38
+ <?php endforeach; ?>
39
+ </a>
40
+ </div>
41
+ <!--}}} Payment Logo -->
42
+ <ul id="payment_form_<?php echo $code ?>" style="display:none">
43
+ <li>
44
+ <?php echo $this->__('The amount will be booked immediately from your credit card.') ?>
45
+ </li>
46
+ <?php if($this->getUserInfo()): ?>
47
+ <li>
48
+ <?php echo $this->getUserInfo()?>
49
+ </li>
50
+ <?php endif ?>
51
+ <?php if($this->getLiveMode() == 0): ?>
52
+ <li>
53
+ <div style="font-weight:bold;color:red;font-size:12px;">
54
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
55
+ </div>
56
+ </li>
57
+ <?php endif ?>
58
+ <li>
59
+ <div class="input-box">
60
+ <label style="float:none;" for="<?php echo $code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
61
+ <select id="<?php echo $code ?>_cc_type" name="payment[nn_cc_type]" class="required-entry validate-cc-type-select">
62
+ <option value=""><?php echo $this->__('--Please Select--')?></option>
63
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
64
+ <option value="<?php echo $_typeCode ?>"><?php echo $_typeName ?></option>
65
+ <?php endforeach; ?>
66
+ </select>
67
+ </div>
68
+ </li>
69
+ <li>
70
+ <div class="input-box">
71
+ <label style="float:none;" for="<?php echo $code ?>_cc_owner"><?php echo $this->__('Credit card holder') ?> <span class="required">*</span></label><br/>
72
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $code ?>_cc_owner" name="payment[nn_cc_owner]" autocomplete="off" />
73
+ </div>
74
+ </li>
75
+ <li>
76
+ <div class="input-box">
77
+ <label style="float:none;" for="<?php echo $code ?>_cc_number"><?php echo $this->__('Card number') ?> <span class="required">*</span></label><br/>
78
+ <input type="text" id="<?php echo $code ?>_cc_number" name="payment[nn_cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="required-entry input-text validate-cc-number validate-cc-type" autocomplete="off" />
79
+ </div>
80
+ </li>
81
+ <li>
82
+ <div class="input-box">
83
+ <label style="float:none;" for="<?php echo $code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
84
+ <div class="v-fix">
85
+ <select id="<?php echo $code ?>_expiration" style="width:140px;" name="payment[nn_cc_exp_month]" class="required-entry">
86
+ <option value=""><?php echo $this->__('Month'); ?></option>
87
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
88
+ <option value="<?php echo $k ?>"><?php echo $v ?></option>
89
+ <?php endforeach; ?>
90
+ </select>
91
+ </div>
92
+ <div class="v-fix" style="padding-left:5px;">
93
+ <select id="<?php echo $code ?>_expiration_yr" style="width:103px;" name="payment[nn_cc_exp_year]" class="required-entry">
94
+ <option value=""><?php echo $this->__('Year'); ?></option>
95
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
96
+ <option value="<?php echo $k ?>"><?php echo $v ?></option>
97
+ <?php endforeach; ?>
98
+ </select>
99
+ </div>
100
+ </div>
101
+ </li>
102
+ <?php if($this->hasVerification()): ?>
103
+ <li>
104
+ <div class="input-box">
105
+ <label style="float:none;" for="<?php echo $code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
106
+ <div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $code ?>_cc_cid" name="payment[nn_cc_cid]" style="width:3em;" autocomplete="off" maxlength="4" /></div>
107
+ &nbsp;
108
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
109
+ </div>
110
+ </li>
111
+ <?php endif; ?>
112
+ </ul>
113
+ </fieldset>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Elvaustria.phtml ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+ ?>
31
+ <fieldset class="form-list">
32
+ <div>
33
+ <!--{{{ Payment Logo -->
34
+ <a href="<?php echo $helper->getNovalnetUrl();?>" target="_new" style="text-decoration:none;">
35
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl()."/img/ELV_Logo.png"; ?>
36
+ <img style="height:20px;" src="<?php echo $imgpath; ?>" alt="<?php echo $this->getMethod()->getConfigData('title'); ?>" title="<?php echo $this->getMethod()->getConfigData('title'); ?>" />
37
+ </a>
38
+ <!--}}} Payment Logo -->
39
+ </div>
40
+ <!--{{{ ELVAT Form -->
41
+ <ul id="payment_form_<?php echo $code ?>" style="display:none">
42
+ <!--{{{ Payment Description -->
43
+ <li style="padding-top: 0.5em;">
44
+ <?php echo $this->__('Your account will be debited upon delivery of goods.') ?>
45
+ </li>
46
+ <!--}}} Payment Description -->
47
+ <?php if($this->getUserInfo()): ?>
48
+ <li>
49
+ <?php echo $this->getUserInfo() ?>
50
+ </li>
51
+ <?php endif ?>
52
+ <?php if($this->getLiveMode() == 0): ?>
53
+ <li>
54
+ <div style="font-weight:bold;color:red;font-size:12px;">
55
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
56
+ </div>
57
+ </li>
58
+ <?php endif ?>
59
+ <li>
60
+ <div class="input-box">
61
+ <label style="float:none;" for="<?php echo $code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
62
+ <input type="text" id="<?php echo $code ?>_account_holder" name="payment[account_holder_at]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" autocomplete="off" />
63
+ </div>
64
+ </li>
65
+ <li>
66
+ <div class="input-box">
67
+ <label style="float:none;" for="<?php echo $code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
68
+ <input type="text" id="<?php echo $code ?>_account_number" name="payment[account_number_at]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" autocomplete="off" />
69
+ </div>
70
+ </li>
71
+ <li>
72
+ <div class="input-box">
73
+ <label style="float:none;" for="<?php echo $code ?>_bank_sorting_code"><?php echo $this->__('Bank Code') ?> <span class="required">*</span></label><br/>
74
+ <input type="text" id="<?php echo $code ?>_bank_sorting_code" name="payment[bank_sorting_code_at]" title="<?php echo $this->__('Bank Code') ?>" class="required-entry input-text" autocomplete="off" />
75
+ </div>
76
+ </li>
77
+ </ul>
78
+ <!-- ELVAT Form -->
79
+ </fieldset>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Elvgerman.phtml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+ ?>
31
+ <fieldset class="form-list">
32
+ <div>
33
+ <!--{{{ Payment Logo -->
34
+ <a href="<?php echo $helper->getNovalnetUrl();?>" target="_new" style="text-decoration:none;">
35
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl()."/img/ELV_Logo.png"; ?>
36
+ <img style="height:20px;" src="<?php echo $imgpath; ?>" alt="<?php echo $this->getMethod()->getConfigData('title'); ?>" title="<?php echo $this->getMethod()->getConfigData('title'); ?>" />
37
+ </a>
38
+ <!--}}} Payment Logo -->
39
+ </div>
40
+ <!--{{{ ELVDE Form -->
41
+ <ul id="payment_form_<?php echo $code ?>" style="display:none">
42
+ <!--{{{ Payment Description -->
43
+ <li style="padding-top: 0.5em;">
44
+ <?php echo $this->__('Your account will be debited upon delivery of goods.') ?>
45
+ </li>
46
+ <!--}}} Payment Description -->
47
+ <?php if($this->getUserInfo()): ?>
48
+ <li>
49
+ <?php echo $this->getUserInfo() ?>
50
+ </li>
51
+ <?php endif ?>
52
+ <?php if($this->getLiveMode() == 0): ?>
53
+ <li>
54
+ <div style="font-weight:bold;color:red;font-size:12px;">
55
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
56
+ </div>
57
+ </li>
58
+ <?php endif ?>
59
+ <li>
60
+ <div class="input-box">
61
+ <label style="float:none;" for="<?php echo $code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
62
+ <input type="text" id="<?php echo $code ?>_account_holder" name="payment[account_holder]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" autocomplete="off" />
63
+ </div>
64
+ </li>
65
+ <li>
66
+ <div class="input-box">
67
+ <label style="float:none;" for="<?php echo $code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
68
+ <input type="text" id="<?php echo $code ?>_account_number" name="payment[account_number]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" autocomplete="off" />
69
+ </div>
70
+ </li>
71
+ <li>
72
+ <div class="input-box">
73
+ <label style="float:none;" for="<?php echo $code ?>_bank_sorting_code"><?php echo $this->__('Bank Code') ?> <span class="required">*</span></label><br/>
74
+ <input type="text" id="<?php echo $code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Code') ?>" class="required-entry input-text" autocomplete="off" />
75
+ </div>
76
+ </li>
77
+ <!--{{{ ACDC check-->
78
+ <?php if ($this->getAcdc()): ?>
79
+ <li>
80
+ <div class="input-box">
81
+ <input type="checkbox" id="<?php echo $code ?>_acdc" name="payment[acdc]" title="<?php echo $this->__('acdc') ?>" class="required-entry" />
82
+ <label style="float:none;" id="elvde_acdc" for="<?php echo $code ?>_acdc"><b><a><?php echo $this->__('Your credit rating is checked by us') ?></a></b>&nbsp;<span class="required">*</span></label>
83
+ </div>
84
+ </li>
85
+ <script type="text/javascript">
86
+ var showbaby;
87
+
88
+ //ACDC Info
89
+ $("elvde_acdc").observe('mouseover', function() {
90
+ var url = parent.location.href;
91
+ url = '<?php echo $helper->getNovalnetPaymentFormLogoUrl(); ?>/img/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
92
+ showbaby = window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
93
+ showbaby.focus();
94
+ });
95
+
96
+ //Hide ACDC info
97
+ function hide_acdc_info() { showbaby.close(); }
98
+ </script>
99
+ <?php endif ?>
100
+ <!--}}} ACDC check-->
101
+ </ul>
102
+ <!-- ELVDE Form -->
103
+ </fieldset>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Invoice.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+ ?>
31
+ <fieldset class="form-list">
32
+ <!-- PAYMENT LOGO -->
33
+ <div>
34
+ <A HREF="<?php echo $helper->getNovalnetUrl() ?>" TARGET="_new" style="text-decoration:none;">
35
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl()."/img/kauf-auf-rechnung.jpg"; ?>
36
+ <img style="height:30px;" src="<?php echo $imgpath ?>" alt="<?php echo $this->getMethod()->getConfigData('title') ?>" title="<?php echo $this->getMethod()->getConfigData('title') ?>" />
37
+ </A>
38
+ </div>
39
+ <!-- PAYMENT LOGO -->
40
+ <ul id="payment_form_<?php echo $code ?>" style="display:none">
41
+ <!--{{{ PAYMENT DESCRIPTION -->
42
+ <li>
43
+ <?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process') ?>
44
+ </li>
45
+ <?php if($this->getUserInfo()): ?>
46
+ <li>
47
+ <?php echo $this->getUserInfo()?>
48
+ </li>
49
+ <?php endif ?>
50
+ <?php if($this->getLiveMode() == 0): ?>
51
+ <li>
52
+ <div style="font-weight:bold;color:red;font-size:12px;">
53
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
54
+ </div>
55
+ </li>
56
+ <?php endif ?>
57
+ <!--}}} PAYMENT DESCRIPTION -->
58
+ </ul>
59
+ </fieldset>
app/design/adminhtml/default/default/template/novalnet/payment/method/form/Prepayment.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $code = $this->getMethodCode();
29
+ $helper = Mage::helper('novalnet_payment');
30
+ ?>
31
+ <fieldset class="form-list">
32
+ <!-- PAYMENT LOGO -->
33
+ <div>
34
+ <a href="<?php echo $helper->getNovalnetUrl() ?>" target="_new" style="text-decoration:none;">
35
+ <?php $imgpath = $helper->getNovalnetPaymentFormLogoUrl()."/img/vorauskasse.jpg"; ?>
36
+ <img style="height:30px;" src="<?php echo $imgpath ?>" alt="<?php echo $this->getMethod()->getConfigData('title') ?>" title="<?php echo $this->getMethod()->getConfigData('title') ?>" />
37
+ </a>
38
+ </div>
39
+ <!-- PAYMENT LOGO -->
40
+ <ul id="payment_form_<?php echo $code ?>" style="display:none">
41
+ <!--{{{ PAYMENT DESCRIPTION -->
42
+ <li>
43
+ <?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process') ?>
44
+ </li>
45
+ <?php if($this->getUserInfo()): ?>
46
+ <li>
47
+ <?php echo $this->getUserInfo()?>
48
+ </li>
49
+ <?php endif ?>
50
+ <?php if($this->getLiveMode() == 0): ?>
51
+ <li>
52
+ <div style="font-weight:bold;color:red;font-size:12px;">
53
+ <?php echo $this->__('Please Note: This transaction will run on TEST MODE and the amount will not be charged') ?>
54
+ </div>
55
+ </li>
56
+ <?php endif ?>
57
+ <!--}}} PAYMENT DESCRIPTION -->
58
+ </ul>
59
+ </fieldset>
app/{code/community/Mage/Novalnet/Model/Mysql4/Setup.php → design/adminhtml/default/default/template/novalnet/payment/method/form/Sofortueberweisung.phtml} RENAMED
@@ -1,30 +1,27 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- class Mage_Novalnet_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
28
- {
29
-
30
- }
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php echo $this->__('Not possible') ?>
 
 
 
app/design/adminhtml/default/default/template/novalnet/payment/method/form/blank.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
28
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
29
+ <head>
30
+ <?php echo $this->getChildHtml('head') ?>
31
+ <style>
32
+ body {background-color:transparent; background-image:none; text-align:left}
33
+ </style>
34
+ </head>
35
+ <body>
36
+ <?php echo $this->getChildHtml('content') ?>
37
+ </body>
38
+ </html>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Cc.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($_info = $this->getInfo()): ?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) echo $this->getAdditionalData('NnComments') ?><br />
33
+ <?php else: ?>
34
+ <?php echo $this->__('Error in getting payment method') ?>
35
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Ccsecure.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()): ?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) { ?>
33
+ <?php echo $this->getAdditionalData('NnComments') ?><br />
34
+ <?php } ?>
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method') ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Elvaustria.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()):?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <!--<?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getAdditionalData('NnAccountHolder'))) ?><br />
33
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getAdditionalData('NnAccountNumber'))) ?><br />
34
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getAdditionalData('NnBankSortingCode'))) ?><br />-->
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method') ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Elvgerman.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()):?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <!--<?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getAdditionalData('NnAccountHolder'))) ?><br />
33
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getAdditionalData('NnAccountNumber'))) ?><br />
34
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getAdditionalData('NnBankSortingCode'))) ?><br />-->
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method') ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Ideal.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()): ?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getMethod()->getTitle()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) { ?>
33
+ <?php echo $this->getAdditionalData('NnComments') ?><br />
34
+ <?php } ?>
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method'); ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Invoice.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Mage
22
+ * @package Mage_Novalnet
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()):?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?>
32
+ <?php if (strlen($this->getAdditionalData('NnComments'))) { echo '<br>', nl2br($this->getAdditionalData('NnComments')); } ?>
33
+ <?php if (strlen($this->getAdditionalData('NnNote'))) { echo '<br>', nl2br($this->getAdditionalData('NnNote')); } ?>
34
+ <?php if (strlen($this->getAdditionalData('NnNoteAmount'))) { echo nl2br($this->getAdditionalData('NnNoteAmount')); } ?>
35
+ <?php if (strlen($this->getAdditionalData('NnNoteTID'))) { echo nl2br($this->getAdditionalData('NnNoteTID')); } ?>
36
+ <?php if (strlen($this->getAdditionalData('NnNoteTransfer'))) { echo nl2br($this->getAdditionalData('NnNoteTransfer')); } ?>
37
+ <?php if (strlen($this->getAdditionalData('NnScript'))) { echo '<br>', nl2br($this->getAdditionalData('NnScript')); } ?>
38
+ <?php else: ?>
39
+ <?php echo $this->__('Error in getting payment method') ?>
40
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Paypal.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()): ?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getMethod()->getTitle()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) { ?>
33
+ <?php echo $this->getAdditionalData('NnComments') ?><br />
34
+ <?php } ?>
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method'); ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Phonepayment.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()):?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) { ?>
33
+ <?php echo $this->getAdditionalData('NnComments') ?><br />
34
+ <?php } ?>
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method') ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Prepayment.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Mage
22
+ * @package Mage_Novalnet
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()):?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getPaymentMethod()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?>
32
+ <?php if (strlen($this->getAdditionalData('NnComments'))) { echo '<br>', nl2br($this->getAdditionalData('NnComments')); } ?>
33
+ <?php if (strlen($this->getAdditionalData('NnNote'))) { echo '<br>', nl2br($this->getAdditionalData('NnNote')); } ?>
34
+ <?php if (strlen($this->getAdditionalData('NnNoteAmount'))) { echo nl2br($this->getAdditionalData('NnNoteAmount')); } ?>
35
+ <?php if (strlen($this->getAdditionalData('NnNoteTID'))) { echo nl2br($this->getAdditionalData('NnNoteTID')); } ?>
36
+ <?php if (strlen($this->getAdditionalData('NnNoteTransfer'))) { echo nl2br($this->getAdditionalData('NnNoteTransfer')); } ?>
37
+ <?php if (strlen($this->getAdditionalData('NnScript'))) { echo '<br>', nl2br($this->getAdditionalData('NnScript')); } ?>
38
+ <?php else: ?>
39
+ <?php echo $this->__('Error in getting payment method') ?>
40
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/info/Sofortueberweisung.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_info = $this->getInfo()): ?>
28
+ <?php if ($this->getAdditionalData('NnTestOrder'))
29
+ 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->htmlEscape($this->getMethod()->getTitle()) ?><br />
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())).'<br />' ?>
32
+ <?php if ($this->getAdditionalData('NnComments')) { ?>
33
+ <?php echo $this->getAdditionalData('NnComments') ?><br />
34
+ <?php } ?>
35
+ <?php else: ?>
36
+ <?php echo $this->__('Error in getting payment method'); ?>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Cc.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Ccsecure.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Elvaustria.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Elvgerman.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Ideal.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Invoice.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
30
+ <?php if (strlen($this->getAdditionalData('NnComments'))) { echo $this->getAdditionalData('NnComments'); } ?>{{pdf_row_separator}}
31
+ <?php if (strlen($this->getAdditionalData('NnNote'))) { echo $this->getAdditionalData('NnNote'); } ?>{{pdf_row_separator}}
32
+ <?php if (strlen($this->getAdditionalData('NnNoteAmount'))) { echo $this->getAdditionalData('NnNoteAmount'); } ?>{{pdf_row_separator}}
33
+ <?php if (strlen($this->getAdditionalData('NnNoteTID'))) { echo $this->getAdditionalData('NnNoteTID'); } ?>{{pdf_row_separator}}
34
+ <?php if (strlen($this->getAdditionalData('NnNoteTransfer'))) { echo $this->getAdditionalData('NnNoteTransfer'); } ?>{{pdf_row_separator}}
35
+ <?php if (strlen($this->getAdditionalData('NnScript'))) { echo $this->getAdditionalData('NnScript'); } ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Paypal.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
30
+ <?php if (strlen($this->getAdditionalData('NnComments'))) { echo $this->getAdditionalData('NnComments'); } ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Phonepayment.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Prepayment.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
30
+ <?php if (strlen($this->getAdditionalData('NnComments'))) { echo $this->getAdditionalData('NnComments'); } ?>{{pdf_row_separator}}
31
+ <?php if (strlen($this->getAdditionalData('NnNote'))) { echo $this->getAdditionalData('NnNote'); } ?>{{pdf_row_separator}}
32
+ <?php if (strlen($this->getAdditionalData('NnNoteAmount'))) { echo $this->getAdditionalData('NnNoteAmount'); } ?>{{pdf_row_separator}}
33
+ <?php if (strlen($this->getAdditionalData('NnNoteTID'))) { echo $this->getAdditionalData('NnNoteTID'); } ?>{{pdf_row_separator}}
34
+ <?php if (strlen($this->getAdditionalData('NnNoteTransfer'))) { echo $this->getAdditionalData('NnNoteTransfer'); } ?>{{pdf_row_separator}}
35
+ <?php if (strlen($this->getAdditionalData('NnScript'))) { echo $this->getAdditionalData('NnScript'); } ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/payment/method/pdf/Sofortueberweisung.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAdditionalData('NnTestOrder')) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
28
+ <strong><?php echo Mage::helper('novalnet_payment')->__('%s',$this->getMethod()->getTitle()) ?></strong>{{pdf_row_separator}}
29
+ <?php echo Mage::helper('novalnet_payment')->__('TID: %s',$this->getInfo()->getLastTransId()) ?>{{pdf_row_separator}}
app/design/adminhtml/default/default/template/novalnet/pci/form.phtml DELETED
@@ -1,69 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- ?>
28
- <?php
29
- $code=$this->getMethodCode();
30
- $baseUrl=Mage::getBaseUrl('skin');
31
- ?>
32
- <?php if ($this->checkCustomerAccess()):?>
33
- <fieldset class="form-list">
34
- <?php if($code!='novalnetCcpci'): ?>
35
- <div style="width:100px;">
36
- <?php $imgpath = "images/novalnet/ELV_Logo.png"; ?>
37
- <img style="height:20px;" src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='ELV Logo'/>
38
- <?php else:?>
39
- <div style="width:130px;">
40
- <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
41
- <?php $imgpath = "images/novalnet/". $_typeCode ."_Logo.png"; ?>
42
- <img style="height:20px;" src='<?php echo Mage::getDesign()->getSkinUrl($imgpath) ?>' alt='<?php echo $_typeName; ?> Logo'/>
43
- <?php endforeach; ?>
44
- <?php endif; ?>
45
- </div>
46
- <ul id="payment_form_<?php echo $code ?>" style="display:none">
47
- <li>
48
- <?php echo $this->__('You will be redirected to Novalnet AG website when you place an order.') ?>
49
- </li>
50
- </ul>
51
- </fieldset>
52
- <?php else:?>
53
- <script type="text/javascript">
54
- function hideMe(payment_code){
55
- t = 'p_method_' + payment_code.toString();
56
- document.getElementById(t).style.visibility = 'hidden';
57
- aTags = document.getElementsByTagName("label");
58
- if (aTags && aTags.length) {
59
- for (i=0; i<aTags.length; i++){
60
- if (aTags[i].htmlFor == t){
61
- aTags[i].style.visibility = 'hidden';
62
- i = aTags.length;
63
- }
64
- }
65
- }
66
- }
67
- <?php echo "hideMe('$code');"; ?>
68
- </script>
69
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/pci/info.phtml DELETED
@@ -1,34 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/phonepayment/form.phtml DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- ?>
30
- <?php
31
- $code = $this->getMethodCode();
32
- $baseUrl = Mage::getBaseUrl('skin')
33
- ?>
34
- <?php if ($this->checkCustomerAccess()):?>
35
- <fieldset class="form-list">
36
- <ul id="payment_form_<?php echo $code ?>" style="display:none">
37
- <li>
38
- <div class="input-box">
39
- <?php echo $this->__('Amount below 0.90 Euro and above 10.00 Euro is not accepted')?><br />
40
- </div>
41
- </li>
42
- </ul>
43
- </fieldset>
44
- <?php else:?>
45
- <script type="text/javascript">
46
- function hideMe(payment_code){
47
- t = 'p_method_' + payment_code.toString();
48
- document.getElementById(t).style.visibility = 'hidden';
49
- aTags = document.getElementsByTagName("label");
50
- if (aTags && aTags.length) {
51
- for (i=0; i<aTags.length; i++){
52
- if (aTags[i].htmlFor == t){
53
- aTags[i].style.visibility = 'hidden';
54
- i = aTags.length;
55
- }
56
- }
57
- }
58
- }
59
- <?php echo "hideMe('$code');"; ?>
60
- </script>
61
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/phonepayment/info.phtml DELETED
@@ -1,34 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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())) ?>
32
- <?php if (strlen($this->getNnComments())) { echo '<br>', nl2br($this->getNnComments()); } ?>
33
- <?php else: ?>
34
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/prepayment/form.phtml DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
-
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) 2012 Novalnet AG
25
- * @version 3.0.1
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- ?>
30
- <?php
31
- $code = $this->getMethodCode();
32
- $baseUrl = Mage::getBaseUrl('skin')
33
- ?>
34
- <?php if ($this->checkCustomerAccess()):?>
35
- <fieldset class="form-list">
36
- <ul id="payment_form_<?php echo $code ?>" style="display:none">
37
- <li>
38
- <div class="input-box">
39
- <?php echo $this->__($this->htmlEscape('The Bank details will be emailed to you soon after the completion of checkout process'))?><br />
40
- </div>
41
- </li>
42
- </ul>
43
- </fieldset>
44
- <?php else: ?>
45
- <script type="text/javascript">
46
- function hideMe(payment_code){
47
- t = 'p_method_' + payment_code.toString();
48
- document.getElementById(t).style.visibility = 'hidden';
49
- aTags = document.getElementsByTagName("label");
50
- if (aTags && aTags.length) {
51
- for (i=0; i<aTags.length; i++){
52
- if (aTags[i].htmlFor == t){
53
- aTags[i].style.visibility = 'hidden';
54
- i = aTags.length;
55
- }
56
- }
57
- }
58
- }
59
- <?php echo "hideMe('$code');"; ?>
60
- </script>
61
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/prepayment/info.phtml DELETED
@@ -1,34 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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())) ?>
32
- <?php if (strlen($this->getNnComments())) { echo '<br>', nl2br($this->getNnComments()); } ?>
33
- <?php else: ?>
34
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/sales/order/view/tab/transactionoverview.phtml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ $transactioOverviewCollection = $this->getTransactionOverview();
27
+ $i = 1;
28
+ foreach ($transactioOverviewCollection as $transactioOverviewId => $data) {
29
+ ?>
30
+ <?php if ($i == 1): ?>
31
+ <div class="box-left">
32
+ <!--Novalnet Order Information-->
33
+ <div class="entry-edit">
34
+ <div class="entry-edit-head">
35
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Order Information') ?></h4>
36
+ </div>
37
+ <div class="fieldset">
38
+ <table cellspacing="0" class="form-list">
39
+ <tr>
40
+ <td class="label">
41
+ <label><?php echo $this->helper('novalnet_payment')->__('Store-ID') ?></label>
42
+ </td>
43
+ <td class="label">
44
+ <strong><?php echo $data->getStoreId() ?></strong>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <td class="label">
49
+ <label><?php echo $this->helper('novalnet_payment')->__('Order-ID') ?></label>
50
+ </td>
51
+ <td class="label">
52
+ <strong><?php echo $data->getOrderId() ?></strong>
53
+ </td>
54
+ </tr>
55
+ </table>
56
+ </div>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="box-right">
61
+ <!--Novalnet Order Information-->
62
+ <div class="entry-edit">
63
+ <div class="entry-edit-head">
64
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Additional Information') ?></h4>
65
+ </div>
66
+ <div class="fieldset">
67
+ <table cellspacing="0" class="form-list">
68
+ <tr>
69
+ <td class="label">
70
+ <label><?php echo $this->helper('novalnet_payment')->__('Customer-ID') ?></label>
71
+ </td>
72
+ <td class="label">
73
+ <strong><?php echo $data->getCustomerId() ?></strong>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td class="label">
78
+ <label><?php echo $this->helper('novalnet_payment')->__('Shop URL') ?></label>
79
+ </td>
80
+ <td style="word-break:break-word;">
81
+ <strong><?php echo $data->getShopUrl() ?></strong>
82
+ </td>
83
+ </tr>
84
+ </table>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <?php endif;
89
+ $i++; ?>
90
+
91
+ <!-- Novalnet API Data -->
92
+ <div class="box-left" style="clear:both;">
93
+ <div class="entry-edit">
94
+ <div class="entry-edit-head">
95
+ <h4 class="icon-head head-payment-method" style="float:none;">
96
+ <?php echo Mage::helper('novalnet_payment')->__('Novalnet Request Data') ?>
97
+ <span style="float:right;"><?php echo 'TID : ' . $data->getTransactionId() ?></span>
98
+ </h4>
99
+ </div>
100
+ <div class="fieldset">
101
+ <table cellspacing="0" class="form-list" width="100%">
102
+ <tr>
103
+ <td class="label">
104
+ <label><?php echo $this->helper('novalnet_payment')->__('Request Data') ?></label><br/>
105
+ <?php
106
+ $getrequestData = unserialize($data->getRequestData());
107
+ if ($getrequestData) {
108
+ ?>
109
+ <div style="height:250px;overflow:scroll;width:470px;">
110
+ <strong> <?php echo "<pre>";
111
+ print_r($getrequestData);
112
+ echo "</pre>"; ?> </strong>
113
+ </div>
114
+ <?php } ?>
115
+ </td>
116
+ </tr>
117
+ </table>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ <div class="box-right">
123
+ <div class="entry-edit">
124
+ <div class="entry-edit-head">
125
+ <h4 class="icon-head head-payment-method" style="float:none;">
126
+ <?php echo Mage::helper('novalnet_payment')->__('Novalnet Response Data') ?>
127
+ <span style="float:right;"><?php echo 'TID : ' . $data->getTransactionId() ?></span>
128
+ </h4>
129
+ </div>
130
+ <div class="fieldset">
131
+ <table cellspacing="0" class="form-list" width="100%">
132
+ <tr>
133
+ <td class="label">
134
+ <label><?php echo $this->helper('novalnet_payment')->__('Response Data') ?></label><br>
135
+ <?php
136
+ $getresponseData = unserialize($data->getResponseData());
137
+ if ($getresponseData) {
138
+ ?>
139
+ <div style="height:250px;overflow:scroll;width:470px;">
140
+ <strong> <?php echo "<pre>";
141
+ print_r($getresponseData);
142
+ echo "</pre>"; ?> </strong>
143
+ </div>
144
+ <?php } ?>
145
+ </td>
146
+ </tr>
147
+ </table>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ <?php
152
+ }
153
+
154
+ ?>
app/design/adminhtml/default/default/template/novalnet/sales/order/view/tab/transactionstatus.phtml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ $data = $this->getTransaction();
27
+ ?>
28
+ <input type="hidden" name="order_id" value="<?php echo $data->getOrderId() ?>"/>
29
+
30
+ <div class="box-left">
31
+ <!--Novalnet Order Information-->
32
+ <div class="entry-edit">
33
+ <div class="entry-edit-head">
34
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Order Information') ?></h4>
35
+ </div>
36
+ <div class="fieldset">
37
+ <table cellspacing="0" class="form-list">
38
+ <tr>
39
+ <td class="label">
40
+ <label><?php echo $this->helper('novalnet_payment')->__('Store-ID') ?></label>
41
+ </td>
42
+ <td class="label">
43
+ <strong><?php echo $data->getStoreId() ?></strong>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <td class="label">
48
+ <label><?php echo $this->helper('novalnet_payment')->__('Order-ID') ?></label>
49
+ </td>
50
+ <td class="label">
51
+ <strong><?php echo $data->getOrderId() ?></strong>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td class="label">
56
+ <label><?php echo $this->helper('novalnet_payment')->__('Tranaction-ID') ?></label>
57
+ </td>
58
+ <td class="label">
59
+ <strong><?php echo $data->getTransactionNo() ?></strong>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td class="label">
64
+ <label><?php echo $this->helper('novalnet_payment')->__('Transaction-Status') ?></label>
65
+ </td>
66
+ <td class="label">
67
+ <strong><?php echo $data->getTransactionStatus() ?></strong>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td class="label">
72
+ <label><?php echo $this->helper('novalnet_payment')->__('NC No') ?></label>
73
+ </td>
74
+ <td class="label">
75
+ <strong><?php echo $data->getNcNo() ?></strong>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td class="label">
80
+ <label><?php echo $this->helper('novalnet_payment')->__('Customer-ID') ?></label>
81
+ </td>
82
+ <td class="label">
83
+ <strong><?php echo $data->getCustomerId() ?></strong>
84
+ </td>
85
+ </tr>
86
+ </table>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <div class="box-right">
91
+ <!--Novalnet Order Shop Information-->
92
+ <div class="entry-edit">
93
+ <div class="entry-edit-head">
94
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Shop Information') ?></h4>
95
+ </div>
96
+ </div>
97
+ <div class="fieldset">
98
+ <table cellspacing="0" class="form-list">
99
+ <tr>
100
+ <td class="label">
101
+ <label><?php echo $this->helper('novalnet_payment')->__('Shop URL') ?></label>
102
+ </td>
103
+ <td class="label">
104
+ <strong><?php echo $data->getShopUrl() ?></strong>
105
+ </td>
106
+ </tr>
107
+ </table>
108
+ </div>
109
+
110
+ <!--Novalnet Order Additional Information-->
111
+ <div class="entry-edit">
112
+ <div class="entry-edit-head">
113
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Additional Information') ?></h4>
114
+ </div>
115
+ </div>
116
+ <div class="fieldset">
117
+ <table cellspacing="0" class="form-list">
118
+ <tr>
119
+ <td class="label">
120
+ <label><?php echo $this->helper('novalnet_payment')->__('Additional Data') ?></label>
121
+ </td>
122
+ <td class="label">
123
+ <strong><?php echo $data->getAdditionalData() ?></strong>
124
+ </td>
125
+ </tr>
126
+ </table>
127
+ </div>
128
+ </div>
app/design/adminhtml/default/default/template/novalnet/secure/form.phtml DELETED
@@ -1,115 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
- ?>
28
- <?php
29
- $code=$this->getMethodCode();
30
- $baseUrl=Mage::getBaseUrl('skin');
31
- ?>
32
- <?php if ($this->checkCustomerAccess()): ?>
33
- <fieldset class="form-list">
34
- <div style="width:130px;">
35
- <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
36
- <?php $imgpath = "images/novalnet/". $_typeCode ."_Logo.png"; ?>
37
- <img style="height:20px;" 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>
42
- <div class="input-box">
43
- <label for="<?php echo $code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
44
- <select id="<?php echo $code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
45
- <option value=""><?php echo $this->__('--Please Select--')?></option>
46
- <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
47
- <option value="<?php echo $_typeCode ?>"><?php echo $_typeName ?></option>
48
- <?php endforeach; ?>
49
- </select>
50
- </div>
51
- </li>
52
- <li>
53
- <div class="input-box">
54
- <label for="<?php echo $code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
55
- <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $code ?>_cc_owner" name="payment[cc_owner]" value=""/>
56
- </div>
57
- </li>
58
- <li>
59
- <div class="input-box">
60
- <label for="<?php echo $code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
61
- <input type="text" id="<?php echo $code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
62
- </div>
63
- </li>
64
- <li>
65
- <div class="input-box">
66
- <label for="<?php echo $code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
67
- <div class="v-fix">
68
- <select id="<?php echo $code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
69
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
70
- <option value="<?php echo $k ?>"><?php echo $v ?></option>
71
- <?php endforeach; ?>
72
- </select>
73
- </div>
74
- <div class="v-fix" style="padding-left:5px;">
75
- <select id="<?php echo $code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
76
- <?php foreach ($this->getCcYears() as $k=>$v): ?>
77
- <option value="<?php echo $k ?>"><?php echo $v ?></option>
78
- <?php endforeach; ?>
79
- </select>
80
- </div>
81
- </div>
82
- </li>
83
- <?php if($this->hasVerification()): ?>
84
- <li>
85
- <div class="input-box">
86
- <label for="<?php echo $code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
87
- <div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="" /></div>
88
- &nbsp;
89
- <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
90
- </div>
91
- </li>
92
- <?php endif; ?>
93
- <li>
94
- <?php echo $this->__('The amount will be booked immediately from your credit card<BR>with <B>%s</B> note.',$this->getMethod()->getBookingReference());?>
95
- </li>
96
- </ul>
97
- </fieldset>
98
- <?php else: ?>
99
- <script type="text/javascript">
100
- function hideMe(payment_code){
101
- t = 'p_method_' + payment_code.toString();
102
- document.getElementById(t).style.visibility = 'hidden';
103
- aTags = document.getElementsByTagName("label");
104
- if (aTags && aTags.length) {
105
- for (i=0; i<aTags.length; i++){
106
- if (aTags[i].htmlFor == t){
107
- aTags[i].style.visibility = 'hidden';
108
- i = aTags.length;
109
- }
110
- }
111
- }
112
- }
113
- <?php echo "hideMe('$code');"; ?>
114
- </script>
115
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/secure/info.phtml DELETED
@@ -1,38 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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 echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br />
32
- <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
33
- <?php echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getCcNumberEnc())) ?><br />
34
- <?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape(str_pad('',2,'*',STR_PAD_RIGHT)), $this->htmlEscape(str_pad(substr($this->getInfo()->getCcExpYear(),0,-2),strlen($this->getInfo()->getCcExpYear()),'*',STR_PAD_RIGHT))) ?><br />
35
- <?php echo $this->__('Card Verification Number: %s', '***') ?><br />
36
- <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
37
- <?php else: ?>
38
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnet/transaction/overview/view/form.phtml ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ //$data = $this->getTransaction();
27
+ $data = $this->getNovalnetTransactionOverview();
28
+ ?>
29
+ <div class="content-header">
30
+ <table cellspacing="0">
31
+ <tr>
32
+ <td><?php echo $this->getHeaderHtml() ?></td>
33
+ <td class="form-buttons">
34
+ <?php echo $this->getButtonsHtml() ?>
35
+ </td>
36
+ </tr>
37
+ </table>
38
+ </div>
39
+ <input type="hidden" name="order_id" value="<?php echo $data->getOrderId() ?>"/>
40
+
41
+ <div class="box-left">
42
+ <!--Novalnet Order Information-->
43
+ <div class="entry-edit">
44
+ <div class="entry-edit-head">
45
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Order Information') ?></h4>
46
+ </div>
47
+ <div class="fieldset">
48
+ <table cellspacing="0" class="form-list">
49
+ <tr>
50
+ <td class="label">
51
+ <label><?php echo $this->helper('novalnet_payment')->__('Store-ID') ?></label>
52
+ </td>
53
+ <td class="label">
54
+ <strong><?php echo $data->getStoreId() ?></strong>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td class="label">
59
+ <label><?php echo $this->helper('novalnet_payment')->__('Order-ID') ?></label>
60
+ </td>
61
+ <td class="label">
62
+ <strong><?php echo $data->getOrderId() ?></strong>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <td class="label">
67
+ <label><?php echo $this->helper('novalnet_payment')->__('Tranaction-ID') ?></label>
68
+ </td>
69
+ <td class="label">
70
+ <strong><?php echo $data->getTransactionId() ?></strong>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td class="label">
75
+ <label><?php echo $this->helper('novalnet_payment')->__('Customer-ID') ?></label>
76
+ </td>
77
+ <td class="label">
78
+ <strong><?php echo $data->getCustomerId() ?></strong>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <td class="label">
83
+ <label><?php echo $this->helper('novalnet_payment')->__('Payment Name') ?></label>
84
+ </td>
85
+ <td class="label">
86
+ <strong><?php echo $this->getPaymentTitle() ?></strong>
87
+ </td>
88
+ </tr>
89
+ </table>
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+
95
+ <div class="box-right">
96
+ <!--Novalnet Order Shop Information-->
97
+ <div class="entry-edit">
98
+ <div class="entry-edit-head">
99
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Shop Information') ?></h4>
100
+ </div>
101
+ <div class="fieldset">
102
+ <table cellspacing="0" class="form-list" width="100%">
103
+ <tr>
104
+ <td class="label">
105
+ <label><?php echo $this->helper('novalnet_payment')->__('Shop URL') ?></label>
106
+ </td>
107
+ <td style="word-break:break-word;">
108
+ <strong><?php echo $data->getShopUrl() ?></strong>
109
+ </td>
110
+ </tr>
111
+ </table>
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+ <div class="box-right">
117
+ <!--Novalnet Order Additional Information-->
118
+ <div class="entry-edit">
119
+ <div class="entry-edit-head">
120
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Additional Information') ?></h4>
121
+ </div>
122
+ <div class="fieldset">
123
+ <table cellspacing="0" class="form-list">
124
+ <tr>
125
+ <td class="label">
126
+ <label><?php echo $this->helper('novalnet_payment')->__('Additional Data') ?></label>
127
+ </td>
128
+ <td style="word-break:break-word;">
129
+ <strong><?php echo $data->getAdditionalData() ?></strong>
130
+ </td>
131
+ </tr>
132
+ </table>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ <!-- Novalnet API Data -->
137
+ <div class="box-left" style="clear:both;">
138
+ <div class="entry-edit">
139
+ <div class="entry-edit-head">
140
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Request Data') ?></h4>
141
+ </div>
142
+ <div class="fieldset">
143
+ <table cellspacing="0" class="form-list" width="100%">
144
+ <tr>
145
+ <td class="label">
146
+ <label><?php echo $this->helper('novalnet_payment')->__('Request Data') ?></label><br>
147
+ <div style="height:250px;overflow:scroll;width:600px;"><strong><?php
148
+
149
+ $getrequestData = unserialize($data->getRequestData());
150
+ echo "<pre>";print_r($getrequestData);echo "</pre>";
151
+
152
+ ?></strong></div>
153
+ </td>
154
+ </tr>
155
+ </table>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+ <div class="box-right">
161
+ <div class="entry-edit">
162
+ <div class="entry-edit-head">
163
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Response Data') ?></h4>
164
+ </div>
165
+ <div class="fieldset">
166
+ <table cellspacing="0" class="form-list" width="100%">
167
+ <tr>
168
+ <td class="label">
169
+ <label><?php echo $this->helper('novalnet_payment')->__('Response Data') ?></label><br>
170
+ <div style="height:250px;overflow:scroll;width:600px;"><strong><?php
171
+
172
+ $getresponseData = unserialize($data->getResponseData());
173
+ echo "<pre>";print_r($getresponseData);echo "</pre>";
174
+
175
+ ?></strong></div>
176
+ </td>
177
+ </tr>
178
+ </table>
179
+ </div>
180
+ </div>
181
+ </div>
app/design/adminhtml/default/default/template/novalnet/transaction/view/form.phtml ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Paymentmodule of Novalnet AG
16
+ * https://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 Novalnet
22
+ * @package Novalnet_Payment
23
+ * @copyright Novalnet AG
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ $data = $this->getNovalnetTransactionStatus();
28
+
29
+ ?>
30
+
31
+ <div class="content-header">
32
+ <table cellspacing="0">
33
+ <tr>
34
+ <td><?php echo $this->getHeaderHtml() ?></td>
35
+ <td class="form-buttons">
36
+ <?php echo $this->getButtonsHtml() ?>
37
+ </td>
38
+ </tr>
39
+ </table>
40
+ </div>
41
+ <input type="hidden" name="order_id" value="<?php echo $data->getOrderNo() ?>"/>
42
+
43
+ <div class="box-left">
44
+ <!--Novalnet Order Information-->
45
+ <div class="entry-edit">
46
+ <div class="entry-edit-head">
47
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Order Information') ?></h4>
48
+ </div>
49
+ <div class="fieldset">
50
+ <table cellspacing="0" class="form-list">
51
+ <tr>
52
+ <td class="label">
53
+ <label><?php echo $this->helper('novalnet_payment')->__('Store-ID') ?></label>
54
+ </td>
55
+ <td class="label">
56
+ <strong><?php echo $data->getStoreId() ?></strong>
57
+ </td>
58
+ </tr>
59
+ <tr>
60
+ <td class="label">
61
+ <label><?php echo $this->helper('novalnet_payment')->__('Order-ID') ?></label>
62
+ </td>
63
+ <td class="label">
64
+ <strong><?php echo $data->getOrderId() ?></strong>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <td class="label">
69
+ <label><?php echo $this->helper('novalnet_payment')->__('Tranaction-ID') ?></label>
70
+ </td>
71
+ <td class="label">
72
+ <strong><?php echo $data->getTransactionNo() ?></strong>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <td class="label">
77
+ <label><?php echo $this->helper('novalnet_payment')->__('Transaction-Status Text') ?></label>
78
+ </td>
79
+ <td class="label">
80
+ <strong>
81
+ <?php
82
+ if($data->getTransactionStatus() == 100) {
83
+ echo $this->helper('novalnet_payment')->__('Successful');
84
+ }elseif($data->getTransactionStatus() == 103) {
85
+ echo $this->helper('novalnet_payment')->__('Transaction deactivate');
86
+ }elseif(in_array($data->getTransactionStatus(), array(98, 99, 91))) {
87
+ echo $this->helper('novalnet_payment')->__('TID on hold');
88
+ }elseif($data->getTransactionStatus() == 90) {
89
+ echo $this->helper('novalnet_payment')->__('PayPal Payment Pending');
90
+ }elseif($data->getTransactionStatus() == 18) {
91
+ echo $this->helper('novalnet_payment')->__('Zahlungsanruf noch nicht durchgeführt');
92
+ }
93
+ ?>
94
+ </strong>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td class="label">
99
+ <label><?php echo $this->helper('novalnet_payment')->__('Transaction-Status') ?></label>
100
+ </td>
101
+ <td class="label">
102
+ <strong><?php echo $data->getTransactionStatus() ?></strong>
103
+ </td>
104
+ </tr>
105
+ <tr>
106
+ <td class="label">
107
+ <label><?php echo $this->helper('novalnet_payment')->__('NC No') ?></label>
108
+ </td>
109
+ <td class="label">
110
+ <strong><?php echo $data->getNcNo() ?></strong>
111
+ </td>
112
+ </tr>
113
+ <tr>
114
+ <td class="label">
115
+ <label><?php echo $this->helper('novalnet_payment')->__('Customer-ID') ?></label>
116
+ </td>
117
+ <td class="label">
118
+ <strong><?php echo $data->getCustomerId() ?></strong>
119
+ </td>
120
+ </tr>
121
+ <tr>
122
+ <td class="label">
123
+ <label><?php echo $this->helper('novalnet_payment')->__('Amount') ?></label>
124
+ </td>
125
+ <td class="label">
126
+ <strong><?php echo sprintf('%.2f', $data->getAmount()) ." ". $this->getCurrencyCode() ?></strong>
127
+ </td>
128
+ </tr>
129
+ <tr>
130
+ <td class="label">
131
+ <label><?php echo $this->helper('novalnet_payment')->__('Payment Name') ?></label>
132
+ </td>
133
+ <td class="label">
134
+ <strong><?php echo $this->getPaymentTitle() ?></strong>
135
+ </td>
136
+ </tr>
137
+ </table>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ <div class="box-right">
142
+ <!--Novalnet Order Shop Information-->
143
+ <div class="entry-edit">
144
+ <div class="entry-edit-head">
145
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Shop Information') ?></h4>
146
+ </div>
147
+ <div class="fieldset">
148
+ <table cellspacing="0" class="form-list" width="100%">
149
+ <tr>
150
+ <td class="label">
151
+ <label><?php echo $this->helper('novalnet_payment')->__('Shop URL') ?></label>
152
+ </td>
153
+ <td style="word-break:break-word;">
154
+ <strong><?php echo $data->getShopUrl() ?></strong>
155
+ </td>
156
+ </tr>
157
+ </table>
158
+ </div>
159
+ </div>
160
+ </div>
161
+
162
+ <div class="box-right">
163
+ <!--Novalnet Order Additional Information-->
164
+ <div class="entry-edit">
165
+ <div class="entry-edit-head">
166
+ <h4 class="icon-head head-payment-method"><?php echo Mage::helper('novalnet_payment')->__('Novalnet Additional Information') ?></h4>
167
+ </div>
168
+ <div class="fieldset">
169
+ <table cellspacing="0" class="form-list">
170
+ <tr>
171
+ <td class="label">
172
+ <label><?php echo $this->helper('novalnet_payment')->__('Additional Data') ?></label>
173
+ </td>
174
+ <td style="word-break:break-word;">
175
+ <strong><?php echo $data->getAdditionalData() ?></strong>
176
+ </td>
177
+ </tr>
178
+ </table>
179
+ </div>
180
+ </div>
181
+ </div>
app/design/adminhtml/default/default/template/novalnetpaypal/form/novalnetpaypal.phtml DELETED
@@ -1 +0,0 @@
1
- <?php echo Mage::helper('novalnetpaypal')->__('Not possible'); ?>
 
app/design/adminhtml/default/default/template/novalnetpaypal/info/novalnetpaypal.phtml DELETED
@@ -1,34 +0,0 @@
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) 2012 Novalnet AG
24
- * @version 3.0.1
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; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnetpaypal/info/pdf/novalnetpaypal.phtml DELETED
@@ -1,7 +0,0 @@
1
- <?php if($_info = $this->getInfo()): ?>
2
- <?php if( $this->getNnTestorder() ) echo $this->__('Testorder'); ?>{{pdf_row_separator}}
3
- <?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?>{{pdf_row_separator}}
4
- <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?>{{pdf_row_separator}}
5
- <?php else: ?>
6
- Error in getting payment method
7
- <?php endif; ?>
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnetsofortueberweisung/form/sofortueberweisung.phtml DELETED
@@ -1 +0,0 @@
1
- <?php echo Mage::helper('sofortueberweisung')->__('Not possible'); ?>
 
app/design/adminhtml/default/default/template/novalnetsofortueberweisung/info/pdf/paycode.phtml DELETED
@@ -1,6 +0,0 @@
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; ?>
 
 
 
 
 
 
app/design/adminhtml/default/default/template/novalnetsofortueberweisung/info/pdf/sofortueberweisung.phtml CHANGED
File without changes