Version Notes
Update transaction status button.
Bugs fixed
Download this release
Release Info
Developer | Filipp Akinfiev |
Extension | mPAY24 |
Version | 1.1.8 |
Comparing to | |
See all releases |
Version 1.1.8
- app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Fieldset.php +221 -0
- app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Global.php +195 -0
- app/code/community/Mpay24/Mpay24/Block/Form.php +57 -0
- app/code/community/Mpay24/Mpay24/Block/Form/Cc.php +103 -0
- app/code/community/Mpay24/Mpay24/Block/Form/Elv.php +58 -0
- app/code/community/Mpay24/Mpay24/Block/Form/Paybox.php +57 -0
- app/code/community/Mpay24/Mpay24/Block/Form/Selectpayment.php +35 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCashTicket.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCb.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCc.php +158 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentElv.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentEps.php +43 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentGiropay.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMaestro.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMia.php +44 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMpass.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPaybox.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPaypal.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPsc.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentQuick.php +36 -0
- app/code/community/Mpay24/Mpay24/Block/Info/Cc.php +86 -0
- app/code/community/Mpay24/Mpay24/Block/Info/Elv.php +57 -0
- app/code/community/Mpay24/Mpay24/Block/Info/Paybox.php +61 -0
- app/code/community/Mpay24/Mpay24/Block/Info/Selectpayment.php +63 -0
- app/code/community/Mpay24/Mpay24/Block/Mpay24.php +33 -0
- app/code/community/Mpay24/Mpay24/Block/ParentRedirect.php +30 -0
- app/code/community/Mpay24/Mpay24/Block/Redirect.php +41 -0
- app/code/community/Mpay24/Mpay24/Block/Update.php +65 -0
- app/code/community/Mpay24/Mpay24/Helper/Data.php +23 -0
- app/code/community/Mpay24/Mpay24/Model/Api/Mpay24.php +732 -0
- app/code/community/Mpay24/Mpay24/Model/Cc.php +206 -0
- app/code/community/Mpay24/Mpay24/Model/Config.php +96 -0
- app/code/community/Mpay24/Mpay24/Model/Convert/Order.php +39 -0
- app/code/community/Mpay24/Mpay24/Model/Convert/Quote.php +40 -0
- app/code/community/Mpay24/Mpay24/Model/Elv.php +162 -0
- app/code/community/Mpay24/Mpay24/Model/Entity/Setup.php +47 -0
- app/code/community/Mpay24/Mpay24/Model/Method/Abstract.php +102 -0
- app/code/community/Mpay24/Mpay24/Model/Method/Cc.php +198 -0
- app/code/community/Mpay24/Mpay24/Model/Method/Selectpayment.php +493 -0
- app/code/community/Mpay24/Mpay24/Model/Method/Selectpayment.php.new~ +493 -0
- app/code/community/Mpay24/Mpay24/Model/Mpay24/Debug.php +25 -0
- app/code/community/Mpay24/Mpay24/Model/Mysql4/Mpay24/Debug.php +25 -0
- app/code/community/Mpay24/Mpay24/Model/Mysql4/Mpay24/Debug/Collection.php +25 -0
- app/code/community/Mpay24/Mpay24/Model/Mysql4/Setup.php +23 -0
- app/code/community/Mpay24/Mpay24/Model/Paybox.php +152 -0
- app/code/community/Mpay24/Mpay24/Model/Selectpayment.php +0 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentCashTicket.php +79 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentCb.php +99 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentCc.php +99 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentElv.php +80 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentEps.php +54 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentGiropay.php +49 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentMaestro.php +61 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentMia.php +54 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentMpass.php +79 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentPaybox.php +78 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentPaypal.php +79 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentPsc.php +48 -0
- app/code/community/Mpay24/Mpay24/Model/SelectpaymentQuick.php +49 -0
- app/code/community/Mpay24/Mpay24/Model/Session.php +27 -0
- app/code/community/Mpay24/Mpay24/Model/Source/BillAddr.php +36 -0
- app/code/community/Mpay24/Mpay24/Model/Source/Cctype.php +47 -0
- app/code/community/Mpay24/Mpay24/Model/Source/ClearingAction.php +29 -0
- app/code/community/Mpay24/Mpay24/Model/Source/ElvCountryAction.php +45 -0
- app/code/community/Mpay24/Mpay24/Model/Source/Elvtype.php +45 -0
- app/code/community/Mpay24/Mpay24/Model/Source/EpsCountryAction.php +28 -0
- app/code/community/Mpay24/Mpay24/Model/Source/EpsTypesAction.php +54 -0
- app/code/community/Mpay24/Mpay24/Model/Source/GiropayCountryAction.php +28 -0
- app/code/community/Mpay24/Mpay24/Model/Source/MaestroCountryAction.php +29 -0
- app/code/community/Mpay24/Mpay24/Model/Source/MiaCountryAction.php +28 -0
- app/code/community/Mpay24/Mpay24/Model/Source/MiaTypesAction.php +29 -0
- app/code/community/Mpay24/Mpay24/Model/Source/PayboxCountryAction.php +28 -0
- app/code/community/Mpay24/Mpay24/Model/Source/PaysafecardCountryAction.php +28 -0
- app/code/community/Mpay24/Mpay24/Model/Source/Request.php +23 -0
- app/code/community/Mpay24/Mpay24/Model/Source/Result.php +23 -0
- app/code/community/Mpay24/Mpay24/Model/Source/ShoppingCartRowsAction.php +34 -0
- app/code/community/Mpay24/Mpay24/Model/System/Config/Backend/Encrypted.php +71 -0
- app/code/community/Mpay24/Mpay24/controllers/AdminhtmlController.php +74 -0
- app/code/community/Mpay24/Mpay24/controllers/IndexController.php +25 -0
- app/code/community/Mpay24/Mpay24/controllers/PaymentController.php +661 -0
- app/code/community/Mpay24/Mpay24/etc/config.xml +414 -0
- app/code/community/Mpay24/Mpay24/etc/system.xml +1280 -0
- app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-install-1.1.8.php +42 -0
- app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-uninstall-1.1.8.php +29 -0
- app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-0.6.2-1.1.8.php +29 -0
- app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-0.6.3-1.1.8.php +29 -0
- app/design/adminhtml/default/default/template/mpay24/info/ajaxRequest.txt +1 -0
- app/design/adminhtml/default/default/template/mpay24/info/cc.phtml +26 -0
- app/design/adminhtml/default/default/template/mpay24/info/elv.phtml +25 -0
- app/design/adminhtml/default/default/template/mpay24/info/giropay.phtml +26 -0
- app/design/adminhtml/default/default/template/mpay24/info/mia.phtml +24 -0
- app/design/adminhtml/default/default/template/mpay24/info/paybox.phtml +23 -0
- app/design/adminhtml/default/default/template/mpay24/info/paysafecard.phtml +23 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/cc.phtml +27 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/elv.phtml +26 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/giropay.phtml +27 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/mia.phtml +22 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/paybox.phtml +21 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/paysafecard.phtml +22 -0
- app/design/adminhtml/default/default/template/mpay24/info/pdf/selectpayment.phtml +22 -0
- app/design/adminhtml/default/default/template/mpay24/info/selectpayment.phtml +89 -0
- app/design/adminhtml/default/default/template/mpay24/prototype.js +3277 -0
- app/design/adminhtml/default/default/template/mpay24/system/config/fieldset/global.phtml +515 -0
- app/design/frontend/default/default/layout/mpay24.xml +27 -0
- app/design/frontend/default/default/template/mpay24/error.phtml +5 -0
- app/design/frontend/default/default/template/mpay24/form/cc.phtml +94 -0
- app/design/frontend/default/default/template/mpay24/form/elv.phtml +52 -0
- app/design/frontend/default/default/template/mpay24/form/giropay.phtml +43 -0
- app/design/frontend/default/default/template/mpay24/form/mia.phtml +52 -0
- app/design/frontend/default/default/template/mpay24/form/paybox.phtml +52 -0
- app/design/frontend/default/default/template/mpay24/form/paysafecard.phtml +28 -0
- app/design/frontend/default/default/template/mpay24/form/selectpayment.phtml +28 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentCashTicket.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentCc.phtml +123 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentElv.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentEps.phtml +34 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentGiropay.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentMaestro.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentMia.phtml +33 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentMpass.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentPaybox.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentPaypal.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentPsc.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/form/selectpaymentQuick.phtml +31 -0
- app/design/frontend/default/default/template/mpay24/info/cc.phtml +28 -0
- app/design/frontend/default/default/template/mpay24/info/elv.phtml +28 -0
- app/design/frontend/default/default/template/mpay24/info/giropay.phtml +28 -0
- app/design/frontend/default/default/template/mpay24/info/mia.phtml +26 -0
- app/design/frontend/default/default/template/mpay24/info/paybox.phtml +26 -0
- app/design/frontend/default/default/template/mpay24/info/paysafecard.phtml +21 -0
- app/design/frontend/default/default/template/mpay24/info/selectpayment.phtml +41 -0
- app/design/frontend/default/default/template/mpay24/mpay24.phtml +65 -0
- app/design/frontend/default/default/template/mpay24/redirect.phtml +35 -0
- app/etc/modules/Mpay24_Mpay24.xml +13 -0
- app/locale/de_AT/Mpay24_Mpay24.csv +46 -0
- app/locale/de_CH/Mpay24_Mpay24.csv +46 -0
- app/locale/de_DE/Mpay24_Mpay24.csv +46 -0
- app/locale/en_US/Mpay24_Mpay24.csv +52 -0
- package.xml +19 -0
- skin/adminhtml/default/default/images/mpay24/mpay24_header.png +0 -0
- skin/adminhtml/default/default/images/mpay24/mpay24_logo.gif +0 -0
- skin/adminhtml/default/default/images/mpay24/mpay24_section.png +0 -0
- skin/frontend/default/default/images/mpay24/AE.gif +0 -0
- skin/frontend/default/default/images/mpay24/AE.png +0 -0
- skin/frontend/default/default/images/mpay24/ARZ.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ.png +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_002.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_011.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_015.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_019.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_023.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_029.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_045.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_089.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_093.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_101_0.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_101_1.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_101_2.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_107.gif +0 -0
- skin/frontend/default/default/images/mpay24/ARZ_109.gif +0 -0
- skin/frontend/default/default/images/mpay24/ATOS.gif +0 -0
- skin/frontend/default/default/images/mpay24/ATOS.png +0 -0
- skin/frontend/default/default/images/mpay24/BA.gif +0 -0
- skin/frontend/default/default/images/mpay24/BA.png +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG.gif +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG.png +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG_1.gif +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG_2.gif +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG_3.gif +0 -0
- skin/frontend/default/default/images/mpay24/BAWAG_4.gif +0 -0
- skin/frontend/default/default/images/mpay24/CASHTICKET.gif +0 -0
- skin/frontend/default/default/images/mpay24/CASHTICKET.png +0 -0
- skin/frontend/default/default/images/mpay24/CC.gif +0 -0
- skin/frontend/default/default/images/mpay24/DC.gif +0 -0
- skin/frontend/default/default/images/mpay24/DC.png +0 -0
- skin/frontend/default/default/images/mpay24/ELV.gif +0 -0
- skin/frontend/default/default/images/mpay24/ELV.png +0 -0
- skin/frontend/default/default/images/mpay24/EPS.gif +0 -0
- skin/frontend/default/default/images/mpay24/EPS.png +0 -0
- skin/frontend/default/default/images/mpay24/EPS_small.gif +0 -0
- skin/frontend/default/default/images/mpay24/ERSTE.gif +0 -0
- skin/frontend/default/default/images/mpay24/ERSTE.png +0 -0
- skin/frontend/default/default/images/mpay24/ERSTE_1.gif +0 -0
- skin/frontend/default/default/images/mpay24/ERSTE_2.gif +0 -0
- skin/frontend/default/default/images/mpay24/GIROPAY.gif +0 -0
- skin/frontend/default/default/images/mpay24/GIROPAY.png +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-AT.gif +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-AT.png +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-DE.gif +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-DE.png +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-NL.gif +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX-NL.png +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX.gif +0 -0
- skin/frontend/default/default/images/mpay24/HOBEX.png +0 -0
- skin/frontend/default/default/images/mpay24/HYPO.gif +0 -0
- skin/frontend/default/default/images/mpay24/HYPO.png +0 -0
- skin/frontend/default/default/images/mpay24/JC.gif +0 -0
- skin/frontend/default/default/images/mpay24/JC.png +0 -0
- skin/frontend/default/default/images/mpay24/MAESTRO.gif +0 -0
- skin/frontend/default/default/images/mpay24/MAESTRO.png +0 -0
- skin/frontend/default/default/images/mpay24/MASTERCARD.gif +0 -0
- skin/frontend/default/default/images/mpay24/MASTERCARD_3DS.gif +0 -0
- skin/frontend/default/default/images/mpay24/MASTERCARD_NON_3DS.png +0 -0
- skin/frontend/default/default/images/mpay24/MC.png +0 -0
- skin/frontend/default/default/images/mpay24/MIA.gif +0 -0
- skin/frontend/default/default/images/mpay24/MPASS.gif +0 -0
- skin/frontend/default/default/images/mpay24/MPASS.png +0 -0
- skin/frontend/default/default/images/mpay24/ONE.gif +0 -0
- skin/frontend/default/default/images/mpay24/ONE.png +0 -0
- skin/frontend/default/default/images/mpay24/ORANGE.gif +0 -0
- skin/frontend/default/default/images/mpay24/ORANGE.png +0 -0
- skin/frontend/default/default/images/mpay24/PAYPAL.gif +0 -0
- skin/frontend/default/default/images/mpay24/PAYPAL.png +0 -0
- skin/frontend/default/default/images/mpay24/PB.gif +0 -0
- skin/frontend/default/default/images/mpay24/PB.png +0 -0
- skin/frontend/default/default/images/mpay24/PSC.gif +0 -0
- skin/frontend/default/default/images/mpay24/PSC.png +0 -0
- skin/frontend/default/default/images/mpay24/QUICK.gif +0 -0
- skin/frontend/default/default/images/mpay24/QUICK.png +0 -0
- skin/frontend/default/default/images/mpay24/RZB.gif +0 -0
- skin/frontend/default/default/images/mpay24/RZB.png +0 -0
- skin/frontend/default/default/images/mpay24/T-MOBILE.gif +0 -0
- skin/frontend/default/default/images/mpay24/T-MOBILE.png +0 -0
- skin/frontend/default/default/images/mpay24/VI.png +0 -0
- skin/frontend/default/default/images/mpay24/VISA.gif +0 -0
- skin/frontend/default/default/images/mpay24/VISA_3DS.gif +0 -0
- skin/frontend/default/default/images/mpay24/VISA_NON_3DS.png +0 -0
- skin/frontend/default/default/images/mpay24/VOLKSBANK.gif +0 -0
- skin/frontend/default/default/images/mpay24/VOLKSBANK.png +0 -0
- skin/frontend/default/default/images/mpay24/brands.png +0 -0
- skin/frontend/default/default/images/mpay24/mpay24.png +0 -0
- skin/frontend/default/default/images/mpay24/mpay24_section.png +0 -0
app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Fieldset.php
ADDED
@@ -0,0 +1,221 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Config form fieldset renderer
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mpay24_Mpay24_Block_Adminhtml_System_Config_Fieldset_Fieldset
|
36 |
+
extends Mage_Adminhtml_Block_Abstract
|
37 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
38 |
+
{
|
39 |
+
|
40 |
+
public $ccBrands = array();
|
41 |
+
public $epsBrands = array();
|
42 |
+
public $elvBrands = array();
|
43 |
+
public $pTypes = array();
|
44 |
+
/**
|
45 |
+
* Render fieldset html
|
46 |
+
*
|
47 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
51 |
+
{
|
52 |
+
|
53 |
+
if(Mage::getStoreConfig('payment/mpay24_sp_cc/active')){
|
54 |
+
$html = $this->_getHeaderHtml($element);
|
55 |
+
if($element->getHtmlId() === 'mpay24_mpay24_sp_paybox')
|
56 |
+
$elementName = 'mpay24_mpay24_sp_pb';
|
57 |
+
else
|
58 |
+
$elementName = $element->getHtmlId();
|
59 |
+
|
60 |
+
|
61 |
+
foreach ($element->getSortedElements() as $field) {
|
62 |
+
if(in_array(substr($elementName, 17), Mpay24_Mpay24_Block_Form_SelectpaymentCc::mPAYPaymentMethodsOrBrands('method')))
|
63 |
+
$html.= $field->toHtml();
|
64 |
+
}
|
65 |
+
|
66 |
+
$html .= $this->_getFooterHtml($element);
|
67 |
+
|
68 |
+
return $html;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Return header html for fieldset
|
74 |
+
*
|
75 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
protected function _getHeaderHtml($element)
|
79 |
+
{
|
80 |
+
$html = '';
|
81 |
+
$default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
|
82 |
+
if($element->getHtmlId() === 'mpay24_mpay24_sp_paybox')
|
83 |
+
$elementName = 'mpay24_mpay24_sp_pb';
|
84 |
+
else
|
85 |
+
$elementName = $element->getHtmlId();
|
86 |
+
if(in_array(substr($elementName, 17), Mpay24_Mpay24_Block_Form_SelectpaymentCc::mPAYPaymentMethodsOrBrands('method'))){
|
87 |
+
$html = '<div class="entry-edit-head collapseable" ><a id="'.$element->getHtmlId().'-head" href="#" onclick="Fieldset.toggleCollapse(\''.$element->getHtmlId().'\', \''.$this->getUrl('*/*/state').'\'); return false;">'.$element->getLegend().'</a></div>';
|
88 |
+
$html.= '<input id="'.$element->getHtmlId().'-state" name="config_state['.$element->getId().']" type="hidden" value="'.(int)$this->_getCollapseState($element).'" />';
|
89 |
+
$html.= '<fieldset class="'.$this->_getFieldsetCss().'" id="'.$element->getHtmlId().'">';
|
90 |
+
$html.= '<legend>'.$element->getLegend().'</legend>';
|
91 |
+
}
|
92 |
+
if ($element->getComment()) {
|
93 |
+
$html .= '<div class="comment">'.$element->getComment().'</div>';
|
94 |
+
}
|
95 |
+
|
96 |
+
// field label column
|
97 |
+
$html.= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
|
98 |
+
if (!$default) {
|
99 |
+
$html.= '<colgroup class="use-default" />';
|
100 |
+
}
|
101 |
+
$html.= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
|
102 |
+
|
103 |
+
return $html;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Return full css class name for form fieldset
|
108 |
+
*
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
protected function _getFieldsetCss()
|
112 |
+
{
|
113 |
+
$configCss = (string)$this->getGroup()->fieldset_css;
|
114 |
+
return 'config collapseable'.($configCss ? ' ' . $configCss : '');
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Return footer html for fieldset
|
119 |
+
* Add extra tooltip comments to elements
|
120 |
+
*
|
121 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
+
protected function _getFooterHtml($element)
|
125 |
+
{
|
126 |
+
$tooltipsExist = false;
|
127 |
+
$html = '</tbody></table>';
|
128 |
+
foreach ($element->getSortedElements() as $field) {
|
129 |
+
if ($field->getTooltip()) {
|
130 |
+
$tooltipsExist = true;
|
131 |
+
$html .= sprintf('<div id="row_%s_comment" class="system-tooltip-box" style="display:none;">%s</div>',
|
132 |
+
$field->getId(), $field->getTooltip()
|
133 |
+
);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
$html .= '</fieldset>' . $this->_getExtraJs($element, $tooltipsExist);
|
137 |
+
return $html;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Return js code for fieldset:
|
142 |
+
* - observe fieldset rows;
|
143 |
+
* - apply collapse;
|
144 |
+
*
|
145 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
146 |
+
* @param bool $tooltipsExist Init tooltips observer or not
|
147 |
+
* @return string
|
148 |
+
*/
|
149 |
+
protected function _getExtraJs($element, $tooltipsExist = false)
|
150 |
+
{
|
151 |
+
$id = $element->getHtmlId();
|
152 |
+
$js = "Fieldset.applyCollapse('{$id}');";
|
153 |
+
if ($tooltipsExist) {
|
154 |
+
$js.= "$$('#{$id} table')[0].addClassName('system-tooltip-wrap');
|
155 |
+
$$('#{$id} table tbody tr').each(function(tr) {
|
156 |
+
Event.observe(tr, 'mouseover', function (event) {
|
157 |
+
var relatedTarget = $(event.relatedTarget || event.fromElement);
|
158 |
+
if(relatedTarget && (relatedTarget == this || relatedTarget.descendantOf(this))) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
showTooltip(event);
|
162 |
+
});
|
163 |
+
Event.observe(tr, 'mouseout', function (event) {
|
164 |
+
var relatedTarget = $(event.relatedTarget || event.toElement);
|
165 |
+
if(relatedTarget && (relatedTarget == this || relatedTarget.childOf(this))) {
|
166 |
+
return;
|
167 |
+
}
|
168 |
+
hideTooltip(event);
|
169 |
+
});
|
170 |
+
});
|
171 |
+
$$('#{$id} table')[0].select('input','select').each(function(field) {
|
172 |
+
Event.observe(field, 'focus', function (event) {
|
173 |
+
showTooltip(event);
|
174 |
+
});
|
175 |
+
Event.observe(field, 'blur', function (event) {
|
176 |
+
hideTooltip(event);
|
177 |
+
});
|
178 |
+
});
|
179 |
+
function showTooltip(event) {
|
180 |
+
var tableHeight = Event.findElement(event, 'table').getStyle('height');
|
181 |
+
var tr = Event.findElement(event, 'tr');
|
182 |
+
var id = tr.id + '_comment';
|
183 |
+
$$('div.system-tooltip-box').invoke('hide');
|
184 |
+
if ($(id)) {
|
185 |
+
$(id).show().setStyle({height : tableHeight});
|
186 |
+
if(document.viewport.getWidth() < 1200) {
|
187 |
+
$(id).addClassName('system-tooltip-small').setStyle({height : 'auto'});
|
188 |
+
} else {
|
189 |
+
$(id).removeClassName('system-tooltip-small');
|
190 |
+
}
|
191 |
+
}
|
192 |
+
};
|
193 |
+
function hideTooltip(event) {
|
194 |
+
var tr = Event.findElement(event, 'tr');
|
195 |
+
var id = tr.id + '_comment';
|
196 |
+
if ($(id)) {
|
197 |
+
setTimeout(function() { $(id).hide(); }, 1);
|
198 |
+
}
|
199 |
+
};";
|
200 |
+
}
|
201 |
+
return Mage::helper('adminhtml/js')->getScript($js);
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Collapsed or expanded fieldset when page loaded?
|
206 |
+
*
|
207 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
208 |
+
* @return bool
|
209 |
+
*/
|
210 |
+
protected function _getCollapseState($element)
|
211 |
+
{
|
212 |
+
if ($element->getExpanded() !== null) {
|
213 |
+
return 1;
|
214 |
+
}
|
215 |
+
$extra = Mage::getSingleton('admin/session')->getUser()->getExtra();
|
216 |
+
if (isset($extra['configState'][$element->getId()])) {
|
217 |
+
return $extra['configState'][$element->getId()];
|
218 |
+
}
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Global.php
ADDED
@@ -0,0 +1,195 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Adminhtml_System_Config_Fieldset_Global
|
22 |
+
extends Mage_Adminhtml_Block_Abstract
|
23 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Associative array of mPay24 product selection elements
|
27 |
+
*
|
28 |
+
* @var array
|
29 |
+
*/
|
30 |
+
protected $_elements = array();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Custom template
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
protected $_template = 'mpay24/system/config/fieldset/global.phtml';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Render fieldset html
|
41 |
+
*
|
42 |
+
* @param Varien_Data_Form_Element_Abstract $fieldset
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function render(Varien_Data_Form_Element_Abstract $fieldset)
|
46 |
+
{
|
47 |
+
foreach ($fieldset->getSortedElements() as $element) {
|
48 |
+
$htmlId = $element->getHtmlId();
|
49 |
+
$this->_elements[$htmlId] = $element;
|
50 |
+
}
|
51 |
+
$originalData = $fieldset->getOriginalData();
|
52 |
+
$this->addData(array(
|
53 |
+
'fieldset_label' => $fieldset->getLegend(),
|
54 |
+
'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '',
|
55 |
+
));
|
56 |
+
return $this->toHtml();
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get array of element objects
|
61 |
+
*
|
62 |
+
* @return array
|
63 |
+
*/
|
64 |
+
public function getElements()
|
65 |
+
{
|
66 |
+
return $this->_elements;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Return checkbox html with hidden field for correct config values
|
71 |
+
*
|
72 |
+
* @param string $elementId
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
public function getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
76 |
+
{
|
77 |
+
$configValue = (string)$element->getValue();
|
78 |
+
if ($configValue) {
|
79 |
+
$element->setChecked(true);
|
80 |
+
} else {
|
81 |
+
$element->setValue('1');
|
82 |
+
}
|
83 |
+
if ($element->getCanUseDefaultValue() && $element->getInherit()) {
|
84 |
+
$element->setDisabled(true);
|
85 |
+
}
|
86 |
+
|
87 |
+
$hidden = new Varien_Data_Form_Element_Hidden(array(
|
88 |
+
'html_id' => $element->getHtmlId() . '_value',
|
89 |
+
'name' => $element->getName(),
|
90 |
+
'value' => '0'
|
91 |
+
));
|
92 |
+
$hidden->setForm($element->getForm());
|
93 |
+
return $hidden->getElementHtml() . $element->getElementHtml();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Whether element should be rendered in "simplified" mode
|
98 |
+
*
|
99 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
100 |
+
* @return bool
|
101 |
+
*/
|
102 |
+
public function getIsElementSimplified(Varien_Data_Form_Element_Abstract $element)
|
103 |
+
{
|
104 |
+
$originalData = $element->getOriginalData();
|
105 |
+
return isset($originalData['is_simplified']) && 1 == $originalData['is_simplified'];
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Getter for element label
|
110 |
+
*
|
111 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
112 |
+
* @return string
|
113 |
+
*/
|
114 |
+
public function getElementLabel(Varien_Data_Form_Element_Abstract $element)
|
115 |
+
{
|
116 |
+
return $element->getLabel();
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Getter for element comment
|
121 |
+
*
|
122 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function getElementComment(Varien_Data_Form_Element_Abstract $element)
|
126 |
+
{
|
127 |
+
return $element->getComment();
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Getter for element comment
|
132 |
+
*
|
133 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
134 |
+
* @return string
|
135 |
+
*/
|
136 |
+
public function getElementOriginalData(Varien_Data_Form_Element_Abstract $element, $key)
|
137 |
+
{
|
138 |
+
$data = $element->getOriginalData();
|
139 |
+
return isset($data[$key]) ? $data[$key] : '';
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Check whether checkbox has "Use default" option or not
|
144 |
+
*
|
145 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
146 |
+
* @return bool
|
147 |
+
*/
|
148 |
+
public function hasInheritElement(Varien_Data_Form_Element_Abstract $element)
|
149 |
+
{
|
150 |
+
return (bool)$element->getCanUseDefaultValue();
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Return "Use default" checkbox html
|
155 |
+
*
|
156 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
157 |
+
* @return string
|
158 |
+
*/
|
159 |
+
public function getInheritElementHtml(Varien_Data_Form_Element_Abstract $element)
|
160 |
+
{
|
161 |
+
$elementId = $element->getHtmlId();
|
162 |
+
$inheritCheckbox = new Varien_Data_Form_Element_Checkbox(array(
|
163 |
+
'html_id' => $elementId . '_inherit',
|
164 |
+
'name' => preg_replace('/\[value\](\[\])?$/', '[inherit]', $element->getName()),
|
165 |
+
'value' => '1',
|
166 |
+
'class' => 'checkbox config-inherit',
|
167 |
+
'onclick' => 'toggleValueElements(this, $(\'' . $elementId . '\').up())'
|
168 |
+
));
|
169 |
+
if ($element->getInherit()) {
|
170 |
+
$inheritCheckbox->setChecked(true);
|
171 |
+
}
|
172 |
+
|
173 |
+
$inheritCheckbox->setForm($element->getForm());
|
174 |
+
return $inheritCheckbox->getElementHtml();
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Return label for "Use default" checkbox
|
179 |
+
*
|
180 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
181 |
+
* @return string
|
182 |
+
*/
|
183 |
+
public function getInheritElementLabelHtml(Varien_Data_Form_Element_Abstract $element)
|
184 |
+
{
|
185 |
+
return sprintf('<label for="%s" class="inherit" title="%s">%s</label>',
|
186 |
+
$element->getHtmlId() . '_inherit',
|
187 |
+
$element->getDefaultValue(),
|
188 |
+
Mage::helper('adminhtml')->__('Use Default')
|
189 |
+
);
|
190 |
+
}
|
191 |
+
|
192 |
+
public function getMpay24ExtensionVersion(){
|
193 |
+
return Mpay24_Mpay24_Model_Api_Mpay24::MAGENTO_VERSION;
|
194 |
+
}
|
195 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form.php
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Payment method form base block
|
23 |
+
*/
|
24 |
+
class Mpay24_Mpay24_Block_Form extends Mage_Core_Block_Template {
|
25 |
+
/**
|
26 |
+
* Retrieve payment method model
|
27 |
+
*
|
28 |
+
* @return Mage_Payment_Model_Method_Abstract
|
29 |
+
*/
|
30 |
+
public function getMethod() {
|
31 |
+
$method = $this->getData('method');
|
32 |
+
|
33 |
+
if (!($method instanceof Mage_Payment_Model_Method_Abstract)) {
|
34 |
+
Mage::throwException($this->__('Can not retrieve payment method model object.'));
|
35 |
+
}
|
36 |
+
return $method;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Retrieve payment method code
|
41 |
+
*
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function getMethodCode() {
|
45 |
+
return $this->getMethod()->getCode();
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Retrieve field value data from payment info object
|
50 |
+
*
|
51 |
+
* @param string $field
|
52 |
+
* @return mixed
|
53 |
+
*/
|
54 |
+
public function getInfoData($field) {
|
55 |
+
return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/Cc.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_Cc extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/cc.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Retrieve availables credit card types
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getCcAvailableTypes() {
|
43 |
+
$types = $this->_getConfig()->getCcTypes();
|
44 |
+
if ($method = $this->getMethod()) {
|
45 |
+
$availableTypes = $method->getConfigData('cctypes');
|
46 |
+
if ($availableTypes) {
|
47 |
+
$availableTypes = explode(',', $availableTypes);
|
48 |
+
foreach ($types as $code=>$name) {
|
49 |
+
if (!in_array($code, $availableTypes)) {
|
50 |
+
unset($types[$code]);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
return $types;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Retrieve credit card expire months
|
60 |
+
*
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function getCcMonths() {
|
64 |
+
$months = $this->getData('cc_months');
|
65 |
+
if (is_null($months)) {
|
66 |
+
$months[0] = $this->__('Month');
|
67 |
+
$months = array_merge($months, $this->_getConfig()->getMonths());
|
68 |
+
$this->setData('cc_months', $months);
|
69 |
+
}
|
70 |
+
return $months;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Retrieve credit card expire years
|
75 |
+
*
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
public function getCcYears() {
|
79 |
+
$years = $this->getData('cc_years');
|
80 |
+
if (is_null($years)) {
|
81 |
+
$years = $this->_getConfig()->getYears();
|
82 |
+
$years = array(0=>$this->__('Year'))+$years;
|
83 |
+
$this->setData('cc_years', $years);
|
84 |
+
}
|
85 |
+
return $years;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Retrive has verification configuration
|
90 |
+
*
|
91 |
+
* @return boolean
|
92 |
+
*/
|
93 |
+
public function hasVerification() {
|
94 |
+
if ($this->getMethod()) {
|
95 |
+
$configData = $this->getMethod()->getConfigData('useccv');
|
96 |
+
if(is_null($configData)){
|
97 |
+
return true;
|
98 |
+
}
|
99 |
+
return (bool) $configData;
|
100 |
+
}
|
101 |
+
return true;
|
102 |
+
}
|
103 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/Elv.php
ADDED
@@ -0,0 +1,58 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_Elv extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/elv.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Retrieve availables credit card types
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getElvAvailableTypes() {
|
43 |
+
$types = $this->_getConfig()->getElvTypes();
|
44 |
+
if ($method = $this->getMethod()) {
|
45 |
+
$availableTypes = $method->getConfigData('elvtypes');
|
46 |
+
if ($availableTypes) {
|
47 |
+
$availableTypes = explode(',', $availableTypes);
|
48 |
+
foreach ($types as $code=>$name) {
|
49 |
+
if (!in_array($code, $availableTypes)) {
|
50 |
+
unset($types[$code]);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
return $types;
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/Paybox.php
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_Paybox extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/paybox.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Retrieve availables area codes
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getPayboxAvailableAreaCodes() {
|
43 |
+
$types = $this->_getConfig()->getPayboxAreaCodes();
|
44 |
+
if ($method = $this->getMethod()) {
|
45 |
+
$availableTypes = $method->getConfigData('area_code');
|
46 |
+
if ($availableTypes) {
|
47 |
+
$availableTypes = explode(',', $availableTypes);
|
48 |
+
foreach ($types as $code=>$name) {
|
49 |
+
if (!in_array($code, $availableTypes)) {
|
50 |
+
unset($types[$code]);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
return $types;
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/Selectpayment.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Form_Selectpayment extends Mage_Payment_Block_Form {
|
22 |
+
protected function _construct() {
|
23 |
+
parent::_construct();
|
24 |
+
$this->setTemplate('mpay24/form/selectpayment.phtml');
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Retrieve payment configuration object
|
29 |
+
*
|
30 |
+
* @return Mage_Payment_Model_Config
|
31 |
+
*/
|
32 |
+
protected function _getConfig() {
|
33 |
+
return Mage::getSingleton('mpay24/config');
|
34 |
+
}
|
35 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCashTicket.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentCashTicket extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentCashTicket.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCb.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentCb extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentCb.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentCc.php
ADDED
@@ -0,0 +1,158 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentCc extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentCc.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getBrands(){
|
38 |
+
$ret = array();
|
39 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_cc/cctypes')) as $brand):
|
40 |
+
$ret[] = $this->_getBrand($brand);
|
41 |
+
endforeach;
|
42 |
+
|
43 |
+
return $ret;
|
44 |
+
}
|
45 |
+
|
46 |
+
private function _getBrand($ccType){
|
47 |
+
$brand = '';
|
48 |
+
switch ($ccType){
|
49 |
+
case 'AE':
|
50 |
+
$brand = 'AMEX';
|
51 |
+
break;
|
52 |
+
case 'DC':
|
53 |
+
$brand = 'DINERS';
|
54 |
+
break;
|
55 |
+
case 'JC':
|
56 |
+
$brand = 'JCB';
|
57 |
+
break;
|
58 |
+
case 'MC':
|
59 |
+
$brand = 'MASTERCARD';
|
60 |
+
break;
|
61 |
+
case 'VI':
|
62 |
+
$brand = 'VISA';
|
63 |
+
break;
|
64 |
+
}
|
65 |
+
return $brand;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Retrieve active system payments
|
70 |
+
*
|
71 |
+
* @param mixed $store
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
public function getActiveMethods($store=null)
|
75 |
+
{
|
76 |
+
$methods = array();
|
77 |
+
$config = Mage::getStoreConfig('payment');
|
78 |
+
|
79 |
+
foreach ($config as $code => $methodConfig) {
|
80 |
+
if(strcmp("mpay24_sp_", substr($code, 0, 10)) == 0){
|
81 |
+
Mage::log($code . " => ");
|
82 |
+
Mage::log($methodConfig);
|
83 |
+
if (Mage::getStoreConfigFlag('payment/'.$code.'/in_use')) {
|
84 |
+
if($code == 'mpay24_sp_cc'){
|
85 |
+
foreach(explode(',', Mage::getStoreConfig('payment/'.$code.'/cctypes')) as $brand){
|
86 |
+
$methods[$brand] = $brand;
|
87 |
+
}
|
88 |
+
} elseif($code == 'mpay24_sp_eps') {
|
89 |
+
foreach(explode(',', Mage::getStoreConfig('payment/'.$code.'/epstypes')) as $bank){
|
90 |
+
$methods[$bank] = $bank;
|
91 |
+
}
|
92 |
+
} elseif($code == 'mpay24_sp_elv') {
|
93 |
+
foreach(explode(',', Mage::getStoreConfig('payment/'.$code.'/specificcountry')) as $country){
|
94 |
+
if($country != 'DE')
|
95 |
+
$methods['HOBEX-'.$country] = 'HOBEX-'.$country;
|
96 |
+
else {
|
97 |
+
$methods['HOBEX-'.$country] = 'HOBEX-'.$country;
|
98 |
+
$methods['ATOS'] = 'ATOS';
|
99 |
+
}
|
100 |
+
}
|
101 |
+
} else {
|
102 |
+
$methods[$code] = strtoupper(substr($code, 10, strlen($code)-10));
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
Mage::log("The active methods are: ");
|
108 |
+
Mage::log($methods);
|
109 |
+
return $methods;
|
110 |
+
}
|
111 |
+
|
112 |
+
public static function mPAYPaymentMethodsOrBrands($type)
|
113 |
+
{
|
114 |
+
$pTypes = array();
|
115 |
+
$ccBrands = array();
|
116 |
+
$elvBrands = array();
|
117 |
+
$epsBrands = array();
|
118 |
+
$str = '';
|
119 |
+
foreach(explode(',', Mage::getStoreConfig('mpay24/mpay24as/payment_methods')) as $brand):
|
120 |
+
if(($brand == 'AMEX' || $brand == 'DINERS' || $brand == 'JCB' || $brand == 'VISA' || $brand == 'MASTERCARD')){
|
121 |
+
if(!in_array('cc', $pTypes)){
|
122 |
+
$pTypes['cc'] = 'cc';
|
123 |
+
$str.= 'cc,';
|
124 |
+
}
|
125 |
+
$ccBrands[strtolower($brand)] = strtolower($brand);
|
126 |
+
} elseif($brand == 'ATOS' || $brand == 'HOBEX-AT' || $brand == 'HOBEX-DE' || $brand == 'HOBEX-NL'){
|
127 |
+
if(!in_array('elv', $pTypes)){
|
128 |
+
$pTypes['elv'] = 'elv';
|
129 |
+
$str.= 'elv,';
|
130 |
+
}
|
131 |
+
$elvBrands[strtolower($brand)] = strtolower($brand);
|
132 |
+
} elseif($brand == 'ARZ' || $brand == 'ERSTE' || $brand == 'HYPO' || $brand == 'BAWAG' || $brand == 'BA' || $brand == 'RZB'){
|
133 |
+
if(!in_array('eps', $pTypes)){
|
134 |
+
$pTypes['eps'] = 'eps';
|
135 |
+
$str.= 'eps,';
|
136 |
+
}
|
137 |
+
$epsBrands[strtolower($brand)] = strtolower($brand);
|
138 |
+
} elseif($brand == 'CASH-TICKET') {
|
139 |
+
$pTypes['cashTicket'] = 'cashTicket';
|
140 |
+
$str.= 'cashTicket,';
|
141 |
+
}else{
|
142 |
+
$pTypes[strtolower($brand)] = strtolower($brand);
|
143 |
+
$str.= strtolower($brand).',';
|
144 |
+
}
|
145 |
+
endforeach;
|
146 |
+
|
147 |
+
if($type === 'cc')
|
148 |
+
return $ccBrands;
|
149 |
+
elseif($type === 'elv')
|
150 |
+
return $elvBrands;
|
151 |
+
elseif($type === 'eps')
|
152 |
+
return $epsBrands;
|
153 |
+
elseif($type === 'method')
|
154 |
+
return $pTypes;
|
155 |
+
|
156 |
+
}
|
157 |
+
}
|
158 |
+
?>
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentElv.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentElv extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentElv.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentEps.php
ADDED
@@ -0,0 +1,43 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentEps extends Mage_Payment_Block_Form {
|
22 |
+
protected function _construct() {
|
23 |
+
parent::_construct();
|
24 |
+
$this->setTemplate('mpay24/form/selectpaymentEps.phtml');
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Retrieve payment configuration object
|
29 |
+
*
|
30 |
+
* @return Mage_Payment_Model_Config
|
31 |
+
*/
|
32 |
+
protected function _getConfig() {
|
33 |
+
return Mage::getSingleton('mpay24/config');
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getBrands(){
|
37 |
+
$ret = array();
|
38 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_eps/epstypes')) as $brand):
|
39 |
+
$ret[] = $brand;
|
40 |
+
endforeach;
|
41 |
+
return $ret;
|
42 |
+
}
|
43 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentGiropay.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentGiropay extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentGiropay.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMaestro.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentMaestro extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentMaestro.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMia.php
ADDED
@@ -0,0 +1,44 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentMia extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentMia.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getBrands(){
|
38 |
+
$ret = array();
|
39 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_mia/miatypes')) as $brand):
|
40 |
+
$ret[] = $brand;
|
41 |
+
endforeach;
|
42 |
+
return $ret;
|
43 |
+
}
|
44 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentMpass.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentMpass extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentMpass.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPaybox.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentPaybox extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentPaybox.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPaypal.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentPaypal extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentPaypal.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentPsc.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentPsc extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentPsc.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Form/SelectpaymentQuick.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Form_SelectpaymentQuick extends Mage_Payment_Block_Form {
|
23 |
+
protected function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->setTemplate('mpay24/form/selectpaymentQuick.phtml');
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve payment configuration object
|
30 |
+
*
|
31 |
+
* @return Mage_Payment_Model_Config
|
32 |
+
*/
|
33 |
+
protected function _getConfig() {
|
34 |
+
return Mage::getSingleton('mpay24/config');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Info/Cc.php
ADDED
@@ -0,0 +1,86 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Info_Cc extends Mage_Payment_Block_Info {
|
23 |
+
/**
|
24 |
+
* Init default template for block
|
25 |
+
*/
|
26 |
+
protected function _construct() {
|
27 |
+
parent::_construct();
|
28 |
+
$this->setTemplate('mpay24/info/cc.phtml');
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getInfo() {
|
32 |
+
$info = $this->getData('info');
|
33 |
+
|
34 |
+
if (!($info instanceof Mage_Payment_Model_Info)) {
|
35 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
36 |
+
}
|
37 |
+
return $info;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getMethod() {
|
41 |
+
return $this->getInfo()->getMethodInstance();
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve credit card type name
|
46 |
+
*
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
public function getCcTypeName() {
|
50 |
+
$types = Mage::getSingleton('mpay24/config')->getCcTypes();
|
51 |
+
if (isset($types[$this->getInfo()->getCcType()])) {
|
52 |
+
return $types[$this->getInfo()->getCcType()];
|
53 |
+
}
|
54 |
+
return $this->getInfo()->getCcType();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Retrieve CC expiration month
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getCcExpMonth() {
|
63 |
+
$month = $this->getInfo()->getCcExpMonth();
|
64 |
+
if ($month<10) {
|
65 |
+
$month = '0'.$month;
|
66 |
+
}
|
67 |
+
return $month;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Retrieve CC expiration date
|
72 |
+
*
|
73 |
+
* @return Zend_Date
|
74 |
+
*/
|
75 |
+
public function getCcExpDate() {
|
76 |
+
$date = Mage::app()->getLocale()->date(0);
|
77 |
+
$date->setYear($this->getInfo()->getCcExpYear());
|
78 |
+
$date->setMonth($this->getInfo()->getCcExpMonth());
|
79 |
+
return $date;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function toPdf() {
|
83 |
+
$this->setTemplate('mpay24/info/pdf/cc.phtml');
|
84 |
+
return $this->toHtml();
|
85 |
+
}
|
86 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Info/Elv.php
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Info_Elv extends Mage_Payment_Block_Info{
|
22 |
+
/**
|
23 |
+
* Init default template for block
|
24 |
+
*/
|
25 |
+
protected function _construct(){
|
26 |
+
parent::_construct();
|
27 |
+
$this->setTemplate('mpay24/info/elv.phtml');
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Retrieve info model
|
32 |
+
*
|
33 |
+
* @return Mage_Sofortueberweisung_Model_Info
|
34 |
+
*/
|
35 |
+
public function getInfo(){
|
36 |
+
$info = $this->getData('info');
|
37 |
+
|
38 |
+
if (!($info instanceof Mage_Payment_Model_Info)) {
|
39 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
40 |
+
}
|
41 |
+
return $info;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve payment method model
|
46 |
+
*
|
47 |
+
* @return Mage_Payment_Model_Method_Abstract
|
48 |
+
*/
|
49 |
+
public function getMethod(){
|
50 |
+
return $this->getInfo()->getMethodInstance();
|
51 |
+
}
|
52 |
+
|
53 |
+
public function toPdf(){
|
54 |
+
$this->setTemplate('mpay24/info/pdf/elv.phtml');
|
55 |
+
return $this->toHtml();
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Info/Paybox.php
ADDED
@@ -0,0 +1,61 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Block_Info_Paybox extends Mage_Payment_Block_Info{
|
21 |
+
/**
|
22 |
+
* Init default template for block
|
23 |
+
*/
|
24 |
+
protected function _construct(){
|
25 |
+
parent::_construct();
|
26 |
+
$this->setTemplate('mpay24/info/paybox.phtml');
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Retrieve info model
|
31 |
+
*
|
32 |
+
* @return Mage_Sofortueberweisung_Model_Info
|
33 |
+
*/
|
34 |
+
public function getInfo(){
|
35 |
+
$info = $this->getData('info');
|
36 |
+
|
37 |
+
if (!($info instanceof Mage_Payment_Model_Info)) {
|
38 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
39 |
+
}
|
40 |
+
return $info;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function getPayboxNr(){
|
44 |
+
return '+'.$this->getInfo()->getMpayPbCountryCode().'-'.$this->getInfo()->getMpayPbAreaCode().'-'.$this->getInfo()->getMpayPbNumber();
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Retrieve payment method model
|
50 |
+
*
|
51 |
+
* @return Mage_Payment_Model_Method_Abstract
|
52 |
+
*/
|
53 |
+
public function getMethod(){
|
54 |
+
return $this->getInfo()->getMethodInstance();
|
55 |
+
}
|
56 |
+
|
57 |
+
public function toPdf(){
|
58 |
+
$this->setTemplate('mpay24/info/pdf/paybox.phtml');
|
59 |
+
return $this->toHtml();
|
60 |
+
}
|
61 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Info/Selectpayment.php
ADDED
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Block_Info_Selectpayment extends Mage_Payment_Block_Info {
|
23 |
+
/**
|
24 |
+
* Init default template for block
|
25 |
+
*/
|
26 |
+
protected function _construct() {
|
27 |
+
parent::_construct();
|
28 |
+
$this->setTemplate('mpay24/info/selectpayment.phtml');
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getInfo() {
|
32 |
+
$info = $this->getData('info');
|
33 |
+
|
34 |
+
if (!($info instanceof Mage_Payment_Model_Info)) {
|
35 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
36 |
+
}
|
37 |
+
return $info;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getMethod() {
|
41 |
+
$payment = $this->getInfo()->getMethodInstance();
|
42 |
+
|
43 |
+
return $this->getInfo()->getMethodInstance();
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getBrand() {
|
47 |
+
return $this->getInfo()->getCcType();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function toPdf() {
|
51 |
+
$this->setTemplate('mpay24/info/pdf/selectpayment.phtml');
|
52 |
+
return $this->toHtml();
|
53 |
+
}
|
54 |
+
|
55 |
+
public function redirectToCalled($user, $tid) {
|
56 |
+
if($user === 'backend')
|
57 |
+
Mage::app()->getFrontController()->getResponse()->
|
58 |
+
setRedirect(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CALLED_BE_URL,array('_secure' => true, '_query' => "TID=$tid")));
|
59 |
+
elseif($user === 'frontend')
|
60 |
+
Mage::app()->getFrontController()->getResponse()->
|
61 |
+
setRedirect(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CALLED_FE_URL,array('_secure' => true, '_query' => "TID=$tid")));
|
62 |
+
}
|
63 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Mpay24.php
ADDED
@@ -0,0 +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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Mpay24 extends Mage_Core_Block_Template
|
22 |
+
{
|
23 |
+
public function _prepareLayout() {
|
24 |
+
return parent::_prepareLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getMpay24() {
|
28 |
+
if (!$this->hasData('mpay24')) {
|
29 |
+
$this->setData('mpay24', Mage::registry('mpay24'));
|
30 |
+
}
|
31 |
+
return $this->getData('mpay24');
|
32 |
+
}
|
33 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/ParentRedirect.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_ParentRedirect extends Mage_Core_Block_Abstract {
|
22 |
+
protected function _toHtml() {
|
23 |
+
$html = '<html><body>';
|
24 |
+
$html.= '<script type="text/javascript">self.parent.location.href="'.(Mage::getUrl(Mage::getSingleton('mpay24/session')->getParentRedirectUrl(), array('_secure'=>true))).'";</script>';
|
25 |
+
$html.= '</body></html>';
|
26 |
+
|
27 |
+
return $html;
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Redirect.php
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Block_Redirect extends Mage_Core_Block_Abstract {
|
22 |
+
protected function _toHtml() {
|
23 |
+
$form = new Varien_Data_Form();
|
24 |
+
$form->setAction(urldecode(Mage::getSingleton('mpay24/session')->get3DSUrl()))
|
25 |
+
->setId('mpay24_checkout')
|
26 |
+
->setName('mpay24_checkout')
|
27 |
+
->setMethod('POST')
|
28 |
+
->setUseContainer(true);
|
29 |
+
// foreach ($payment->getFormFields() as $field=>$value) {
|
30 |
+
// $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
31 |
+
// }
|
32 |
+
$html = '<html><body>';
|
33 |
+
$html.= $this->__('You will be redirected to the mPAY24 payment window in a few seconds.');
|
34 |
+
$html.= $form->toHtml();
|
35 |
+
|
36 |
+
$html.= '<script type="text/javascript">document.getElementById("mpay24_checkout").submit();</script>';
|
37 |
+
$html.= '</body></html>';
|
38 |
+
|
39 |
+
return $html;
|
40 |
+
}
|
41 |
+
}
|
app/code/community/Mpay24/Mpay24/Block/Update.php
ADDED
@@ -0,0 +1,65 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Encrypted config field backend model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
*/
|
34 |
+
class Mpay24_Mpay24_Block_Update extends Mage_Adminhtml_Block_System_Config_Form_Field
|
35 |
+
{
|
36 |
+
|
37 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
38 |
+
{
|
39 |
+
if(Mage::getStoreConfig('payment/mpay24_sp_cc/active') && Mage::getStoreConfig('mpay24/mpay24as/merchantid') !== ''
|
40 |
+
&& Mage::getStoreConfig('mpay24/mpay24as/soap_pass')
|
41 |
+
&& Mage::getStoreConfig('mpay24/mpay24as/soap_url')){
|
42 |
+
$this->setElement($element);
|
43 |
+
$url = $this->getUrl('mpay24/adminhtml/index');
|
44 |
+
$export = $this->getUrl('mpay24/adminhtml/export');
|
45 |
+
|
46 |
+
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
47 |
+
->setType('button')
|
48 |
+
->setClass('scalable')
|
49 |
+
->setId('mpay24_connect')
|
50 |
+
->setLabel('Connect')
|
51 |
+
->setOnClick("sendRequest('".Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::CONNECT,array('_secure' => true))."', 'mpay24_connect');")
|
52 |
+
->toHtml();
|
53 |
+
|
54 |
+
$html.="<br><br>" . $this->getLayout()->createBlock('adminhtml/widget_button')
|
55 |
+
->setType('button')
|
56 |
+
->setClass('scalable')
|
57 |
+
->setLabel('Export debug table')
|
58 |
+
->setOnClick("setLocation('$export')")
|
59 |
+
->toHtml();
|
60 |
+
|
61 |
+
return $html;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
?>
|
app/code/community/Mpay24/Mpay24/Helper/Data.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Helper_Data extends Mage_Core_Helper_Abstract {
|
22 |
+
|
23 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Api/Mpay24.php
ADDED
@@ -0,0 +1,732 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
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E OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Api_Mpay24 extends Varien_Object {
|
22 |
+
|
23 |
+
const PAYMENT_TYPE_AUTH = 'authorize';
|
24 |
+
const PAYMENT_TYPE_SALE = 'authorize_capture';
|
25 |
+
|
26 |
+
const URL = 'https://test.mPAY24.com/app/bin/etpv5';
|
27 |
+
|
28 |
+
const SUCCESS_URL = 'mpay24/payment/success';
|
29 |
+
const GUEST_SUCCESS_URL = 'mpay24/payment/guestsuccess';
|
30 |
+
const ERROR_URL = 'mpay24/payment/error';
|
31 |
+
const CONFIRMATION_URL = 'mpay24/payment/confirmation';
|
32 |
+
|
33 |
+
const SP_ERROR_URL = 'mpay24/payment/errorSP';
|
34 |
+
const UPDATE_URL = 'mpay24/payment/update';
|
35 |
+
const CONNECT = 'mpay24/payment/connect';
|
36 |
+
const SP_CONFIRMATION_URL = 'mpay24/payment/confirmationSP';
|
37 |
+
const SP_CANCEL_URL = 'mpay24/payment/cancelSP';
|
38 |
+
const SP_CALLED_BE_URL = 'mpay24/payment/calledBESP';
|
39 |
+
const SP_CALLED_FE_URL = 'mpay24/payment/calledFESP';
|
40 |
+
|
41 |
+
const RESPONSE_CODE_UNKNOWN = 0;
|
42 |
+
const RESPONSE_CODE_APPROVED = 1;
|
43 |
+
const RESPONSE_CODE_DECLINED = 2;
|
44 |
+
const RESPONSE_CODE_ERROR = 3;
|
45 |
+
const RESPONSE_CODE_HELD = 4;
|
46 |
+
const RESPONSE_CODE_REDIRECT = 5;
|
47 |
+
const RESPONSE_CODE_OPERATION = 6;
|
48 |
+
const RESPONSE_CODE_STATUS_GETTED = 7;
|
49 |
+
const RESPONSE_CODE_STATUS_UNKNOWN = 8;
|
50 |
+
|
51 |
+
const MAGENTO_VERSION = "Magento 1.1.8 ";
|
52 |
+
|
53 |
+
private $debug_save = false;
|
54 |
+
|
55 |
+
public function createBasicRequestObject($operation, $mID = null){
|
56 |
+
if($mID === null || $mID === Mage::getStoreConfig('mpay24/mpay24as/merchantid')){
|
57 |
+
$request = Mage::getModel('mpay24/source_request')
|
58 |
+
->setOperation($operation)
|
59 |
+
->setMerchantid(Mage::getStoreConfig('mpay24/mpay24as/merchantid'));
|
60 |
+
} else{
|
61 |
+
$request = Mage::getModel('mpay24/source_request')
|
62 |
+
->setOperation($operation)
|
63 |
+
->setMerchantid($mID);
|
64 |
+
}
|
65 |
+
return $request;
|
66 |
+
}
|
67 |
+
|
68 |
+
public function createBasicSoapRequestObject($operation, $merchantID = null, $soapPass = null){
|
69 |
+
if($merchantID != null && $soapPass != null){
|
70 |
+
$merchID = $merchantID;
|
71 |
+
$soapP = $soapPass;
|
72 |
+
} else {
|
73 |
+
$merchID = Mage::getStoreConfig('mpay24/mpay24as/merchantid');
|
74 |
+
$soapP = Mage::getStoreConfig('mpay24/mpay24as/soap_pass');
|
75 |
+
}
|
76 |
+
$request = Mage::getModel('mpay24/source_request')
|
77 |
+
->setOperation($operation)
|
78 |
+
->setMerchantid($merchID)
|
79 |
+
->setSoapPass($soapP);
|
80 |
+
if(Mage::getStoreConfig('mpay24/mpay24as/use_proxy')){
|
81 |
+
$request->setProxyHost(Mage::getStoreConfig('mpay24/mpay24as/proxy_host'))
|
82 |
+
->setProxyPort(Mage::getStoreConfig('mpay24/mpay24as/proxy_port'));
|
83 |
+
}
|
84 |
+
return $request;
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getMpayTid($orderId){
|
88 |
+
$order = Mage::getModel('sales/order');
|
89 |
+
$order->loadByIncrementId($orderId);
|
90 |
+
return ($order->getId()) ? $order->getPayment()->getAdditionalInformation('mpay_tid') : '';
|
91 |
+
}
|
92 |
+
|
93 |
+
public function authorize(Varien_Object $request){
|
94 |
+
$result = $this->_processSoapRequest($request);
|
95 |
+
|
96 |
+
$this->_responseHandler($result);
|
97 |
+
return $result;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function charge($mpaytid, $amount){
|
101 |
+
$soapRequest = $this->createBasicSoapRequestObject('LESSCLEAR');
|
102 |
+
$transactionStatusRequest = $this->createBasicSoapRequestObject('MPAYTID_TRANSACTIONSTATUS');
|
103 |
+
|
104 |
+
$soapRequest->setMpaytid(trim($mpaytid))
|
105 |
+
->setPrice($amount*100);
|
106 |
+
$transactionStatusRequest->setMpaytid(trim($mpaytid));
|
107 |
+
|
108 |
+
$result = $this->_processSoapRequest($soapRequest);
|
109 |
+
$resultTransactionStatus = $this->_processSoapRequest($transactionStatusRequest);
|
110 |
+
}
|
111 |
+
|
112 |
+
public function refund($mpaytid, $amount){
|
113 |
+
$soapRequest = $this->createBasicSoapRequestObject('MANUALCREDIT');
|
114 |
+
$transactionStatusRequest = $this->createBasicSoapRequestObject('MPAYTID_TRANSACTIONSTATUS');
|
115 |
+
|
116 |
+
$soapRequest->setMpaytid(trim($mpaytid))
|
117 |
+
->setPrice($amount*100)
|
118 |
+
->setCustomer('DUMMY')
|
119 |
+
->setCurrency('DUMMY');
|
120 |
+
$transactionStatusRequest->setMpaytid(trim($mpaytid));
|
121 |
+
|
122 |
+
$result = $this->_processSoapRequest($soapRequest);
|
123 |
+
$resultTransactionStatus = $this->_processSoapRequest($transactionStatusRequest);
|
124 |
+
}
|
125 |
+
|
126 |
+
public function cancel($mpaytid){
|
127 |
+
$soapRequest = $this->createBasicSoapRequestObject('MANUALREVERSE');
|
128 |
+
$transactionStatusRequest = $this->createBasicSoapRequestObject('MPAYTID_TRANSACTIONSTATUS');
|
129 |
+
|
130 |
+
$soapRequest->setMpaytid(trim($mpaytid));
|
131 |
+
$transactionStatusRequest->setMpaytid(trim($mpaytid));
|
132 |
+
|
133 |
+
$result = $this->_processSoapRequest($soapRequest);
|
134 |
+
$resultTransactionStatus = $this->_processSoapRequest($transactionStatusRequest);
|
135 |
+
}
|
136 |
+
|
137 |
+
private function _processRequest($request){
|
138 |
+
$result = Mage::getModel('mpay24/source_result');
|
139 |
+
$client = new Varien_Http_Client();
|
140 |
+
try{
|
141 |
+
$uri = Mage::getStoreConfig('mpay24/mpay24as/url');
|
142 |
+
$client->setUri($uri ? $uri : self::URL);
|
143 |
+
$client->setConfig(array(
|
144 |
+
'maxredirects'=>0,
|
145 |
+
'timeout'=>30,
|
146 |
+
));
|
147 |
+
|
148 |
+
$client->setParameterPost($request->getData());
|
149 |
+
$client->setMethod(Zend_Http_Client::POST);
|
150 |
+
|
151 |
+
$requestData = join('&', $requestData);
|
152 |
+
|
153 |
+
$debug = Mage::getModel('mpay24/mpay24_debug')
|
154 |
+
->setRequestBody($requestData)
|
155 |
+
->setRequestSerialized(serialize($request->getData()))
|
156 |
+
->setRequestDump(print_r($request->getData(),1));
|
157 |
+
if($this->debug_save)$debug->save();
|
158 |
+
|
159 |
+
$response = $client->request();
|
160 |
+
|
161 |
+
$response = trim(strstr($response->getRawBody(), 'STATUS'));
|
162 |
+
|
163 |
+
$valArray = explode('&', $response);
|
164 |
+
$v = '';
|
165 |
+
|
166 |
+
$result->setResultCode($result->getResult())
|
167 |
+
->setRespmsg($result->getRespmsg());
|
168 |
+
|
169 |
+
if (!empty($debug)) {
|
170 |
+
$debug
|
171 |
+
->setResponseBody($response)
|
172 |
+
->setResultSerialized(serialize($result->getData()))
|
173 |
+
->setResultDump(print_r($result->getData(),1));
|
174 |
+
if($this->debug_save) $debug->save();
|
175 |
+
}
|
176 |
+
} catch (Exception $e) {
|
177 |
+
$result->setResponseCode(-1)
|
178 |
+
->setResponseReasonCode($e->getCode())
|
179 |
+
->setResponseReasonText($e->getMessage());
|
180 |
+
if (!empty($debug)) {
|
181 |
+
$debug
|
182 |
+
->setResultSerialized(serialize($result->getData()))
|
183 |
+
->setResultDump(print_r($result->getData(),1));
|
184 |
+
if($this->debug_save) $debug->save();
|
185 |
+
}
|
186 |
+
Mage::throwException(Mage::helper('mpay24')->__('Gateway request error: %s', $e->getMessage()));
|
187 |
+
}
|
188 |
+
return $result;
|
189 |
+
}
|
190 |
+
|
191 |
+
private function _processSoapRequest($request){
|
192 |
+
$result = Mage::getModel('mpay24/source_result');
|
193 |
+
$wsdlURI = Mage::getStoreConfig('mpay24/mpay24as/soap_url');
|
194 |
+
|
195 |
+
ini_set("soap.wsdl_cache_enabled", "0");
|
196 |
+
if(Mage::getStoreConfig('mpay24/mpay24as/use_proxy')){
|
197 |
+
$client = new Zend_Soap_Client($wsdlURI,
|
198 |
+
array(
|
199 |
+
'login' => 'u'.$request->getMerchantid(),
|
200 |
+
'password' => $request->getSoapPass(),
|
201 |
+
'proxy_host' => $request->getProxyHost(),
|
202 |
+
'proxy_port' => $request->getProxyPort()
|
203 |
+
));
|
204 |
+
} else{
|
205 |
+
$client = new Zend_Soap_Client($wsdlURI,
|
206 |
+
array(
|
207 |
+
'login' => 'u'.$request->getMerchantid(),
|
208 |
+
'password' => $request->getSoapPass()
|
209 |
+
));
|
210 |
+
}
|
211 |
+
try{
|
212 |
+
$soapReq = '';
|
213 |
+
|
214 |
+
foreach( $request->getData() as $key => $value ) {
|
215 |
+
$requestData[] = strtoupper($key) . '=' . $value;
|
216 |
+
$soapReq.= strtoupper($key) . '=' . $value."\n";
|
217 |
+
}
|
218 |
+
$debug = Mage::getModel('mpay24/mpay24_debug');
|
219 |
+
$debug -> setRequestBody(serialize($requestData)) -> save();
|
220 |
+
$debug -> setRequestSerialized(serialize($request->getData())) -> save();
|
221 |
+
$debug -> setRequestDump(print_r($request->getData(),1)) -> save();
|
222 |
+
if($this->debug_save) $debug->save();
|
223 |
+
|
224 |
+
switch($request->getOperation()){
|
225 |
+
case 'SELECTPAYMENT':
|
226 |
+
$response = $client->SelectPayment(array(
|
227 |
+
'merchantID' => $request->getMerchantid(),
|
228 |
+
'mdxi' =>utf8_encode($request->getMdxi()),
|
229 |
+
'getDataURL' => '',
|
230 |
+
'tid' => $request->getTid()
|
231 |
+
));
|
232 |
+
|
233 |
+
break;
|
234 |
+
case 'LESSCLEAR':
|
235 |
+
$response = $client->LessClear(array(
|
236 |
+
'merchantID' => $request->getMerchantid(),
|
237 |
+
'mpayTID' => $request->getMpaytid(),
|
238 |
+
'price' => $request->getPrice(),
|
239 |
+
'currency' => $request->getCurrency(),
|
240 |
+
'timeStamp' => 1294738079
|
241 |
+
));
|
242 |
+
break;
|
243 |
+
case 'MANUALCREDIT':
|
244 |
+
$response = $client->ManualCredit(array(
|
245 |
+
'merchantID' => $request->getMerchantid(),
|
246 |
+
'mpayTID' => $request->getMpaytid(),
|
247 |
+
'price' => $request->getPrice(),
|
248 |
+
'currency' => $request->getCurrency(),
|
249 |
+
'timeStamp' => 1294738079,
|
250 |
+
'customer' => $request->getCustomer()
|
251 |
+
));
|
252 |
+
break;
|
253 |
+
case 'LISTPAYMENTMETHODS':
|
254 |
+
$response = $client->ListPaymentMethods(array(
|
255 |
+
'merchantID' => $request->getMerchantid(),
|
256 |
+
));
|
257 |
+
break;
|
258 |
+
case 'MANUALREVERSE':
|
259 |
+
$response = $client->ManualReverse(array(
|
260 |
+
'merchantID' => $request->getMerchantid(),
|
261 |
+
'mpayTID' =>$request->getMpaytid(),
|
262 |
+
'timeStamp' => 1294738079
|
263 |
+
));
|
264 |
+
break;
|
265 |
+
case 'MPAYTID_TRANSACTIONSTATUS':
|
266 |
+
$response = $client->TransactionStatus(array(
|
267 |
+
'merchantID' => $request->getMerchantid(),
|
268 |
+
'mpayTID' =>$request->getMpaytid()
|
269 |
+
));
|
270 |
+
break;
|
271 |
+
case 'TID_TRANSACTIONSTATUS':
|
272 |
+
$response = $client->TransactionStatus(array(
|
273 |
+
'merchantID' => $request->getMerchantid(),
|
274 |
+
'tid' => $request->getTid()
|
275 |
+
));
|
276 |
+
break;
|
277 |
+
default:
|
278 |
+
break;
|
279 |
+
}
|
280 |
+
$result = $this->convertResponse($response, $request->getOperation());
|
281 |
+
|
282 |
+
$debug -> setResultSerialized(serialize($result->getData())) -> save();
|
283 |
+
$debug -> setResultDump(print_r($result->getData(),1)) -> save();
|
284 |
+
if($this->debug_save) $debug->save();
|
285 |
+
} catch (Exception $e) {
|
286 |
+
$result->setResponseCode(-1)
|
287 |
+
->setResponseReasonCode($e->getCode())
|
288 |
+
->setResponseReasonText($e->getMessage());
|
289 |
+
$debug->setResultSerialized(serialize($result->getData()))->save();
|
290 |
+
$debug->setResultDump(print_r($result->getData(),1))->save();
|
291 |
+
if($this->debug_save) $debug->save();
|
292 |
+
Mage::throwException(Mage::helper('mpay24')->__('Gateway request error: %s', $e->getMessage()));
|
293 |
+
}
|
294 |
+
Mage::log($result);
|
295 |
+
return $result;
|
296 |
+
}
|
297 |
+
|
298 |
+
private function _responseHandler($result){
|
299 |
+
switch($result->getData('STATUS')){
|
300 |
+
case 'OK':
|
301 |
+
if($result->getData('RETURNCODE') != ''){
|
302 |
+
switch($result->getData('RETURNCODE')){
|
303 |
+
case 'OK':
|
304 |
+
$result->setResponseCode(self::RESPONSE_CODE_APPROVED);
|
305 |
+
$result->setTransactionId(trim($result->getData('MPAYTID')));
|
306 |
+
$this->getSession()->setAdditionalInformation('mpay_tid', trim($result->getData('MPAYTID')));
|
307 |
+
if($result->getData('ALL') > 0){
|
308 |
+
$activeBrands = '';
|
309 |
+
foreach( $result->getData() as $key => $value ) {
|
310 |
+
if(substr($key, 0, 5) == 'BRAND')
|
311 |
+
if(($value == 'JCB' && Mage::getStoreConfig('currency/options/base') == 'EUR') || $value != 'JCB')
|
312 |
+
$activeBrands.= $value.",";
|
313 |
+
}
|
314 |
+
|
315 |
+
$paymentMethods = new Mage_Core_Model_Config();
|
316 |
+
$paymentMethods ->saveConfig('mpay24/mpay24as/payment_methods', $activeBrands, 'default', "");
|
317 |
+
}
|
318 |
+
|
319 |
+
if($result->getData('TRANSACTION_STATUS') !== null){
|
320 |
+
if($result->getData('USER_FIELD') !== null){
|
321 |
+
$order = Mage::getSingleton('sales/order');
|
322 |
+
$order->loadByIncrementId($result->getData('TID'));
|
323 |
+
if($result->getData('USER_FIELD') === $order->getPayment()->getAdditionalInformation('user_field')){
|
324 |
+
$result->setResponseCode(self::RESPONSE_CODE_STATUS_GETTED);
|
325 |
+
} else {
|
326 |
+
$result->setResponseCode(self::RESPONSE_CODE_STATUS_UNKNOWN);
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
break;
|
333 |
+
case 'ERROR':
|
334 |
+
$result->setResponseCode(self::RESPONSE_CODE_ERROR);
|
335 |
+
break;
|
336 |
+
case 'REDIRECT':
|
337 |
+
$result->setResponseCode(self::RESPONSE_CODE_REDIRECT);
|
338 |
+
$result->setLocation($result->getData('LOCATION'));
|
339 |
+
$this->getSession()->set3DSUrl($result->getLocation());
|
340 |
+
break;
|
341 |
+
case 'TRANSACTION_NOT_FOUND':
|
342 |
+
$result->setResponseCode(self::RESPONSE_CODE_STATUS_UNKNOWN);
|
343 |
+
break;
|
344 |
+
default:
|
345 |
+
break;
|
346 |
+
}
|
347 |
+
break;
|
348 |
+
} else {
|
349 |
+
|
350 |
+
switch($result->getData('ERRORCODE')){
|
351 |
+
case 'OK':
|
352 |
+
|
353 |
+
$activeBrands = '';
|
354 |
+
|
355 |
+
$paymentMethods = new Mage_Core_Model_Config();
|
356 |
+
$paymentMethods ->saveConfig('mpay24/mpay24as/payment_methods', $activeBrands, 'default', "");
|
357 |
+
|
358 |
+
break;
|
359 |
+
default:
|
360 |
+
break;
|
361 |
+
}
|
362 |
+
break;
|
363 |
+
}
|
364 |
+
case 'ERROR':
|
365 |
+
$result->setResponseCode(self::RESPONSE_CODE_ERROR);
|
366 |
+
if($result->getData('RETURNCODE') != ''){
|
367 |
+
switch($result->getData('RETURNCODE')){
|
368 |
+
case 'OPERATION%5FNOT%5FSUPPORTED':
|
369 |
+
$result->setResponseCode(self::RESPONSE_CODE_OPERATION);
|
370 |
+
$activeBrands = 'AMEX,DINERS,JCB,MASTERCARD,VISA,MAESTRO,ERSTE,HYPO,ARZ,RZB,BAWAG,BA,PB,GIROPAY,ATOS,HOBEX-AT,HOBEX-DE,HOBEX-NL,PAYPAL,CASH-TICKET,MPASS,PSC,';
|
371 |
+
$paymentMethods = new Mage_Core_Model_Config();
|
372 |
+
$paymentMethods ->saveConfig('mpay24/mpay24as/payment_methods', $activeBrands, 'default', "");
|
373 |
+
break;
|
374 |
+
case 'NOT_FOUND':
|
375 |
+
$result->setResponseCode(self::RESPONSE_CODE_STATUS_UNKNOWN);
|
376 |
+
break;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
break;
|
380 |
+
if($result->getData('ERRNO') != ''){
|
381 |
+
switch($result->getData('ERRNO')){
|
382 |
+
case '1': // Karte abgelehnt
|
383 |
+
case '2': // Ablaufdatum falsch
|
384 |
+
$result->setResponseCode(self::RESPONSE_CODE_DECLINED);
|
385 |
+
break;
|
386 |
+
case '3': // Host Problem
|
387 |
+
case '4': // Haendler abgelehnt
|
388 |
+
case '5': // Betrag falsch
|
389 |
+
case '6': // Pin falsch
|
390 |
+
case '7': // Transaktion ungueltig
|
391 |
+
case '8': // Invalid UserID
|
392 |
+
case '9': // Transaction Error
|
393 |
+
case '10': // Transaktion abgelehnt, Autorisierung negativ
|
394 |
+
$result->setResponseCode(self::RESPONSE_CODE_ERROR);
|
395 |
+
break;
|
396 |
+
default:
|
397 |
+
$result->setResponseCode(self::RESPONSE_CODE_ERROR);
|
398 |
+
break;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
break;
|
402 |
+
default:
|
403 |
+
$result->setResponseCode(self::RESPONSE_CODE_UNKNOWN);
|
404 |
+
break;
|
405 |
+
}
|
406 |
+
}
|
407 |
+
|
408 |
+
public function convertResponse($response, $operation){
|
409 |
+
$responseAsArray = (array) $response;
|
410 |
+
$result = Mage::getModel('mpay24/source_result');
|
411 |
+
$soapResult = '';
|
412 |
+
$countMethods = 0;
|
413 |
+
|
414 |
+
switch($operation){
|
415 |
+
case 'SELECTPAYMENT':
|
416 |
+
foreach($responseAsArray as $r){
|
417 |
+
$array2 = (array) $r;
|
418 |
+
foreach(array_keys($array2) as $k){
|
419 |
+
$result->setData(strtoupper($k), $array2[$k]);
|
420 |
+
$soapResult.= strtoupper($k).' = '.$array2[$k]."\n";
|
421 |
+
}
|
422 |
+
}
|
423 |
+
break;
|
424 |
+
case 'LESSCLEAR':
|
425 |
+
foreach(array_keys($responseAsArray) as $r){
|
426 |
+
if(!$responseAsArray[$r] instanceOf stdClass){
|
427 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
428 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
429 |
+
}
|
430 |
+
else{
|
431 |
+
$a = (array) $responseAsArray[$r];
|
432 |
+
foreach(array_keys($a) as $k){
|
433 |
+
$result->setData(strtoupper($k), $a[$k]);
|
434 |
+
$soapResult.= strtoupper($k).' = '.$a[$k]."\n";
|
435 |
+
}
|
436 |
+
}
|
437 |
+
}
|
438 |
+
break;
|
439 |
+
case 'MANUALCREDIT':
|
440 |
+
foreach(array_keys($responseAsArray) as $r){
|
441 |
+
if(!$responseAsArray[$r] instanceOf stdClass){
|
442 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
443 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
444 |
+
}
|
445 |
+
else{
|
446 |
+
$a = (array) $responseAsArray[$r];
|
447 |
+
foreach(array_keys($a) as $k){
|
448 |
+
$result->setData(strtoupper($k), $a[$k]);
|
449 |
+
$soapResult.= strtoupper($k).' = '.$a[$k]."\n";
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
break;
|
454 |
+
case 'LISTPAYMENTMETHODS':
|
455 |
+
foreach(array_keys($responseAsArray) as $r){
|
456 |
+
if(!is_array($responseAsArray[$r])){
|
457 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
458 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
459 |
+
}
|
460 |
+
else{
|
461 |
+
foreach($responseAsArray[$r] as $o){
|
462 |
+
$array2 = (array) $o;
|
463 |
+
$countMethods++;
|
464 |
+
foreach(array_keys($array2) as $ok){
|
465 |
+
$result->setData(strtoupper($ok).'['.$countMethods.']', $array2[$ok]);
|
466 |
+
$soapResult.= strtoupper($ok).'['.$countMethods.'] = '.$array2[$ok]."\n";
|
467 |
+
}
|
468 |
+
}
|
469 |
+
}
|
470 |
+
}
|
471 |
+
break;
|
472 |
+
case 'MANUALREVERSE':
|
473 |
+
foreach(array_keys($responseAsArray) as $r){
|
474 |
+
if(!$responseAsArray[$r] instanceOf stdClass) {
|
475 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
476 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
477 |
+
}
|
478 |
+
else{
|
479 |
+
$a = (array) $responseAsArray[$r];
|
480 |
+
foreach(array_keys($a) as $k){
|
481 |
+
$result->setData(strtoupper($k), $a[$k]);
|
482 |
+
$soapResult.= strtoupper($k).' = '.$a[$k]."\n";
|
483 |
+
}
|
484 |
+
}
|
485 |
+
}
|
486 |
+
break;
|
487 |
+
case 'MPAYTID_TRANSACTIONSTATUS':
|
488 |
+
$statusGeted = false;
|
489 |
+
$userFieldGeted = false;
|
490 |
+
$appr_codeGeted = false;
|
491 |
+
$mpaytidGeted = false;
|
492 |
+
$priceGeted = false;
|
493 |
+
$currencyGeted = false;
|
494 |
+
$ptypeGeted = false;
|
495 |
+
$brandGeted = false;
|
496 |
+
$billing_addrGeted = false;
|
497 |
+
$shipping_addrGeted = false;
|
498 |
+
|
499 |
+
foreach(array_keys($responseAsArray) as $r){
|
500 |
+
if(!is_array($responseAsArray[$r])){
|
501 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
502 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
503 |
+
}
|
504 |
+
else{
|
505 |
+
$a = $responseAsArray[$r];
|
506 |
+
foreach(array_keys($a) as $k){
|
507 |
+
$array2 = (array) $a[$k];
|
508 |
+
foreach(array_keys($array2) as $ak){
|
509 |
+
if(strtoupper($ak) === 'VALUE' && $statusGeted === true){
|
510 |
+
$result->setData('TRANSACTION_STATUS', $array2[$ak]);
|
511 |
+
$soapResult.= $array2[$ak]."\n";
|
512 |
+
$statusGeted = false;
|
513 |
+
}
|
514 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'STATUS' && $statusGeted === false){
|
515 |
+
$soapResult.= 'TRANSACTION_STATUS'.' = ';
|
516 |
+
$statusGeted = true;
|
517 |
+
}
|
518 |
+
if(strtoupper($ak) === 'VALUE' && $userFieldGeted === true){
|
519 |
+
$result->setData('USER_FIELD', $array2[$ak]);
|
520 |
+
$soapResult.= $array2[$ak]."\n";
|
521 |
+
$userFieldGeted = false;
|
522 |
+
}
|
523 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'USER_FIELD' && $userFieldGeted === false){
|
524 |
+
$soapResult.= 'USER_FIELD'.' = ';
|
525 |
+
$userFieldGeted = true;
|
526 |
+
}
|
527 |
+
if(strtoupper($ak) === 'VALUE' && $appr_codeGeted === true){
|
528 |
+
$result->setData('APPR_CODE', $array2[$ak]);
|
529 |
+
$soapResult.= $array2[$ak]."\n";
|
530 |
+
$appr_codeGeted = false;
|
531 |
+
}
|
532 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'APPR_CODE' && $appr_codeGeted === false){
|
533 |
+
$soapResult.= 'APPR_CODE'.' = ';
|
534 |
+
$appr_codeGeted = true;
|
535 |
+
}
|
536 |
+
if(strtoupper($ak) === 'VALUE' && $mpaytidGeted === true){
|
537 |
+
$result->setData('MPAYTID', $array2[$ak]);
|
538 |
+
$soapResult.= $array2[$ak]."\n";
|
539 |
+
$mpaytidGeted = false;
|
540 |
+
}
|
541 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'MPAYTID' && $mpaytidGeted === false){
|
542 |
+
$soapResult.= 'MPAYTID'.' = ';
|
543 |
+
$mpaytidGeted = true;
|
544 |
+
}
|
545 |
+
if(strtoupper($ak) === 'VALUE' && $priceGeted === true){
|
546 |
+
$result->setData('PRICE', $array2[$ak]);
|
547 |
+
$soapResult.= $array2[$ak]."\n";
|
548 |
+
$priceGeted = false;
|
549 |
+
}
|
550 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'PRICE' && $priceGeted === false){
|
551 |
+
$soapResult.= 'PRICE'.' = ';
|
552 |
+
$priceGeted = true;
|
553 |
+
}
|
554 |
+
if(strtoupper($ak) === 'VALUE' && $currencyGeted === true){
|
555 |
+
$result->setData('CURRENCY', $array2[$ak]);
|
556 |
+
$soapResult.= $array2[$ak]."\n";
|
557 |
+
$currencyGeted = false;
|
558 |
+
}
|
559 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'CURRENCY' && $currencyGeted === false){
|
560 |
+
$soapResult.= 'CURRENCY'.' = ';
|
561 |
+
$currencyGeted = true;
|
562 |
+
}
|
563 |
+
if(strtoupper($ak) === 'VALUE' && $ptypeGeted === true){
|
564 |
+
$result->setData('P_TYPE', $array2[$ak]);
|
565 |
+
$soapResult.= $array2[$ak]."\n";
|
566 |
+
$ptypeGeted = false;
|
567 |
+
}
|
568 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'P_TYPE' && $ptypeGeted === false){
|
569 |
+
$soapResult.= 'P_TYPE'.' = ';
|
570 |
+
$ptypeGeted = true;
|
571 |
+
}
|
572 |
+
if(strtoupper($ak) === 'VALUE' && $brandGeted === true){
|
573 |
+
$result->setData('BRAND', $array2[$ak]);
|
574 |
+
$soapResult.= $array2[$ak]."\n";
|
575 |
+
$brandGeted = false;
|
576 |
+
}
|
577 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'BRAND' && $brandGeted === false){
|
578 |
+
$soapResult.= 'BRAND'.' = ';
|
579 |
+
$brandGeted = true;
|
580 |
+
}
|
581 |
+
if(strtoupper($ak) === 'VALUE' && $billing_addrGeted === true){
|
582 |
+
$result->setData('BILLING_ADDR', $array2[$ak]);
|
583 |
+
$soapResult.= $array2[$ak]."\n";
|
584 |
+
$billing_addrGeted = false;
|
585 |
+
}
|
586 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'BILLING_ADDR' && $billing_addrGeted === false){
|
587 |
+
$soapResult.= 'BILLING_ADDR'.' = ';
|
588 |
+
$billing_addrGeted = true;
|
589 |
+
}
|
590 |
+
if(strtoupper($ak) === 'VALUE' && $shipping_addrGeted === true){
|
591 |
+
$result->setData('SHIPPING_ADDR', $array2[$ak]);
|
592 |
+
$soapResult.= $array2[$ak]."\n";
|
593 |
+
$shipping_addrGeted = false;
|
594 |
+
}
|
595 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'SHIPPING_ADDR' && $shipping_addrGeted === false){
|
596 |
+
$soapResult.= 'SHIPPING_ADDR'.' = ';
|
597 |
+
$shipping_addrGeted = true;
|
598 |
+
}
|
599 |
+
}
|
600 |
+
}
|
601 |
+
}
|
602 |
+
}
|
603 |
+
break;
|
604 |
+
case 'TID_TRANSACTIONSTATUS':
|
605 |
+
$statusGeted = false;
|
606 |
+
$userFieldGeted = false;
|
607 |
+
$appr_codeGeted = false;
|
608 |
+
$mpaytidGeted = false;
|
609 |
+
$priceGeted = false;
|
610 |
+
$currencyGeted = false;
|
611 |
+
$ptypeGeted = false;
|
612 |
+
$brandGeted = false;
|
613 |
+
$billing_addrGeted = false;
|
614 |
+
$shipping_addrGeted = false;
|
615 |
+
|
616 |
+
foreach(array_keys($responseAsArray) as $r){
|
617 |
+
if(!is_array($responseAsArray[$r])){
|
618 |
+
$result->setData(strtoupper($r), $responseAsArray[$r]);
|
619 |
+
$soapResult.= strtoupper($r).' = '.$responseAsArray[$r]."\n";
|
620 |
+
}
|
621 |
+
else{
|
622 |
+
$a = $responseAsArray[$r];
|
623 |
+
foreach(array_keys($a) as $k){
|
624 |
+
$array2 = (array) $a[$k];
|
625 |
+
foreach(array_keys($array2) as $ak){
|
626 |
+
if(strtoupper($ak) === 'VALUE' && $statusGeted === true){
|
627 |
+
$result->setData('TRANSACTION_STATUS', $array2[$ak]);
|
628 |
+
$soapResult.= $array2[$ak]."\n";
|
629 |
+
$statusGeted = false;
|
630 |
+
}
|
631 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'STATUS' && $statusGeted === false){
|
632 |
+
$soapResult.= 'TRANSACTION_STATUS'.' = ';
|
633 |
+
$statusGeted = true;
|
634 |
+
}
|
635 |
+
if(strtoupper($ak) === 'VALUE' && $userFieldGeted === true){
|
636 |
+
$result->setData('USER_FIELD', $array2[$ak]);
|
637 |
+
$soapResult.= $array2[$ak]."\n";
|
638 |
+
$userFieldGeted = false;
|
639 |
+
}
|
640 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'USER_FIELD' && $userFieldGeted === false){
|
641 |
+
$soapResult.= 'USER_FIELD'.' = ';
|
642 |
+
$userFieldGeted = true;
|
643 |
+
}
|
644 |
+
if(strtoupper($ak) === 'VALUE' && $appr_codeGeted === true){
|
645 |
+
$result->setData('APPR_CODE', $array2[$ak]);
|
646 |
+
$soapResult.= $array2[$ak]."\n";
|
647 |
+
$appr_codeGeted = false;
|
648 |
+
}
|
649 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'APPR_CODE' && $appr_codeGeted === false){
|
650 |
+
$soapResult.= 'APPR_CODE'.' = ';
|
651 |
+
$appr_codeGeted = true;
|
652 |
+
}
|
653 |
+
if(strtoupper($ak) === 'VALUE' && $mpaytidGeted === true){
|
654 |
+
$result->setData('MPAYTID', $array2[$ak]);
|
655 |
+
$soapResult.= $array2[$ak]."\n";
|
656 |
+
$mpaytidGeted = false;
|
657 |
+
}
|
658 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'MPAYTID' && $mpaytidGeted === false){
|
659 |
+
$soapResult.= 'MPAYTID'.' = ';
|
660 |
+
$mpaytidGeted = true;
|
661 |
+
}
|
662 |
+
if(strtoupper($ak) === 'VALUE' && $priceGeted === true){
|
663 |
+
$result->setData('PRICE', $array2[$ak]);
|
664 |
+
$soapResult.= $array2[$ak]."\n";
|
665 |
+
$priceGeted = false;
|
666 |
+
}
|
667 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'PRICE' && $priceGeted === false){
|
668 |
+
$soapResult.= 'PRICE'.' = ';
|
669 |
+
$priceGeted = true;
|
670 |
+
}
|
671 |
+
if(strtoupper($ak) === 'VALUE' && $currencyGeted === true){
|
672 |
+
$result->setData('CURRENCY', $array2[$ak]);
|
673 |
+
$soapResult.= $array2[$ak]."\n";
|
674 |
+
$currencyGeted = false;
|
675 |
+
}
|
676 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'CURRENCY' && $currencyGeted === false){
|
677 |
+
$soapResult.= 'CURRENCY'.' = ';
|
678 |
+
$currencyGeted = true;
|
679 |
+
}
|
680 |
+
if(strtoupper($ak) === 'VALUE' && $ptypeGeted === true){
|
681 |
+
$result->setData('P_TYPE', $array2[$ak]);
|
682 |
+
$soapResult.= $array2[$ak]."\n";
|
683 |
+
$ptypeGeted = false;
|
684 |
+
}
|
685 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'P_TYPE' && $ptypeGeted === false){
|
686 |
+
$soapResult.= 'P_TYPE'.' = ';
|
687 |
+
$ptypeGeted = true;
|
688 |
+
}
|
689 |
+
if(strtoupper($ak) === 'VALUE' && $brandGeted === true){
|
690 |
+
$result->setData('BRAND', $array2[$ak]);
|
691 |
+
$soapResult.= $array2[$ak]."\n";
|
692 |
+
$brandGeted = false;
|
693 |
+
}
|
694 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'BRAND' && $brandGeted === false){
|
695 |
+
$soapResult.= 'BRAND'.' = ';
|
696 |
+
$brandGeted = true;
|
697 |
+
}
|
698 |
+
if(strtoupper($ak) === 'VALUE' && $billing_addrGeted === true){
|
699 |
+
$result->setData('BILLING_ADDR', $array2[$ak]);
|
700 |
+
$soapResult.= $array2[$ak]."\n";
|
701 |
+
$billing_addrGeted = false;
|
702 |
+
}
|
703 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'BILLING_ADDR' && $billing_addrGeted === false){
|
704 |
+
$soapResult.= 'BILLING_ADDR'.' = ';
|
705 |
+
$billing_addrGeted = true;
|
706 |
+
}
|
707 |
+
if(strtoupper($ak) === 'VALUE' && $shipping_addrGeted === true){
|
708 |
+
$result->setData('SHIPPING_ADDR', $array2[$ak]);
|
709 |
+
$soapResult.= $array2[$ak]."\n";
|
710 |
+
$shipping_addrGeted = false;
|
711 |
+
}
|
712 |
+
if(strtoupper($ak) === 'NAME' && $array2[$ak] === 'SHIPPING_ADDR' && $shipping_addrGeted === false){
|
713 |
+
$soapResult.= 'SHIPPING_ADDR'.' = ';
|
714 |
+
$shipping_addrGeted = true;
|
715 |
+
}
|
716 |
+
}
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
+
break;
|
721 |
+
default:
|
722 |
+
break;
|
723 |
+
}
|
724 |
+
|
725 |
+
return $result;
|
726 |
+
}
|
727 |
+
|
728 |
+
public function getSession() {
|
729 |
+
return Mage::getSingleton('mpay24/session');
|
730 |
+
}
|
731 |
+
}
|
732 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Cc.php
ADDED
@@ -0,0 +1,206 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/*
|
21 |
+
* Visa Number = 40070000000027
|
22 |
+
* MasterCard Number = 5424000000000015
|
23 |
+
* American Express Number = 370000000000002
|
24 |
+
* Discover/Novus Number = 6011000000000012
|
25 |
+
* JCB Number = 3088000000000017
|
26 |
+
* Diners/Carte Blanche Number = 38000000000006
|
27 |
+
* Monat 01 -> Abgelehnt ohne Begründung
|
28 |
+
* Monat 02 -> Ablaufdatum falsch
|
29 |
+
* Monat 03 -> Kartenprüfzifer falsch
|
30 |
+
* Monat 04 -> externer Fehler
|
31 |
+
* Monat 05 -> OK
|
32 |
+
* Monat 06 bis 12 -> eine Verified by VISA-Transaktion wird simuliert
|
33 |
+
* (Das Jahr bitte größer 2007 wählen)
|
34 |
+
*/
|
35 |
+
|
36 |
+
|
37 |
+
class Mpay24_Mpay24_Model_Cc extends Mpay24_Mpay24_Model_Method_Cc {
|
38 |
+
protected $_code = 'mpay24_cc';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Availability options
|
42 |
+
*/
|
43 |
+
protected $_isGateway = false;
|
44 |
+
protected $_canAuthorize = true;
|
45 |
+
protected $_canCapture = true;
|
46 |
+
protected $_canCapturePartial = true;
|
47 |
+
protected $_canRefund = true;
|
48 |
+
protected $_canVoid = false;
|
49 |
+
protected $_canUseInternal = true;
|
50 |
+
protected $_canUseCheckout = true;
|
51 |
+
protected $_canUseForMultishipping = false;
|
52 |
+
protected $_canSaveCc = false;
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Send authorize request to gateway
|
57 |
+
*
|
58 |
+
* @param Varien_Object $payment
|
59 |
+
* @param decimal $amount
|
60 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
61 |
+
*/
|
62 |
+
public function authorize(Varien_Object $payment, $amount){
|
63 |
+
$this->clearSession();
|
64 |
+
$error = false;
|
65 |
+
if($amount>0){
|
66 |
+
$payment->setAmount($amount);
|
67 |
+
$request= $this->_buildRequest($payment);
|
68 |
+
$result = $this->getApi()->authorize($request);
|
69 |
+
|
70 |
+
switch ($result->getResponseCode()) {
|
71 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_APPROVED:
|
72 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
73 |
+
$payment->setMpayTid($result->getTransactionId());
|
74 |
+
break;
|
75 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_DECLINED:
|
76 |
+
$error = Mage::helper('mpay24')->__('Your credit card was declined, sorry.');
|
77 |
+
break;
|
78 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_REDIRECT:
|
79 |
+
$this->getPayment()->setAuth3DS(true);
|
80 |
+
break;
|
81 |
+
default:
|
82 |
+
// $error = Mage::helper('mpay24')->__('Payment authorization error.');
|
83 |
+
$error = urldecode($result->getData('RETURNCODE'));
|
84 |
+
break;
|
85 |
+
}
|
86 |
+
}else{
|
87 |
+
$error = Mage::helper('mpay24')->__('Invalid amount for authorization.');
|
88 |
+
}
|
89 |
+
if ($error !== false) {
|
90 |
+
Mage::throwException($error);
|
91 |
+
}
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Capture payment
|
97 |
+
*
|
98 |
+
* @param Varien_Object $orderPayment
|
99 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
100 |
+
*/
|
101 |
+
public function capture(Varien_Object $payment, $amount) {
|
102 |
+
$this->clearSession();
|
103 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
104 |
+
if($mpayTid != ''){
|
105 |
+
$this->getApi()->charge($mpayTid, $amount);
|
106 |
+
}else{
|
107 |
+
Mage::log('capture not possible. mpaytid not exist');
|
108 |
+
}
|
109 |
+
return $this;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Refund money
|
114 |
+
*
|
115 |
+
* @param Varien_Object $invoicePayment
|
116 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
117 |
+
*/
|
118 |
+
public function refund(Varien_Object $payment, $amount){
|
119 |
+
$this->clearSession();
|
120 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
121 |
+
$this->getApi()->refund($mpayTid, $amount);
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
|
125 |
+
// public function void(Varien_Object $payment){
|
126 |
+
// Mage::log('void');
|
127 |
+
// $mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
128 |
+
// $this->getApi()->void($mpayTid);
|
129 |
+
//// $this->getApi()->refund($mpayTid, $payment->getOrder()->getGrandTotal());
|
130 |
+
// return $this;
|
131 |
+
// }
|
132 |
+
|
133 |
+
protected function _buildRequest(Varien_Object $payment) {
|
134 |
+
$order = $payment->getOrder();
|
135 |
+
$this->setStore($order->getStoreId());
|
136 |
+
|
137 |
+
$request = $this->getApi()->createBasicRequestObject('ACCEPTPAYMENT');
|
138 |
+
|
139 |
+
if ($order && $order->getIncrementId()) {
|
140 |
+
$request->setTid($order->getIncrementId()); // TID == OrderNR
|
141 |
+
}
|
142 |
+
|
143 |
+
$request->setPType('CC');
|
144 |
+
|
145 |
+
if($payment->getCcNumber()){
|
146 |
+
$request->setBrand($this->_getBrand($payment->getCcType()))
|
147 |
+
->setIdentifier($payment->getCcNumber())
|
148 |
+
->setExpiry(substr(sprintf('%04d%02d', $payment->getCcExpYear(), $payment->getCcExpMonth()), 2, 4 ))
|
149 |
+
->setCvc($payment->getCcCid());
|
150 |
+
}
|
151 |
+
|
152 |
+
if($payment->getAmount()){
|
153 |
+
$request->setPrice($payment->getAmount()*100,2);
|
154 |
+
$request->setCurrency($order->getBaseCurrencyCode());
|
155 |
+
}
|
156 |
+
$request->setClearing('1');
|
157 |
+
$request->setAuth_3ds('Y');
|
158 |
+
|
159 |
+
$request->setSuccessUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SUCCESS_URL,array('_secure' => true)));
|
160 |
+
$request->setErrorUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::ERROR_URL,array('_secure' => true)));
|
161 |
+
$request->setConfirmationUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::CONFIRMATION_URL,array('_secure' => true)));
|
162 |
+
|
163 |
+
$billing = $order->getBillingAddress();
|
164 |
+
if (!empty($billing)) {
|
165 |
+
$request->setCustomer($billing->getFirstname()." ".$billing->getLastname());
|
166 |
+
}
|
167 |
+
$request->setUserField($order->getIncrementId()); // do not change this -> it will be used as order id; USER_FIELD == OrderNR
|
168 |
+
// $request->setProfile();
|
169 |
+
// $request->setCustomerId();
|
170 |
+
// $request->setCustomerEmail();
|
171 |
+
// $request->setUserField();
|
172 |
+
|
173 |
+
// Mage::log($request);
|
174 |
+
return $request;
|
175 |
+
}
|
176 |
+
|
177 |
+
public function getOrderPlaceRedirectUrl() {
|
178 |
+
if(!$this->getPayment()->getAuth3DS() && $this->getSession()->getMpayTid()){
|
179 |
+
return Mage::getUrl('mpay24/payment/redirectcc',array('_secure' => true));
|
180 |
+
}
|
181 |
+
return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/payment',array('_secure' => true)) : false;
|
182 |
+
}
|
183 |
+
|
184 |
+
private function _getBrand($ccType){
|
185 |
+
$brand = '';
|
186 |
+
switch ($ccType){
|
187 |
+
case 'AE':
|
188 |
+
$brand = 'AMEX';
|
189 |
+
break;
|
190 |
+
case 'DC':
|
191 |
+
$brand = 'DINERS';
|
192 |
+
break;
|
193 |
+
case 'JC':
|
194 |
+
$brand = 'JCB';
|
195 |
+
break;
|
196 |
+
case 'MC':
|
197 |
+
$brand = 'MASTERCARD';
|
198 |
+
break;
|
199 |
+
case 'VI':
|
200 |
+
$brand = 'VISA';
|
201 |
+
break;
|
202 |
+
}
|
203 |
+
return $brand;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Config.php
ADDED
@@ -0,0 +1,96 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Config extends Mage_Payment_Model_Config
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieve active system payments
|
26 |
+
*
|
27 |
+
* @param mixed $store
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function getActiveMethods($store=null)
|
31 |
+
{
|
32 |
+
$methods = array();
|
33 |
+
$config = Mage::getStoreConfig('mpay24', $store);
|
34 |
+
foreach ($config as $code => $methodConfig) {
|
35 |
+
if (Mage::getStoreConfigFlag('payment/'.$code.'/active', $store)) {
|
36 |
+
$methods[$code] = $this->_getMethod($code, $methodConfig);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
return $methods;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Retrieve all system payments
|
44 |
+
*
|
45 |
+
* @param mixed $store
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public function getAllMethods($store=null)
|
49 |
+
{
|
50 |
+
$methods = array();
|
51 |
+
$config = Mage::getStoreConfig('payment', $store);
|
52 |
+
foreach ($config as $code => $methodConfig) {
|
53 |
+
$methods[$code] = $this->_getMethod($code, $methodConfig);
|
54 |
+
}
|
55 |
+
return $methods;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Retrieve array of credit card types
|
60 |
+
*
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function getCcTypes() {
|
64 |
+
$_types = Mage::getConfig()->getNode('global/payment/cc/types')->asArray();
|
65 |
+
|
66 |
+
// usort($_types, array('Mpay24_Mpay24_Model_Config', 'compareCcTypes'));
|
67 |
+
sort($_types);
|
68 |
+
|
69 |
+
$types = array();
|
70 |
+
foreach ($_types as $data) {
|
71 |
+
$types[$data['code']] = $data['name'];
|
72 |
+
}
|
73 |
+
return $types;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getElvTypes() {
|
77 |
+
$_types = Mage::getConfig()->getNode('global/payment/elv/types')->asArray();
|
78 |
+
|
79 |
+
// uasort($_types, array('Mpay24_Mpay24_Model_Config', 'compareCcTypes'));
|
80 |
+
|
81 |
+
$types = array();
|
82 |
+
foreach ($_types as $data) {
|
83 |
+
$types[$data['code']] = $data['name'];
|
84 |
+
}
|
85 |
+
return $types;
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getPayboxAreaCodes(){
|
89 |
+
$_types = Mage::getConfig()->getNode('global/payment/paybox/area_code')->asArray();
|
90 |
+
$types = array();
|
91 |
+
foreach ($_types as $data) {
|
92 |
+
$types[$data['code']] = $data['name'];
|
93 |
+
}
|
94 |
+
return $types;
|
95 |
+
}
|
96 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Convert/Order.php
ADDED
@@ -0,0 +1,39 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Convert_Order extends Mage_Sales_Model_Convert_Order
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Convert order payment to quote payment
|
25 |
+
*
|
26 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
27 |
+
* @return Mage_Sales_Model_Quote_Payment
|
28 |
+
*/
|
29 |
+
public function paymentToQuotePayment(Mage_Sales_Model_Order_Payment $payment, $quotePayment=null)
|
30 |
+
{
|
31 |
+
$quotePayment = parent::paymentToQuotePayment($payment, $quotePayment);
|
32 |
+
|
33 |
+
$quotePayment->setMpayAccountNumber($payment->getMpayAccountNumber())
|
34 |
+
->setMpayBankCode($payment->getMpayBankCode())
|
35 |
+
->setMpayHolder($payment->getMpayHolder());
|
36 |
+
|
37 |
+
return $quotePayment;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Convert/Quote.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Convert_Quote extends Mage_Sales_Model_Convert_Quote
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Convert quote payment to order payment
|
26 |
+
*
|
27 |
+
* @param Mage_Sales_Model_Quote_Payment $payment
|
28 |
+
* @return Mage_Sales_Model_Quote_Payment
|
29 |
+
*/
|
30 |
+
public function paymentToOrderPayment(Mage_Sales_Model_Quote_Payment $payment)
|
31 |
+
{
|
32 |
+
$orderPayment = parent::paymentToOrderPayment($payment);
|
33 |
+
$orderPayment->setMpayAccountNumber($payment->getMpayAccountNumber())
|
34 |
+
->setMpayBankCode($payment->getMpayBankCode())
|
35 |
+
->setMpayHolder($payment->getMpayHolder());
|
36 |
+
|
37 |
+
return $orderPayment;
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Elv.php
ADDED
@@ -0,0 +1,162 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Elv extends Mpay24_Mpay24_Model_Method_Abstract {
|
22 |
+
protected $_code = 'mpay24_elv';
|
23 |
+
protected $_formBlockType = 'mpay24/form_elv';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_elv';
|
25 |
+
protected $_allowCurrencyCode = array('EUR');
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Availability options
|
30 |
+
*/
|
31 |
+
protected $_isGateway = false;
|
32 |
+
protected $_canAuthorize = true;
|
33 |
+
protected $_canCapture = false;
|
34 |
+
protected $_canCapturePartial = false;
|
35 |
+
protected $_canRefund = false;
|
36 |
+
protected $_canVoid = false;
|
37 |
+
protected $_canUseInternal = false;
|
38 |
+
protected $_canUseCheckout = true;
|
39 |
+
protected $_canUseForMultishipping = false;
|
40 |
+
protected $_canSaveCc = false;
|
41 |
+
|
42 |
+
public function _construct(){
|
43 |
+
parent::_construct();
|
44 |
+
$this->_init('mpay24/elv');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function assignData($data){
|
48 |
+
if (!($data instanceof Varien_Object)) {
|
49 |
+
$data = new Varien_Object($data);
|
50 |
+
}
|
51 |
+
$info = $this->getInfoInstance();
|
52 |
+
$info->setMpayAccountNumber($data->getMpayAccountNumber())
|
53 |
+
->setMpayBankCode($data->getMpayBankCode())
|
54 |
+
->setMpayHolder($data->getMpayHolder());
|
55 |
+
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function validate(){
|
60 |
+
parent::validate();
|
61 |
+
if (!$this->getQuote()->getPayment()->getMpayHolder()) {
|
62 |
+
Mage::throwException(Mage::helper('mpay24')->__('Please fill out the account holder'));
|
63 |
+
}
|
64 |
+
if (!$this->getQuote()->getPayment()->getMpayAccountNumber()) {
|
65 |
+
Mage::throwException(Mage::helper('mpay24')->__('Please fill out the account number'));
|
66 |
+
}
|
67 |
+
if (!$this->getQuote()->getPayment()->getMpayBankCode()) {
|
68 |
+
Mage::throwException(Mage::helper('mpay24')->__('Please fill out the bank code'));
|
69 |
+
}
|
70 |
+
$currency_code = $this->getQuote()->getBaseCurrencyCode();
|
71 |
+
if (!in_array($currency_code,$this->_allowCurrencyCode)) {
|
72 |
+
Mage::throwException(Mage::helper('mpay24')->__('Selected currency code ('.$currency_code.') is not compatible with Elv'));
|
73 |
+
}
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
|
77 |
+
public function authorize(Varien_Object $payment, $amount){
|
78 |
+
$this->clearSession();
|
79 |
+
$error = false;
|
80 |
+
if($amount>0){
|
81 |
+
// $payment->setAnetTransType(self::REQUEST_TYPE_AUTH_ONLY);
|
82 |
+
$payment->setAmount($amount);
|
83 |
+
|
84 |
+
$request= $this->_buildRequest($payment);
|
85 |
+
$result = $this->getApi()->authorize($request);
|
86 |
+
switch ($result->getResponseCode()) {
|
87 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_APPROVED:
|
88 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
89 |
+
$payment->setMpayTid($result->getTransactionId());
|
90 |
+
break;
|
91 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_REDIRECT:
|
92 |
+
$this->getPayment()->setAuth3DS(true);
|
93 |
+
break;
|
94 |
+
default:
|
95 |
+
switch(urldecode($result->getData('RETURNCODE'))){
|
96 |
+
case 'SORT_CODE_NOT_CORRECT':
|
97 |
+
$error = Mage::helper('mpay24')->__('Invalid Bank Code.');
|
98 |
+
break;
|
99 |
+
case 'PAYMENT_METHOD_NOT_ACTIVE':
|
100 |
+
$error = Mage::helper('mpay24')->__('Payment method not active.');
|
101 |
+
break;
|
102 |
+
default:
|
103 |
+
$error = urldecode($result->getData('RETURNCODE'));
|
104 |
+
break;
|
105 |
+
}
|
106 |
+
// $error = Mage::helper('mpay24')->__('Payment authorization error.');
|
107 |
+
break;
|
108 |
+
}
|
109 |
+
}else{
|
110 |
+
$error = Mage::helper('mpay24')->__('Invalid amount for authorization.');
|
111 |
+
}
|
112 |
+
Mage::log('error'.$error);
|
113 |
+
if ($error !== false) {
|
114 |
+
Mage::throwException($error);
|
115 |
+
}
|
116 |
+
return $this;
|
117 |
+
}
|
118 |
+
|
119 |
+
protected function _buildRequest(Varien_Object $payment) {
|
120 |
+
$order = $payment->getOrder();
|
121 |
+
$this->setStore($order->getStoreId());
|
122 |
+
|
123 |
+
$request = $this->getApi()->createBasicRequestObject('ACCEPTPAYMENT');
|
124 |
+
|
125 |
+
if ($order && $order->getIncrementId()) {
|
126 |
+
$request->setTid($order->getIncrementId()); // TID == OrderNR
|
127 |
+
}
|
128 |
+
|
129 |
+
$request->setPType('ELV')
|
130 |
+
->setIdentifier($payment->getMpayAccountNumber())
|
131 |
+
->setSortCode($payment->getMpayBankCode());
|
132 |
+
|
133 |
+
if($payment->getAmount()){
|
134 |
+
$request->setPrice($payment->getAmount()*100,2);
|
135 |
+
$request->setCurrency($order->getBaseCurrencyCode());
|
136 |
+
}
|
137 |
+
|
138 |
+
$request->setClearing('0');
|
139 |
+
|
140 |
+
$request->setSuccessUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SUCCESS_URL,array('_secure' => true)));
|
141 |
+
$request->setErrorUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::ERROR_URL,array('_secure' => true)));
|
142 |
+
$request->setConfirmationUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::CONFIRMATION_URL,array('_secure' => true)));
|
143 |
+
|
144 |
+
$billing = $order->getBillingAddress();
|
145 |
+
if (!empty($billing)) {
|
146 |
+
$request->setCustomer($billing->getFirstname()." ".$billing->getLastname());
|
147 |
+
}
|
148 |
+
$request->setUserField($order->getIncrementId()); // do not change this -> it will be used as order id; USER_FIELD == OrderNR
|
149 |
+
// $request->setProfile();
|
150 |
+
// $request->setCustomerId();
|
151 |
+
// $request->setCustomerEmail();
|
152 |
+
// $request->setUserField();
|
153 |
+
|
154 |
+
// Mage::log($request);
|
155 |
+
return $request;
|
156 |
+
}
|
157 |
+
|
158 |
+
public function getOrderPlaceRedirectUrl(){
|
159 |
+
return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/payment',array('_secure' => true)) : false;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Entity/Setup.php
ADDED
@@ -0,0 +1,47 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
//class Mpay24_Mpay24_Model_Entity_Setup extends Mage_Core_Model_Resource_Setup
|
22 |
+
class Mpay24_Mpay24_Model_Entity_Setup extends Mage_Eav_Model_Entity_Setup
|
23 |
+
{
|
24 |
+
public function getDefaultEntities()
|
25 |
+
{
|
26 |
+
return array(
|
27 |
+
'order_payment' => array(
|
28 |
+
'entity_model' => 'sales/order_payment',
|
29 |
+
'table'=>'sales/order_entity',
|
30 |
+
'attributes' => array(
|
31 |
+
'parent_id' => array(
|
32 |
+
'type'=>'static',
|
33 |
+
'backend'=>'sales_entity/order_attribute_backend_child'
|
34 |
+
),
|
35 |
+
'mpay_tid' => array(),
|
36 |
+
'mpay_holder' => array(),
|
37 |
+
'mpay_account_number' => array(),
|
38 |
+
'mpay_bank_code' => array(),
|
39 |
+
'mpay_pb_country_code' => array(),
|
40 |
+
'mpay_pb_area_code' => array(),
|
41 |
+
'mpay_pb_number' => array()
|
42 |
+
)
|
43 |
+
)
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Method/Abstract.php
ADDED
@@ -0,0 +1,102 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
*
|
23 |
+
* Abstract Payment Module
|
24 |
+
*
|
25 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
26 |
+
*/
|
27 |
+
abstract class Mpay24_Mpay24_Model_Method_Abstract extends Mage_Payment_Model_Method_Abstract
|
28 |
+
{
|
29 |
+
/**
|
30 |
+
* Get mpay24 API Model
|
31 |
+
*
|
32 |
+
* @return Mpay24_Mpay24_Model_Api_Mpay24
|
33 |
+
*/
|
34 |
+
public function getApi(){
|
35 |
+
return Mage::getSingleton('mpay24/api_mpay24');
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get mpay24 session namespace
|
40 |
+
*
|
41 |
+
* @return Mpay24_Mpay24_Model_Session
|
42 |
+
*/
|
43 |
+
public function getSession() {
|
44 |
+
return Mage::getSingleton('mpay24/session');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function clearSession(){
|
48 |
+
$this->getSession()->set3DSUrl('');
|
49 |
+
$this->getSession()->setAdditionalInformation('mpay_tid', '');
|
50 |
+
// $this->getSession()->setMpayTid('');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get payment
|
55 |
+
*
|
56 |
+
* @return Mage_Sales_Model_Order
|
57 |
+
*/
|
58 |
+
public function getPayment() {
|
59 |
+
if (empty($this->_payment)) {
|
60 |
+
$this->_payment = $this->getCheckout()->getQuote()->getPayment();
|
61 |
+
}
|
62 |
+
return $this->_payment;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get quote
|
67 |
+
*
|
68 |
+
* @return Mage_Sales_Model_Order
|
69 |
+
*/
|
70 |
+
public function getQuote() {
|
71 |
+
if (empty($this->_quote)) {
|
72 |
+
$this->_quote = $this->getCheckout()->getQuote();
|
73 |
+
}
|
74 |
+
return $this->_quote;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get checkout
|
79 |
+
*
|
80 |
+
* @return Mage_Sales_Model_Order
|
81 |
+
*/
|
82 |
+
public function getCheckout() {
|
83 |
+
if (empty($this->_checkout)) {
|
84 |
+
$this->_checkout = Mage::getSingleton('checkout/session');
|
85 |
+
}
|
86 |
+
return $this->_checkout;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get order model
|
91 |
+
*
|
92 |
+
* @return Mage_Sales_Model_Order
|
93 |
+
*/
|
94 |
+
public function getOrder() {
|
95 |
+
if (!$this->_order) {
|
96 |
+
$paymentInfo = $this->getInfoInstance();
|
97 |
+
$this->_order = Mage::getModel('sales/order')
|
98 |
+
->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
|
99 |
+
}
|
100 |
+
return $this->_order;
|
101 |
+
}
|
102 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Method/Cc.php
ADDED
@@ -0,0 +1,198 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
class Mpay24_Mpay24_Model_Method_Cc extends Mpay24_Mpay24_Model_Method_Abstract {
|
23 |
+
protected $_formBlockType = 'mpay24/form_cc';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_cc';
|
25 |
+
protected $_canSaveCc = false;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Assign data to info model instance
|
30 |
+
*
|
31 |
+
* @param mixed $data
|
32 |
+
* @return Mage_Payment_Model_Info
|
33 |
+
*/
|
34 |
+
public function assignData($data) {
|
35 |
+
if (!($data instanceof Varien_Object)) {
|
36 |
+
$data = new Varien_Object($data);
|
37 |
+
}
|
38 |
+
$info = $this->getInfoInstance();
|
39 |
+
$info->setCcType($data->getCcType())
|
40 |
+
->setCcOwner($data->getCcOwner())
|
41 |
+
->setCcLast4(substr($data->getCcNumber(), -4))
|
42 |
+
->setCcNumber($data->getCcNumber())
|
43 |
+
->setCcCid($data->getCcCid())
|
44 |
+
->setCcExpMonth($data->getCcExpMonth())
|
45 |
+
->setCcExpYear($data->getCcExpYear());
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Prepare info instance for save
|
51 |
+
*
|
52 |
+
* @return Mage_Payment_Model_Abstract
|
53 |
+
*/
|
54 |
+
public function prepareSave() {
|
55 |
+
$info = $this->getInfoInstance();
|
56 |
+
if ($this->_canSaveCc) {
|
57 |
+
$info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
|
58 |
+
}
|
59 |
+
//$info->setCcCidEnc($info->encrypt($info->getCcCid()));
|
60 |
+
$info->setCcNumber(null)
|
61 |
+
->setCcCid(null);
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Validate payment method information object
|
67 |
+
*
|
68 |
+
* @param Mage_Payment_Model_Info $info
|
69 |
+
* @return Mage_Payment_Model_Abstract
|
70 |
+
*/
|
71 |
+
public function validate() {
|
72 |
+
/*
|
73 |
+
* calling parent validate function
|
74 |
+
*/
|
75 |
+
parent::validate();
|
76 |
+
|
77 |
+
$info = $this->getInfoInstance();
|
78 |
+
$errorMsg = false;
|
79 |
+
$availableTypes = explode(',',$this->getConfigData('cctypes'));
|
80 |
+
|
81 |
+
$ccNumber = $info->getCcNumber();
|
82 |
+
|
83 |
+
// remove credit card number delimiters such as "-" and space
|
84 |
+
$ccNumber = preg_replace('/[\-\s]+/', '', $ccNumber);
|
85 |
+
$info->setCcNumber($ccNumber);
|
86 |
+
|
87 |
+
$ccType = '';
|
88 |
+
|
89 |
+
if (!$this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) {
|
90 |
+
$errorCode = 'ccsave_expiration,ccsave_expiration_yr';
|
91 |
+
$errorMsg = $this->_getHelper()->__('Incorrect credit card expiration date');
|
92 |
+
}
|
93 |
+
|
94 |
+
if (in_array($info->getCcType(), $availableTypes)){
|
95 |
+
if ($this->validateCcNum($ccNumber)
|
96 |
+
// Other credit card type number validation
|
97 |
+
|| ($this->OtherCcType($info->getCcType()) && $this->validateCcNumOther($ccNumber))) {
|
98 |
+
|
99 |
+
$ccType = 'OT';
|
100 |
+
$ccTypeRegExpList = array(
|
101 |
+
'VI' => '/^4[0-9]{12}([0-9]{3})?$/', // Visa
|
102 |
+
'MC' => '/^5[1-5][0-9]{14}$/', // Master Card
|
103 |
+
'AE' => '/^3[47][0-9]{13}$/', // American Express
|
104 |
+
'DI' => '/^6011[0-9]{12}$/', // Discovery
|
105 |
+
'DC' => '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', // Diners Club
|
106 |
+
'JC' => '/(^3[0-9]{15}$)|(^(2131|1800)[0-9]{11}$)/', // JCB
|
107 |
+
'SS' => '/^((6759[0-9]{12})|(49[013][1356][0-9]{13})|(633[34][0-9]{12})|(633110[0-9]{10})|(564182[0-9]{10}))([0-9]{2,3})?$/'
|
108 |
+
);
|
109 |
+
|
110 |
+
foreach ($ccTypeRegExpList as $ccTypeMatch=>$ccTypeRegExp) {
|
111 |
+
if (preg_match($ccTypeRegExp, $ccNumber)) {
|
112 |
+
$ccType = $ccTypeMatch;
|
113 |
+
break;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if (!$this->OtherCcType($info->getCcType()) && $ccType!=$info->getCcType()) {
|
118 |
+
$errorCode = 'ccsave_cc_type,ccsave_cc_number';
|
119 |
+
$errorMsg = $this->_getHelper()->__('Credit card number mismatch with credit card type');
|
120 |
+
}
|
121 |
+
} else {
|
122 |
+
$errorCode = 'ccsave_cc_number';
|
123 |
+
$errorMsg = $this->_getHelper()->__('Invalid Credit Card Number');
|
124 |
+
}
|
125 |
+
|
126 |
+
} else {
|
127 |
+
$errorCode = 'ccsave_cc_type';
|
128 |
+
$errorMsg = $this->_getHelper()->__('Credit card type is not allowed for this payment method');
|
129 |
+
}
|
130 |
+
|
131 |
+
if($errorMsg){
|
132 |
+
Mage::throwException($errorMsg);
|
133 |
+
//throw Mage::exception('Mage_Payment', $errorMsg, $errorCode);
|
134 |
+
}
|
135 |
+
|
136 |
+
return $this;
|
137 |
+
}
|
138 |
+
|
139 |
+
protected function _validateExpDate($expYear, $expMonth) {
|
140 |
+
$date = Mage::app()->getLocale()->date();
|
141 |
+
if (!$expYear || !$expMonth || ($date->compareYear($expYear)==1) || ($date->compareYear($expYear) == 0 && ($date->compareMonth($expMonth)==1 ) )) {
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
|
147 |
+
public function OtherCcType($type) {
|
148 |
+
return $type=='OT';
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Validate credit card number
|
153 |
+
*
|
154 |
+
* @param string $cc_number
|
155 |
+
* @return bool
|
156 |
+
*/
|
157 |
+
public function validateCcNum($ccNumber) {
|
158 |
+
$cardNumber = strrev($ccNumber);
|
159 |
+
$numSum = 0;
|
160 |
+
|
161 |
+
for ($i=0; $i<strlen($cardNumber); $i++) {
|
162 |
+
$currentNum = substr($cardNumber, $i, 1);
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Double every second digit
|
166 |
+
*/
|
167 |
+
if ($i % 2 == 1) {
|
168 |
+
$currentNum *= 2;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Add digits of 2-digit numbers together
|
173 |
+
*/
|
174 |
+
if ($currentNum > 9) {
|
175 |
+
$firstNum = $currentNum % 10;
|
176 |
+
$secondNum = ($currentNum - $firstNum) / 10;
|
177 |
+
$currentNum = $firstNum + $secondNum;
|
178 |
+
}
|
179 |
+
|
180 |
+
$numSum += $currentNum;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* If the total has no remainder it's OK
|
185 |
+
*/
|
186 |
+
return ($numSum % 10 == 0);
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Other credit cart type number validation
|
191 |
+
*
|
192 |
+
* @param string $ccNumber
|
193 |
+
* @return boolean
|
194 |
+
*/
|
195 |
+
public function validateCcNumOther($ccNumber) {
|
196 |
+
return preg_match('/^\\d+$/', $ccNumber);
|
197 |
+
}
|
198 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Method/Selectpayment.php
ADDED
@@ -0,0 +1,493 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
abstract class Mpay24_Mpay24_Model_Method_Selectpayment extends Mpay24_Mpay24_Model_Method_Abstract {
|
22 |
+
|
23 |
+
public function authorize(Varien_Object $payment, $amount){
|
24 |
+
$this->clearSession();
|
25 |
+
$error = false;
|
26 |
+
if($amount>0){
|
27 |
+
// $payment->setAnetTransType(self::REQUEST_TYPE_AUTH_ONLY);
|
28 |
+
$payment->setAmount($amount);
|
29 |
+
|
30 |
+
$soapRequest = $this->_buildSoapRequest($payment);
|
31 |
+
$soapResult = $this->getApi()->authorize($soapRequest);
|
32 |
+
|
33 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
34 |
+
|
35 |
+
switch ($soapResult->getResponseCode()) {
|
36 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_APPROVED:
|
37 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
38 |
+
$payment->setAdditionalInformation('mpay_tid', $soapResult->getTransactionId());
|
39 |
+
break;
|
40 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_REDIRECT:
|
41 |
+
$this->getPayment()->setAuth3DS(true);
|
42 |
+
$payment->setAdditionalInformation('mpay_tid', $soapResult->getTransactionId());
|
43 |
+
$payment->setAdditionalInformation('user_field', Mpay24_Mpay24_Model_Api_Mpay24::MAGENTO_VERSION.substr($payment->getOrder()->getIncrementId(),0,100).'_'.date('Y-m-d'));
|
44 |
+
break;
|
45 |
+
default:
|
46 |
+
$error = urldecode($soapResult->getData('EXTERNALSTATUS'));
|
47 |
+
break;
|
48 |
+
}
|
49 |
+
}else{
|
50 |
+
$error = Mage::helper('mpay24')->__('Invalid amount for authorization.');
|
51 |
+
}
|
52 |
+
if ($error !== false) {
|
53 |
+
Mage::throwException('Please contact the merchant,'."\n".'this payment is at the moment not possible!'."\n".'ERROR: '.$error);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
protected function _buildRequest(Varien_Object $payment){
|
58 |
+
$order = $payment->getOrder();
|
59 |
+
$this->setStore($order->getStoreId());
|
60 |
+
|
61 |
+
$request = $this->getApi()->createBasicRequestObject('SELECTPAYMENT');
|
62 |
+
$request->setMdxi($this->makeMDXI($order));
|
63 |
+
|
64 |
+
return $request;
|
65 |
+
}
|
66 |
+
|
67 |
+
protected function _buildSoapRequest(Varien_Object $payment){
|
68 |
+
$order = $payment->getOrder();
|
69 |
+
$this->setStore($order->getStoreId());
|
70 |
+
|
71 |
+
$request = $this->getApi()->createBasicSoapRequestObject('SELECTPAYMENT');
|
72 |
+
$mdxi = str_replace('"', '\'"', $this->makeMDXI($order));
|
73 |
+
$mdxi = $this->makeMDXI($order);
|
74 |
+
|
75 |
+
$request->setMdxi($mdxi);
|
76 |
+
$request->setTid($order->getIncrementId());
|
77 |
+
$request->setCurrency($order->getBaseCurrencyCode());
|
78 |
+
|
79 |
+
return $request;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function _buildSoapTransactionStatusRequest(Varien_Object $payment){
|
83 |
+
$order = $payment->getOrder();
|
84 |
+
$this->setStore($order->getStoreId());
|
85 |
+
|
86 |
+
$transactionStatusRequest = $this->getApi()->createBasicSoapRequestObject('TID_TRANSACTIONSTATUS');
|
87 |
+
|
88 |
+
$transactionStatusRequest->setTid($order->getIncrementId());
|
89 |
+
|
90 |
+
return $transactionStatusRequest;
|
91 |
+
}
|
92 |
+
|
93 |
+
private function _getBrand($ccType){
|
94 |
+
$brand = '';
|
95 |
+
switch ($ccType){
|
96 |
+
case 'AE':
|
97 |
+
$brand = 'AMEX';
|
98 |
+
break;
|
99 |
+
case 'DC':
|
100 |
+
$brand = 'DINERS';
|
101 |
+
break;
|
102 |
+
case 'JC':
|
103 |
+
$brand = 'JCB';
|
104 |
+
break;
|
105 |
+
case 'MC':
|
106 |
+
$brand = 'MASTERCARD';
|
107 |
+
break;
|
108 |
+
case 'VI':
|
109 |
+
$brand = 'VISA';
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
return $brand;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function getActivePaymentTypes(){
|
116 |
+
$newLine = "\n";
|
117 |
+
$tab = "\t";
|
118 |
+
$ret = '';
|
119 |
+
$inactivePayments = '';
|
120 |
+
$inactiveCcBrands = array();
|
121 |
+
$inactiveElvCountries = array();
|
122 |
+
$inactiveEpsBanks = array();
|
123 |
+
|
124 |
+
|
125 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_cc/in_use'))
|
126 |
+
$inactivePayments= 'cc,';
|
127 |
+
else {
|
128 |
+
$inactiveCcBrands = array("AE" => "AE", "DC" => "DC", "JC" => "JC", "MC" => "MC", "VI" => "VI");
|
129 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_cc/cctypes')) as $b):
|
130 |
+
unset($inactiveCcBrands[$b]);
|
131 |
+
endforeach;
|
132 |
+
}
|
133 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_elv/in_use'))
|
134 |
+
$inactivePayments.= 'elv,';
|
135 |
+
else {
|
136 |
+
$inactiveElvCountries = array("AT" => "AT", "DE" => "DE", "NL" => "NL");
|
137 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_elv/specificcountry')) as $c):
|
138 |
+
unset($inactiveElvCountries[$c]);
|
139 |
+
endforeach;
|
140 |
+
}
|
141 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_eps/in_use'))
|
142 |
+
$inactivePayments.= 'eps,';
|
143 |
+
else {
|
144 |
+
$inactiveEpsBanks = array("ARZ" => "ARZ", "BA" => "BA", "BAWAG" => "BAWAG", "ERSTE" => "ERSTE", "HYPO" => "HYPO", "RZB" => "RZB");
|
145 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_eps/epstypes')) as $b):
|
146 |
+
unset($inactiveEpsBanks[$b]);
|
147 |
+
endforeach;
|
148 |
+
}
|
149 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_giropay/in_use'))
|
150 |
+
$inactivePayments.= 'giropay,';
|
151 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_maestro/in_use'))
|
152 |
+
$inactivePayments.= 'maestro,';
|
153 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_paybox/in_use'))
|
154 |
+
$inactivePayments.= 'pb,';
|
155 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_psc/in_use'))
|
156 |
+
$inactivePayments.= 'psc,';
|
157 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_paypal/in_use'))
|
158 |
+
$inactivePayments.= 'paypal,';
|
159 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_mpass/in_use'))
|
160 |
+
$inactivePayments.= 'mpass,';
|
161 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_cashTicket/in_use'))
|
162 |
+
$inactivePayments.= 'cash-ticket';
|
163 |
+
$ret.=$tab.'<PaymentTypes Enable="false">'.$newLine;
|
164 |
+
if(!empty($inactiveCcBrands))
|
165 |
+
foreach($inactiveCcBrands as $brand => $value):
|
166 |
+
$ret.= $tab.$tab.'<Payment Type="CC" Brand="'.$this->_getBrand($inactiveCcBrands[$brand]).'"/>'.$newLine;
|
167 |
+
endforeach;
|
168 |
+
if(!empty($inactiveEpsBanks))
|
169 |
+
foreach($inactiveEpsBanks as $bank => $value):
|
170 |
+
$ret.= $tab.$tab.'<Payment Type="EPS" Brand="'.$bank.'"/>'.$newLine;
|
171 |
+
endforeach;
|
172 |
+
if(!empty($inactiveElvCountries))
|
173 |
+
foreach($inactiveElvCountries as $country => $value):
|
174 |
+
if($country === 'DE')
|
175 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="ATOS"/>'.$newLine;
|
176 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="HOBEX-'.$country.'"/>'.$newLine;
|
177 |
+
endforeach;
|
178 |
+
else{
|
179 |
+
$inactiveElvCountries = array("AT" => "AT", "DE" => "DE", "NL" => "NL");
|
180 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_elv/specificcountry')) as $c):
|
181 |
+
if($c === $this->getQuote()->getBillingAddress()->getCountry())
|
182 |
+
unset($inactiveElvCountries[$c]);
|
183 |
+
endforeach;
|
184 |
+
foreach($inactiveElvCountries as $country => $value):
|
185 |
+
if($country === "DE")
|
186 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="ATOS"/>'.$newLine;
|
187 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="HOBEX-'.$country.'"/>'.$newLine;
|
188 |
+
endforeach;
|
189 |
+
}
|
190 |
+
if($inactivePayments !== ''){
|
191 |
+
if(strripos($inactivePayments, ',') === strlen($inactivePayments)-1)
|
192 |
+
$inactivePayments = substr($inactivePayments, 0, strlen($inactivePayments)-1);
|
193 |
+
|
194 |
+
foreach(explode(',',$inactivePayments) as $payment):
|
195 |
+
$ret.= $tab.$tab.'<Payment Type="'.strtoupper($payment).'"/>'.$newLine;
|
196 |
+
endforeach;
|
197 |
+
|
198 |
+
}
|
199 |
+
$ret.=$tab.'</PaymentTypes>'.$newLine;
|
200 |
+
return $ret;
|
201 |
+
}
|
202 |
+
|
203 |
+
protected function makeMDXI($order){
|
204 |
+
$newLine = "\n";
|
205 |
+
$tab = "\t";
|
206 |
+
$stylehead = "font-family:Verdana,Arial,sans-serif;font-size: 10px;background:#336699;color:#FFFFFF;font-weight:bold;border:1px solid #ffffff;border-top:1px solid #7b9ebd;border:1px solid #7b9ebd;";
|
207 |
+
|
208 |
+
$mdxi= '<?xml version="1.0" encoding="UTF-8"?>'.$newLine;
|
209 |
+
$mdxi.= '<Order';
|
210 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24sporder/style').'"' : "";
|
211 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/logostyle')) ? ' LogoStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/logostyle').'"' : "";
|
212 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle')) ? ' PageHeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle').'"' : "";
|
213 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle')) ? ' PageCaptionStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle').'"' : "";
|
214 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle')) ? ' PageStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle').'"' : "";
|
215 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle')) ? ' InputFieldsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle').'"' : "";
|
216 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle')) ? ' DropDownListsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle').'"' : "";
|
217 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle')) ? ' ButtonsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle').'"' : "";
|
218 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle')) ? ' ErrorsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle').'"' : "";
|
219 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle')) ? ' SuccessTitleStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle').'"' : "";
|
220 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle')) ? ' ErrorTitleStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle').'"' : "";
|
221 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle')) ? ' FooterStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle').'"' : "";
|
222 |
+
$mdxi.= '>'.$newLine;
|
223 |
+
$mdxi.= $tab.'<UserField>'.Mpay24_Mpay24_Model_Api_Mpay24::MAGENTO_VERSION.substr($order->getIncrementId(),0,100).'_'.date('Y-m-d').'</UserField>'.$newLine;
|
224 |
+
$mdxi.= $tab.'<Tid>'.substr($order->getIncrementId(),0,32).'</Tid>'.$newLine;
|
225 |
+
$lang = explode('_', Mage::getStoreConfig('general/locale/code'));
|
226 |
+
$mdxi.= $tab.'<TemplateSet Language="'.strtoupper($lang[0]).'"/>'.$newLine;
|
227 |
+
$mdxi.= $this->getActivePaymentTypes();
|
228 |
+
$conf = explode(',',Mage::getStoreConfig('mpay24/mpay24spsc/sc_row'));
|
229 |
+
|
230 |
+
$mdxi.= $tab.'<ShoppingCart';
|
231 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_style').'"' : "";
|
232 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_header').'"' : "";
|
233 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle').'"' : "";
|
234 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle')) ? ' CaptionStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle').'"' : "";
|
235 |
+
if(in_array('Number',$conf)){
|
236 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader')) ? ' NumberHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader').'"' : "";
|
237 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle')) ? ' NumberStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle').'"' : "";
|
238 |
+
}
|
239 |
+
if(in_array('ProductNr',$conf)){
|
240 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader')) ? ' ProductNrHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader').'"' : "";
|
241 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle')) ? ' ProductNrStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle').'"' : "";
|
242 |
+
}
|
243 |
+
if(in_array('Description',$conf)){
|
244 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader')) ? ' DescriptionHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader').'"' : "";
|
245 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle')) ? ' DescriptionStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle').'"' : "";
|
246 |
+
}
|
247 |
+
if(in_array('Package',$conf)){
|
248 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader')) ? ' PackageHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader').'"' : "";
|
249 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle')) ? ' PackageStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle').'"' : "";
|
250 |
+
}
|
251 |
+
if(in_array('Quantity',$conf)){
|
252 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader')) ? ' QuantityHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader').'"' : "";
|
253 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle')) ? ' QuantityStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle').'"' : "";
|
254 |
+
}
|
255 |
+
if(in_array('ItemPrice',$conf)){
|
256 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader')) ? ' ItemPriceHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader').'"' : "";
|
257 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle')) ? ' ItemPriceStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle').'"' : "";
|
258 |
+
}
|
259 |
+
if(in_array('Price',$conf)){
|
260 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader')) ? ' PriceHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader').'"' : "";
|
261 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle')) ? ' PriceStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle').'"' : "";
|
262 |
+
}
|
263 |
+
$mdxi.= '>'.$newLine;
|
264 |
+
|
265 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/description')) ? $tab.'<Description>'.Mage::getStoreConfig('mpay24/mpay24spsc/description').'</Description>' : "";
|
266 |
+
|
267 |
+
$style1 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style1');
|
268 |
+
$style2 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style2');
|
269 |
+
$ret = "";
|
270 |
+
$linecount = 0;
|
271 |
+
|
272 |
+
foreach($order->getAllItems() as $_item):
|
273 |
+
$linecount++;
|
274 |
+
$style = ($linecount % 2== 1) ? $style1 : $style2;
|
275 |
+
if($style !== '')
|
276 |
+
$style = "Style=\"".$style."\"";
|
277 |
+
$xmlitem = $newLine.$tab.$tab."<Item>".$newLine;
|
278 |
+
$xmlitem .= (in_array('Number',$conf)) ? $tab.$tab.$tab."<Number ".$style.">".$linecount."</Number>".$newLine : "";
|
279 |
+
$xmlitem .= (in_array('ProductNr',$conf)) ? $tab.$tab.$tab."<ProductNr ".$style.">".$this->xmlentities($_item->getData('sku'))."</ProductNr>".$newLine : "";
|
280 |
+
$xmlitem .= (in_array('Description',$conf)) ? $tab.$tab.$tab."<Description ".$style.">".$this->xmlentities($_item->getData('name'))."</Description>".$newLine : "";
|
281 |
+
$xmlitem .= (in_array('Package',$conf)) ? $tab.$tab.$tab."<Package ".$style.">"."</Package>".$newLine : "";
|
282 |
+
$xmlitem .= (in_array('Quantity',$conf)) ? $tab.$tab.$tab."<Quantity ".$style.">".(int)$_item->getQtyOrdered()."</Quantity>".$newLine : "";
|
283 |
+
if(Mage::getStoreConfig('tax/cart_display/price') == 2 || Mage::getStoreConfig('tax/cart_display/price') == 3){
|
284 |
+
$xmlitem .= (in_array('ItemPrice',$conf)) ? $tab.$tab.$tab."<ItemPrice ".$style." Tax='".number_format($_item->getTaxAmount(),2,'.','')."'>".number_format($_item->getPriceInclTax()*1,2,'.','')."</ItemPrice>".$newLine : "";
|
285 |
+
} else
|
286 |
+
$xmlitem .= (in_array('ItemPrice',$conf)) ? $tab.$tab.$tab."<ItemPrice ".$style.">".number_format(($_item->getData('price')*1),2,'.','')."</ItemPrice>".$newLine : "";
|
287 |
+
$xmlitem .= $tab.$tab."</Item>".$newLine;
|
288 |
+
$ret .= $xmlitem;
|
289 |
+
endforeach;
|
290 |
+
$mdxi.= $ret;
|
291 |
+
|
292 |
+
$mdxi.= $tab.'<SubTotal';
|
293 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header').'"' : "";
|
294 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle').'"' : "";
|
295 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style').'"' : "";
|
296 |
+
if(Mage::getStoreConfig('tax/cart_display/subtotal') == 2 || Mage::getStoreConfig('tax/cart_display/subtotal') == 3)
|
297 |
+
$mdxi.= '>'.number_format($order->getSubtotalInclTax(),2,'.','').'</SubTotal>'.$newLine;
|
298 |
+
else
|
299 |
+
$mdxi.= '>'.number_format($order->getData('subtotal'),2,'.','').'</SubTotal>'.$newLine;
|
300 |
+
|
301 |
+
if(number_format($order->getData('discount_amount'),2,'.','') !== '0.00'){
|
302 |
+
$mdxi.= $tab.$tab.'<Discount';
|
303 |
+
$mdxi.= ' Header="'.$order->getData('discount_description').'"';
|
304 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle').'"' : "";
|
305 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/discount_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/discount_style').'"' : "";
|
306 |
+
$mdxi.= '>'.number_format($order->getData('discount_amount'), 2, '.', '').'</Discount>'.$newLine;
|
307 |
+
}
|
308 |
+
|
309 |
+
if(number_format($order->getData('shipping_amount'),2,'.','') !== '0.00'){
|
310 |
+
$mdxi.=$tab. $tab.'<ShippingCosts';
|
311 |
+
$mdxi.= ' Header="'.$order->getData('shipping_description').'"';
|
312 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle').'"' : "";
|
313 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style').'"' : "";
|
314 |
+
if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3)
|
315 |
+
$mdxi.= '>'.number_format($order->getShippingInclTax(), 2, '.', '').'</ShippingCosts>'.$newLine;
|
316 |
+
else
|
317 |
+
$mdxi.= '>'.number_format($order->getData('shipping_amount'), 2, '.', '').'</ShippingCosts>'.$newLine;
|
318 |
+
}
|
319 |
+
|
320 |
+
if(number_format($order->getData('tax_amount'),2,'.','') !== '0.00'){
|
321 |
+
$array = $order->getFullTaxInfo();
|
322 |
+
$taxInfo = array();
|
323 |
+
foreach($array as $a){
|
324 |
+
$taxArray = $a;
|
325 |
+
foreach(array_keys($taxArray) as $taxKey){
|
326 |
+
$taxInfo[$taxKey] = $taxArray[$taxKey];
|
327 |
+
}
|
328 |
+
$mdxi.= $tab.$tab.'<Tax';
|
329 |
+
$mdxi.= ' Header="'.$taxArray['id'].'"';
|
330 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle').'"' : "";
|
331 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/tax_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/tax_style').'"' : "";
|
332 |
+
$mdxi.= ' Percent="'.number_format($taxArray['rates'][0]['percent'],0,'.','').'"';
|
333 |
+
$mdxi.= '>'.number_format($taxArray['amount'],2,'.','').'</Tax>'.$newLine;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
$mdxi.= $tab.'</ShoppingCart>'.$newLine;
|
338 |
+
|
339 |
+
$billingCountry = "";
|
340 |
+
$billingCountryCode = "";
|
341 |
+
$shippingCountry = "";
|
342 |
+
$shippingCountryCode = "";
|
343 |
+
|
344 |
+
foreach(Mage::app()->getLocale()->getOptionCountries() as $c)
|
345 |
+
if ($c['value'] == $order->getBillingAddress()->getCountry()) {
|
346 |
+
$billingCountry = $c['label'];
|
347 |
+
$billingCountryCode = $c['value'];
|
348 |
+
break;
|
349 |
+
}
|
350 |
+
|
351 |
+
if($order->getShippingAddress())
|
352 |
+
foreach(Mage::app()->getLocale()->getOptionCountries() as $c){
|
353 |
+
if ($c['value'] == $order->getShippingAddress()->getCountry()) {
|
354 |
+
$shippingCountry = $c['label'];
|
355 |
+
$shippingCountryCode = $c['value'];
|
356 |
+
break;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
$mdxi.= $tab.'<Price';
|
361 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_header').'"' : "";
|
362 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle').'"' : "";
|
363 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_style').'"' : "";
|
364 |
+
$mdxi.= '>'.number_format($order->getData('grand_total'),2,'.','').'</Price>'.$newLine;
|
365 |
+
|
366 |
+
$mdxi.= $tab.'<Currency>'.$this->xmlentities($order->getBaseCurrencyCode()).'</Currency>'.$newLine;
|
367 |
+
|
368 |
+
$mdxi.= $tab.'<BillingAddr Mode="'.Mage::getStoreConfig('mpay24/mpay24as/billingAddressMode').'">'.$newLine;
|
369 |
+
|
370 |
+
if($order->getShippingAddress() && $this->xmlentities($order->getShippingAddress()->getFirstname()) === '')
|
371 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getLastname());
|
372 |
+
elseif($this->xmlentities($order->getBillingAddress()->getLastname()) === '')
|
373 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getFirstname());
|
374 |
+
else
|
375 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getFirstname()).' '.$this->xmlentities($order->getBillingAddress()->getLastname());
|
376 |
+
$mdxi.= $tab.$tab.'<Name>'.substr($billingName,0,50).'</Name>'.$newLine;
|
377 |
+
|
378 |
+
$billingAdress = $this->xmlentities($order->getBillingAddress()->getStreetFull());
|
379 |
+
|
380 |
+
$billingStreet = $this->splitAdress($billingAdress);
|
381 |
+
|
382 |
+
$mdxi.= $tab.$tab.$billingStreet;
|
383 |
+
$mdxi.= $tab.$tab.'<Zip>'.substr($this->xmlentities($order->getBillingAddress()->getPostcode()),0,50).'</Zip>'.$newLine;
|
384 |
+
$mdxi.= $tab.$tab.'<City>'.substr($this->xmlentities($order->getBillingAddress()->getCity()),0,50).'</City>'.$newLine;
|
385 |
+
$mdxi.= $tab.$tab.'<Country Code="'.$this->xmlentities($billingCountryCode).'"/>'.$newLine;
|
386 |
+
$mdxi.= $tab.'</BillingAddr>'.$newLine;
|
387 |
+
|
388 |
+
if($order->getShippingAddress()){
|
389 |
+
$mdxi.= $tab.'<ShippingAddr Mode="ReadOnly">'.$newLine;
|
390 |
+
if($this->xmlentities($order->getShippingAddress()->getFirstname()) === '')
|
391 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getLastname());
|
392 |
+
elseif($this->xmlentities($order->getShippingAddress()->getLastname()) === '')
|
393 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getFirstname());
|
394 |
+
else
|
395 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getFirstname()).' '.$this->xmlentities($order->getShippingAddress()->getLastname());
|
396 |
+
$mdxi.= $tab.$tab.'<Name>'.substr($shippingName,0,50).'</Name>'.$newLine;
|
397 |
+
|
398 |
+
$shippingAdress = $this->xmlentities($order->getShippingAddress()->getStreetFull());
|
399 |
+
|
400 |
+
$shippingStreet = $this->splitAdress($shippingAdress);
|
401 |
+
|
402 |
+
$mdxi.= $tab.$tab.$shippingStreet;
|
403 |
+
$mdxi.= $tab.$tab.'<Zip>'.substr($this->xmlentities($order->getShippingAddress()->getPostcode()),0,50).'</Zip>'.$newLine;
|
404 |
+
$mdxi.= $tab.$tab.'<City>'.substr($this->xmlentities($order->getShippingAddress()->getCity()),0,50).'</City>'.$newLine;
|
405 |
+
$mdxi.= $tab.$tab.'<Country Code="'.$this->xmlentities($shippingCountryCode).'"/>'.$newLine;
|
406 |
+
$mdxi.= $tab.'</ShippingAddr>'.$newLine;
|
407 |
+
}
|
408 |
+
|
409 |
+
$mdxi.= $tab.'<URL>'.$newLine;
|
410 |
+
if(Mage::helper('customer')->isLoggedIn())
|
411 |
+
$mdxi.= $tab.$tab.'<Success>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SUCCESS_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Success>'.$newLine;
|
412 |
+
else
|
413 |
+
$mdxi.= $tab.$tab.'<Success>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::GUEST_SUCCESS_URL,array('_secure' => true, '_query' => "tid=" . substr($order->getIncrementId(),0,32) )).'</Success>'.$newLine;
|
414 |
+
$mdxi.= $tab.$tab.'<Error>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_ERROR_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Error>'.$newLine;
|
415 |
+
$mdxi.= $tab.$tab.'<Confirmation>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CONFIRMATION_URL,array('_secure' => true)).'</Confirmation>'.$newLine;
|
416 |
+
$mdxi.= $tab.$tab.'<Cancel>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CANCEL_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Cancel>'.$newLine;
|
417 |
+
$mdxi.= $tab.'</URL>'.$newLine;
|
418 |
+
|
419 |
+
$mdxi.= '</Order>';
|
420 |
+
|
421 |
+
return $mdxi;
|
422 |
+
}
|
423 |
+
|
424 |
+
public function getOrderPlaceRedirectUrl() {
|
425 |
+
return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/redirect',array('_secure' => true)) : false;
|
426 |
+
}
|
427 |
+
|
428 |
+
private function xmlentities($string){
|
429 |
+
static $trans;
|
430 |
+
if (!isset($trans)) {
|
431 |
+
$trans = get_html_translation_table(HTML_SPECIALCHARS);
|
432 |
+
foreach ($trans as $key => $value)
|
433 |
+
$trans[$key] = '&#'.ord($key).';';
|
434 |
+
|
435 |
+
// dont translate the '&' in case it is part of &xxx;
|
436 |
+
$trans[chr(38)] = '&';
|
437 |
+
}
|
438 |
+
|
439 |
+
//after the initial translation, _do_ map standalone '&' into '&'
|
440 |
+
return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($string, $trans));
|
441 |
+
}
|
442 |
+
|
443 |
+
private function splitAdress($adress, $str2=null){
|
444 |
+
$posNewLine = strpos($adress, "\n");
|
445 |
+
$str = '';
|
446 |
+
if($posNewLine === false){
|
447 |
+
if(strlen($adress) <= 50){
|
448 |
+
if($str2 !== true)
|
449 |
+
$str.= '<Street>'.$adress.'</Street>'."\n";
|
450 |
+
else
|
451 |
+
$str.= "\t"."\t".'<Street2>'.$adress.'</Street2>'."\n";
|
452 |
+
}
|
453 |
+
else{
|
454 |
+
$street1before = substr($adress, 0, 50);
|
455 |
+
$posLastInterval1 = strrpos($street1before, " ");
|
456 |
+
|
457 |
+
$street1 = substr($street1before, 0, $posLastInterval1);
|
458 |
+
|
459 |
+
$street2before = substr(substr($street1before, $posLastInterval1).substr($adress, 50), 1, 50);
|
460 |
+
$posLastInterval2 = strrpos($street2before, " ");
|
461 |
+
$street2 = substr($street2before, 0, $posLastInterval2);
|
462 |
+
|
463 |
+
if($str2 === null){
|
464 |
+
$str.= '<Street>'.$street1.'</Street>'."\n";
|
465 |
+
$str.= "\t"."\t".'<Street2>'.$street2.'</Street2>'."\n";
|
466 |
+
}
|
467 |
+
elseif($str2 === false){
|
468 |
+
if($posLastInterval1){
|
469 |
+
$str.= '<Street>'.$street1.'</Street>'."\n";
|
470 |
+
} else {
|
471 |
+
$str.= '<Street>'.$street1before.'</Street>'."\n";
|
472 |
+
}
|
473 |
+
}
|
474 |
+
else{
|
475 |
+
if($posLastInterval1){
|
476 |
+
$str.= "\t"."\t".'<Street2>'.$street1.'</Street2>'."\n";
|
477 |
+
} else {
|
478 |
+
$str.= '<Street2>'.$street1before.'</Street2>'."\n";
|
479 |
+
}
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}
|
483 |
+
else{
|
484 |
+
$array = explode("\n", $adress);
|
485 |
+
$adress1 = $array[0];
|
486 |
+
$str.= $this->splitAdress($adress1, false);
|
487 |
+
|
488 |
+
$adress2 = $array[1];
|
489 |
+
$str.= $this->splitAdress($adress2, true);
|
490 |
+
}
|
491 |
+
return $str;
|
492 |
+
}
|
493 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Method/Selectpayment.php.new~
ADDED
@@ -0,0 +1,493 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
abstract class Mpay24_Mpay24_Model_Method_Selectpayment extends Mpay24_Mpay24_Model_Method_Abstract {
|
22 |
+
|
23 |
+
public function authorize(Varien_Object $payment, $amount){
|
24 |
+
$this->clearSession();
|
25 |
+
$error = false;
|
26 |
+
if($amount>0){
|
27 |
+
// $payment->setAnetTransType(self::REQUEST_TYPE_AUTH_ONLY);
|
28 |
+
$payment->setAmount($amount);
|
29 |
+
|
30 |
+
$soapRequest = $this->_buildSoapRequest($payment);
|
31 |
+
$soapResult = $this->getApi()->authorize($soapRequest);
|
32 |
+
|
33 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
34 |
+
|
35 |
+
switch ($soapResult->getResponseCode()) {
|
36 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_APPROVED:
|
37 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
38 |
+
$payment->setAdditionalInformation('mpay_tid', $soapResult->getTransactionId());
|
39 |
+
break;
|
40 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_REDIRECT:
|
41 |
+
$this->getPayment()->setAuth3DS(true);
|
42 |
+
$payment->setAdditionalInformation('mpay_tid', $soapResult->getTransactionId());
|
43 |
+
$payment->setAdditionalInformation('user_field', "Magento 1.1.1 ".substr($payment->getOrder()->getIncrementId(),0,100).'_'.date('Y-m-d'));
|
44 |
+
break;
|
45 |
+
default:
|
46 |
+
$error = urldecode($soapResult->getData('EXTERNALSTATUS'));
|
47 |
+
break;
|
48 |
+
}
|
49 |
+
}else{
|
50 |
+
$error = Mage::helper('mpay24')->__('Invalid amount for authorization.');
|
51 |
+
}
|
52 |
+
if ($error !== false) {
|
53 |
+
Mage::throwException('Please contact the merchant,'."\n".'this payment is at the moment not possible!'."\n".'ERROR: '.$error);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
protected function _buildRequest(Varien_Object $payment){
|
58 |
+
$order = $payment->getOrder();
|
59 |
+
$this->setStore($order->getStoreId());
|
60 |
+
|
61 |
+
$request = $this->getApi()->createBasicRequestObject('SELECTPAYMENT');
|
62 |
+
$request->setMdxi($this->makeMDXI($order));
|
63 |
+
|
64 |
+
return $request;
|
65 |
+
}
|
66 |
+
|
67 |
+
protected function _buildSoapRequest(Varien_Object $payment){
|
68 |
+
$order = $payment->getOrder();
|
69 |
+
$this->setStore($order->getStoreId());
|
70 |
+
|
71 |
+
$request = $this->getApi()->createBasicSoapRequestObject('SELECTPAYMENT');
|
72 |
+
$mdxi = str_replace('"', '\'"', $this->makeMDXI($order));
|
73 |
+
$mdxi = $this->makeMDXI($order);
|
74 |
+
|
75 |
+
$request->setMdxi($mdxi);
|
76 |
+
$request->setTid($order->getIncrementId());
|
77 |
+
$request->setCurrency($order->getBaseCurrencyCode());
|
78 |
+
|
79 |
+
return $request;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function _buildSoapTransactionStatusRequest(Varien_Object $payment){
|
83 |
+
$order = $payment->getOrder();
|
84 |
+
$this->setStore($order->getStoreId());
|
85 |
+
|
86 |
+
$transactionStatusRequest = $this->getApi()->createBasicSoapRequestObject('TID_TRANSACTIONSTATUS');
|
87 |
+
|
88 |
+
$transactionStatusRequest->setTid($order->getIncrementId());
|
89 |
+
|
90 |
+
return $transactionStatusRequest;
|
91 |
+
}
|
92 |
+
|
93 |
+
private function _getBrand($ccType){
|
94 |
+
$brand = '';
|
95 |
+
switch ($ccType){
|
96 |
+
case 'AE':
|
97 |
+
$brand = 'AMEX';
|
98 |
+
break;
|
99 |
+
case 'DC':
|
100 |
+
$brand = 'DINERS';
|
101 |
+
break;
|
102 |
+
case 'JC':
|
103 |
+
$brand = 'JCB';
|
104 |
+
break;
|
105 |
+
case 'MC':
|
106 |
+
$brand = 'MASTERCARD';
|
107 |
+
break;
|
108 |
+
case 'VI':
|
109 |
+
$brand = 'VISA';
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
return $brand;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function getActivePaymentTypes(){
|
116 |
+
$newLine = "\n";
|
117 |
+
$tab = "\t";
|
118 |
+
$ret = '';
|
119 |
+
$inactivePayments = '';
|
120 |
+
$inactiveCcBrands = array();
|
121 |
+
$inactiveElvCountries = array();
|
122 |
+
$inactiveEpsBanks = array();
|
123 |
+
|
124 |
+
|
125 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_cc/in_use'))
|
126 |
+
$inactivePayments= 'cc,';
|
127 |
+
else {
|
128 |
+
$inactiveCcBrands = array("AE" => "AE", "DC" => "DC", "JC" => "JC", "MC" => "MC", "VI" => "VI");
|
129 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_cc/cctypes')) as $b):
|
130 |
+
unset($inactiveCcBrands[$b]);
|
131 |
+
endforeach;
|
132 |
+
}
|
133 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_elv/in_use'))
|
134 |
+
$inactivePayments.= 'elv,';
|
135 |
+
else {
|
136 |
+
$inactiveElvCountries = array("AT" => "AT", "DE" => "DE", "NL" => "NL");
|
137 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_elv/specificcountry')) as $c):
|
138 |
+
unset($inactiveElvCountries[$c]);
|
139 |
+
endforeach;
|
140 |
+
}
|
141 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_eps/in_use'))
|
142 |
+
$inactivePayments.= 'eps,';
|
143 |
+
else {
|
144 |
+
$inactiveEpsBanks = array("ARZ" => "ARZ", "BA" => "BA", "BAWAG" => "BAWAG", "ERSTE" => "ERSTE", "HYPO" => "HYPO", "RZB" => "RZB");
|
145 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_eps/epstypes')) as $b):
|
146 |
+
unset($inactiveEpsBanks[$b]);
|
147 |
+
endforeach;
|
148 |
+
}
|
149 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_giropay/in_use'))
|
150 |
+
$inactivePayments.= 'giropay,';
|
151 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_maestro/in_use'))
|
152 |
+
$inactivePayments.= 'maestro,';
|
153 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_paybox/in_use'))
|
154 |
+
$inactivePayments.= 'pb,';
|
155 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_psc/in_use'))
|
156 |
+
$inactivePayments.= 'psc,';
|
157 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_paypal/in_use'))
|
158 |
+
$inactivePayments.= 'paypal,';
|
159 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_mpass/in_use'))
|
160 |
+
$inactivePayments.= 'mpass,';
|
161 |
+
if(!Mage::getStoreConfig('payment/mpay24_sp_cashTicket/in_use'))
|
162 |
+
$inactivePayments.= 'cash-ticket';
|
163 |
+
$ret.=$tab.'<PaymentTypes Enable="false">'.$newLine;
|
164 |
+
if(!empty($inactiveCcBrands))
|
165 |
+
foreach($inactiveCcBrands as $brand => $value):
|
166 |
+
$ret.= $tab.$tab.'<Payment Type="CC" Brand="'.$this->_getBrand($inactiveCcBrands[$brand]).'"/>'.$newLine;
|
167 |
+
endforeach;
|
168 |
+
if(!empty($inactiveEpsBanks))
|
169 |
+
foreach($inactiveEpsBanks as $bank => $value):
|
170 |
+
$ret.= $tab.$tab.'<Payment Type="EPS" Brand="'.$bank.'"/>'.$newLine;
|
171 |
+
endforeach;
|
172 |
+
if(!empty($inactiveElvCountries))
|
173 |
+
foreach($inactiveElvCountries as $country => $value):
|
174 |
+
if($country === 'DE')
|
175 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="ATOS"/>'.$newLine;
|
176 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="HOBEX-'.$country.'"/>'.$newLine;
|
177 |
+
endforeach;
|
178 |
+
else{
|
179 |
+
$inactiveElvCountries = array("AT" => "AT", "DE" => "DE", "NL" => "NL");
|
180 |
+
foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_elv/specificcountry')) as $c):
|
181 |
+
if($c === $this->getQuote()->getBillingAddress()->getCountry())
|
182 |
+
unset($inactiveElvCountries[$c]);
|
183 |
+
endforeach;
|
184 |
+
foreach($inactiveElvCountries as $country => $value):
|
185 |
+
if($country === "DE")
|
186 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="ATOS"/>'.$newLine;
|
187 |
+
$ret.= $tab.$tab.'<Payment Type="ELV" Brand="HOBEX-'.$country.'"/>'.$newLine;
|
188 |
+
endforeach;
|
189 |
+
}
|
190 |
+
if($inactivePayments !== ''){
|
191 |
+
if(strripos($inactivePayments, ',') === strlen($inactivePayments)-1)
|
192 |
+
$inactivePayments = substr($inactivePayments, 0, strlen($inactivePayments)-1);
|
193 |
+
|
194 |
+
foreach(explode(',',$inactivePayments) as $payment):
|
195 |
+
$ret.= $tab.$tab.'<Payment Type="'.strtoupper($payment).'"/>'.$newLine;
|
196 |
+
endforeach;
|
197 |
+
|
198 |
+
}
|
199 |
+
$ret.=$tab.'</PaymentTypes>'.$newLine;
|
200 |
+
return $ret;
|
201 |
+
}
|
202 |
+
|
203 |
+
protected function makeMDXI($order){
|
204 |
+
$newLine = "\n";
|
205 |
+
$tab = "\t";
|
206 |
+
$stylehead = "font-family:Verdana,Arial,sans-serif;font-size: 10px;background:#336699;color:#FFFFFF;font-weight:bold;border:1px solid #ffffff;border-top:1px solid #7b9ebd;border:1px solid #7b9ebd;";
|
207 |
+
|
208 |
+
$mdxi= '<?xml version="1.0" encoding="UTF-8"?>'.$newLine;
|
209 |
+
$mdxi.= '<Order';
|
210 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24sporder/style').'"' : "";
|
211 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/logostyle')) ? ' LogoStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/logostyle').'"' : "";
|
212 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle')) ? ' PageHeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle').'"' : "";
|
213 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle')) ? ' PageCaptionStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle').'"' : "";
|
214 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle')) ? ' PageStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle').'"' : "";
|
215 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle')) ? ' InputFieldsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle').'"' : "";
|
216 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle')) ? ' DropDownListsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle').'"' : "";
|
217 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle')) ? ' ButtonsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle').'"' : "";
|
218 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle')) ? ' ErrorsStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle').'"' : "";
|
219 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle')) ? ' SuccessTitleStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle').'"' : "";
|
220 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle')) ? ' ErrorTitleStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle').'"' : "";
|
221 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle')) ? ' FooterStyle="'.Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle').'"' : "";
|
222 |
+
$mdxi.= '>'.$newLine;
|
223 |
+
$mdxi.= $tab.'<UserField>Magento 1.1.1 '.substr($order->getIncrementId(),0,100).'_'.date('Y-m-d').'</UserField>'.$newLine;
|
224 |
+
$mdxi.= $tab.'<Tid>'.substr($order->getIncrementId(),0,32).'</Tid>'.$newLine;
|
225 |
+
$lang = explode('_', Mage::getStoreConfig('general/locale/code'));
|
226 |
+
$mdxi.= $tab.'<TemplateSet Language="'.strtoupper($lang[0]).'"/>'.$newLine;
|
227 |
+
$mdxi.= $this->getActivePaymentTypes();
|
228 |
+
$conf = explode(',',Mage::getStoreConfig('mpay24/mpay24spsc/sc_row'));
|
229 |
+
|
230 |
+
$mdxi.= $tab.'<ShoppingCart';
|
231 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_style').'"' : "";
|
232 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_header').'"' : "";
|
233 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle').'"' : "";
|
234 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle')) ? ' CaptionStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle').'"' : "";
|
235 |
+
if(in_array('Number',$conf)){
|
236 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader')) ? ' NumberHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader').'"' : "";
|
237 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle')) ? ' NumberStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle').'"' : "";
|
238 |
+
}
|
239 |
+
if(in_array('ProductNr',$conf)){
|
240 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader')) ? ' ProductNrHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader').'"' : "";
|
241 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle')) ? ' ProductNrStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle').'"' : "";
|
242 |
+
}
|
243 |
+
if(in_array('Description',$conf)){
|
244 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader')) ? ' DescriptionHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader').'"' : "";
|
245 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle')) ? ' DescriptionStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle').'"' : "";
|
246 |
+
}
|
247 |
+
if(in_array('Package',$conf)){
|
248 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader')) ? ' PackageHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader').'"' : "";
|
249 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle')) ? ' PackageStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle').'"' : "";
|
250 |
+
}
|
251 |
+
if(in_array('Quantity',$conf)){
|
252 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader')) ? ' QuantityHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader').'"' : "";
|
253 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle')) ? ' QuantityStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle').'"' : "";
|
254 |
+
}
|
255 |
+
if(in_array('ItemPrice',$conf)){
|
256 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader')) ? ' ItemPriceHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader').'"' : "";
|
257 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle')) ? ' ItemPriceStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle').'"' : "";
|
258 |
+
}
|
259 |
+
if(in_array('Price',$conf)){
|
260 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader')) ? ' PriceHeader="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader').'"' : "";
|
261 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle')) ? ' PriceStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle').'"' : "";
|
262 |
+
}
|
263 |
+
$mdxi.= '>'.$newLine;
|
264 |
+
|
265 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/description')) ? $tab.'<Description>'.Mage::getStoreConfig('mpay24/mpay24spsc/description').'</Description>' : "";
|
266 |
+
|
267 |
+
$style1 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style1');
|
268 |
+
$style2 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style2');
|
269 |
+
$ret = "";
|
270 |
+
$linecount = 0;
|
271 |
+
|
272 |
+
foreach($order->getAllItems() as $_item):
|
273 |
+
$linecount++;
|
274 |
+
$style = ($linecount % 2== 1) ? $style1 : $style2;
|
275 |
+
if($style !== '')
|
276 |
+
$style = "Style=\"".$style."\"";
|
277 |
+
$xmlitem = $newLine.$tab.$tab."<Item>".$newLine;
|
278 |
+
$xmlitem .= (in_array('Number',$conf)) ? $tab.$tab.$tab."<Number ".$style.">".$linecount."</Number>".$newLine : "";
|
279 |
+
$xmlitem .= (in_array('ProductNr',$conf)) ? $tab.$tab.$tab."<ProductNr ".$style.">".$this->xmlentities($_item->getData('sku'))."</ProductNr>".$newLine : "";
|
280 |
+
$xmlitem .= (in_array('Description',$conf)) ? $tab.$tab.$tab."<Description ".$style.">".$this->xmlentities($_item->getData('name'))."</Description>".$newLine : "";
|
281 |
+
$xmlitem .= (in_array('Package',$conf)) ? $tab.$tab.$tab."<Package ".$style.">"."</Package>".$newLine : "";
|
282 |
+
$xmlitem .= (in_array('Quantity',$conf)) ? $tab.$tab.$tab."<Quantity ".$style.">".(int)$_item->getQtyOrdered()."</Quantity>".$newLine : "";
|
283 |
+
if(Mage::getStoreConfig('tax/cart_display/price') == 2 || Mage::getStoreConfig('tax/cart_display/price') == 3){
|
284 |
+
$xmlitem .= (in_array('ItemPrice',$conf)) ? $tab.$tab.$tab."<ItemPrice ".$style." Tax='".number_format($_item->getTaxAmount(),2,'.','')."'>".number_format($_item->getPriceInclTax()*1,2,'.','')."</ItemPrice>".$newLine : "";
|
285 |
+
} else
|
286 |
+
$xmlitem .= (in_array('ItemPrice',$conf)) ? $tab.$tab.$tab."<ItemPrice ".$style.">".number_format(($_item->getData('price')*1),2,'.','')."</ItemPrice>".$newLine : "";
|
287 |
+
$xmlitem .= $tab.$tab."</Item>".$newLine;
|
288 |
+
$ret .= $xmlitem;
|
289 |
+
endforeach;
|
290 |
+
$mdxi.= $ret;
|
291 |
+
|
292 |
+
$mdxi.= $tab.'<SubTotal';
|
293 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header').'"' : "";
|
294 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle').'"' : "";
|
295 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style').'"' : "";
|
296 |
+
if(Mage::getStoreConfig('tax/cart_display/subtotal') == 2 || Mage::getStoreConfig('tax/cart_display/subtotal') == 3)
|
297 |
+
$mdxi.= '>'.number_format($order->getSubtotalInclTax(),2,'.','').'</SubTotal>'.$newLine;
|
298 |
+
else
|
299 |
+
$mdxi.= '>'.number_format($order->getData('subtotal'),2,'.','').'</SubTotal>'.$newLine;
|
300 |
+
|
301 |
+
if(number_format($order->getData('discount_amount'),2,'.','') !== '0.00'){
|
302 |
+
$mdxi.= $tab.$tab.'<Discount';
|
303 |
+
$mdxi.= ' Header="'.$order->getData('discount_description').'"';
|
304 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle').'"' : "";
|
305 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/discount_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/discount_style').'"' : "";
|
306 |
+
$mdxi.= '>'.number_format($order->getData('discount_amount'), 2, '.', '').'</Discount>'.$newLine;
|
307 |
+
}
|
308 |
+
|
309 |
+
if(number_format($order->getData('shipping_amount'),2,'.','') !== '0.00'){
|
310 |
+
$mdxi.=$tab. $tab.'<ShippingCosts';
|
311 |
+
$mdxi.= ' Header="'.$order->getData('shipping_description').'"';
|
312 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle').'"' : "";
|
313 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style').'"' : "";
|
314 |
+
if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3)
|
315 |
+
$mdxi.= '>'.number_format($order->getShippingInclTax(), 2, '.', '').'</ShippingCosts>'.$newLine;
|
316 |
+
else
|
317 |
+
$mdxi.= '>'.number_format($order->getData('shipping_amount'), 2, '.', '').'</ShippingCosts>'.$newLine;
|
318 |
+
}
|
319 |
+
|
320 |
+
if(number_format($order->getData('tax_amount'),2,'.','') !== '0.00'){
|
321 |
+
$array = $order->getFullTaxInfo();
|
322 |
+
$taxInfo = array();
|
323 |
+
foreach($array as $a){
|
324 |
+
$taxArray = $a;
|
325 |
+
foreach(array_keys($taxArray) as $taxKey){
|
326 |
+
$taxInfo[$taxKey] = $taxArray[$taxKey];
|
327 |
+
}
|
328 |
+
$mdxi.= $tab.$tab.'<Tax';
|
329 |
+
$mdxi.= ' Header="'.$taxArray['id'].'"';
|
330 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle').'"' : "";
|
331 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/tax_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/tax_style').'"' : "";
|
332 |
+
$mdxi.= ' Percent="'.number_format($taxArray['rates'][0]['percent'],0,'.','').'"';
|
333 |
+
$mdxi.= '>'.number_format($taxArray['amount'],2,'.','').'</Tax>'.$newLine;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
$mdxi.= $tab.'</ShoppingCart>'.$newLine;
|
338 |
+
|
339 |
+
$billingCountry = "";
|
340 |
+
$billingCountryCode = "";
|
341 |
+
$shippingCountry = "";
|
342 |
+
$shippingCountryCode = "";
|
343 |
+
|
344 |
+
foreach(Mage::app()->getLocale()->getOptionCountries() as $c)
|
345 |
+
if ($c['value'] == $order->getBillingAddress()->getCountry()) {
|
346 |
+
$billingCountry = $c['label'];
|
347 |
+
$billingCountryCode = $c['value'];
|
348 |
+
break;
|
349 |
+
}
|
350 |
+
|
351 |
+
if($order->getShippingAddress())
|
352 |
+
foreach(Mage::app()->getLocale()->getOptionCountries() as $c){
|
353 |
+
if ($c['value'] == $order->getShippingAddress()->getCountry()) {
|
354 |
+
$shippingCountry = $c['label'];
|
355 |
+
$shippingCountryCode = $c['value'];
|
356 |
+
break;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
$mdxi.= $tab.'<Price';
|
361 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_header')) ? ' Header="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_header').'"' : "";
|
362 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle')) ? ' HeaderStyle="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle').'"' : "";
|
363 |
+
$mdxi.= (Mage::getStoreConfig('mpay24/mpay24spsc/price_style')) ? ' Style="'.Mage::getStoreConfig('mpay24/mpay24spsc/price_style').'"' : "";
|
364 |
+
$mdxi.= '>'.number_format($order->getData('grand_total'),2,'.','').'</Price>'.$newLine;
|
365 |
+
|
366 |
+
$mdxi.= $tab.'<Currency>'.$this->xmlentities($order->getBaseCurrencyCode()).'</Currency>'.$newLine;
|
367 |
+
|
368 |
+
$mdxi.= $tab.'<BillingAddr Mode="'.Mage::getStoreConfig('mpay24/mpay24as/billingAddressMode').'">'.$newLine;
|
369 |
+
|
370 |
+
if($order->getShippingAddress() && $this->xmlentities($order->getShippingAddress()->getFirstname()) === '')
|
371 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getLastname());
|
372 |
+
elseif($this->xmlentities($order->getBillingAddress()->getLastname()) === '')
|
373 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getFirstname());
|
374 |
+
else
|
375 |
+
$billingName = $this->xmlentities($order->getBillingAddress()->getFirstname()).' '.$this->xmlentities($order->getBillingAddress()->getLastname());
|
376 |
+
$mdxi.= $tab.$tab.'<Name>'.substr($billingName,0,50).'</Name>'.$newLine;
|
377 |
+
|
378 |
+
$billingAdress = $this->xmlentities($order->getBillingAddress()->getStreetFull());
|
379 |
+
|
380 |
+
$billingStreet = $this->splitAdress($billingAdress);
|
381 |
+
|
382 |
+
$mdxi.= $tab.$tab.$billingStreet;
|
383 |
+
$mdxi.= $tab.$tab.'<Zip>'.substr($this->xmlentities($order->getBillingAddress()->getPostcode()),0,50).'</Zip>'.$newLine;
|
384 |
+
$mdxi.= $tab.$tab.'<City>'.substr($this->xmlentities($order->getBillingAddress()->getCity()),0,50).'</City>'.$newLine;
|
385 |
+
$mdxi.= $tab.$tab.'<Country Code="'.$this->xmlentities($billingCountryCode).'"/>'.$newLine;
|
386 |
+
$mdxi.= $tab.'</BillingAddr>'.$newLine;
|
387 |
+
|
388 |
+
if($order->getShippingAddress()){
|
389 |
+
$mdxi.= $tab.'<ShippingAddr Mode="ReadOnly">'.$newLine;
|
390 |
+
if($this->xmlentities($order->getShippingAddress()->getFirstname()) === '')
|
391 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getLastname());
|
392 |
+
elseif($this->xmlentities($order->getShippingAddress()->getLastname()) === '')
|
393 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getFirstname());
|
394 |
+
else
|
395 |
+
$shippingName = $this->xmlentities($order->getShippingAddress()->getFirstname()).' '.$this->xmlentities($order->getShippingAddress()->getLastname());
|
396 |
+
$mdxi.= $tab.$tab.'<Name>'.substr($shippingName,0,50).'</Name>'.$newLine;
|
397 |
+
|
398 |
+
$shippingAdress = $this->xmlentities($order->getShippingAddress()->getStreetFull());
|
399 |
+
|
400 |
+
$shippingStreet = $this->splitAdress($shippingAdress);
|
401 |
+
|
402 |
+
$mdxi.= $tab.$tab.$shippingStreet;
|
403 |
+
$mdxi.= $tab.$tab.'<Zip>'.substr($this->xmlentities($order->getShippingAddress()->getPostcode()),0,50).'</Zip>'.$newLine;
|
404 |
+
$mdxi.= $tab.$tab.'<City>'.substr($this->xmlentities($order->getShippingAddress()->getCity()),0,50).'</City>'.$newLine;
|
405 |
+
$mdxi.= $tab.$tab.'<Country Code="'.$this->xmlentities($shippingCountryCode).'"/>'.$newLine;
|
406 |
+
$mdxi.= $tab.'</ShippingAddr>'.$newLine;
|
407 |
+
}
|
408 |
+
|
409 |
+
$mdxi.= $tab.'<URL>'.$newLine;
|
410 |
+
if(Mage::helper('customer')->isLoggedIn())
|
411 |
+
$mdxi.= $tab.$tab.'<Success>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SUCCESS_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Success>'.$newLine;
|
412 |
+
else
|
413 |
+
$mdxi.= $tab.$tab.'<Success>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::GUEST_SUCCESS_URL,array('_secure' => true, '_query' => "tid=" . substr($order->getIncrementId(),0,32) )).'</Success>'.$newLine;
|
414 |
+
$mdxi.= $tab.$tab.'<Error>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_ERROR_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Error>'.$newLine;
|
415 |
+
$mdxi.= $tab.$tab.'<Confirmation>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CONFIRMATION_URL,array('_secure' => true)).'</Confirmation>'.$newLine;
|
416 |
+
$mdxi.= $tab.$tab.'<Cancel>'.Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SP_CANCEL_URL,array('_secure' => true, '_query' => "TID=" . substr($order->getIncrementId(),0,32) )).'</Cancel>'.$newLine;
|
417 |
+
$mdxi.= $tab.'</URL>'.$newLine;
|
418 |
+
|
419 |
+
$mdxi.= '</Order>';
|
420 |
+
|
421 |
+
return $mdxi;
|
422 |
+
}
|
423 |
+
|
424 |
+
public function getOrderPlaceRedirectUrl() {
|
425 |
+
return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/redirect',array('_secure' => true)) : false;
|
426 |
+
}
|
427 |
+
|
428 |
+
private function xmlentities($string){
|
429 |
+
static $trans;
|
430 |
+
if (!isset($trans)) {
|
431 |
+
$trans = get_html_translation_table(HTML_SPECIALCHARS);
|
432 |
+
foreach ($trans as $key => $value)
|
433 |
+
$trans[$key] = '&#'.ord($key).';';
|
434 |
+
|
435 |
+
// dont translate the '&' in case it is part of &xxx;
|
436 |
+
$trans[chr(38)] = '&';
|
437 |
+
}
|
438 |
+
|
439 |
+
//after the initial translation, _do_ map standalone '&' into '&'
|
440 |
+
return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($string, $trans));
|
441 |
+
}
|
442 |
+
|
443 |
+
private function splitAdress($adress, $str2=null){
|
444 |
+
$posNewLine = strpos($adress, "\n");
|
445 |
+
$str = '';
|
446 |
+
if($posNewLine === false){
|
447 |
+
if(strlen($adress) <= 50){
|
448 |
+
if($str2 !== true)
|
449 |
+
$str.= '<Street>'.$adress.'</Street>'."\n";
|
450 |
+
else
|
451 |
+
$str.= "\t"."\t".'<Street2>'.$adress.'</Street2>'."\n";
|
452 |
+
}
|
453 |
+
else{
|
454 |
+
$street1before = substr($adress, 0, 50);
|
455 |
+
$posLastInterval1 = strrpos($street1before, " ");
|
456 |
+
|
457 |
+
$street1 = substr($street1before, 0, $posLastInterval1);
|
458 |
+
|
459 |
+
$street2before = substr(substr($street1before, $posLastInterval1).substr($adress, 50), 1, 50);
|
460 |
+
$posLastInterval2 = strrpos($street2before, " ");
|
461 |
+
$street2 = substr($street2before, 0, $posLastInterval2);
|
462 |
+
|
463 |
+
if($str2 === null){
|
464 |
+
$str.= '<Street>'.$street1.'</Street>'."\n";
|
465 |
+
$str.= "\t"."\t".'<Street2>'.$street2.'</Street2>'."\n";
|
466 |
+
}
|
467 |
+
elseif($str2 === false){
|
468 |
+
if($posLastInterval1){
|
469 |
+
$str.= '<Street>'.$street1.'</Street>'."\n";
|
470 |
+
} else {
|
471 |
+
$str.= '<Street>'.$street1before.'</Street>'."\n";
|
472 |
+
}
|
473 |
+
}
|
474 |
+
else{
|
475 |
+
if($posLastInterval1){
|
476 |
+
$str.= "\t"."\t".'<Street2>'.$street1.'</Street2>'."\n";
|
477 |
+
} else {
|
478 |
+
$str.= '<Street2>'.$street1before.'</Street2>'."\n";
|
479 |
+
}
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}
|
483 |
+
else{
|
484 |
+
$array = explode("\n", $adress);
|
485 |
+
$adress1 = $array[0];
|
486 |
+
$str.= $this->splitAdress($adress1, false);
|
487 |
+
|
488 |
+
$adress2 = $array[1];
|
489 |
+
$str.= $this->splitAdress($adress2, true);
|
490 |
+
}
|
491 |
+
return $str;
|
492 |
+
}
|
493 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Mpay24/Debug.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Mpay24_Debug extends Mage_Core_Model_Abstract {
|
22 |
+
protected function _construct() {
|
23 |
+
$this->_init('mpay24/mpay24_debug');
|
24 |
+
}
|
25 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Mysql4/Mpay24/Debug.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Mysql4_Mpay24_Debug extends Mage_Core_Model_Mysql4_Abstract {
|
22 |
+
protected function _construct() {
|
23 |
+
$this->_init('mpay24/mpay24_debug', 'debug_id');
|
24 |
+
}
|
25 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Mysql4/Mpay24/Debug/Collection.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Mysql4_Mpay24_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
22 |
+
protected function _construct() {
|
23 |
+
$this->_init('mpay24/mpay24_debug');
|
24 |
+
}
|
25 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {
|
22 |
+
|
23 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Paybox.php
ADDED
@@ -0,0 +1,152 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Paybox extends Mpay24_Mpay24_Model_Method_Abstract {
|
22 |
+
protected $_code = 'mpay24_paybox';
|
23 |
+
protected $_formBlockType = 'mpay24/form_paybox';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_paybox';
|
25 |
+
protected $_allowCurrencyCode = array('EUR');
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Availability options
|
29 |
+
*/
|
30 |
+
protected $_isGateway = false;
|
31 |
+
protected $_canAuthorize = true;
|
32 |
+
protected $_canCapture = true;
|
33 |
+
protected $_canCapturePartial = false;
|
34 |
+
protected $_canRefund = false;
|
35 |
+
protected $_canVoid = false;
|
36 |
+
protected $_canUseInternal = false;
|
37 |
+
protected $_canUseCheckout = true;
|
38 |
+
protected $_canUseForMultishipping = false;
|
39 |
+
protected $_canSaveCc = false;
|
40 |
+
|
41 |
+
public function assignData($data){
|
42 |
+
if (!($data instanceof Varien_Object)) {
|
43 |
+
$data = new Varien_Object($data);
|
44 |
+
}
|
45 |
+
$info = $this->getInfoInstance();
|
46 |
+
$info->setMpayPbCountryCode($data->getMpayPbCountryCode());
|
47 |
+
$info->setMpayPbAreaCode($data->getMpayPbAreaCode());
|
48 |
+
$info->setMpayPbNumber($data->getMpayPbNumber());
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function validate(){
|
53 |
+
parent::validate();
|
54 |
+
if (!$this->getQuote()->getPayment()->getMpayPbNumber()) {
|
55 |
+
Mage::throwException(Mage::helper('mpay24')->__('Please fill out the account number'));
|
56 |
+
}
|
57 |
+
$currency_code = $this->getQuote()->getBaseCurrencyCode();
|
58 |
+
if (!in_array($currency_code,$this->_allowCurrencyCode)) {
|
59 |
+
Mage::throwException(Mage::helper('mpay24')->__('Selected currency code ('.$currency_code.') is not compatible with paybox'));
|
60 |
+
}
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
|
64 |
+
public function authorize(Varien_Object $payment, $amount){
|
65 |
+
$this->clearSession();
|
66 |
+
$error = false;
|
67 |
+
if($amount>0){
|
68 |
+
// $payment->setAnetTransType(self::REQUEST_TYPE_AUTH_ONLY);
|
69 |
+
$payment->setAmount($amount);
|
70 |
+
|
71 |
+
$request= $this->_buildRequest($payment);
|
72 |
+
$result = $this->getApi()->authorize($request);
|
73 |
+
switch ($result->getResponseCode()) {
|
74 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_APPROVED:
|
75 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
76 |
+
$payment->setMpayTid($result->getTransactionId());
|
77 |
+
break;
|
78 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_REDIRECT:
|
79 |
+
$this->getPayment()->setAuth3DS(true);
|
80 |
+
break;
|
81 |
+
default:
|
82 |
+
// $error = Mage::helper('mpay24')->__('Payment authorization error.');
|
83 |
+
$error = urldecode($result->getData('RETURNCODE'));
|
84 |
+
break;
|
85 |
+
}
|
86 |
+
}else{
|
87 |
+
$error = Mage::helper('mpay24')->__('Invalid amount for authorization.');
|
88 |
+
}
|
89 |
+
if ($error !== false) {
|
90 |
+
Mage::throwException($error);
|
91 |
+
}
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
public function capture(Varien_Object $payment, $amount) {
|
96 |
+
$this->clearSession();
|
97 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
98 |
+
if($mpayTid != ''){
|
99 |
+
$this->getApi()->charge($mpayTid, $amount);
|
100 |
+
}else{
|
101 |
+
Mage::log('capture not possible. mpaytid not exist');
|
102 |
+
}
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
protected function _buildRequest(Varien_Object $payment){
|
107 |
+
$order = $payment->getOrder();
|
108 |
+
$this->setStore($order->getStoreId());
|
109 |
+
|
110 |
+
$request = $this->getApi()->createBasicRequestObject('ACCEPTPAYMENT');
|
111 |
+
|
112 |
+
if ($order && $order->getIncrementId()) {
|
113 |
+
$request->setTid($order->getIncrementId()); // TID == OrderNR
|
114 |
+
}
|
115 |
+
$request->setPType('PB')
|
116 |
+
->setIdentifier($payment->getMpayPbCountryCode().$payment->getMpayPbAreaCode().$payment->getMpayPbNumber());
|
117 |
+
|
118 |
+
|
119 |
+
if($payment->getAmount()){
|
120 |
+
$request->setPrice($payment->getAmount()*100,2);
|
121 |
+
$request->setCurrency($order->getBaseCurrencyCode());
|
122 |
+
}
|
123 |
+
|
124 |
+
$request->setSuccessUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::SUCCESS_URL,array('_secure' => true)));
|
125 |
+
$request->setErrorUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::ERROR_URL,array('_secure' => true)));
|
126 |
+
$request->setConfirmationUrl(Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::CONFIRMATION_URL,array('_secure' => true)));
|
127 |
+
|
128 |
+
$billing = $order->getBillingAddress();
|
129 |
+
if (!empty($billing)) {
|
130 |
+
$request->setCustomer($billing->getFirstname()." ".$billing->getLastname()." [".$billing->getCustomerId()."]");
|
131 |
+
}
|
132 |
+
$request->setUserField($order->getIncrementId()); // do not change this -> it will be used as order id; USER_FIELD == OrderNR
|
133 |
+
// $request->setProfile();
|
134 |
+
// $request->setCustomerId();
|
135 |
+
// $request->setCustomerEmail();
|
136 |
+
// $request->setUserField();
|
137 |
+
|
138 |
+
// Mage::log($request);
|
139 |
+
return $request;
|
140 |
+
}
|
141 |
+
|
142 |
+
public function getOrderPlaceRedirectUrl() {
|
143 |
+
//// if(!$this->getPayment()->getAuth3DS() && $this->getSession()->getMpayTid()){
|
144 |
+
//// return Mage::getUrl('mpay24/payment/redirectpb',array('_secure' => true));
|
145 |
+
//// }
|
146 |
+
//// return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/redirect',array('_secure' => true)) : false;
|
147 |
+
return ($this->getPayment()->getAuth3DS()) ? Mage::getUrl('mpay24/payment/payment',array('_secure' => true)) : false;
|
148 |
+
// return false;
|
149 |
+
}
|
150 |
+
|
151 |
+
}
|
152 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Selectpayment.php
ADDED
File without changes
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentCashTicket.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentCashTicket extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_cashTicket';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentCashTicket';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
33 |
+
protected $_canRefund = true;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="CASH-TICKET"/>';
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Capture payment
|
51 |
+
*
|
52 |
+
* @param Varien_Object $orderPayment
|
53 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
54 |
+
*/
|
55 |
+
public function capture(Varien_Object $payment, $amount) {
|
56 |
+
$this->clearSession();
|
57 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
58 |
+
if($mpayTid != ''){
|
59 |
+
$this->getApi()->charge($mpayTid, $amount);
|
60 |
+
}else{
|
61 |
+
Mage::log('capture not possible. mpaytid not exist');
|
62 |
+
}
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Refund money
|
68 |
+
*
|
69 |
+
* @param Varien_Object $invoicePayment
|
70 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
71 |
+
*/
|
72 |
+
public function refund(Varien_Object $payment, $amount){
|
73 |
+
$this->clearSession();
|
74 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
75 |
+
$this->getApi()->refund($mpayTid, $amount);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentCb.php
ADDED
@@ -0,0 +1,99 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentCb extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_cb';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentCb';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
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 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Capture payment
|
47 |
+
*
|
48 |
+
* @param Varien_Object $orderPayment
|
49 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
50 |
+
*/
|
51 |
+
public function capture(Varien_Object $payment, $amount) {
|
52 |
+
$this->clearSession();
|
53 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
54 |
+
if($mpayTid != ''){
|
55 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
56 |
+
$this->getApi()->charge($mpayTid, $amount);
|
57 |
+
}else{
|
58 |
+
Mage::log('capture not possible. mpaytid not exist');
|
59 |
+
}
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Refund money
|
65 |
+
*
|
66 |
+
* @param Varien_Object $invoicePayment
|
67 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
68 |
+
*/
|
69 |
+
public function refund(Varien_Object $payment, $amount){
|
70 |
+
$this->clearSession();
|
71 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
72 |
+
if($mpayTid != ''){
|
73 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
74 |
+
$this->getApi()->refund($mpayTid, $amount);
|
75 |
+
}else{
|
76 |
+
Mage::log('refund not possible. mpaytid not exist');
|
77 |
+
}
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
|
81 |
+
public function void(Varien_Object $payment){
|
82 |
+
$this->clearSession();
|
83 |
+
$this->cancel($payment);
|
84 |
+
return $this;
|
85 |
+
}
|
86 |
+
|
87 |
+
public function cancel(Varien_Object $payment){
|
88 |
+
$this->clearSession();
|
89 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
90 |
+
if($mpayTid != ''){
|
91 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
92 |
+
$this->getApi()->cancel($mpayTid);
|
93 |
+
}else{
|
94 |
+
Mage::log('cancel not possible. mpaytid not exist');
|
95 |
+
}
|
96 |
+
return $this;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentCc.php
ADDED
@@ -0,0 +1,99 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentCc extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_cc';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentCc';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
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 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Capture payment
|
47 |
+
*
|
48 |
+
* @param Varien_Object $orderPayment
|
49 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
50 |
+
*/
|
51 |
+
public function capture(Varien_Object $payment, $amount) {
|
52 |
+
$this->clearSession();
|
53 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
54 |
+
if($mpayTid != ''){
|
55 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
56 |
+
$this->getApi()->charge($mpayTid, $amount);
|
57 |
+
}else{
|
58 |
+
Mage::log('capture not possible. mpaytid not exist');
|
59 |
+
}
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Refund money
|
65 |
+
*
|
66 |
+
* @param Varien_Object $invoicePayment
|
67 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
68 |
+
*/
|
69 |
+
public function refund(Varien_Object $payment, $amount){
|
70 |
+
$this->clearSession();
|
71 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
72 |
+
if($mpayTid != ''){
|
73 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
74 |
+
$this->getApi()->refund($mpayTid, $amount);
|
75 |
+
}else{
|
76 |
+
Mage::log('refund not possible. mpaytid not exist');
|
77 |
+
}
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
|
81 |
+
public function void(Varien_Object $payment){
|
82 |
+
$this->clearSession();
|
83 |
+
$this->cancel($payment);
|
84 |
+
return $this;
|
85 |
+
}
|
86 |
+
|
87 |
+
public function cancel(Varien_Object $payment){
|
88 |
+
$this->clearSession();
|
89 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
90 |
+
if($mpayTid != ''){
|
91 |
+
$payment->setTransactionId($payment->getOrder()->getIncrementId())->setIsTransactionClosed(0);
|
92 |
+
$this->getApi()->cancel($mpayTid);
|
93 |
+
}else{
|
94 |
+
Mage::log('cancel not possible. mpaytid not exist');
|
95 |
+
}
|
96 |
+
return $this;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentElv.php
ADDED
@@ -0,0 +1,80 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentElv extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_elv';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentElv';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
33 |
+
protected $_canRefund = true;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="ELV" Brand="HOBEX-'.$this->getQuote()->getBillingAddress()->getCountry().'"/>';;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Capture payment
|
51 |
+
*
|
52 |
+
* @param Varien_Object $orderPayment
|
53 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
54 |
+
*/
|
55 |
+
public function capture(Varien_Object $payment, $amount) {
|
56 |
+
$this->clearSession();
|
57 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
58 |
+
if($mpayTid != ''){
|
59 |
+
$this->getApi()->charge($mpayTid, $amount);
|
60 |
+
}else{
|
61 |
+
Mage::log('capture not possible. mpaytid not exist');
|
62 |
+
}
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Refund money
|
68 |
+
*
|
69 |
+
* @param Varien_Object $invoicePayment
|
70 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
71 |
+
*/
|
72 |
+
public function refund(Varien_Object $payment, $amount){
|
73 |
+
$this->clearSession();
|
74 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
75 |
+
$this->getApi()->refund($mpayTid, $amount);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
80 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentEps.php
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentEps extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_eps';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentEps';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = false;
|
32 |
+
protected $_canCapturePartial = false;
|
33 |
+
protected $_canRefund = false;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
$ret = '';
|
47 |
+
// foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_eps/epstypes')) as $brand):
|
48 |
+
// $ret.= '<Payment Type="EPS" Brand="'.$brand.'"/>';
|
49 |
+
// endforeach;
|
50 |
+
$ret.= '<Payment Type="EPS"/>';
|
51 |
+
return $ret;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentGiropay.php
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentGiropay extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_giropay';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentGiropay';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = false;
|
32 |
+
protected $_canCapturePartial = false;
|
33 |
+
protected $_canRefund = false;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="GIROPAY"/>';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentMaestro.php
ADDED
@@ -0,0 +1,61 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_SelectpaymentMaestro extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
21 |
+
protected $_code = 'mpay24_sp_maestro';
|
22 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentMaestro';
|
23 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Availability options
|
27 |
+
*/
|
28 |
+
protected $_isGateway = false;
|
29 |
+
protected $_canAuthorize = true;
|
30 |
+
protected $_canCapture = false;
|
31 |
+
protected $_canCapturePartial = false;
|
32 |
+
protected $_canRefund = true;
|
33 |
+
protected $_canVoid = false;
|
34 |
+
protected $_canUseInternal = false;
|
35 |
+
protected $_canUseCheckout = true;
|
36 |
+
protected $_canUseForMultishipping = false;
|
37 |
+
protected $_canSaveCc = false;
|
38 |
+
|
39 |
+
public function validate(){
|
40 |
+
parent::validate();
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getPaymentTypes(){
|
45 |
+
return '<Payment Type="MAESTRO"/>';
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Refund money
|
50 |
+
*
|
51 |
+
* @param Varien_Object $invoicePayment
|
52 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
53 |
+
*/
|
54 |
+
public function refund(Varien_Object $payment, $amount){
|
55 |
+
$this->clearSession();
|
56 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
57 |
+
$this->getApi()->refund($mpayTid, $amount);
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentMia.php
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentMia extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_mia';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentMia';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = false;
|
32 |
+
protected $_canCapturePartial = false;
|
33 |
+
protected $_canRefund = false;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
$ret = '';
|
47 |
+
// foreach(explode(',',Mage::getStoreConfig('payment/mpay24_sp_mia/miatypes')) as $brand):
|
48 |
+
// $ret.= '<Payment Type="MIA" Brand="'.$brand.'"/>';
|
49 |
+
// endforeach;
|
50 |
+
$ret.= '<Payment Type="MIA" />';
|
51 |
+
return $ret;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentMpass.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentMpass extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_mpass';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentMpass';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
33 |
+
protected $_canRefund = true;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="MPASS"/>';
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Capture payment
|
51 |
+
*
|
52 |
+
* @param Varien_Object $orderPayment
|
53 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
54 |
+
*/
|
55 |
+
public function capture(Varien_Object $payment, $amount) {
|
56 |
+
$this->clearSession();
|
57 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
58 |
+
if($mpayTid != ''){
|
59 |
+
$this->getApi()->charge($mpayTid, $amount);
|
60 |
+
}else{
|
61 |
+
Mage::log('capture not possible. mpaytid not exist');
|
62 |
+
}
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Refund money
|
68 |
+
*
|
69 |
+
* @param Varien_Object $invoicePayment
|
70 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
71 |
+
*/
|
72 |
+
public function refund(Varien_Object $payment, $amount){
|
73 |
+
$this->clearSession();
|
74 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
75 |
+
$this->getApi()->refund($mpayTid, $amount);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentPaybox.php
ADDED
@@ -0,0 +1,78 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_SelectpaymentPaybox extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
21 |
+
protected $_code = 'mpay24_sp_paybox';
|
22 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentPaybox';
|
23 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Availability options
|
27 |
+
*/
|
28 |
+
protected $_isGateway = false;
|
29 |
+
protected $_canAuthorize = true;
|
30 |
+
protected $_canCapture = true;
|
31 |
+
protected $_canCapturePartial = true;
|
32 |
+
protected $_canRefund = true;
|
33 |
+
protected $_canVoid = false;
|
34 |
+
protected $_canUseInternal = false;
|
35 |
+
protected $_canUseCheckout = true;
|
36 |
+
protected $_canUseForMultishipping = false;
|
37 |
+
protected $_canSaveCc = false;
|
38 |
+
|
39 |
+
public function validate(){
|
40 |
+
parent::validate();
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getPaymentTypes(){
|
45 |
+
return '<Payment Type="PB"/>';
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Capture payment
|
50 |
+
*
|
51 |
+
* @param Varien_Object $orderPayment
|
52 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
53 |
+
*/
|
54 |
+
public function capture(Varien_Object $payment, $amount) {
|
55 |
+
$this->clearSession();
|
56 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
57 |
+
if($mpayTid != ''){
|
58 |
+
$this->getApi()->charge($mpayTid, $amount);
|
59 |
+
}else{
|
60 |
+
Mage::log('capture not possible. mpaytid not exist');
|
61 |
+
}
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Refund money
|
67 |
+
*
|
68 |
+
* @param Varien_Object $invoicePayment
|
69 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
70 |
+
*/
|
71 |
+
public function refund(Varien_Object $payment, $amount){
|
72 |
+
$this->clearSession();
|
73 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
74 |
+
$this->getApi()->refund($mpayTid, $amount);
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentPaypal.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentPaypal extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_paypal';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentPaypal';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = true;
|
32 |
+
protected $_canCapturePartial = true;
|
33 |
+
protected $_canRefund = true;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="PAYPAL"/>';
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Capture payment
|
51 |
+
*
|
52 |
+
* @param Varien_Object $orderPayment
|
53 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
54 |
+
*/
|
55 |
+
public function capture(Varien_Object $payment, $amount) {
|
56 |
+
$this->clearSession();
|
57 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
58 |
+
if($mpayTid != ''){
|
59 |
+
$this->getApi()->charge($mpayTid, $amount);
|
60 |
+
}else{
|
61 |
+
Mage::log('capture not possible. mpaytid not exist');
|
62 |
+
}
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Refund money
|
68 |
+
*
|
69 |
+
* @param Varien_Object $invoicePayment
|
70 |
+
* @return Mpay24_Mpay24_Model_PaymentMethod
|
71 |
+
*/
|
72 |
+
public function refund(Varien_Object $payment, $amount){
|
73 |
+
$this->clearSession();
|
74 |
+
$mpayTid = $this->getApi()->getMpayTid($payment->getOrder()->getIncrementId());
|
75 |
+
$this->getApi()->refund($mpayTid, $amount);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentPsc.php
ADDED
@@ -0,0 +1,48 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_SelectpaymentPsc extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
21 |
+
protected $_code = 'mpay24_sp_psc';
|
22 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentPsc';
|
23 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Availability options
|
27 |
+
*/
|
28 |
+
protected $_isGateway = false;
|
29 |
+
protected $_canAuthorize = true;
|
30 |
+
protected $_canCapture = false;
|
31 |
+
protected $_canCapturePartial = false;
|
32 |
+
protected $_canRefund = false;
|
33 |
+
protected $_canVoid = false;
|
34 |
+
protected $_canUseInternal = false;
|
35 |
+
protected $_canUseCheckout = true;
|
36 |
+
protected $_canUseForMultishipping = false;
|
37 |
+
protected $_canSaveCc = false;
|
38 |
+
|
39 |
+
public function validate(){
|
40 |
+
parent::validate();
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getPaymentTypes(){
|
45 |
+
return '<Payment Type="PSC"/>';
|
46 |
+
}
|
47 |
+
}
|
48 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/SelectpaymentQuick.php
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_SelectpaymentQuick extends Mpay24_Mpay24_Model_Method_Selectpayment {
|
22 |
+
protected $_code = 'mpay24_sp_quick';
|
23 |
+
protected $_formBlockType = 'mpay24/form_selectpaymentQuick';
|
24 |
+
protected $_infoBlockType = 'mpay24/info_selectpayment';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Availability options
|
28 |
+
*/
|
29 |
+
protected $_isGateway = false;
|
30 |
+
protected $_canAuthorize = true;
|
31 |
+
protected $_canCapture = false;
|
32 |
+
protected $_canCapturePartial = false;
|
33 |
+
protected $_canRefund = false;
|
34 |
+
protected $_canVoid = false;
|
35 |
+
protected $_canUseInternal = false;
|
36 |
+
protected $_canUseCheckout = true;
|
37 |
+
protected $_canUseForMultishipping = false;
|
38 |
+
protected $_canSaveCc = false;
|
39 |
+
|
40 |
+
public function validate(){
|
41 |
+
parent::validate();
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getPaymentTypes(){
|
46 |
+
return '<Payment Type="QUICK"/>';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
?>
|
app/code/community/Mpay24/Mpay24/Model/Session.php
ADDED
@@ -0,0 +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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Session extends Mage_Core_Model_Session_Abstract
|
22 |
+
{
|
23 |
+
public function __construct()
|
24 |
+
{
|
25 |
+
$this->init('mpay24');
|
26 |
+
}
|
27 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/BillAddr.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_BillAddr
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Options getter
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
public function toOptionArray()
|
29 |
+
{
|
30 |
+
return array(
|
31 |
+
array('value' => 'ReadWrite', 'label'=>Mage::helper('adminhtml')->__('ReadWrite')),
|
32 |
+
array('value' => 'ReadOnly', 'label'=>Mage::helper('adminhtml')->__('ReadOnly')),
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/Cctype.php
ADDED
@@ -0,0 +1,47 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Source_Cctype {
|
22 |
+
|
23 |
+
public function getAllowedTypes() {
|
24 |
+
return array('VI', 'MC', 'AE', 'DC', 'JC');
|
25 |
+
}
|
26 |
+
|
27 |
+
public function toOptionArray(){
|
28 |
+
/**
|
29 |
+
* making filter by allowed cards
|
30 |
+
*/
|
31 |
+
$allowed = $this->getAllowedTypes();
|
32 |
+
$options = array();
|
33 |
+
|
34 |
+
foreach (Mage::getSingleton('mpay24/config')->getCcTypes() as $code => $name) {
|
35 |
+
if (in_array($code, $allowed) || !count($allowed)) {
|
36 |
+
if(($name == 'JCB' && Mage::getStoreConfig('currency/options/base') == 'EUR') || $name != 'JCB'){
|
37 |
+
$options[] = array(
|
38 |
+
'value' => $code,
|
39 |
+
'label' => $name
|
40 |
+
);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
return $options;
|
46 |
+
}
|
47 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/ClearingAction.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_ClearingAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('mpay24')->__('Authorize')),
|
26 |
+
array('value' => Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_SALE, 'label' => Mage::helper('mpay24')->__('Sale')),
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/ElvCountryAction.php
ADDED
@@ -0,0 +1,45 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_ElvCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
$elvTypes = Mpay24_Mpay24_Block_Form_SelectpaymentCc::mPAYPaymentMethodsOrBrands('elv');
|
25 |
+
$alreadyDE = false;
|
26 |
+
$reurnElvTypes = array();
|
27 |
+
|
28 |
+
foreach($elvTypes as $e):
|
29 |
+
$e = strtoupper($e);
|
30 |
+
if($e === 'HOBEX-AT'):
|
31 |
+
$at = array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria'));
|
32 |
+
array_push($reurnElvTypes, $at);
|
33 |
+
elseif(($e === 'HOBEX-DE' || $e === 'ATOS') && !$alreadyDE):
|
34 |
+
$de = array('value' => 'DE', 'label' => Mage::helper('mpay24')->__('Germany'));
|
35 |
+
array_push($reurnElvTypes, $de);
|
36 |
+
$alreadyDE = true;
|
37 |
+
elseif($e === 'HOBEX-NL'):
|
38 |
+
$nl = array('value' => 'NL', 'label' => Mage::helper('mpay24')->__('Netherland'));
|
39 |
+
array_push($reurnElvTypes, $nl);
|
40 |
+
endif;
|
41 |
+
endforeach;
|
42 |
+
|
43 |
+
return $reurnElvTypes;
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/Elvtype.php
ADDED
@@ -0,0 +1,45 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Source_Elvtype {
|
22 |
+
|
23 |
+
public function getAllowedTypes() {
|
24 |
+
return array('HOBEX-AT', 'HOBEX-DE', 'HOBEX-NL');
|
25 |
+
}
|
26 |
+
|
27 |
+
public function toOptionArray(){
|
28 |
+
/**
|
29 |
+
* making filter by allowed cards
|
30 |
+
*/
|
31 |
+
$allowed = $this->getAllowedTypes();
|
32 |
+
$options = array();
|
33 |
+
|
34 |
+
foreach (Mage::getSingleton('mpay24/config')->getElvTypes() as $code => $name) {
|
35 |
+
if (in_array($code, $allowed) || !count($allowed)) {
|
36 |
+
$options[] = array(
|
37 |
+
'value' => $code,
|
38 |
+
'label' => $name
|
39 |
+
);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $options;
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/EpsCountryAction.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_EpsCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria'))
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/EpsTypesAction.php
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_EpsTypesAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
$epsTypes = Mpay24_Mpay24_Block_Form_SelectpaymentCc::mPAYPaymentMethodsOrBrands('eps');
|
25 |
+
|
26 |
+
$reurnEpsTypes = array();
|
27 |
+
|
28 |
+
foreach($epsTypes as $e):
|
29 |
+
$e = strtoupper($e);
|
30 |
+
if($e === 'ARZ'):
|
31 |
+
$arz = array('value' => 'ARZ', 'label' => Mage::helper('mpay24')->__('Ärztebank'));
|
32 |
+
array_push($reurnEpsTypes, $arz);
|
33 |
+
elseif($e === 'BA'):
|
34 |
+
$ba = array('value' => 'BA', 'label' => Mage::helper('mpay24')->__('Bank Austria Creditanstalt'));
|
35 |
+
array_push($reurnEpsTypes, $ba);
|
36 |
+
elseif($e === 'BAWAG'):
|
37 |
+
$bawag = array('value' => 'BAWAG', 'label' => Mage::helper('mpay24')->__('BAWAG P.S.K. Gruppe'));
|
38 |
+
array_push($reurnEpsTypes, $bawag);
|
39 |
+
elseif($e === 'ERSTE'):
|
40 |
+
$erste = array('value' => 'ERSTE', 'label' => Mage::helper('mpay24')->__('Erste Bank/Sparkassengruppe'));
|
41 |
+
array_push($reurnEpsTypes, $erste);
|
42 |
+
elseif($e === 'HYPO'):
|
43 |
+
$hypo = array('value' => 'HYPO', 'label' => Mage::helper('mpay24')->__('Hypotekenbanken'));
|
44 |
+
array_push($reurnEpsTypes, $hypo);
|
45 |
+
elseif($e === 'RZB'):
|
46 |
+
$rzb = array('value' => 'RZB', 'label' => Mage::helper('mpay24')->__('Raiffeisen Bankengruppe'));
|
47 |
+
array_push($reurnEpsTypes, $rzb);
|
48 |
+
endif;
|
49 |
+
|
50 |
+
endforeach;
|
51 |
+
|
52 |
+
return $reurnEpsTypes;
|
53 |
+
}
|
54 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/GiropayCountryAction.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_GiropayCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'DE', 'label' => Mage::helper('mpay24')->__('Germany')),
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/MaestroCountryAction.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_MaestroCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria')),
|
26 |
+
array('value' => 'UK', 'label' => Mage::helper('mpay24')->__('UK'))
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/MiaCountryAction.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_MiaCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria'))
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/MiaTypesAction.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_MiaTypesAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'ORANGE', 'label' => Mage::helper('mpay24')->__('ORANGE')),
|
26 |
+
array('value' => 'T-MOBILE', 'label' => Mage::helper('mpay24')->__('T-MOBILE'))
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/PayboxCountryAction.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_PayboxCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria'))
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/PaysafecardCountryAction.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_PaysafecardCountryAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'AT', 'label' => Mage::helper('mpay24')->__('Austria'))
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/Request.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Source_Request extends Varien_Object {
|
22 |
+
|
23 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/Result.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_Model_Source_Result extends Varien_Object {
|
22 |
+
|
23 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/Source/ShoppingCartRowsAction.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Mpay24_Mpay24_Model_Source_ShoppingCartRowsAction
|
21 |
+
{
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
array('value' => 'Number', 'label' => Mage::helper('mpay24')->__('Number')),
|
26 |
+
array('value' => 'ProductNr', 'label' => Mage::helper('mpay24')->__('ProductNr')),
|
27 |
+
array('value' => 'Description', 'label' => Mage::helper('mpay24')->__('Description')),
|
28 |
+
array('value' => 'Package', 'label' => Mage::helper('mpay24')->__('Package')),
|
29 |
+
array('value' => 'Quantity', 'label' => Mage::helper('mpay24')->__('Quantity')),
|
30 |
+
array('value' => 'ItemPrice', 'label' => Mage::helper('mpay24')->__('ItemPrice')),
|
31 |
+
array('value' => 'Price', 'label' => Mage::helper('mpay24')->__('Price'))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
app/code/community/Mpay24/Mpay24/Model/System/Config/Backend/Encrypted.php
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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Encrypted config field backend model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
*/
|
34 |
+
class Mpay24_Mpay24_Model_System_Config_Backend_Encrypted extends Mage_Core_Model_Config_Data
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Decrypt value after loading
|
38 |
+
*
|
39 |
+
*/
|
40 |
+
protected function _afterLoad()
|
41 |
+
{
|
42 |
+
$value = (string)$this->getValue();
|
43 |
+
if (!empty($value) && ($decrypted = Mage::helper('core')->decrypt($value))) {
|
44 |
+
$this->setValue($decrypted);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
protected function _beforeSave()
|
50 |
+
{
|
51 |
+
$value = (string)$this->getValue();
|
52 |
+
|
53 |
+
// don't change value, if an obscured value came
|
54 |
+
if (preg_match('/^\*+$/', $this->getValue())) {
|
55 |
+
$value = $this->getOldValue();
|
56 |
+
}
|
57 |
+
if (!empty($value) && ($encrypted = Mage::helper('core')->encrypt($value))) {
|
58 |
+
$this->setValue($encrypted);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Get & decrypt old value from configuration
|
64 |
+
*
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
public function getOldValue()
|
68 |
+
{
|
69 |
+
return Mage::helper('core')->decrypt(parent::getOldValue());
|
70 |
+
}
|
71 |
+
}
|
app/code/community/Mpay24/Mpay24/controllers/AdminhtmlController.php
ADDED
@@ -0,0 +1,74 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_AdminhtmlController extends Mage_Core_Controller_Front_Action {
|
22 |
+
|
23 |
+
public function indexAction() {
|
24 |
+
Mage::getModel('mpay24/update')->listPaymentMethods();
|
25 |
+
$this->_redirect('adminhtml/system_config/edit/section/mpay24');
|
26 |
+
}
|
27 |
+
|
28 |
+
public function exportAction() {
|
29 |
+
$filename = "export_".date("Y-m-d_H-i",time());
|
30 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
31 |
+
$tables = $connection->listTables();
|
32 |
+
$columns = array();
|
33 |
+
$i = 0;
|
34 |
+
$sql_output = "SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\";
|
35 |
+
CREATE TABLE IF NOT EXISTS `mpay24_debug` (
|
36 |
+
`debug_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
37 |
+
`request_body` text,
|
38 |
+
`response_body` text,
|
39 |
+
`request_serialized` text,
|
40 |
+
`result_serialized` text,
|
41 |
+
`request_dump` text,
|
42 |
+
`result_dump` text,
|
43 |
+
`time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
44 |
+
PRIMARY KEY (`debug_id`)
|
45 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
|
46 |
+
|
47 |
+
INSERT INTO `mpay24_debug` (`debug_id`, `request_body`, `response_body`, `request_serialized`, `result_serialized`, `request_dump`, `result_dump`, `time_stamp`) VALUES
|
48 |
+
";
|
49 |
+
if(in_array("mpay24_debug", $tables)){
|
50 |
+
foreach ($connection->fetchAll("SHOW COLUMNS FROM mpay24_debug") as $col) {
|
51 |
+
$columns[$i] = $col['Field'];
|
52 |
+
$i++;
|
53 |
+
}
|
54 |
+
|
55 |
+
foreach ($connection->fetchAll("SELECT * FROM mpay24_debug") as $row) {
|
56 |
+
$sql_output.= "(";
|
57 |
+
for ($j=0;$j<$i;$j++) {
|
58 |
+
$colName = $columns[$j];
|
59 |
+
$sql_output .= "'" . $row[$colName] . "',";
|
60 |
+
}
|
61 |
+
$sql_output = substr($sql_output, 0, -1);
|
62 |
+
$sql_output .= "),";
|
63 |
+
}
|
64 |
+
|
65 |
+
header("Content-type: application/vnd.ms-excel");
|
66 |
+
header("Content-disposition: sql" . date("Y-m-d") . ".sql");
|
67 |
+
header( "Content-disposition: filename=".$filename.".sql");
|
68 |
+
|
69 |
+
print substr($sql_output, 0, -1) . ";";
|
70 |
+
} else {
|
71 |
+
$this->_redirect('adminhtml/system_config/edit/section/mpay24');
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
app/code/community/Mpay24/Mpay24/controllers/IndexController.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_IndexController extends Mage_Core_Controller_Front_Action {
|
22 |
+
public function indexAction() {
|
23 |
+
$this->_redirect('/');
|
24 |
+
}
|
25 |
+
}
|
app/code/community/Mpay24/Mpay24/controllers/PaymentController.php
ADDED
@@ -0,0 +1,661 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action {
|
22 |
+
|
23 |
+
protected function _expireAjax() {
|
24 |
+
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
25 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
|
26 |
+
exit;
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
public function redirectccAction() {
|
31 |
+
$order = $this->getOrder();
|
32 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Reserved').' [ '.($order->formatPriceTxt($order->getGrandTotal())).' ]');
|
33 |
+
$order->save();
|
34 |
+
if(Mage::getModel('mpay24/cc')->getConfigData('clearing') == Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_SALE){
|
35 |
+
if($this->_createInvoice($order, true)){
|
36 |
+
$this->getApi()->charge($order->getPayment()->getMpayTid(), $order->getGrandTotal());
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
40 |
+
}
|
41 |
+
|
42 |
+
public function redirectpbAction() {
|
43 |
+
$order = $this->getOrder();
|
44 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Reserved').' [ '.($order->formatPriceTxt($order->getGrandTotal())).' ]');
|
45 |
+
$order->save();
|
46 |
+
if(Mage::getModel('mpay24/paybox')->getConfigData('clearing') == Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_SALE){
|
47 |
+
if($this->_createInvoice($order, true)){
|
48 |
+
$this->getApi()->charge($order->getPayment()->getMpayTid(), $order->getGrandTotal());
|
49 |
+
}
|
50 |
+
}
|
51 |
+
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
52 |
+
}
|
53 |
+
|
54 |
+
public function redirectAction() {
|
55 |
+
$this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)->save();
|
56 |
+
$this->getOrder()->setData('status',Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)->save();
|
57 |
+
$this->_redirectedTo3DSUrl();
|
58 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/redirect")->toHtml());
|
59 |
+
}
|
60 |
+
|
61 |
+
public function confirmationAction() {
|
62 |
+
Mage::log('confirmation called');
|
63 |
+
$this->getResponse()->setBody("OK:received");
|
64 |
+
|
65 |
+
$result = $this->getRequest()->getParams();
|
66 |
+
Mage::log($result);
|
67 |
+
switch($result['OPERATION']){
|
68 |
+
case 'CONFIRMATION':
|
69 |
+
$order = Mage::getModel('sales/order');
|
70 |
+
switch($result['STATUS']){
|
71 |
+
case 'RESERVED':
|
72 |
+
$this->_paymentSuccess();
|
73 |
+
$order->loadByIncrementId($result['USER_FIELD']);
|
74 |
+
if($order->getId()){
|
75 |
+
$order->getPayment()->setMpayTid($result['MPAYTID']);
|
76 |
+
$order->getPayment()->setAmountAuthorized($result['PRICE']/100);
|
77 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Reserved').' [ '.$order->formatPriceTxt($result['PRICE']/100).' ]');
|
78 |
+
$order->save();
|
79 |
+
$this->_sendNewOrderEmail();
|
80 |
+
switch($result['P_TYPE']){
|
81 |
+
case 'CC':
|
82 |
+
if(Mage::getModel('mpay24/cc')->getConfigData('clearing') == Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_SALE){
|
83 |
+
$this->_createInvoice($order, true);
|
84 |
+
}
|
85 |
+
break;
|
86 |
+
case 'PB':
|
87 |
+
if(Mage::getModel('mpay24/paybox')->getConfigData('clearing') == Mpay24_Mpay24_Model_Api_Mpay24::PAYMENT_TYPE_SALE){
|
88 |
+
$this->_createInvoice($order, true);
|
89 |
+
}
|
90 |
+
break;
|
91 |
+
default:
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
break;
|
96 |
+
case 'BILLED':
|
97 |
+
$order->loadByIncrementId($result['USER_FIELD']);
|
98 |
+
foreach ($order->getInvoiceCollection() as $orderInvoice) {
|
99 |
+
$open = Mage_Sales_Model_Order_Invoice::STATE_OPEN;
|
100 |
+
$paid = Mage_Sales_Model_Order_Invoice::STATE_PAID;
|
101 |
+
if ($orderInvoice->getState() == $open && $orderInvoice->getGrandTotal() == ($result['PRICE']/100)) {
|
102 |
+
$orderInvoice->pay();
|
103 |
+
$orderInvoice->save();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
$order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PROCESSING, Mage::helper('mpay24')->__('Payment Billed').' [ '.$order->formatPriceTxt($result['PRICE']/100).' ]');
|
107 |
+
$order->save();
|
108 |
+
break;
|
109 |
+
case 'REVERSED':
|
110 |
+
|
111 |
+
break;
|
112 |
+
case 'CREDITED':
|
113 |
+
$order->loadByIncrementId($result['USER_FIELD']);
|
114 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Credited'));
|
115 |
+
$order->save();
|
116 |
+
break;
|
117 |
+
case 'ERROR':
|
118 |
+
$order->loadByIncrementId($result['USER_FIELD']);
|
119 |
+
if(!$order->getPayment()->getMpayTid()) $order->getPayment()->setMpayTid($result['MPAYTID']);
|
120 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Customer cancled payment or payment error'));
|
121 |
+
$order->save();
|
122 |
+
break;
|
123 |
+
}
|
124 |
+
break;
|
125 |
+
default:
|
126 |
+
break;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
public function confirmationSPAction() {
|
131 |
+
Mage::log('confirmationSP called');
|
132 |
+
|
133 |
+
$this->getResponse()->setBody("OK:received");
|
134 |
+
|
135 |
+
$result = $this->getRequest()->getParams();
|
136 |
+
|
137 |
+
$order = Mage::getModel('sales/order');
|
138 |
+
$order->loadByIncrementId($result['TID']);
|
139 |
+
|
140 |
+
Mage::log('RESULT from confirmationSP:'."\n");
|
141 |
+
Mage::log($result);
|
142 |
+
switch($result['OPERATION']){
|
143 |
+
case 'CONFIRMATION':
|
144 |
+
$this->getTransactionStatus($result['TID']);
|
145 |
+
break;
|
146 |
+
default:
|
147 |
+
break;
|
148 |
+
}
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
public function indexAction() {
|
153 |
+
$this->loadLayout();
|
154 |
+
$this->renderLayout();
|
155 |
+
}
|
156 |
+
|
157 |
+
public function paymentAction() {
|
158 |
+
$this->loadLayout();
|
159 |
+
$this->renderLayout();
|
160 |
+
}
|
161 |
+
|
162 |
+
public function successAction() {
|
163 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
164 |
+
Mage::log('success called for order '.$order->getData('increment_id'));
|
165 |
+
$order->getPayment()->setAdditionalInformation('success', true)->save();
|
166 |
+
$this->_redirect('sales/order/view/order_id/'.$order->getId().'/');
|
167 |
+
}
|
168 |
+
|
169 |
+
public function guestsuccessAction() {
|
170 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
171 |
+
Mage::log('success called for order '.$order->getData('increment_id'));
|
172 |
+
$order->getPayment()->setAdditionalInformation('success', true)->save();
|
173 |
+
$this->getTransactionStatus();
|
174 |
+
$this->_redirect('checkout/onepage/success/');
|
175 |
+
}
|
176 |
+
|
177 |
+
public function errorAction() {
|
178 |
+
Mage::getSingleton('mpay24/session')->setParentRedirectUrl('mpay24/payment/errormsg');
|
179 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
|
180 |
+
}
|
181 |
+
|
182 |
+
public function errorSPAction() {
|
183 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
184 |
+
Mage::log('errorSP called for order '.$order->getData('increment_id'));
|
185 |
+
$order->getPayment()->setAdditionalInformation('error', true)->save();
|
186 |
+
$this->getTransactionStatus();
|
187 |
+
|
188 |
+
Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
|
189 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
|
190 |
+
}
|
191 |
+
|
192 |
+
public function cancelSPAction() {
|
193 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
194 |
+
Mage::log('cancelSP called for order '.$order->getData('increment_id'));
|
195 |
+
$order->getPayment()->setAdditionalInformation('cancel', true)->save();
|
196 |
+
$this->getTransactionStatus();
|
197 |
+
Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
|
198 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
|
199 |
+
}
|
200 |
+
|
201 |
+
public function errormsgAction(){
|
202 |
+
$this->loadLayout();
|
203 |
+
$this->renderLayout();
|
204 |
+
}
|
205 |
+
|
206 |
+
private function _redirectedTo3DSUrl(){
|
207 |
+
$order = $this->getOrder();
|
208 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Redirected to a 3D secure form'));
|
209 |
+
$order->save();
|
210 |
+
}
|
211 |
+
|
212 |
+
private function _paymentError(){
|
213 |
+
$session = $this->getCheckout();
|
214 |
+
$session->getQuote()->setIsActive(false)->save();
|
215 |
+
$order = $this->getOrder();
|
216 |
+
$order->cancel();
|
217 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Customer cancled payment or payment error'));
|
218 |
+
$order->save();
|
219 |
+
}
|
220 |
+
|
221 |
+
public function _paymentSuccess() {
|
222 |
+
$session = $this->getCheckout();
|
223 |
+
$session->getQuote()->setIsActive(false)->save();
|
224 |
+
}
|
225 |
+
|
226 |
+
public function _createInvoice($order, $capture = false){
|
227 |
+
if ($order->canInvoice()) {
|
228 |
+
$invoice = $order->prepareInvoice();
|
229 |
+
|
230 |
+
if($capture){
|
231 |
+
$invoice->register()->capture();
|
232 |
+
}else{
|
233 |
+
$invoice->register();
|
234 |
+
}
|
235 |
+
Mage::getModel('core/resource_transaction')
|
236 |
+
->addObject($invoice)
|
237 |
+
->addObject($invoice->getOrder())
|
238 |
+
->save();
|
239 |
+
|
240 |
+
$invoice->sendEmail(true, '');
|
241 |
+
return true;
|
242 |
+
}
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
|
246 |
+
public function _sendNewOrderEmail(){
|
247 |
+
$order = $this->getOrder();
|
248 |
+
if($order->getId()){
|
249 |
+
$order->sendNewOrderEmail();
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
public function getCheckout() {
|
254 |
+
return Mage::getSingleton('checkout/session');
|
255 |
+
}
|
256 |
+
|
257 |
+
public function getOrder($tid=null) {
|
258 |
+
$order = Mage::getSingleton('sales/order');
|
259 |
+
if($tid == null)
|
260 |
+
return $order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
|
261 |
+
else
|
262 |
+
return $order->loadByIncrementId($tid);
|
263 |
+
}
|
264 |
+
|
265 |
+
public function getSession() {
|
266 |
+
return Mage::getSingleton('mpay24/session');
|
267 |
+
}
|
268 |
+
|
269 |
+
public function getApi(){
|
270 |
+
return Mage::getSingleton('mpay24/api_mpay24');
|
271 |
+
}
|
272 |
+
|
273 |
+
public function getTransactionStatus($tid=null){
|
274 |
+
$updateResult = "";
|
275 |
+
$order = $this->getOrder($tid);
|
276 |
+
|
277 |
+
Mage::log('getTransactionStatus called for order '.$order->getData('increment_id'));
|
278 |
+
|
279 |
+
$incrementId = $order->getData('increment_id');
|
280 |
+
$tid = $order->getId();
|
281 |
+
|
282 |
+
if($order->getPayment()){
|
283 |
+
if($order->getPayment()->getAdditionalInformation('mpay_tid') != '' && !$order->getPayment()->getAdditionalInformation('error') && $tid == null){
|
284 |
+
$soapTransactionStatusRequest = Mage::getSingleton('mpay24/api_mpay24')->createBasicSoapRequestObject('MPAYTID_TRANSACTIONSTATUS');
|
285 |
+
$soapTransactionStatusRequest->setMpaytid($order->getPayment()->getAdditionalInformation('mpay_tid'));
|
286 |
+
} else{
|
287 |
+
$soapTransactionStatusRequest = Mage::getSingleton('mpay24/api_mpay24')->createBasicSoapRequestObject('TID_TRANSACTIONSTATUS');
|
288 |
+
$soapTransactionStatusRequest->setTid($incrementId);
|
289 |
+
}
|
290 |
+
$soapTransactionStatusResult = Mage::getSingleton('mpay24/api_mpay24')->authorize($soapTransactionStatusRequest);
|
291 |
+
|
292 |
+
Mage::log('RESULT from getTransactionStatus:'."\n");
|
293 |
+
Mage::log($soapTransactionStatusResult);
|
294 |
+
if($soapTransactionStatusResult->getData('APPR_CODE') == '')
|
295 |
+
$apprCode = 'N/A';
|
296 |
+
else
|
297 |
+
$apprCode = $soapTransactionStatusResult->getData('APPR_CODE');
|
298 |
+
|
299 |
+
switch ($soapTransactionStatusResult->getResponseCode()) {
|
300 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_STATUS_GETTED:
|
301 |
+
$updateResult = "The transaction status was succesfully updated!";
|
302 |
+
$type = '';
|
303 |
+
|
304 |
+
if($soapTransactionStatusResult->getData('P_TYPE') === "PB"):
|
305 |
+
$type = 'mpay24_sp_paybox';
|
306 |
+
elseif($soapTransactionStatusResult->getData('P_TYPE') === "CASH-TICKET"):
|
307 |
+
$type = 'mpay24_sp_cashTicket';
|
308 |
+
else:
|
309 |
+
$type = 'mpay24_sp_'.strtolower($soapTransactionStatusResult->getData('P_TYPE'));
|
310 |
+
endif;
|
311 |
+
$order->getPayment()->setMethod($type)->save();
|
312 |
+
$order->getPayment()->setCcType($soapTransactionStatusResult->getData('BRAND'))->save();
|
313 |
+
$order->getPayment()->setAdditionalInformation('status', true)->save();
|
314 |
+
$updateResult .= "\n\nActual status: " . $soapTransactionStatusResult->getData('TRANSACTION_STATUS');
|
315 |
+
$updateResult .= "\nAmount: " . number_format($soapTransactionStatusResult->getData('PRICE')/100, 2, '.', '') . " " . $soapTransactionStatusResult->getData('CURRENCY');
|
316 |
+
$updateResult .= "\nMPAYTID: " . $soapTransactionStatusResult->getData('MPAYTID');
|
317 |
+
$updateResult .= "\nAppr_code: " . $apprCode;
|
318 |
+
|
319 |
+
switch($soapTransactionStatusResult->getData('TRANSACTION_STATUS')){
|
320 |
+
case 'CREDITED':
|
321 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
322 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
323 |
+
//$order->cancel();
|
324 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
325 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
326 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Credited'))->save();
|
327 |
+
$order->getPayment()->setAdditionalInformation('error', false)->save();
|
328 |
+
$order->save();
|
329 |
+
break;
|
330 |
+
case 'BILLED':
|
331 |
+
if($order->getInvoiceCollection()->count() == 0){
|
332 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
333 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
334 |
+
$order->getPayment()->setAmountAuthorized($soapTransactionStatusResult->getData('PRICE')/100)->save();
|
335 |
+
$order->getPayment()->setAmountCharged($soapTransactionStatusResult->getData('PRICE')/100)->save();
|
336 |
+
$order->getPayment()->setAdditionalInformation('error', false)->save();
|
337 |
+
$this->_sendNewOrderEmail();
|
338 |
+
$this->_createInvoice($order, false);
|
339 |
+
$order->save();
|
340 |
+
}
|
341 |
+
foreach ($order->getInvoiceCollection() as $orderInvoice) {
|
342 |
+
$paid = Mage_Sales_Model_Order::STATE_COMPLETE;
|
343 |
+
if ($order->getState() != $paid && $orderInvoice->getGrandTotal() == ($soapTransactionStatusResult->getData('PRICE')/100)) {
|
344 |
+
$orderInvoice->pay();
|
345 |
+
$orderInvoice->save();
|
346 |
+
$order->getPayment()->capture($orderInvoice);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
350 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
351 |
+
if($order->getIsNotVirtual()){
|
352 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING)->save();
|
353 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_PROCESSING)->save();
|
354 |
+
} else {
|
355 |
+
$order->setState(Mage_Sales_Model_Order::STATE_COMPLETE)->save();
|
356 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_COMPLETE)->save();
|
357 |
+
}
|
358 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Billed').' [ '.$order->formatPriceTxt($soapTransactionStatusResult->getData('PRICE')/100).' ]')->save();
|
359 |
+
$order->save();
|
360 |
+
break;
|
361 |
+
case 'REVERSED':
|
362 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
363 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
364 |
+
//$order->cancel();
|
365 |
+
foreach ($order->getCreditmemosCollection() as $creditMemo) {
|
366 |
+
$open = Mage_Sales_Model_Order_Creditmemo::STATE_OPEN;
|
367 |
+
$paid = Mage_Sales_Model_Order_Invoice::STATE_PAID;
|
368 |
+
if ($creditMemo->getState() == $open && $creditMemo->getGrandTotal() == ($soapTransactionStatusResult->getData('PRICE')/100)) {
|
369 |
+
$order->getPayment()->refund($creditMemo);
|
370 |
+
$creditMemo->save();
|
371 |
+
}
|
372 |
+
}
|
373 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
374 |
+
$order->getPayment()->setAdditionalInformation('error', false)->save();
|
375 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
376 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Credited'))->save();
|
377 |
+
$order->save();
|
378 |
+
break;
|
379 |
+
case 'RESERVED':
|
380 |
+
if($order->getId()){
|
381 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
382 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
383 |
+
$order->getPayment()->setAmountAuthorized($soapTransactionStatusResult->getData('PRICE')/100)->save();
|
384 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING)->save();
|
385 |
+
$order->getPayment()->setAdditionalInformation('error', false)->save();
|
386 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_PROCESSING)->save();
|
387 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Reserved').' [ '.$order->formatPriceTxt($soapTransactionStatusResult->getData('PRICE')/100).' ]');
|
388 |
+
$this->_sendNewOrderEmail();
|
389 |
+
$this->_createInvoice($order, false);
|
390 |
+
}
|
391 |
+
$order->save();
|
392 |
+
break;
|
393 |
+
case 'SUSPENDED':
|
394 |
+
if($order->getId()){
|
395 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
396 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
397 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)->save();
|
398 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)->save();
|
399 |
+
$order->getPayment()->setAdditionalInformation('error', false)->save();
|
400 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment Suspended').' [ '.$order->formatPriceTxt($soapTransactionStatusResult->getData('PRICE')/100).' ]');
|
401 |
+
}
|
402 |
+
$order->save();
|
403 |
+
break;
|
404 |
+
case 'ERROR':
|
405 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED);
|
406 |
+
$order->setData('status', Mage_Sales_Model_Order::STATE_CANCELED);
|
407 |
+
$order->save();
|
408 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
|
409 |
+
$order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
|
410 |
+
$order->getPayment()->setAdditionalInformation('error', true)->save();
|
411 |
+
//$order->getPayment()->cancel();
|
412 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment error'));
|
413 |
+
$order->save();
|
414 |
+
break;
|
415 |
+
default:
|
416 |
+
break;
|
417 |
+
|
418 |
+
}
|
419 |
+
break;
|
420 |
+
case Mpay24_Mpay24_Model_Api_Mpay24::RESPONSE_CODE_STATUS_UNKNOWN:
|
421 |
+
$updateResult = "The transaction was not found!";
|
422 |
+
$order->getPayment()->setAdditionalInformation('status', true)->save();
|
423 |
+
$order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
|
424 |
+
$order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
|
425 |
+
//$order->cancel();
|
426 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
427 |
+
$order->setData('status',Mage_Sales_Model_Order::STATE_CANCELED)->save();
|
428 |
+
$order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__('Payment canceled'));
|
429 |
+
$order->save();
|
430 |
+
break;
|
431 |
+
default:
|
432 |
+
break;
|
433 |
+
}
|
434 |
+
|
435 |
+
if(Mage::getStoreConfig('mpay24/mpay24as/billingAddressMode') == "ReadWrite"){
|
436 |
+
if($soapTransactionStatusResult->getData('BILLING_ADDR') == ''){
|
437 |
+
|
438 |
+
$request = $this->getRequest();
|
439 |
+
$id = $this->getRequest()->getParam('id');
|
440 |
+
|
441 |
+
$template = $this->_initTemplate('id');
|
442 |
+
|
443 |
+
$template->setTemplateSubject('ACHTUNG!')
|
444 |
+
->setTemplateCode('ADDR_MODE')
|
445 |
+
->setTemplateText('<table>
|
446 |
+
<thead>
|
447 |
+
<tr>
|
448 |
+
<th>Die Rechnungsadresse wurde von mPAY24 nicht zurückgeliefert!</th>
|
449 |
+
</tr>
|
450 |
+
</thead>
|
451 |
+
<tbody>
|
452 |
+
<tr>
|
453 |
+
<td>
|
454 |
+
<p>
|
455 |
+
{{var reason}}
|
456 |
+
</p>
|
457 |
+
</td>
|
458 |
+
</tr>
|
459 |
+
</tbody>
|
460 |
+
</table>');
|
461 |
+
|
462 |
+
// The Id you just marked...
|
463 |
+
if (!$template->getId()) {
|
464 |
+
$template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_HTML);
|
465 |
+
}
|
466 |
+
|
467 |
+
if($request->getParam('_change_type_flag')) {
|
468 |
+
$template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_TEXT);
|
469 |
+
$template->setTemplateStyles('');
|
470 |
+
}
|
471 |
+
|
472 |
+
$template->save();
|
473 |
+
|
474 |
+
|
475 |
+
// Define the sender, here we query Magento default email (in the configuration)
|
476 |
+
// For customer support email, use : 'trans_email/ident_support/...'
|
477 |
+
$sender = Array('name' => Mage::getStoreConfig('trans_email/ident_general/name'),
|
478 |
+
'email' => Mage::getStoreConfig('trans_email/ident_general/email'));
|
479 |
+
|
480 |
+
// Set you store
|
481 |
+
// This information may be taken from the current logged in user
|
482 |
+
$store = Mage::app()->getStore();
|
483 |
+
|
484 |
+
// In this array, you set the variables you use in your template
|
485 |
+
$vars = Array(
|
486 |
+
'reason' => "ACHTUNG! - M�glicherweise wurde die Rechnungsadresse f�r die Bestellung mit ID '" .
|
487 |
+
$order->getId() . "' vom Kunden in der mPAY24-Bezahlseite ge�ndert, jedoch in Ihrem Shop nicht gespeichert!
|
488 |
+
Der Rechnungsadresse-Modus wurde auf 'ReadOnly' zur�ckgesetzt! Damit Sie den Modus 'ReadWrite' benutzen
|
489 |
+
k�nnen, muss die Variable 'BILLING_ADDR' im 'TRANSACTIONSTATUS'-Request bei mPAY24 freigeschalten werden.
|
490 |
+
Bitte wenden Sie sich mit Ihrer MerchantID '" . Mage::getStoreConfig('mpay24/mpay24as/merchantid')
|
491 |
+
. "' an mPAY24 (support@mpay24.com)!");
|
492 |
+
|
493 |
+
// You don't care about this...
|
494 |
+
$translate = Mage::getSingleton('core/translate');
|
495 |
+
|
496 |
+
// Send your email
|
497 |
+
Mage::getModel('core/email_template')->sendTransactional($template->getId(),
|
498 |
+
$sender,
|
499 |
+
Mage::getStoreConfig('trans_email/ident_general/email'),
|
500 |
+
Mage::getStoreConfig('trans_email/ident_general/name'),
|
501 |
+
$vars,
|
502 |
+
$store->getId());
|
503 |
+
|
504 |
+
// You don't care as well
|
505 |
+
$translate->setTranslateInline(true);
|
506 |
+
|
507 |
+
$template->delete();
|
508 |
+
|
509 |
+
$billingAddressMode = new Mage_Core_Model_Config();
|
510 |
+
$billingAddressMode->saveConfig('mpay24/mpay24as/billingAddressMode', 'ReadOnly', 'default', "");
|
511 |
+
} else{
|
512 |
+
$billingAddress = new DOMDocument();
|
513 |
+
$billingAddress->loadXML(trim($soapTransactionStatusResult->getData('BILLING_ADDR')));
|
514 |
+
$billingAddress->saveXML();
|
515 |
+
|
516 |
+
$name = $billingAddress->getElementsByTagName("Name")->item(0)->nodeValue;
|
517 |
+
$street = $billingAddress->getElementsByTagName("Street")->item(0)->nodeValue;
|
518 |
+
$street2 = $billingAddress->getElementsByTagName("Street2")->item(0)->nodeValue;
|
519 |
+
$zip = $billingAddress->getElementsByTagName("Zip")->item(0)->nodeValue;
|
520 |
+
$city = $billingAddress->getElementsByTagName("City")->item(0)->nodeValue;
|
521 |
+
$email = $billingAddress->getElementsByTagName("Email")->item(0)->nodeValue;
|
522 |
+
$countryCode = $billingAddress->getElementsByTagName("Country")->item(0)->getAttribute("code");
|
523 |
+
|
524 |
+
//Build billing and shipping address for customer, for checkout
|
525 |
+
if(strpos($name, " ")){
|
526 |
+
$_billing_address = array (
|
527 |
+
'firstname' => substr($name, 0, strpos($name, " ")),
|
528 |
+
'lastname' => substr($name, strpos($name, " ")+1),
|
529 |
+
'street' => array (
|
530 |
+
'0' => $street,
|
531 |
+
'1' => $street2,
|
532 |
+
),
|
533 |
+
|
534 |
+
'city' => $city,
|
535 |
+
'postcode' => $zip,
|
536 |
+
'country_id' => $countryCode,
|
537 |
+
'prefix' => '',
|
538 |
+
'middlename' => '',
|
539 |
+
'suffix' => '',
|
540 |
+
'company' => '',
|
541 |
+
'region' => '',
|
542 |
+
'region_id' => '',
|
543 |
+
'telephone' => '',
|
544 |
+
'fax' => ''
|
545 |
+
);
|
546 |
+
} else{
|
547 |
+
$_billing_address = array (
|
548 |
+
'firstname' => $name,
|
549 |
+
'lastname' => '',
|
550 |
+
'street' => array (
|
551 |
+
'0' => $street,
|
552 |
+
'1' => $street2,
|
553 |
+
),
|
554 |
+
|
555 |
+
'city' => $city,
|
556 |
+
'postcode' => $zip,
|
557 |
+
'country_id' => $countryCode,
|
558 |
+
'prefix' => '',
|
559 |
+
'middlename' => '',
|
560 |
+
'suffix' => '',
|
561 |
+
'company' => '',
|
562 |
+
'region' => '',
|
563 |
+
'region_id' => '',
|
564 |
+
'telephone' => '',
|
565 |
+
'fax' => ''
|
566 |
+
);
|
567 |
+
}
|
568 |
+
|
569 |
+
$addressId = $order->getBillingAddress()->getId();
|
570 |
+
$address = Mage::getModel('sales/order_address')->load($addressId);
|
571 |
+
$address->addData($_billing_address);
|
572 |
+
$address->implodeStreetAddress()->save();
|
573 |
+
|
574 |
+
$order->setBillingAddress($address);
|
575 |
+
$order->save();
|
576 |
+
|
577 |
+
if(Mage::helper('customer')->isLoggedIn()){
|
578 |
+
$addressAlreadySaved = false;
|
579 |
+
foreach(Mage::getSingleton('customer/session')->getCustomer()->getAddressesCollection() as $a){
|
580 |
+
if($a->getFirstname() == substr($name, 0, strpos($name, " ")) && $a->getLastname() == substr($name, strpos($name, " ")+1)
|
581 |
+
&& $a->getStreet1() == $street && $a->getStreet2() == $street2 && $a->getCity() == $city
|
582 |
+
&& $a->getPostcode() == $zip && $a->getCountry() == $countryCode){
|
583 |
+
$addressAlreadySaved = true;
|
584 |
+
}
|
585 |
+
}
|
586 |
+
if(!$addressAlreadySaved){
|
587 |
+
$billAddress = Mage::getModel('customer/address');
|
588 |
+
$billAddress->setData($_billing_address)
|
589 |
+
->setCustomerId(Mage::getSingleton('customer/session')->getCustomer()->getId())
|
590 |
+
->setIsDefaultBilling('0')
|
591 |
+
->setIsDefaultShipping('0')
|
592 |
+
->setSaveInAddressBook('1');
|
593 |
+
|
594 |
+
$billAddress->save();
|
595 |
+
}
|
596 |
+
}
|
597 |
+
}
|
598 |
+
}
|
599 |
+
}
|
600 |
+
return $updateResult;
|
601 |
+
}
|
602 |
+
|
603 |
+
public function calledBESPAction() {
|
604 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
605 |
+
Mage::log('calledSP from backend called for order '.$order->getData('increment_id'));
|
606 |
+
$this->getTransactionStatus($_REQUEST['TID']);
|
607 |
+
$this->_redirect('adminhtml/sales_order/view/order_id/'.$order->getId().'/');
|
608 |
+
Mage::log('redirected to '.'index.php/admin/sales_order/view/order_id/'.$order->getId().'/');
|
609 |
+
}
|
610 |
+
|
611 |
+
public function calledFESPAction() {
|
612 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
613 |
+
Mage::log('calledSP from frontend called for order '.$order->getData('increment_id'));
|
614 |
+
$this->getTransactionStatus($_REQUEST['TID']);
|
615 |
+
$this->_redirect('sales/order/view/order_id/'.$order->getId().'/');
|
616 |
+
Mage::log('redirected to '.'sales/order/view/order_id/'.$order->getId().'/');
|
617 |
+
}
|
618 |
+
|
619 |
+
protected function _initTemplate($idFieldName = 'template_id')
|
620 |
+
{
|
621 |
+
$this->_title($this->__('System'))->_title($this->__('Transactional Emails'));
|
622 |
+
|
623 |
+
$id = (int)$this->getRequest()->getParam($idFieldName);
|
624 |
+
$model = Mage::getModel('adminhtml/email_template');
|
625 |
+
if ($id) {
|
626 |
+
$model->load($id);
|
627 |
+
}
|
628 |
+
if (!Mage::registry('email_template')) {
|
629 |
+
Mage::register('email_template', $model);
|
630 |
+
}
|
631 |
+
if (!Mage::registry('current_email_template')) {
|
632 |
+
Mage::register('current_email_template', $model);
|
633 |
+
}
|
634 |
+
return $model;
|
635 |
+
}
|
636 |
+
|
637 |
+
public function updateAction() {
|
638 |
+
$order = $this->getOrder($_REQUEST['TID']);
|
639 |
+
Mage::log('calledUpdateAction from backend; called for order '.$order->getData('increment_id'));
|
640 |
+
echo $this->getTransactionStatus($_REQUEST['TID']);
|
641 |
+
}
|
642 |
+
|
643 |
+
public function connectAction() {
|
644 |
+
$result = Mage::getModel('mpay24/source_result');
|
645 |
+
$soapPass = $_REQUEST['soapPass'];
|
646 |
+
$merchantID = $_REQUEST['merchantID'];
|
647 |
+
$request = Mage::getSingleton('mpay24/api_mpay24')->createBasicSoapRequestObject('LISTPAYMENTMETHODS', $merchantID, $soapPass);
|
648 |
+
try{
|
649 |
+
$result = Mage::getSingleton('mpay24/api_mpay24')->authorize($request);
|
650 |
+
} catch(Exception $e){
|
651 |
+
$result->setData('STATUS', "ERROR");
|
652 |
+
$result->setData('RETURNCODE', "Authorization required!");
|
653 |
+
}
|
654 |
+
Mage::log("RESULT from connectAction:");
|
655 |
+
Mage::log($result);
|
656 |
+
if($result->getData('STATUS') == 'OK'){
|
657 |
+
echo "The payment systems was successfully updated!";
|
658 |
+
} else
|
659 |
+
echo $result->getData('STATUS') . " - " . $result->getData('RETURNCODE');
|
660 |
+
}
|
661 |
+
}
|
app/code/community/Mpay24/Mpay24/etc/config.xml
ADDED
@@ -0,0 +1,414 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Mpay24_Mpay24>
|
5 |
+
<version>1.1.8</version>
|
6 |
+
</Mpay24_Mpay24>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<fieldsets>
|
11 |
+
<sales_convert_quote_payment>
|
12 |
+
<mpay_account_number><to_order_payment>*</to_order_payment></mpay_account_number>
|
13 |
+
<mpay_bank_code><to_order_payment>*</to_order_payment></mpay_bank_code>
|
14 |
+
<mpay_holder><to_order_payment>*</to_order_payment></mpay_holder>
|
15 |
+
<mpay_pb_country_code><to_order_payment>*</to_order_payment></mpay_pb_country_code>
|
16 |
+
<mpay_pb_area_code><to_order_payment>*</to_order_payment></mpay_pb_area_code>
|
17 |
+
<mpay_pb_number><to_order_payment>*</to_order_payment></mpay_pb_number>
|
18 |
+
</sales_convert_quote_payment>
|
19 |
+
|
20 |
+
<sales_convert_order_payment>
|
21 |
+
<mpay_account_number><to_quote_payment>*</to_quote_payment></mpay_account_number>
|
22 |
+
<mpay_bank_code><to_quote_payment>*</to_quote_payment></mpay_bank_code>
|
23 |
+
<mpay_holder><to_quote_payment>*</to_quote_payment></mpay_holder>
|
24 |
+
<mpay_pb_country_code><to_quote_payment>*</to_quote_payment></mpay_pb_country_code>
|
25 |
+
<mpay_pb_area_code><to_quote_payment>*</to_quote_payment></mpay_pb_area_code>
|
26 |
+
<mpay_pb_number><to_quote_payment>*</to_quote_payment></mpay_pb_number>
|
27 |
+
</sales_convert_order_payment>
|
28 |
+
</fieldsets>
|
29 |
+
<models>
|
30 |
+
<mpay24>
|
31 |
+
<class>Mpay24_Mpay24_Model</class>
|
32 |
+
<resourceModel>mpay24_mysql4</resourceModel>
|
33 |
+
</mpay24>
|
34 |
+
<mpay24a>
|
35 |
+
<class>Mpay24_Mpay24_Model</class>
|
36 |
+
<resourceModel>mpay24_entity</resourceModel>
|
37 |
+
</mpay24a>
|
38 |
+
|
39 |
+
<mpay24_mysql4>
|
40 |
+
<class>Mpay24_Mpay24_Model_Mysql4</class>
|
41 |
+
<entities>
|
42 |
+
<mpay24_debug><table>mpay24_debug</table></mpay24_debug>
|
43 |
+
</entities>
|
44 |
+
</mpay24_mysql4>
|
45 |
+
<mpay24_entity>
|
46 |
+
<class>Mpay24_Mpay24_Model_Entity</class>
|
47 |
+
</mpay24_entity>
|
48 |
+
</models>
|
49 |
+
<blocks>
|
50 |
+
<mpay24>
|
51 |
+
<class>Mpay24_Mpay24_Block</class>
|
52 |
+
</mpay24>
|
53 |
+
</blocks>
|
54 |
+
<helpers>
|
55 |
+
<mpay24>
|
56 |
+
<class>Mpay24_Mpay24_Helper</class>
|
57 |
+
</mpay24>
|
58 |
+
</helpers>
|
59 |
+
<resources>
|
60 |
+
<mpay24_setup>
|
61 |
+
<setup>
|
62 |
+
<module>Mpay24_Mpay24</module>
|
63 |
+
<class>Mpay24_Mpay24_Model_Entity_Setup</class>
|
64 |
+
</setup>
|
65 |
+
<connection>
|
66 |
+
<use>core_setup</use>
|
67 |
+
</connection>
|
68 |
+
</mpay24_setup>
|
69 |
+
|
70 |
+
<mpay24_write>
|
71 |
+
<connection>
|
72 |
+
<use>core_write</use>
|
73 |
+
</connection>
|
74 |
+
</mpay24_write>
|
75 |
+
<mpay24_read>
|
76 |
+
<connection>
|
77 |
+
<use>core_read</use>
|
78 |
+
</connection>
|
79 |
+
</mpay24_read>
|
80 |
+
<mpay24a_write>
|
81 |
+
<connection>
|
82 |
+
<use>core_write</use>
|
83 |
+
</connection>
|
84 |
+
</mpay24a_write>
|
85 |
+
<mpay24a_read>
|
86 |
+
<connection>
|
87 |
+
<use>core_read</use>
|
88 |
+
</connection>
|
89 |
+
</mpay24a_read>
|
90 |
+
</resources>
|
91 |
+
|
92 |
+
<payment>
|
93 |
+
<cc>
|
94 |
+
<types>
|
95 |
+
<DN>
|
96 |
+
<code>DC</code>
|
97 |
+
<name>Diners Club</name>
|
98 |
+
<order>39</order>
|
99 |
+
</DN>
|
100 |
+
<JC>
|
101 |
+
<code>JC</code>
|
102 |
+
<name>JCB</name>
|
103 |
+
<order>40</order>
|
104 |
+
</JC>
|
105 |
+
</types>
|
106 |
+
</cc>
|
107 |
+
<elv>
|
108 |
+
<types>
|
109 |
+
<HOBEX-AT>
|
110 |
+
<code>HOBEX-AT</code>
|
111 |
+
<name>HOBEX-AT</name>
|
112 |
+
<order>1</order>
|
113 |
+
</HOBEX-AT>
|
114 |
+
<HOBEX-DE>
|
115 |
+
<code>HOBEX-DE</code>
|
116 |
+
<name>HOBEX-DE</name>
|
117 |
+
<order>1</order>
|
118 |
+
</HOBEX-DE>
|
119 |
+
<HOBEX-NL>
|
120 |
+
<code>HOBEX-NL</code>
|
121 |
+
<name>HOBEX-NL</name>
|
122 |
+
<order>1</order>
|
123 |
+
</HOBEX-NL>
|
124 |
+
</types>
|
125 |
+
</elv>
|
126 |
+
<paybox>
|
127 |
+
<area_code>
|
128 |
+
<CD0664>
|
129 |
+
<code>664</code>
|
130 |
+
<name>664</name>
|
131 |
+
<order>1</order>
|
132 |
+
</CD0664>
|
133 |
+
<CD0676>
|
134 |
+
<code>676</code>
|
135 |
+
<name>676</name>
|
136 |
+
<order>2</order>
|
137 |
+
</CD0676>
|
138 |
+
<CD0699>
|
139 |
+
<code>699</code>
|
140 |
+
<name>699</name>
|
141 |
+
<order>3</order>
|
142 |
+
</CD0699>
|
143 |
+
<CD0650>
|
144 |
+
<code>650</code>
|
145 |
+
<name>650</name>
|
146 |
+
<order>4</order>
|
147 |
+
</CD0650>
|
148 |
+
<CD0660>
|
149 |
+
<code>660</code>
|
150 |
+
<name>660</name>
|
151 |
+
<order>5</order>
|
152 |
+
</CD0660>
|
153 |
+
<CD0688>
|
154 |
+
<code>688</code>
|
155 |
+
<name>688</name>
|
156 |
+
<order>6</order>
|
157 |
+
</CD0688>
|
158 |
+
<CD0680>
|
159 |
+
<code>680</code>
|
160 |
+
<name>680</name>
|
161 |
+
<order>7</order>
|
162 |
+
</CD0680>
|
163 |
+
<CD0681>
|
164 |
+
<code>681</code>
|
165 |
+
<name>681</name>
|
166 |
+
<order>8</order>
|
167 |
+
</CD0681>
|
168 |
+
</area_code>
|
169 |
+
</paybox>
|
170 |
+
</payment>
|
171 |
+
|
172 |
+
<payment>
|
173 |
+
<groups>
|
174 |
+
<mpay24>mPAY24</mpay24>
|
175 |
+
</groups>
|
176 |
+
</payment>
|
177 |
+
</global>
|
178 |
+
|
179 |
+
<frontend>
|
180 |
+
<secure_url>
|
181 |
+
<mpay24_payment>/mpay24/payment</mpay24_payment>
|
182 |
+
</secure_url>
|
183 |
+
|
184 |
+
<routers>
|
185 |
+
<mpay24>
|
186 |
+
<use>standard</use>
|
187 |
+
<args>
|
188 |
+
<module>Mpay24_Mpay24</module>
|
189 |
+
<frontName>mpay24</frontName>
|
190 |
+
</args>
|
191 |
+
</mpay24>
|
192 |
+
</routers>
|
193 |
+
<layout>
|
194 |
+
<updates>
|
195 |
+
<mpay24>
|
196 |
+
<file>mpay24.xml</file>
|
197 |
+
</mpay24>
|
198 |
+
</updates>
|
199 |
+
</layout>
|
200 |
+
<translate>
|
201 |
+
<modules>
|
202 |
+
<Mpay24_Mpay24>
|
203 |
+
<files>
|
204 |
+
<default>Mpay24_Mpay24.csv</default>
|
205 |
+
</files>
|
206 |
+
</Mpay24_Mpay24>
|
207 |
+
</modules>
|
208 |
+
</translate>
|
209 |
+
</frontend>
|
210 |
+
|
211 |
+
<admin>
|
212 |
+
<routers>
|
213 |
+
<mpay24>
|
214 |
+
<use>admin</use>
|
215 |
+
<args>
|
216 |
+
<module>Mpay24_Mpay24</module>
|
217 |
+
<frontName>mpay24</frontName>
|
218 |
+
</args>
|
219 |
+
</mpay24>
|
220 |
+
</routers>
|
221 |
+
</admin>
|
222 |
+
<adminhtml>
|
223 |
+
<acl>
|
224 |
+
<resources>
|
225 |
+
<all>
|
226 |
+
<title>Allow Everything</title>
|
227 |
+
</all>
|
228 |
+
|
229 |
+
<admin>
|
230 |
+
<children>
|
231 |
+
<system>
|
232 |
+
<children>
|
233 |
+
<config>
|
234 |
+
<children>
|
235 |
+
<mpay24>
|
236 |
+
<title>mPAY24 API</title>
|
237 |
+
</mpay24>
|
238 |
+
</children>
|
239 |
+
</config>
|
240 |
+
</children>
|
241 |
+
</system>
|
242 |
+
</children>
|
243 |
+
</admin>
|
244 |
+
</resources>
|
245 |
+
</acl>
|
246 |
+
<translate>
|
247 |
+
<modules>
|
248 |
+
<Mpay24_Mpay24>
|
249 |
+
<files>
|
250 |
+
<default>Mpay24_Mpay24.csv</default>
|
251 |
+
</files>
|
252 |
+
</Mpay24_Mpay24>
|
253 |
+
</modules>
|
254 |
+
</translate>
|
255 |
+
<layout>
|
256 |
+
<updates>
|
257 |
+
<jquery>
|
258 |
+
<file>mpay24.xml</file>
|
259 |
+
</jquery>
|
260 |
+
</updates>
|
261 |
+
</layout>
|
262 |
+
</adminhtml>
|
263 |
+
|
264 |
+
|
265 |
+
<default>
|
266 |
+
<mpay24>
|
267 |
+
<mpay24as>
|
268 |
+
<active>1</active>
|
269 |
+
<titel>mPAY24</titel>
|
270 |
+
<soap_url>https://www.mpay24.com/soap/etp/1.4/ETP.wsdl</soap_url>
|
271 |
+
<merchantid backend_model="adminhtml/system_config_backend_encrypted"/>
|
272 |
+
<payment_methods/>
|
273 |
+
<use_proxy>0</use_proxy>
|
274 |
+
<billingAddressMode>ReadOnly</billingAddressMode>
|
275 |
+
</mpay24as>
|
276 |
+
<mpay24sporder>
|
277 |
+
<style></style>
|
278 |
+
<logostyle></logostyle>
|
279 |
+
<pageheaderstyle></pageheaderstyle>
|
280 |
+
<pagecaptionstyle></pagecaptionstyle>
|
281 |
+
<pagestyle></pagestyle>
|
282 |
+
<inputfieldsstyle></inputfieldsstyle>
|
283 |
+
<dropdownlistsstyle></dropdownlistsstyle>
|
284 |
+
<buttonsstyle></buttonsstyle>
|
285 |
+
<errorsstyle></errorsstyle>
|
286 |
+
<successtitlestyle></successtitlestyle>
|
287 |
+
<errortitlestyle></errortitlestyle>
|
288 |
+
<footerstyle></footerstyle>
|
289 |
+
</mpay24sporder>
|
290 |
+
<mpay24spsc>
|
291 |
+
<sc_row>Number,ProductNr,Description,Package,Quantity,ItemPrice,Price</sc_row>
|
292 |
+
<sc_style></sc_style>
|
293 |
+
<sc_header></sc_header>
|
294 |
+
<sc_headerstyle></sc_headerstyle>
|
295 |
+
<sc_captionstyle></sc_captionstyle>
|
296 |
+
<sc_numberheader></sc_numberheader>
|
297 |
+
<sc_numberstyle></sc_numberstyle>
|
298 |
+
<sc_productnrheader></sc_productnrheader>
|
299 |
+
<sc_productnrstyle></sc_productnrstyle>
|
300 |
+
<sc_descriptionheader></sc_descriptionheader>
|
301 |
+
<sc_descriptionstyle></sc_descriptionstyle>
|
302 |
+
<sc_packageheader></sc_packageheader>
|
303 |
+
<sc_packagestyle></sc_packagestyle>
|
304 |
+
<sc_quantityheader></sc_quantityheader>
|
305 |
+
<sc_quantitystyle></sc_quantitystyle>
|
306 |
+
<sc_itempriceheader></sc_itempriceheader>
|
307 |
+
<sc_mpay24itempricestyle></sc_mpay24itempricestyle>
|
308 |
+
<sc_priceheader></sc_priceheader>
|
309 |
+
<sc_pricestyle></sc_pricestyle>
|
310 |
+
<description></description>
|
311 |
+
<item_style1></item_style1>
|
312 |
+
<item_style2></item_style2>
|
313 |
+
<discount_headerstyle></discount_headerstyle>
|
314 |
+
<discount_style></discount_style>
|
315 |
+
<shipping_costs_headerstyle></shipping_costs_headerstyle>
|
316 |
+
<shipping_costs_style></shipping_costs_style>
|
317 |
+
<tax_headerstyle></tax_headerstyle>
|
318 |
+
<tax_style></tax_style>
|
319 |
+
<price_header></price_header>
|
320 |
+
<price_headerstyle></price_headerstyle>
|
321 |
+
<price_style></price_style>
|
322 |
+
<subtotal_header></subtotal_header>
|
323 |
+
<subtotal_headerstyle></subtotal_headerstyle>
|
324 |
+
<subtotal_style></subtotal_style>
|
325 |
+
</mpay24spsc>
|
326 |
+
</mpay24>
|
327 |
+
<payment>
|
328 |
+
<mpay24_sp_cc>
|
329 |
+
<in_use>1</in_use>
|
330 |
+
<model>mpay24/selectpaymentCc</model>
|
331 |
+
<cctypes>VI</cctypes>
|
332 |
+
<useccv>1</useccv>
|
333 |
+
<payment_action>authorize</payment_action>
|
334 |
+
<order_status>processing</order_status>
|
335 |
+
<group>mpay24</group>
|
336 |
+
</mpay24_sp_cc>
|
337 |
+
<mpay24_sp_elv>
|
338 |
+
<in_use>0</in_use>
|
339 |
+
<model>mpay24/selectpaymentElv</model>
|
340 |
+
<payment_action>authorize</payment_action>
|
341 |
+
<order_status>processing</order_status>
|
342 |
+
<specificcountry>AT,DE,NL</specificcountry>
|
343 |
+
<group>mpay24</group>
|
344 |
+
</mpay24_sp_elv>
|
345 |
+
<mpay24_sp_eps>
|
346 |
+
<in_use>0</in_use>
|
347 |
+
<model>mpay24/selectpaymentEps</model>
|
348 |
+
<payment_action>authorize</payment_action>
|
349 |
+
<epstypes>ARZ,BA,BAWAG,ERSTE,HYPO,RZB</epstypes>
|
350 |
+
<order_status>processing</order_status>
|
351 |
+
<specificcountry>AT</specificcountry>
|
352 |
+
<group>mpay24</group>
|
353 |
+
</mpay24_sp_eps>
|
354 |
+
<mpay24_sp_giropay>
|
355 |
+
<in_use>0</in_use>
|
356 |
+
<model>mpay24/selectpaymentGiropay</model>
|
357 |
+
<payment_action>authorize</payment_action>
|
358 |
+
<order_status>processing</order_status>
|
359 |
+
<group>mpay24</group>
|
360 |
+
</mpay24_sp_giropay>
|
361 |
+
<mpay24_sp_maestro>
|
362 |
+
<in_use>0</in_use>
|
363 |
+
<model>mpay24/selectpaymentMaestro</model>
|
364 |
+
<payment_action>authorize</payment_action>
|
365 |
+
<order_status>processing</order_status>
|
366 |
+
<specificcountry>AT,UK</specificcountry>
|
367 |
+
<group>mpay24</group>
|
368 |
+
</mpay24_sp_maestro>
|
369 |
+
<mpay24_sp_paybox>
|
370 |
+
<in_use>0</in_use>
|
371 |
+
<model>mpay24/selectpaymentPaybox</model>
|
372 |
+
<payment_action>authorize</payment_action>
|
373 |
+
<order_status>processing</order_status>
|
374 |
+
<specificcountry>AT</specificcountry>
|
375 |
+
<group>mpay24</group>
|
376 |
+
</mpay24_sp_paybox>
|
377 |
+
<mpay24_sp_psc>
|
378 |
+
<in_use>0</in_use>
|
379 |
+
<model>mpay24/selectpaymentPsc</model>
|
380 |
+
<payment_action>authorize</payment_action>
|
381 |
+
<order_status>processing</order_status>
|
382 |
+
<group>mpay24</group>
|
383 |
+
</mpay24_sp_psc>
|
384 |
+
<mpay24_sp_paypal>
|
385 |
+
<in_use>0</in_use>
|
386 |
+
<model>mpay24/selectpaymentPaypal</model>
|
387 |
+
<payment_action>authorize</payment_action>
|
388 |
+
<order_status>processing</order_status>
|
389 |
+
<group>mpay24</group>
|
390 |
+
</mpay24_sp_paypal>
|
391 |
+
<mpay24_sp_mpass>
|
392 |
+
<in_use>0</in_use>
|
393 |
+
<model>mpay24/selectpaymentMpass</model>
|
394 |
+
<payment_action>authorize</payment_action>
|
395 |
+
<order_status>processing</order_status>
|
396 |
+
<group>mpay24</group>
|
397 |
+
</mpay24_sp_mpass>
|
398 |
+
<mpay24_sp_cashTicket>
|
399 |
+
<in_use>0</in_use>
|
400 |
+
<model>mpay24/selectpaymentCashTicket</model>
|
401 |
+
<payment_action>authorize</payment_action>
|
402 |
+
<order_status>processing</order_status>
|
403 |
+
<group>mpay24</group>
|
404 |
+
</mpay24_sp_cashTicket>
|
405 |
+
<mpay24_sp_cb>
|
406 |
+
<in_use>0</in_use>
|
407 |
+
<model>mpay24/selectpaymentCb</model>
|
408 |
+
<payment_action>authorize</payment_action>
|
409 |
+
<order_status>processing</order_status>
|
410 |
+
<group>mpay24</group>
|
411 |
+
</mpay24_sp_cb>
|
412 |
+
</payment>
|
413 |
+
</default>
|
414 |
+
</config>
|
app/code/community/Mpay24/Mpay24/etc/system.xml
ADDED
@@ -0,0 +1,1280 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<mpay24 translate="label" module="mpay24">
|
5 |
+
<label>mPAY24</label>
|
6 |
+
<tab>sales</tab>
|
7 |
+
<frontend_type>text</frontend_type>
|
8 |
+
<sort_order>349</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
<groups>
|
13 |
+
<mpay24as translate="label">
|
14 |
+
<label>mPAY24 Account Settings</label>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>1</sort_order>
|
17 |
+
<expanded>1</expanded>
|
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 |
+
<fields>
|
22 |
+
<active translate="label">
|
23 |
+
<label>mPAY24 enabled</label>
|
24 |
+
<frontend_type>select</frontend_type>
|
25 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
26 |
+
<config_path>payment/mpay24_sp_cc/active</config_path>
|
27 |
+
<sort_order>0</sort_order>
|
28 |
+
<show_in_default>1</show_in_default>
|
29 |
+
<show_in_website>1</show_in_website>
|
30 |
+
</active>
|
31 |
+
<title translate="label">
|
32 |
+
<label>Title</label>
|
33 |
+
<config_path>payment/mpay24_sp_cc/title</config_path>
|
34 |
+
<frontend_type>text</frontend_type>
|
35 |
+
<sort_order>1</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>1</show_in_website>
|
38 |
+
</title>
|
39 |
+
<soap_url translate="label comment">
|
40 |
+
<label>mPAY24 Webservices (SOAP) URL</label>
|
41 |
+
<frontend_type>text</frontend_type>
|
42 |
+
<sort_order>2</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<comment><![CDATA[Example: <b>https://test.mpay24.com/soap/etp/1.4/ETP-test.wsdl</b>]]></comment>
|
46 |
+
</soap_url>
|
47 |
+
<merchantid translate="label">
|
48 |
+
<label>Merchant ID</label>
|
49 |
+
<frontend_type>text</frontend_type>
|
50 |
+
<backend_model>mpay24/system_config_backend_encrypted</backend_model>
|
51 |
+
<sort_order>3</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<comment><![CDATA[The Merchant ID provided by mPAY24]]></comment>
|
55 |
+
</merchantid>
|
56 |
+
<soap_pass translate="label">
|
57 |
+
<label>SOAP password</label>
|
58 |
+
<frontend_type>password</frontend_type>
|
59 |
+
<sort_order>4</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<comment><![CDATA[The SOAP password provided by mPAY24]]></comment>
|
63 |
+
</soap_pass>
|
64 |
+
<payment_methods translate="label comment">
|
65 |
+
<label>Active Payment Methods</label>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<config_path>mpay24/mpay24as/payment_methods</config_path>
|
68 |
+
<sort_order>5</sort_order>
|
69 |
+
</payment_methods>
|
70 |
+
<use_proxy translate="label">
|
71 |
+
<label>API uses proxy</label>
|
72 |
+
<frontend_type>select</frontend_type>
|
73 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
74 |
+
<sort_order>7</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
</use_proxy>
|
78 |
+
<proxy_host translate="label">
|
79 |
+
<label>Proxy Host</label>
|
80 |
+
<frontend_type>text</frontend_type>
|
81 |
+
<sort_order>8</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<depends><use_proxy>1</use_proxy></depends>
|
85 |
+
</proxy_host>
|
86 |
+
<proxy_port translate="label">
|
87 |
+
<label>Proxy Port</label>
|
88 |
+
<frontend_type>text</frontend_type>
|
89 |
+
<sort_order>9</sort_order>
|
90 |
+
<show_in_default>1</show_in_default>
|
91 |
+
<show_in_website>1</show_in_website>
|
92 |
+
<depends><use_proxy>1</use_proxy></depends>
|
93 |
+
</proxy_port>
|
94 |
+
<billingAddressMode translate="label">
|
95 |
+
<label>Billing address mode</label>
|
96 |
+
<frontend_type>select</frontend_type>
|
97 |
+
<source_model>mpay24/source_billAddr</source_model>
|
98 |
+
<sort_order>8</sort_order>
|
99 |
+
<show_in_default>1</show_in_default>
|
100 |
+
<show_in_website>1</show_in_website>
|
101 |
+
</billingAddressMode>
|
102 |
+
</fields>
|
103 |
+
</mpay24as>
|
104 |
+
<mpay24sporder>
|
105 |
+
<label>mPAY24 Selectpayment Order Design</label>
|
106 |
+
<frontend_type>text</frontend_type>
|
107 |
+
<sort_order>2</sort_order>
|
108 |
+
<expanded>0</expanded>
|
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 |
+
<fields>
|
113 |
+
<style translate="label">
|
114 |
+
<label>Style</label>
|
115 |
+
<frontend_type>text</frontend_type>
|
116 |
+
<sort_order>101</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>0</show_in_store>
|
120 |
+
</style>
|
121 |
+
<logostyle translate="label">
|
122 |
+
<label>LogoStyle</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>102</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>0</show_in_store>
|
128 |
+
</logostyle>
|
129 |
+
<pageheaderstyle translate="label">
|
130 |
+
<label>PageHeaderStyle</label>
|
131 |
+
<frontend_type>text</frontend_type>
|
132 |
+
<sort_order>103</sort_order>
|
133 |
+
<show_in_default>1</show_in_default>
|
134 |
+
<show_in_website>1</show_in_website>
|
135 |
+
<show_in_store>0</show_in_store>
|
136 |
+
</pageheaderstyle>
|
137 |
+
<pagecaptionstyle translate="label">
|
138 |
+
<label>PageCaptionStyle</label>
|
139 |
+
<frontend_type>text</frontend_type>
|
140 |
+
<sort_order>104</sort_order>
|
141 |
+
<show_in_default>1</show_in_default>
|
142 |
+
<show_in_website>1</show_in_website>
|
143 |
+
<show_in_store>0</show_in_store>
|
144 |
+
</pagecaptionstyle>
|
145 |
+
<pagestyle translate="label">
|
146 |
+
<label>PageStyle</label>
|
147 |
+
<frontend_type>text</frontend_type>
|
148 |
+
<sort_order>105</sort_order>
|
149 |
+
<show_in_default>1</show_in_default>
|
150 |
+
<show_in_website>1</show_in_website>
|
151 |
+
<show_in_store>0</show_in_store>
|
152 |
+
</pagestyle>
|
153 |
+
<inputfieldsstyle translate="label">
|
154 |
+
<label>InputFieldsStyle</label>
|
155 |
+
<frontend_type>text</frontend_type>
|
156 |
+
<sort_order>106</sort_order>
|
157 |
+
<show_in_default>1</show_in_default>
|
158 |
+
<show_in_website>1</show_in_website>
|
159 |
+
<show_in_store>0</show_in_store>
|
160 |
+
</inputfieldsstyle>
|
161 |
+
<dropdownlistsstyle translate="label">
|
162 |
+
<label>DropDownListsStyle</label>
|
163 |
+
<frontend_type>text</frontend_type>
|
164 |
+
<sort_order>107</sort_order>
|
165 |
+
<show_in_default>1</show_in_default>
|
166 |
+
<show_in_website>1</show_in_website>
|
167 |
+
<show_in_store>0</show_in_store>
|
168 |
+
</dropdownlistsstyle>
|
169 |
+
<buttonsstyle translate="label">
|
170 |
+
<label>ButtonsStyle</label>
|
171 |
+
<frontend_type>text</frontend_type>
|
172 |
+
<sort_order>108</sort_order>
|
173 |
+
<show_in_default>1</show_in_default>
|
174 |
+
<show_in_website>1</show_in_website>
|
175 |
+
<show_in_store>0</show_in_store>
|
176 |
+
</buttonsstyle>
|
177 |
+
<errorsstyle translate="label">
|
178 |
+
<label>ErrorsStyle</label>
|
179 |
+
<frontend_type>text</frontend_type>
|
180 |
+
<sort_order>109</sort_order>
|
181 |
+
<show_in_default>1</show_in_default>
|
182 |
+
<show_in_website>1</show_in_website>
|
183 |
+
<show_in_store>0</show_in_store>
|
184 |
+
</errorsstyle>
|
185 |
+
<successtitlestyle translate="label">
|
186 |
+
<label>SuccessTitleStyle</label>
|
187 |
+
<frontend_type>text</frontend_type>
|
188 |
+
<sort_order>110</sort_order>
|
189 |
+
<show_in_default>1</show_in_default>
|
190 |
+
<show_in_website>1</show_in_website>
|
191 |
+
<show_in_store>0</show_in_store>
|
192 |
+
</successtitlestyle>
|
193 |
+
<errortitlestyle translate="label">
|
194 |
+
<label>ErrorTitleStyle</label>
|
195 |
+
<frontend_type>text</frontend_type>
|
196 |
+
<sort_order>111</sort_order>
|
197 |
+
<show_in_default>1</show_in_default>
|
198 |
+
<show_in_website>1</show_in_website>
|
199 |
+
<show_in_store>0</show_in_store>
|
200 |
+
</errortitlestyle>
|
201 |
+
<footerstyle translate="label">
|
202 |
+
<label>FooterStyle</label>
|
203 |
+
<frontend_type>text</frontend_type>
|
204 |
+
<sort_order>112</sort_order>
|
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 |
+
</footerstyle>
|
209 |
+
</fields>
|
210 |
+
</mpay24sporder>
|
211 |
+
<mpay24spsc translate="label">
|
212 |
+
<label>mPAY24 Selectpayment ShoppingCart Design</label>
|
213 |
+
<frontend_type>text</frontend_type>
|
214 |
+
<sort_order>3</sort_order>
|
215 |
+
<expanded>0</expanded>
|
216 |
+
<show_in_default>1</show_in_default>
|
217 |
+
<show_in_website>1</show_in_website>
|
218 |
+
<show_in_store>1</show_in_store>
|
219 |
+
<fields>
|
220 |
+
<sc_row translate="label">
|
221 |
+
<label>ShoppingCart Rows</label>
|
222 |
+
<frontend_type>multiselect</frontend_type>
|
223 |
+
<sort_order>50</sort_order>
|
224 |
+
<source_model>mpay24/source_shoppingCartRowsAction</source_model>
|
225 |
+
<show_in_default>1</show_in_default>
|
226 |
+
<show_in_website>1</show_in_website>
|
227 |
+
<show_in_store>0</show_in_store>
|
228 |
+
</sc_row>
|
229 |
+
<sc_style translate="label">
|
230 |
+
<label>Style</label>
|
231 |
+
<frontend_type>text</frontend_type>
|
232 |
+
<sort_order>101</sort_order>
|
233 |
+
<show_in_default>1</show_in_default>
|
234 |
+
<show_in_website>1</show_in_website>
|
235 |
+
<show_in_store>0</show_in_store>
|
236 |
+
</sc_style>
|
237 |
+
<sc_header translate="label">
|
238 |
+
<label>Header</label>
|
239 |
+
<frontend_type>text</frontend_type>
|
240 |
+
<sort_order>102</sort_order>
|
241 |
+
<show_in_default>1</show_in_default>
|
242 |
+
<show_in_website>1</show_in_website>
|
243 |
+
<show_in_store>0</show_in_store>
|
244 |
+
</sc_header>
|
245 |
+
<sc_headerstyle translate="label">
|
246 |
+
<label>HeaderStyle</label>
|
247 |
+
<frontend_type>text</frontend_type>
|
248 |
+
<sort_order>103</sort_order>
|
249 |
+
<show_in_default>1</show_in_default>
|
250 |
+
<show_in_website>1</show_in_website>
|
251 |
+
<show_in_store>0</show_in_store>
|
252 |
+
</sc_headerstyle>
|
253 |
+
<sc_captionstyle translate="label">
|
254 |
+
<label>CaptionStyle</label>
|
255 |
+
<frontend_type>text</frontend_type>
|
256 |
+
<sort_order>104</sort_order>
|
257 |
+
<show_in_default>1</show_in_default>
|
258 |
+
<show_in_website>1</show_in_website>
|
259 |
+
<show_in_store>0</show_in_store>
|
260 |
+
</sc_captionstyle>
|
261 |
+
<sc_numberheader translate="label">
|
262 |
+
<label>NumberHeader</label>
|
263 |
+
<frontend_type>text</frontend_type>
|
264 |
+
<sort_order>105</sort_order>
|
265 |
+
<show_in_default>1</show_in_default>
|
266 |
+
<show_in_website>1</show_in_website>
|
267 |
+
<show_in_store>0</show_in_store>
|
268 |
+
</sc_numberheader>
|
269 |
+
<sc_numberstyle translate="label">
|
270 |
+
<label>NumberStyle</label>
|
271 |
+
<frontend_type>text</frontend_type>
|
272 |
+
<sort_order>106</sort_order>
|
273 |
+
<show_in_default>1</show_in_default>
|
274 |
+
<show_in_website>1</show_in_website>
|
275 |
+
<show_in_store>0</show_in_store>
|
276 |
+
</sc_numberstyle>
|
277 |
+
<sc_productnrheader translate="label">
|
278 |
+
<label>ProductNrHeader</label>
|
279 |
+
<frontend_type>text</frontend_type>
|
280 |
+
<sort_order>107</sort_order>
|
281 |
+
<show_in_default>1</show_in_default>
|
282 |
+
<show_in_website>1</show_in_website>
|
283 |
+
<show_in_store>0</show_in_store>
|
284 |
+
</sc_productnrheader>
|
285 |
+
<sc_productnrstyle translate="label">
|
286 |
+
<label>ProductNrStyle</label>
|
287 |
+
<frontend_type>text</frontend_type>
|
288 |
+
<sort_order>108</sort_order>
|
289 |
+
<show_in_default>1</show_in_default>
|
290 |
+
<show_in_website>1</show_in_website>
|
291 |
+
<show_in_store>0</show_in_store>
|
292 |
+
</sc_productnrstyle>
|
293 |
+
<sc_descriptionheader translate="label">
|
294 |
+
<label>DescriptionHeader</label>
|
295 |
+
<frontend_type>text</frontend_type>
|
296 |
+
<sort_order>109</sort_order>
|
297 |
+
<show_in_default>1</show_in_default>
|
298 |
+
<show_in_website>1</show_in_website>
|
299 |
+
<show_in_store>0</show_in_store>
|
300 |
+
</sc_descriptionheader>
|
301 |
+
<sc_descriptionstyle translate="label">
|
302 |
+
<label>DescriptionStyle</label>
|
303 |
+
<frontend_type>text</frontend_type>
|
304 |
+
<sort_order>110</sort_order>
|
305 |
+
<show_in_default>1</show_in_default>
|
306 |
+
<show_in_website>1</show_in_website>
|
307 |
+
<show_in_store>0</show_in_store>
|
308 |
+
</sc_descriptionstyle>
|
309 |
+
<sc_packageheader translate="label">
|
310 |
+
<label>PackageHeader</label>
|
311 |
+
<frontend_type>text</frontend_type>
|
312 |
+
<sort_order>111</sort_order>
|
313 |
+
<show_in_default>1</show_in_default>
|
314 |
+
<show_in_website>1</show_in_website>
|
315 |
+
<show_in_store>0</show_in_store>
|
316 |
+
</sc_packageheader>
|
317 |
+
<sc_packagestyle translate="label">
|
318 |
+
<label>PackageStyle</label>
|
319 |
+
<frontend_type>text</frontend_type>
|
320 |
+
<sort_order>112</sort_order>
|
321 |
+
<show_in_default>1</show_in_default>
|
322 |
+
<show_in_website>1</show_in_website>
|
323 |
+
<show_in_store>0</show_in_store>
|
324 |
+
</sc_packagestyle>
|
325 |
+
<sc_quantityheader translate="label">
|
326 |
+
<label>QuantityHeader</label>
|
327 |
+
<frontend_type>text</frontend_type>
|
328 |
+
<sort_order>113</sort_order>
|
329 |
+
<show_in_default>1</show_in_default>
|
330 |
+
<show_in_website>1</show_in_website>
|
331 |
+
<show_in_store>0</show_in_store>
|
332 |
+
</sc_quantityheader>
|
333 |
+
<sc_quantitystyle translate="label">
|
334 |
+
<label>QuantityStyle</label>
|
335 |
+
<frontend_type>text</frontend_type>
|
336 |
+
<sort_order>114</sort_order>
|
337 |
+
<show_in_default>1</show_in_default>
|
338 |
+
<show_in_website>1</show_in_website>
|
339 |
+
<show_in_store>0</show_in_store>
|
340 |
+
</sc_quantitystyle>
|
341 |
+
<sc_itempriceheader translate="label">
|
342 |
+
<label>ItemPriceHeader</label>
|
343 |
+
<frontend_type>text</frontend_type>
|
344 |
+
<sort_order>115</sort_order>
|
345 |
+
<show_in_default>1</show_in_default>
|
346 |
+
<show_in_website>1</show_in_website>
|
347 |
+
<show_in_store>0</show_in_store>
|
348 |
+
</sc_itempriceheader>
|
349 |
+
<sc_itempricestyle translate="label">
|
350 |
+
<label>ItemPriceStyle</label>
|
351 |
+
<frontend_type>text</frontend_type>
|
352 |
+
<sort_order>116</sort_order>
|
353 |
+
<show_in_default>1</show_in_default>
|
354 |
+
<show_in_website>1</show_in_website>
|
355 |
+
<show_in_store>0</show_in_store>
|
356 |
+
</sc_itempricestyle>
|
357 |
+
<sc_priceheader translate="label">
|
358 |
+
<label>PriceHeader</label>
|
359 |
+
<frontend_type>text</frontend_type>
|
360 |
+
<sort_order>117</sort_order>
|
361 |
+
<show_in_default>1</show_in_default>
|
362 |
+
<show_in_website>1</show_in_website>
|
363 |
+
<show_in_store>0</show_in_store>
|
364 |
+
</sc_priceheader>
|
365 |
+
<sc_pricestyle translate="label">
|
366 |
+
<label>PriceStyle</label>
|
367 |
+
<frontend_type>text</frontend_type>
|
368 |
+
<sort_order>118</sort_order>
|
369 |
+
<show_in_default>1</show_in_default>
|
370 |
+
<show_in_website>1</show_in_website>
|
371 |
+
<show_in_store>0</show_in_store>
|
372 |
+
</sc_pricestyle>
|
373 |
+
<description translate="label">
|
374 |
+
<label>Description</label>
|
375 |
+
<frontend_type>text</frontend_type>
|
376 |
+
<sort_order>119</sort_order>
|
377 |
+
<show_in_default>1</show_in_default>
|
378 |
+
<show_in_website>1</show_in_website>$value == 'JCB'
|
379 |
+
<show_in_store>0</show_in_store>
|
380 |
+
</description>
|
381 |
+
<item_style1 translate="label">
|
382 |
+
<label>ItemStyle Line 1</label>
|
383 |
+
<frontend_type>text</frontend_type>
|
384 |
+
<sort_order>120</sort_order>
|
385 |
+
<show_in_default>1</show_in_default>
|
386 |
+
<show_in_website>1</show_in_website>
|
387 |
+
<show_in_store>0</show_in_store>
|
388 |
+
</item_style1>
|
389 |
+
<item_style2 translate="label">
|
390 |
+
<label>ItemStyle Line 2</label>
|
391 |
+
<frontend_type>text</frontend_type>
|
392 |
+
<sort_order>121</sort_order>
|
393 |
+
<show_in_default>1</show_in_default>
|
394 |
+
<show_in_website>1</show_in_website>
|
395 |
+
<show_in_store>0</show_in_store>
|
396 |
+
</item_style2>
|
397 |
+
<discount_headerstyle translate="label">
|
398 |
+
<label>Discount HeaderStyle</label>
|
399 |
+
<frontend_type>text</frontend_type>
|
400 |
+
<sort_order>123</sort_order>
|
401 |
+
<show_in_default>1</show_in_default>
|
402 |
+
<show_in_website>1</show_in_website>
|
403 |
+
<show_in_store>0</show_in_store>
|
404 |
+
</discount_headerstyle>
|
405 |
+
<discount_style translate="label">
|
406 |
+
<label>Discount Style</label>
|
407 |
+
<frontend_type>text</frontend_type>
|
408 |
+
<sort_order>124</sort_order>
|
409 |
+
<show_in_default>1</show_in_default>
|
410 |
+
<show_in_website>1</show_in_website>
|
411 |
+
<show_in_store>0</show_in_store>
|
412 |
+
</discount_style>
|
413 |
+
<shipping_costs_headerstyle translate="label">
|
414 |
+
<label>Ship.Costs HeaderStyle</label>
|
415 |
+
<frontend_type>text</frontend_type>
|
416 |
+
<sort_order>126</sort_order>
|
417 |
+
<show_in_default>1</show_in_default>
|
418 |
+
<show_in_website>1</show_in_website>
|
419 |
+
<show_in_store>0</show_in_store>
|
420 |
+
</shipping_costs_headerstyle>
|
421 |
+
<shipping_costs_style translate="label">
|
422 |
+
<label>Ship.Costs Style</label>
|
423 |
+
<frontend_type>text</frontend_type>
|
424 |
+
<sort_order>127</sort_order>
|
425 |
+
<show_in_default>1</show_in_default>
|
426 |
+
<show_in_website>1</show_in_website>
|
427 |
+
<show_in_store>0</show_in_store>
|
428 |
+
</shipping_costs_style>
|
429 |
+
<tax_headerstyle translate="label">
|
430 |
+
<label>Tax HeaderStyle</label>
|
431 |
+
<frontend_type>text</frontend_type>
|
432 |
+
<sort_order>129</sort_order>
|
433 |
+
<show_in_default>1</show_in_default>
|
434 |
+
<show_in_website>1</show_in_website>
|
435 |
+
<show_in_store>0</show_in_store>
|
436 |
+
</tax_headerstyle>
|
437 |
+
<tax_style translate="label">
|
438 |
+
<label>Tax Style</label>
|
439 |
+
<frontend_type>text</frontend_type>
|
440 |
+
<sort_order>130</sort_order>
|
441 |
+
<show_in_default>1</show_in_default>
|
442 |
+
<show_in_website>1</show_in_website>
|
443 |
+
<show_in_store>0</show_in_store>
|
444 |
+
</tax_style>
|
445 |
+
<price_header translate="label">
|
446 |
+
<label>Price Header</label>
|
447 |
+
<frontend_type>text</frontend_type>
|
448 |
+
<sort_order>132</sort_order>
|
449 |
+
<show_in_default>1</show_in_default>
|
450 |
+
<show_in_website>1</show_in_website>
|
451 |
+
<show_in_store>0</show_in_store>
|
452 |
+
</price_header>
|
453 |
+
<price_headerstyle translate="label">
|
454 |
+
<label>Price HeaderStyle</label>
|
455 |
+
<frontend_type>text</frontend_type>
|
456 |
+
<sort_order>133</sort_order>
|
457 |
+
<show_in_default>1</show_in_default>
|
458 |
+
<show_in_website>1</show_in_website>
|
459 |
+
<show_in_store>0</show_in_store>
|
460 |
+
</price_headerstyle>
|
461 |
+
<price_style translate="label">
|
462 |
+
<label>Price Style</label>
|
463 |
+
<frontend_type>text</frontend_type>
|
464 |
+
<sort_order>134</sort_order>
|
465 |
+
<show_in_default>1</show_in_default>
|
466 |
+
<show_in_website>1</show_in_website>
|
467 |
+
<show_in_store>0</show_in_store>
|
468 |
+
</price_style>
|
469 |
+
<subtotal_header translate="label">
|
470 |
+
<label>Subtotal Header</label>
|
471 |
+
<frontend_type>text</frontend_type>
|
472 |
+
<sort_order>135</sort_order>
|
473 |
+
<show_in_default>1</show_in_default>
|
474 |
+
<show_in_website>1</show_in_website>
|
475 |
+
<show_in_store>0</show_in_store>
|
476 |
+
</subtotal_header>
|
477 |
+
<subtotal_headerstyle translate="label">
|
478 |
+
<label>Subtotal HeaderStyle</label>
|
479 |
+
<frontend_type>text</frontend_type>
|
480 |
+
<sort_order>136</sort_order>
|
481 |
+
<show_in_default>1</show_in_default>
|
482 |
+
<show_in_website>1</show_in_website>
|
483 |
+
<show_in_store>0</show_in_store>
|
484 |
+
</subtotal_headerstyle>
|
485 |
+
<subtotal_style translate="label">
|
486 |
+
<label>Subtotal Style</label>
|
487 |
+
<frontend_type>text</frontend_type>
|
488 |
+
<sort_order>137</sort_order>
|
489 |
+
<show_in_default>1</show_in_default>
|
490 |
+
<show_in_website>1</show_in_website>
|
491 |
+
<show_in_store>0</show_in_store>
|
492 |
+
</subtotal_style>
|
493 |
+
</fields>
|
494 |
+
</mpay24spsc>
|
495 |
+
|
496 |
+
<update translate="label">
|
497 |
+
<label>Connect</label>
|
498 |
+
<frontend_type>text</frontend_type>
|
499 |
+
<frontend_model>mpay24/update</frontend_model>
|
500 |
+
<sort_order>20</sort_order>
|
501 |
+
<show_in_default>1</show_in_default>
|
502 |
+
<show_in_website>1</show_in_website>
|
503 |
+
<fields>
|
504 |
+
<run>
|
505 |
+
<frontend_type>button</frontend_type>
|
506 |
+
<sort_order>0</sort_order>
|
507 |
+
<show_in_default>1</show_in_default>
|
508 |
+
<show_in_website>1</show_in_website>
|
509 |
+
<show_in_store>1</show_in_store>
|
510 |
+
</run>
|
511 |
+
</fields>
|
512 |
+
</update>
|
513 |
+
|
514 |
+
<global translate="label">
|
515 |
+
<label>Turn off a mPAY24 Solution</label>
|
516 |
+
<frontend_type>text</frontend_type>
|
517 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_global</frontend_model>
|
518 |
+
<sort_order>4</sort_order>
|
519 |
+
<show_in_default>1</show_in_default>
|
520 |
+
<show_in_website>1</show_in_website>
|
521 |
+
<fields>
|
522 |
+
<mpay24_sp_active translate="label">
|
523 |
+
<frontend_type>button</frontend_type>
|
524 |
+
<sort_order>0</sort_order>
|
525 |
+
<show_in_default>1</show_in_default>
|
526 |
+
<show_in_website>1</show_in_website>
|
527 |
+
</mpay24_sp_active>
|
528 |
+
<mpay24_sp_cc translate="label">
|
529 |
+
<label>Credit Cards</label>
|
530 |
+
<config_path>payment/mpay24_sp_cc/in_use</config_path>
|
531 |
+
<frontend_type>checkbox</frontend_type>
|
532 |
+
<sort_order>1</sort_order>
|
533 |
+
<show_in_default>1</show_in_default>
|
534 |
+
<show_in_website>1</show_in_website>
|
535 |
+
</mpay24_sp_cc>
|
536 |
+
<mpay24_sp_eps translate="label">
|
537 |
+
<label>eps Online Bank Transfer</label>
|
538 |
+
<config_path>payment/mpay24_sp_eps/in_use</config_path>
|
539 |
+
<frontend_type>checkbox</frontend_type>
|
540 |
+
<sort_order>2</sort_order>
|
541 |
+
<show_in_default>1</show_in_default>
|
542 |
+
<show_in_website>1</show_in_website>
|
543 |
+
</mpay24_sp_eps>
|
544 |
+
<mpay24_sp_maestro>
|
545 |
+
<label>MAESTRO</label>
|
546 |
+
<config_path>payment/mpay24_sp_maestro/in_use</config_path>
|
547 |
+
<frontend_type>checkbox</frontend_type>
|
548 |
+
<sort_order>3</sort_order>
|
549 |
+
<show_in_default>1</show_in_default>
|
550 |
+
<show_in_website>1</show_in_website>
|
551 |
+
</mpay24_sp_maestro>
|
552 |
+
<mpay24_sp_psc>
|
553 |
+
<label>paysafecard</label>
|
554 |
+
<config_path>payment/mpay24_sp_psc/in_use</config_path>
|
555 |
+
<frontend_type>checkbox</frontend_type>
|
556 |
+
<sort_order>4</sort_order>
|
557 |
+
<show_in_default>1</show_in_default>
|
558 |
+
<show_in_website>1</show_in_website>
|
559 |
+
</mpay24_sp_psc>
|
560 |
+
<mpay24_sp_giropay>
|
561 |
+
<label>giropay (Online-Überweisung für DE)</label>
|
562 |
+
<config_path>payment/mpay24_sp_giropay/in_use</config_path>
|
563 |
+
<frontend_type>checkbox</frontend_type>
|
564 |
+
<sort_order>5</sort_order>
|
565 |
+
<show_in_default>1</show_in_default>
|
566 |
+
<show_in_website>1</show_in_website>
|
567 |
+
</mpay24_sp_giropay>
|
568 |
+
<mpay24_sp_paypal translate="label comment">
|
569 |
+
<label>PayPal</label>
|
570 |
+
<config_path>payment/mpay24_sp_paypal/in_use</config_path>
|
571 |
+
<frontend_type>checkbox</frontend_type>
|
572 |
+
<sort_order>6</sort_order>
|
573 |
+
<show_in_default>1</show_in_default>
|
574 |
+
<show_in_website>1</show_in_website>
|
575 |
+
</mpay24_sp_paypal>
|
576 |
+
<mpay24_sp_cashTicket translate="label comment">
|
577 |
+
<label>Cash-Ticket</label>
|
578 |
+
<config_path>payment/mpay24_sp_cashTicket/in_use</config_path>
|
579 |
+
<frontend_type>checkbox</frontend_type>
|
580 |
+
<sort_order>7</sort_order>
|
581 |
+
<show_in_default>1</show_in_default>
|
582 |
+
<show_in_website>1</show_in_website>
|
583 |
+
</mpay24_sp_cashTicket>
|
584 |
+
<mpay24_sp_cb translate="label comment">
|
585 |
+
<label>Carte Bleue</label>
|
586 |
+
<config_path>payment/mpay24_sp_cb/in_use</config_path>
|
587 |
+
<frontend_type>checkbox</frontend_type>
|
588 |
+
<sort_order>8</sort_order>
|
589 |
+
<show_in_default>1</show_in_default>
|
590 |
+
<show_in_website>1</show_in_website>
|
591 |
+
</mpay24_sp_cb>
|
592 |
+
<mpay24_sp_mpass>
|
593 |
+
<label>mpass</label>
|
594 |
+
<config_path>payment/mpay24_sp_mpass/in_use</config_path>
|
595 |
+
<frontend_type>checkbox</frontend_type>
|
596 |
+
<sort_order>9</sort_order>
|
597 |
+
<show_in_default>1</show_in_default>
|
598 |
+
<show_in_website>1</show_in_website>
|
599 |
+
</mpay24_sp_mpass>
|
600 |
+
<mpay24_sp_paybox translate="label comment">
|
601 |
+
<label>paybox - Pay with mobile phone</label>
|
602 |
+
<config_path>payment/mpay24_sp_paybox/in_use</config_path>
|
603 |
+
<frontend_type>checkbox</frontend_type>
|
604 |
+
<sort_order>10</sort_order>
|
605 |
+
<show_in_default>1</show_in_default>
|
606 |
+
<show_in_website>1</show_in_website>
|
607 |
+
</mpay24_sp_paybox>
|
608 |
+
<mpay24_sp_elv>
|
609 |
+
<label>Elektronisches Lastschriftverfahren (ELV) über hobex</label>
|
610 |
+
<config_path>payment/mpay24_sp_elv/in_use</config_path>
|
611 |
+
<frontend_type>checkbox</frontend_type>
|
612 |
+
<sort_order>11</sort_order>
|
613 |
+
<show_in_default>1</show_in_default>
|
614 |
+
<show_in_website>1</show_in_website>
|
615 |
+
</mpay24_sp_elv>
|
616 |
+
</fields>
|
617 |
+
</global>
|
618 |
+
<mpay24_sp_cc translate="label" module="mpay24">
|
619 |
+
<label>Credit Cards</label>
|
620 |
+
<frontend_type>text</frontend_type>
|
621 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
622 |
+
<sort_order>5</sort_order>
|
623 |
+
<show_in_default>1</show_in_default>
|
624 |
+
<show_in_website>1</show_in_website>
|
625 |
+
<fields>
|
626 |
+
<payment_action translate="label">
|
627 |
+
<label>Payment Action</label>
|
628 |
+
<frontend_type>select</frontend_type>
|
629 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
630 |
+
<config_path>payment/mpay24_sp_cc/payment_action</config_path>
|
631 |
+
<sort_order>2</sort_order>
|
632 |
+
</payment_action>
|
633 |
+
<order_status translate="label">
|
634 |
+
<label>New order status</label>
|
635 |
+
<frontend_type>select</frontend_type>
|
636 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
637 |
+
<config_path>payment/mpay24_sp_cc/order_status</config_path>
|
638 |
+
<sort_order>3</sort_order>
|
639 |
+
<show_in_default>1</show_in_default>
|
640 |
+
<show_in_website>1</show_in_website>
|
641 |
+
</order_status>
|
642 |
+
<cctypes translate="label">
|
643 |
+
<label>Credit Card Types</label>
|
644 |
+
<frontend_type>multiselect</frontend_type>
|
645 |
+
<source_model>mpay24/source_cctype</source_model>
|
646 |
+
<config_path>payment/mpay24_sp_cc/cctypes</config_path>
|
647 |
+
<sort_order>4</sort_order>
|
648 |
+
<show_in_default>1</show_in_default>
|
649 |
+
<show_in_website>1</show_in_website>
|
650 |
+
</cctypes>
|
651 |
+
<allowspecific translate="label">
|
652 |
+
<label>Payment from applicable countries</label>
|
653 |
+
<frontend_type>select</frontend_type>
|
654 |
+
<config_path>payment/mpay24_sp_cc/allowspecific</config_path>
|
655 |
+
<sort_order>5</sort_order>
|
656 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
657 |
+
<show_in_default>1</show_in_default>
|
658 |
+
<show_in_website>1</show_in_website>
|
659 |
+
</allowspecific>
|
660 |
+
<specificcountry translate="label">
|
661 |
+
<label>Payment from Specific countries</label>
|
662 |
+
<frontend_type>multiselect</frontend_type>
|
663 |
+
<config_path>payment/mpay24_sp_cc/specificcountry</config_path>
|
664 |
+
<sort_order>6</sort_order>
|
665 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
666 |
+
<show_in_default>1</show_in_default>
|
667 |
+
<show_in_website>1</show_in_website>
|
668 |
+
<depends><allowspecific>1</allowspecific></depends>
|
669 |
+
</specificcountry>
|
670 |
+
<min_order_total translate="label">
|
671 |
+
<label>Minimum Order Total</label>
|
672 |
+
<frontend_type>text</frontend_type>
|
673 |
+
<config_path>payment/mpay24_sp_cc/min_order_total</config_path>
|
674 |
+
<sort_order>7</sort_order>
|
675 |
+
<show_in_default>1</show_in_default>
|
676 |
+
<show_in_website>1</show_in_website>
|
677 |
+
</min_order_total>
|
678 |
+
<max_order_total translate="label">
|
679 |
+
<label>Maximum Order Total</label>
|
680 |
+
<frontend_type>text</frontend_type>
|
681 |
+
<config_path>payment/mpay24_sp_cc/max_order_total</config_path>
|
682 |
+
<sort_order>8</sort_order>
|
683 |
+
<show_in_default>1</show_in_default>
|
684 |
+
<show_in_website>1</show_in_website>
|
685 |
+
</max_order_total>
|
686 |
+
</fields>
|
687 |
+
</mpay24_sp_cc>
|
688 |
+
<mpay24_sp_elv translate="label" module="mpay24">
|
689 |
+
<label>Elektronisches Lastschriftverfahren (ELV) über hobex</label>
|
690 |
+
<frontend_type>text</frontend_type>
|
691 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
692 |
+
<sort_order>14</sort_order>
|
693 |
+
<show_in_default>1</show_in_default>
|
694 |
+
<show_in_website>1</show_in_website>
|
695 |
+
<fields>
|
696 |
+
<payment_action translate="label">
|
697 |
+
<label>Payment Action</label>
|
698 |
+
<frontend_type>select</frontend_type>
|
699 |
+
<config_path>payment/mpay24_sp_elv/payment_action</config_path>
|
700 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
701 |
+
<sort_order>3</sort_order>
|
702 |
+
</payment_action>
|
703 |
+
<order_status translate="label">
|
704 |
+
<label>New order status</label>
|
705 |
+
<frontend_type>select</frontend_type>
|
706 |
+
<config_path>payment/mpay24_sp_elv/order_status</config_path>
|
707 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
708 |
+
<sort_order>2</sort_order>
|
709 |
+
<show_in_default>1</show_in_default>
|
710 |
+
<show_in_website>1</show_in_website>
|
711 |
+
</order_status>
|
712 |
+
<allowspecific translate="label">
|
713 |
+
<label>Payment from applicable countries</label>
|
714 |
+
<frontend_type>select</frontend_type>
|
715 |
+
<config_path>payment/mpay24_sp_elv/allowspecific</config_path>
|
716 |
+
<sort_order>3</sort_order>
|
717 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
718 |
+
<show_in_default>1</show_in_default>
|
719 |
+
<show_in_website>1</show_in_website>
|
720 |
+
</allowspecific>
|
721 |
+
<specificcountry translate="label">
|
722 |
+
<label>Payment from Specific countries</label>
|
723 |
+
<frontend_type>multiselect</frontend_type>
|
724 |
+
<config_path>payment/mpay24_sp_elv/specificcountry</config_path>
|
725 |
+
<sort_order>4</sort_order>
|
726 |
+
<source_model>mpay24/source_elvCountryAction</source_model>
|
727 |
+
<show_in_default>1</show_in_default>
|
728 |
+
<show_in_website>1</show_in_website>
|
729 |
+
<depends><allowspecific>1</allowspecific></depends>
|
730 |
+
</specificcountry>
|
731 |
+
<min_order_total translate="label">
|
732 |
+
<label>Minimum Order Total</label>
|
733 |
+
<frontend_type>text</frontend_type>
|
734 |
+
<config_path>payment/mpay24_sp_elv/min_order_total</config_path>
|
735 |
+
<sort_order>5</sort_order>
|
736 |
+
<show_in_default>1</show_in_default>
|
737 |
+
<show_in_website>1</show_in_website>
|
738 |
+
</min_order_total>
|
739 |
+
<max_order_total translate="label">
|
740 |
+
<label>Maximum Order Total</label>
|
741 |
+
<frontend_type>text</frontend_type>
|
742 |
+
<config_path>payment/mpay24_sp_elv/max_order_total</config_path>
|
743 |
+
<sort_order>6</sort_order>
|
744 |
+
<show_in_default>1</show_in_default>
|
745 |
+
<show_in_website>1</show_in_website>
|
746 |
+
</max_order_total>
|
747 |
+
</fields>
|
748 |
+
</mpay24_sp_elv>
|
749 |
+
<mpay24_sp_eps translate="label" module="mpay24">
|
750 |
+
<label>eps Online Bank Transfer</label>
|
751 |
+
<frontend_type>text</frontend_type>
|
752 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
753 |
+
<sort_order>6</sort_order>
|
754 |
+
<show_in_default>1</show_in_default>
|
755 |
+
<show_in_website>1</show_in_website>
|
756 |
+
<fields>
|
757 |
+
<payment_action translate="label">
|
758 |
+
<label>Payment Action</label>
|
759 |
+
<frontend_type>select</frontend_type>
|
760 |
+
<config_path>payment/mpay24_sp_eps/payment_action</config_path>
|
761 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
762 |
+
<sort_order>2</sort_order>
|
763 |
+
</payment_action>
|
764 |
+
<order_status translate="label">
|
765 |
+
<label>New order status</label>
|
766 |
+
<frontend_type>select</frontend_type>
|
767 |
+
<config_path>payment/mpay24_sp_eps/order_status</config_path>
|
768 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
769 |
+
<sort_order>5</sort_order>
|
770 |
+
<show_in_default>1</show_in_default>
|
771 |
+
<show_in_website>1</show_in_website>
|
772 |
+
</order_status>
|
773 |
+
<epstypes translate="label">
|
774 |
+
<label>Brand</label>
|
775 |
+
<frontend_type>multiselect</frontend_type>
|
776 |
+
<config_path>payment/mpay24_sp_eps/epstypes</config_path>
|
777 |
+
<sort_order>3</sort_order>
|
778 |
+
<source_model>mpay24/source_epsTypesAction</source_model>
|
779 |
+
<show_in_default>1</show_in_default>
|
780 |
+
<show_in_website>1</show_in_website>
|
781 |
+
</epstypes>
|
782 |
+
<allowspecific translate="label">
|
783 |
+
<label>Payment from applicable countries</label>
|
784 |
+
<frontend_type>select</frontend_type>
|
785 |
+
<config_path>payment/mpay24_sp_eps/allowspecific</config_path>
|
786 |
+
<sort_order>4</sort_order>
|
787 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
788 |
+
<show_in_default>1</show_in_default>
|
789 |
+
<show_in_website>1</show_in_website>
|
790 |
+
</allowspecific>
|
791 |
+
<specificcountry translate="label">
|
792 |
+
<label>Payment from Specific countries</label>
|
793 |
+
<frontend_type>multiselect</frontend_type>
|
794 |
+
<config_path>payment/mpay24_sp_eps/specificcountry</config_path>
|
795 |
+
<sort_order>5</sort_order>
|
796 |
+
<source_model>mpay24/source_epsCountryAction</source_model>
|
797 |
+
<show_in_default>1</show_in_default>
|
798 |
+
<show_in_website>1</show_in_website>
|
799 |
+
<depends><allowspecific>1</allowspecific></depends>
|
800 |
+
</specificcountry>
|
801 |
+
<min_order_total translate="label">
|
802 |
+
<label>Minimum Order Total</label>
|
803 |
+
<frontend_type>text</frontend_type>
|
804 |
+
<config_path>payment/mpay24_sp_eps/min_order_total</config_path>
|
805 |
+
<sort_order>6</sort_order>
|
806 |
+
<show_in_default>1</show_in_default>
|
807 |
+
<show_in_website>1</show_in_website>
|
808 |
+
</min_order_total>
|
809 |
+
<max_order_total translate="label">
|
810 |
+
<label>Maximum Order Total</label>
|
811 |
+
<frontend_type>text</frontend_type>
|
812 |
+
<config_path>payment/mpay24_sp_eps/max_order_total</config_path>
|
813 |
+
<sort_order>7</sort_order>
|
814 |
+
<show_in_default>1</show_in_default>
|
815 |
+
<show_in_website>1</show_in_website>
|
816 |
+
</max_order_total>
|
817 |
+
</fields>
|
818 |
+
</mpay24_sp_eps>
|
819 |
+
<mpay24_sp_giropay module="mpay24">
|
820 |
+
<label>giropay (Online-Überweisung für DE)</label>
|
821 |
+
<frontend_type>text</frontend_type>
|
822 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
823 |
+
<sort_order>9</sort_order>
|
824 |
+
<show_in_default>1</show_in_default>
|
825 |
+
<show_in_website>1</show_in_website>
|
826 |
+
<fields>
|
827 |
+
<allowspecific translate="label">
|
828 |
+
<label>Payment from applicable countries</label>
|
829 |
+
<frontend_type>select</frontend_type>
|
830 |
+
<config_path>payment/mpay24_sp_giropay/allowspecific</config_path>
|
831 |
+
<sort_order>2</sort_order>
|
832 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
833 |
+
<show_in_default>1</show_in_default>
|
834 |
+
<show_in_website>1</show_in_website>
|
835 |
+
</allowspecific>
|
836 |
+
<specificcountry translate="label">
|
837 |
+
<label>Payment from Specific countries</label>
|
838 |
+
<frontend_type>multiselect</frontend_type>
|
839 |
+
<config_path>payment/mpay24_sp_giropay/specificcountry</config_path>
|
840 |
+
<sort_order>3</sort_order>
|
841 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
842 |
+
<show_in_default>1</show_in_default>
|
843 |
+
<show_in_website>1</show_in_website>
|
844 |
+
<depends><allowspecific>1</allowspecific></depends>
|
845 |
+
</specificcountry>
|
846 |
+
<min_order_total translate="label">
|
847 |
+
<label>Minimum Order Total</label>
|
848 |
+
<frontend_type>text</frontend_type>
|
849 |
+
<config_path>payment/mpay24_sp_giropay/min_order_total</config_path>
|
850 |
+
<sort_order>4</sort_order>
|
851 |
+
<show_in_default>1</show_in_default>
|
852 |
+
<show_in_website>1</show_in_website>
|
853 |
+
</min_order_total>
|
854 |
+
<max_order_total translate="label">
|
855 |
+
<label>Maximum Order Total</label>
|
856 |
+
<frontend_type>text</frontend_type>
|
857 |
+
<config_path>payment/mpay24_sp_giropay/max_order_total</config_path>
|
858 |
+
<sort_order>5</sort_order>
|
859 |
+
<show_in_default>1</show_in_default>
|
860 |
+
<show_in_website>1</show_in_website>
|
861 |
+
</max_order_total>
|
862 |
+
</fields>
|
863 |
+
</mpay24_sp_giropay>
|
864 |
+
<mpay24_sp_maestro module="mpay24">
|
865 |
+
<label>MAESTRO</label>
|
866 |
+
<frontend_type>text</frontend_type>
|
867 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
868 |
+
<sort_order>7</sort_order>
|
869 |
+
<show_in_default>1</show_in_default>
|
870 |
+
<show_in_website>1</show_in_website>
|
871 |
+
<fields>
|
872 |
+
<order_status translate="label">
|
873 |
+
<label>New order status</label>
|
874 |
+
<frontend_type>select</frontend_type>
|
875 |
+
<config_path>payment/mpay24_sp_maestro/order_status</config_path>
|
876 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
877 |
+
<sort_order>2</sort_order>
|
878 |
+
<show_in_default>1</show_in_default>
|
879 |
+
<show_in_website>1</show_in_website>
|
880 |
+
</order_status>
|
881 |
+
<allowspecific translate="label">
|
882 |
+
<label>Payment from applicable countries</label>
|
883 |
+
<frontend_type>select</frontend_type>
|
884 |
+
<config_path>payment/mpay24_sp_maestro/allowspecific</config_path>
|
885 |
+
<sort_order>3</sort_order>
|
886 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
887 |
+
<show_in_default>1</show_in_default>
|
888 |
+
<show_in_website>1</show_in_website>
|
889 |
+
</allowspecific>
|
890 |
+
<specificcountry translate="label">
|
891 |
+
<label>Payment from Specific countries</label>
|
892 |
+
<frontend_type>multiselect</frontend_type>
|
893 |
+
<config_path>payment/mpay24_sp_maestro/specificcountry</config_path>
|
894 |
+
<sort_order>4</sort_order>
|
895 |
+
<source_model>mpay24/source_maestroCountryAction</source_model>
|
896 |
+
<show_in_default>1</show_in_default>
|
897 |
+
<show_in_website>1</show_in_website>
|
898 |
+
<depends><allowspecific>1</allowspecific></depends>
|
899 |
+
</specificcountry>
|
900 |
+
<min_order_total translate="label">
|
901 |
+
<label>Minimum Order Total</label>
|
902 |
+
<frontend_type>text</frontend_type>
|
903 |
+
<config_path>payment/mpay24_sp_maestro/min_order_total</config_path>
|
904 |
+
<sort_order>5</sort_order>
|
905 |
+
<show_in_default>1</show_in_default>
|
906 |
+
<show_in_website>1</show_in_website>
|
907 |
+
</min_order_total>
|
908 |
+
<max_order_total translate="label">
|
909 |
+
<label>Maximum Order Total</label>
|
910 |
+
<frontend_type>text</frontend_type>
|
911 |
+
<config_path>payment/mpay24_sp_maestro/max_order_total</config_path>
|
912 |
+
<sort_order>6</sort_order>
|
913 |
+
<show_in_default>1</show_in_default>
|
914 |
+
<show_in_website>1</show_in_website>
|
915 |
+
</max_order_total>
|
916 |
+
</fields>
|
917 |
+
</mpay24_sp_maestro>
|
918 |
+
<mpay24_sp_paybox translate="label" module="mpay24">
|
919 |
+
<label>paybox - Pay with mobile phone</label>
|
920 |
+
<frontend_type>text</frontend_type>
|
921 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
922 |
+
<sort_order>13</sort_order>
|
923 |
+
<show_in_default>1</show_in_default>
|
924 |
+
<show_in_website>1</show_in_website>
|
925 |
+
<fields>
|
926 |
+
<payment_action translate="label">
|
927 |
+
<label>Payment Action</label>
|
928 |
+
<frontend_type>select</frontend_type>
|
929 |
+
<config_path>payment/mpay24_sp_paybox/payment_action</config_path>
|
930 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
931 |
+
<sort_order>2</sort_order>
|
932 |
+
</payment_action>
|
933 |
+
<order_status translate="label">
|
934 |
+
<label>New order status</label>
|
935 |
+
<frontend_type>select</frontend_type>
|
936 |
+
<config_path>payment/mpay24_sp_paybox/order_status</config_path>
|
937 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
938 |
+
<sort_order>3</sort_order>
|
939 |
+
<show_in_default>1</show_in_default>
|
940 |
+
<show_in_website>1</show_in_website>
|
941 |
+
</order_status>
|
942 |
+
<allowspecific translate="label">
|
943 |
+
<label>Payment from applicable countries</label>
|
944 |
+
<frontend_type>select</frontend_type>
|
945 |
+
<config_path>payment/mpay24_sp_paybox/allowspecific</config_path>
|
946 |
+
<sort_order>4</sort_order>
|
947 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
948 |
+
<show_in_default>1</show_in_default>
|
949 |
+
<show_in_website>1</show_in_website>
|
950 |
+
</allowspecific>
|
951 |
+
<specificcountry translate="label">
|
952 |
+
<label>Payment from Specific countries</label>
|
953 |
+
<frontend_type>multiselect</frontend_type>
|
954 |
+
<config_path>payment/mpay24_sp_paybox/specificcountry</config_path>
|
955 |
+
<sort_order>5</sort_order>
|
956 |
+
<source_model>mpay24/source_payboxCountryAction</source_model>
|
957 |
+
<show_in_default>1</show_in_default>
|
958 |
+
<show_in_website>1</show_in_website>
|
959 |
+
<depends><allowspecific>1</allowspecific></depends>
|
960 |
+
</specificcountry>
|
961 |
+
<min_order_total translate="label">
|
962 |
+
<label>Minimum Order Total</label>
|
963 |
+
<frontend_type>text</frontend_type>
|
964 |
+
<config_path>payment/mpay24_sp_paybox/min_order_total</config_path>
|
965 |
+
<sort_order>6</sort_order>
|
966 |
+
<show_in_default>1</show_in_default>
|
967 |
+
<show_in_website>1</show_in_website>
|
968 |
+
</min_order_total>
|
969 |
+
<max_order_total translate="label">
|
970 |
+
<label>Maximum Order Total</label>
|
971 |
+
<frontend_type>text</frontend_type>
|
972 |
+
<config_path>payment/mpay24_sp_paybox/max_order_total</config_path>
|
973 |
+
<sort_order>7</sort_order>
|
974 |
+
<show_in_default>1</show_in_default>
|
975 |
+
<show_in_website>1</show_in_website>
|
976 |
+
</max_order_total>
|
977 |
+
</fields>
|
978 |
+
</mpay24_sp_paybox>
|
979 |
+
<mpay24_sp_psc module="mpay24">
|
980 |
+
<label>paysafecard</label>
|
981 |
+
<frontend_type>text</frontend_type>
|
982 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
983 |
+
<sort_order>8</sort_order>
|
984 |
+
<show_in_default>1</show_in_default>
|
985 |
+
<show_in_website>1</show_in_website>
|
986 |
+
<fields>
|
987 |
+
<order_status translate="label">
|
988 |
+
<label>New order status</label>
|
989 |
+
<frontend_type>select</frontend_type>
|
990 |
+
<config_path>payment/mpay24_sp_psc/order_status</config_path>
|
991 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
992 |
+
<sort_order>2</sort_order>
|
993 |
+
<show_in_default>1</show_in_default>
|
994 |
+
<show_in_website>1</show_in_website>
|
995 |
+
</order_status>
|
996 |
+
<allowspecific translate="label">
|
997 |
+
<label>Payment from applicable countries</label>
|
998 |
+
<frontend_type>select</frontend_type>
|
999 |
+
<config_path>payment/mpay24_sp_psc/allowspecific</config_path>
|
1000 |
+
<sort_order>3</sort_order>
|
1001 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1002 |
+
<show_in_default>1</show_in_default>
|
1003 |
+
<show_in_website>1</show_in_website>
|
1004 |
+
</allowspecific>
|
1005 |
+
<specificcountry translate="label">
|
1006 |
+
<label>Payment from Specific countries</label>
|
1007 |
+
<frontend_type>multiselect</frontend_type>
|
1008 |
+
<config_path>payment/mpay24_sp_psc/specificcountry</config_path>
|
1009 |
+
<sort_order>4</sort_order>
|
1010 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1011 |
+
<show_in_default>1</show_in_default>
|
1012 |
+
<show_in_website>1</show_in_website>
|
1013 |
+
<depends><allowspecific>1</allowspecific></depends>
|
1014 |
+
</specificcountry>
|
1015 |
+
<min_order_total translate="label">
|
1016 |
+
<label>Minimum Order Total</label>
|
1017 |
+
<frontend_type>text</frontend_type>
|
1018 |
+
<config_path>payment/mpay24_sp_psc/min_order_total</config_path>
|
1019 |
+
<sort_order>5</sort_order>
|
1020 |
+
<show_in_default>1</show_in_default>
|
1021 |
+
<show_in_website>1</show_in_website>
|
1022 |
+
</min_order_total>
|
1023 |
+
<max_order_total translate="label">
|
1024 |
+
<label>Maximum Order Total</label>
|
1025 |
+
<frontend_type>text</frontend_type>
|
1026 |
+
<config_path>payment/mpay24_sp_psc/max_order_total</config_path>
|
1027 |
+
<sort_order>6</sort_order>
|
1028 |
+
<show_in_default>1</show_in_default>
|
1029 |
+
<show_in_website>1</show_in_website>
|
1030 |
+
</max_order_total>
|
1031 |
+
</fields>
|
1032 |
+
</mpay24_sp_psc>
|
1033 |
+
<mpay24_sp_paypal module="mpay24">
|
1034 |
+
<label>PayPal</label>
|
1035 |
+
<frontend_type>text</frontend_type>
|
1036 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
1037 |
+
<sort_order>10</sort_order>
|
1038 |
+
<show_in_default>1</show_in_default>
|
1039 |
+
<show_in_website>1</show_in_website>
|
1040 |
+
<fields>
|
1041 |
+
<payment_action translate="label">
|
1042 |
+
<label>Payment Action</label>
|
1043 |
+
<frontend_type>select</frontend_type>
|
1044 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
1045 |
+
<config_path>payment/mpay24_sp_paypal/payment_action</config_path>
|
1046 |
+
<sort_order>2</sort_order>
|
1047 |
+
</payment_action>
|
1048 |
+
<order_status translate="label">
|
1049 |
+
<label>New order status</label>
|
1050 |
+
<frontend_type>select</frontend_type>
|
1051 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
1052 |
+
<config_path>payment/mpay24_sp_paypal/order_status</config_path>
|
1053 |
+
<sort_order>3</sort_order>
|
1054 |
+
<show_in_default>1</show_in_default>
|
1055 |
+
<show_in_website>1</show_in_website>
|
1056 |
+
</order_status>
|
1057 |
+
<allowspecific translate="label">
|
1058 |
+
<label>Payment from applicable countries</label>
|
1059 |
+
<frontend_type>select</frontend_type>
|
1060 |
+
<config_path>payment/mpay24_sp_paypal/allowspecific</config_path>
|
1061 |
+
<sort_order>5</sort_order>
|
1062 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1063 |
+
<show_in_default>1</show_in_default>
|
1064 |
+
<show_in_website>1</show_in_website>
|
1065 |
+
</allowspecific>
|
1066 |
+
<specificcountry translate="label">
|
1067 |
+
<label>Payment from Specific countries</label>
|
1068 |
+
<frontend_type>multiselect</frontend_type>
|
1069 |
+
<config_path>payment/mpay24_sp_paypal/specificcountry</config_path>
|
1070 |
+
<sort_order>6</sort_order>
|
1071 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1072 |
+
<show_in_default>1</show_in_default>
|
1073 |
+
<show_in_website>1</show_in_website>
|
1074 |
+
<depends><allowspecific>1</allowspecific></depends>
|
1075 |
+
</specificcountry>
|
1076 |
+
<min_order_total translate="label">
|
1077 |
+
<label>Minimum Order Total</label>
|
1078 |
+
<frontend_type>text</frontend_type>
|
1079 |
+
<config_path>payment/mpay24_sp_paypal/min_order_total</config_path>
|
1080 |
+
<sort_order>7</sort_order>
|
1081 |
+
<show_in_default>1</show_in_default>
|
1082 |
+
<show_in_website>1</show_in_website>
|
1083 |
+
</min_order_total>
|
1084 |
+
<max_order_total translate="label">
|
1085 |
+
<label>Maximum Order Total</label>
|
1086 |
+
<frontend_type>text</frontend_type>
|
1087 |
+
<config_path>payment/mpay24_sp_paypal/max_order_total</config_path>
|
1088 |
+
<sort_order>8</sort_order>
|
1089 |
+
<show_in_default>1</show_in_default>
|
1090 |
+
<show_in_website>1</show_in_website>
|
1091 |
+
</max_order_total>
|
1092 |
+
</fields>
|
1093 |
+
</mpay24_sp_paypal>
|
1094 |
+
<mpay24_sp_mpass module="mpay24">
|
1095 |
+
<label>mpass</label>
|
1096 |
+
<frontend_type>text</frontend_type>
|
1097 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
1098 |
+
<sort_order>12</sort_order>
|
1099 |
+
<show_in_default>1</show_in_default>
|
1100 |
+
<show_in_website>1</show_in_website>
|
1101 |
+
<fields>
|
1102 |
+
<payment_action translate="label">
|
1103 |
+
<label>Payment Action</label>
|
1104 |
+
<frontend_type>select</frontend_type>
|
1105 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
1106 |
+
<config_path>payment/mpay24_sp_mpass/payment_action</config_path>
|
1107 |
+
<sort_order>2</sort_order>
|
1108 |
+
</payment_action>
|
1109 |
+
<order_status translate="label">
|
1110 |
+
<label>New order status</label>
|
1111 |
+
<frontend_type>select</frontend_type>
|
1112 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
1113 |
+
<config_path>payment/mpay24_sp_mpass/order_status</config_path>
|
1114 |
+
<sort_order>3</sort_order>
|
1115 |
+
<show_in_default>1</show_in_default>
|
1116 |
+
<show_in_website>1</show_in_website>
|
1117 |
+
</order_status>
|
1118 |
+
<allowspecific translate="label">
|
1119 |
+
<label>Payment from applicable countries</label>
|
1120 |
+
<frontend_type>select</frontend_type>
|
1121 |
+
<config_path>payment/mpay24_sp_mpass/allowspecific</config_path>
|
1122 |
+
<sort_order>5</sort_order>
|
1123 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1124 |
+
<show_in_default>1</show_in_default>
|
1125 |
+
<show_in_website>1</show_in_website>
|
1126 |
+
</allowspecific>
|
1127 |
+
<specificcountry translate="label">
|
1128 |
+
<label>Payment from Specific countries</label>
|
1129 |
+
<frontend_type>multiselect</frontend_type>
|
1130 |
+
<config_path>payment/mpay24_sp_mpass/specificcountry</config_path>
|
1131 |
+
<sort_order>6</sort_order>
|
1132 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1133 |
+
<show_in_default>1</show_in_default>
|
1134 |
+
<show_in_website>1</show_in_website>
|
1135 |
+
<depends><allowspecific>1</allowspecific></depends>
|
1136 |
+
</specificcountry>
|
1137 |
+
<min_order_total translate="label">
|
1138 |
+
<label>Minimum Order Total</label>
|
1139 |
+
<frontend_type>text</frontend_type>
|
1140 |
+
<config_path>payment/mpay24_sp_mpass/min_order_total</config_path>
|
1141 |
+
<sort_order>7</sort_order>
|
1142 |
+
<show_in_default>1</show_in_default>
|
1143 |
+
<show_in_website>1</show_in_website>
|
1144 |
+
</min_order_total>
|
1145 |
+
<max_order_total translate="label">
|
1146 |
+
<label>Maximum Order Total</label>
|
1147 |
+
<frontend_type>text</frontend_type>
|
1148 |
+
<config_path>payment/mpay24_sp_mpass/max_order_total</config_path>
|
1149 |
+
<sort_order>8</sort_order>
|
1150 |
+
<show_in_default>1</show_in_default>
|
1151 |
+
<show_in_website>1</show_in_website>
|
1152 |
+
</max_order_total>
|
1153 |
+
</fields>
|
1154 |
+
</mpay24_sp_mpass>
|
1155 |
+
<mpay24_sp_cashTicket module="mpay24">
|
1156 |
+
<label>Cash-Ticket</label>
|
1157 |
+
<frontend_type>text</frontend_type>
|
1158 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
1159 |
+
<sort_order>11</sort_order>
|
1160 |
+
<show_in_default>1</show_in_default>
|
1161 |
+
<show_in_website>1</show_in_website>
|
1162 |
+
<fields>
|
1163 |
+
<payment_action translate="label">
|
1164 |
+
<label>Payment Action</label>
|
1165 |
+
<frontend_type>select</frontend_type>
|
1166 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
1167 |
+
<config_path>payment/mpay24_sp_cashTicket/payment_action</config_path>
|
1168 |
+
<sort_order>2</sort_order>
|
1169 |
+
</payment_action>
|
1170 |
+
<order_status translate="label">
|
1171 |
+
<label>New order status</label>
|
1172 |
+
<frontend_type>select</frontend_type>
|
1173 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
1174 |
+
<config_path>payment/mpay24_sp_cashTicket/order_status</config_path>
|
1175 |
+
<sort_order>3</sort_order>
|
1176 |
+
<show_in_default>1</show_in_default>
|
1177 |
+
<show_in_website>1</show_in_website>
|
1178 |
+
</order_status>
|
1179 |
+
<allowspecific translate="label">
|
1180 |
+
<label>Payment from applicable countries</label>
|
1181 |
+
<frontend_type>select</frontend_type>
|
1182 |
+
<config_path>payment/mpay24_sp_cashTicket/allowspecific</config_path>
|
1183 |
+
<sort_order>5</sort_order>
|
1184 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1185 |
+
<show_in_default>1</show_in_default>
|
1186 |
+
<show_in_website>1</show_in_website>
|
1187 |
+
</allowspecific>
|
1188 |
+
<specificcountry translate="label">
|
1189 |
+
<label>Payment from Specific countries</label>
|
1190 |
+
<frontend_type>multiselect</frontend_type>
|
1191 |
+
<config_path>payment/mpay24_sp_cashTicket/specificcountry</config_path>
|
1192 |
+
<sort_order>6</sort_order>
|
1193 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1194 |
+
<show_in_default>1</show_in_default>
|
1195 |
+
<show_in_website>1</show_in_website>
|
1196 |
+
<depends><allowspecific>1</allowspecific></depends>
|
1197 |
+
</specificcountry>
|
1198 |
+
<min_order_total translate="label">
|
1199 |
+
<label>Minimum Order Total</label>
|
1200 |
+
<frontend_type>text</frontend_type>
|
1201 |
+
<config_path>payment/mpay24_sp_cashTicket/min_order_total</config_path>
|
1202 |
+
<sort_order>7</sort_order>
|
1203 |
+
<show_in_default>1</show_in_default>
|
1204 |
+
<show_in_website>1</show_in_website>
|
1205 |
+
</min_order_total>
|
1206 |
+
<max_order_total translate="label">
|
1207 |
+
<label>Maximum Order Total</label>
|
1208 |
+
<frontend_type>text</frontend_type>
|
1209 |
+
<config_path>payment/mpay24_sp_cashTicket/max_order_total</config_path>
|
1210 |
+
<sort_order>8</sort_order>
|
1211 |
+
<show_in_default>1</show_in_default>
|
1212 |
+
<show_in_website>1</show_in_website>
|
1213 |
+
</max_order_total>
|
1214 |
+
</fields>
|
1215 |
+
</mpay24_sp_cashTicket>
|
1216 |
+
<mpay24_sp_cb module="mpay24">
|
1217 |
+
<label>Carte Bleue</label>
|
1218 |
+
<frontend_type>text</frontend_type>
|
1219 |
+
<frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
|
1220 |
+
<sort_order>12</sort_order>
|
1221 |
+
<show_in_default>1</show_in_default>
|
1222 |
+
<show_in_website>1</show_in_website>
|
1223 |
+
<fields>
|
1224 |
+
<payment_action translate="label">
|
1225 |
+
<label>Payment Action</label>
|
1226 |
+
<frontend_type>select</frontend_type>
|
1227 |
+
<source_model>mpay24/source_clearingAction</source_model>
|
1228 |
+
<config_path>payment/mpay24_sp_cb/payment_action</config_path>
|
1229 |
+
<sort_order>2</sort_order>
|
1230 |
+
</payment_action>
|
1231 |
+
<order_status translate="label">
|
1232 |
+
<label>New order status</label>
|
1233 |
+
<frontend_type>select</frontend_type>
|
1234 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
1235 |
+
<config_path>payment/mpay24_sp_cb/order_status</config_path>
|
1236 |
+
<sort_order>3</sort_order>
|
1237 |
+
<show_in_default>1</show_in_default>
|
1238 |
+
<show_in_website>1</show_in_website>
|
1239 |
+
</order_status>
|
1240 |
+
<allowspecific translate="label">
|
1241 |
+
<label>Payment from applicable countries</label>
|
1242 |
+
<frontend_type>select</frontend_type>
|
1243 |
+
<config_path>payment/mpay24_sp_cb/allowspecific</config_path>
|
1244 |
+
<sort_order>5</sort_order>
|
1245 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1246 |
+
<show_in_default>1</show_in_default>
|
1247 |
+
<show_in_website>1</show_in_website>
|
1248 |
+
</allowspecific>
|
1249 |
+
<specificcountry translate="label">
|
1250 |
+
<label>Payment from Specific countries</label>
|
1251 |
+
<frontend_type>multiselect</frontend_type>
|
1252 |
+
<config_path>payment/mpay24_sp_cb/specificcountry</config_path>
|
1253 |
+
<sort_order>6</sort_order>
|
1254 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1255 |
+
<show_in_default>1</show_in_default>
|
1256 |
+
<show_in_website>1</show_in_website>
|
1257 |
+
<depends><allowspecific>1</allowspecific></depends>
|
1258 |
+
</specificcountry>
|
1259 |
+
<min_order_total translate="label">
|
1260 |
+
<label>Minimum Order Total</label>
|
1261 |
+
<frontend_type>text</frontend_type>
|
1262 |
+
<config_path>payment/mpay24_sp_cb/min_order_total</config_path>
|
1263 |
+
<sort_order>7</sort_order>
|
1264 |
+
<show_in_default>1</show_in_default>
|
1265 |
+
<show_in_website>1</show_in_website>
|
1266 |
+
</min_order_total>
|
1267 |
+
<max_order_total translate="label">
|
1268 |
+
<label>Maximum Order Total</label>
|
1269 |
+
<frontend_type>text</frontend_type>
|
1270 |
+
<config_path>payment/mpay24_sp_cb/max_order_total</config_path>
|
1271 |
+
<sort_order>8</sort_order>
|
1272 |
+
<show_in_default>1</show_in_default>
|
1273 |
+
<show_in_website>1</show_in_website>
|
1274 |
+
</max_order_total>
|
1275 |
+
</fields>
|
1276 |
+
</mpay24_sp_cb>
|
1277 |
+
</groups>
|
1278 |
+
</mpay24>
|
1279 |
+
</sections>
|
1280 |
+
</config>
|
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-install-1.1.8.php
ADDED
@@ -0,0 +1,42 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
$this->startSetup();
|
22 |
+
|
23 |
+
$this->run("
|
24 |
+
|
25 |
+
-- DROP TABLE if exists {$this->getTable('mpay24_debug')};
|
26 |
+
CREATE TABLE {$this->getTable('mpay24_debug')} (
|
27 |
+
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
28 |
+
`request_body` text,
|
29 |
+
`response_body` text,
|
30 |
+
`request_serialized` text,
|
31 |
+
`result_serialized` text,
|
32 |
+
`request_dump` text,
|
33 |
+
`result_dump` text,
|
34 |
+
`time_stamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
35 |
+
ON UPDATE CURRENT_TIMESTAMP,
|
36 |
+
PRIMARY KEY (`debug_id`)
|
37 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
38 |
+
|
39 |
+
");
|
40 |
+
|
41 |
+
$this->endSetup();
|
42 |
+
?>
|
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-uninstall-1.1.8.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
$code = 'mpay24';
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
$installer->run("
|
26 |
+
DROP TABLE if exists {$this->getTable('mpay24_debug')};
|
27 |
+
");
|
28 |
+
$installer->endSetup();
|
29 |
+
?>
|
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-0.6.2-1.1.8.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
$code = 'mpay24';
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
$installer->run("
|
26 |
+
DROP TABLE if exists {$this->getTable('mpay24_debug')};
|
27 |
+
");
|
28 |
+
$installer->endSetup();
|
29 |
+
?>
|
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-0.6.3-1.1.8.php
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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
$code = 'mpay24';
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
$installer->startSetup();
|
25 |
+
$installer->run("
|
26 |
+
DROP TABLE if exists {$this->getTable('mpay24_debug')};
|
27 |
+
");
|
28 |
+
$installer->endSetup();
|
29 |
+
?>
|
app/design/adminhtml/default/default/template/mpay24/info/ajaxRequest.txt
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
tid = 100000037
|
app/design/adminhtml/default/default/template/mpay24/info/cc.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<!--<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/> -->
|
22 |
+
<!--<?php echo Mage::helper('mpay24')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br/>-->
|
23 |
+
<?php echo Mage::helper('mpay24')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
|
24 |
+
<?php echo Mage::helper('mpay24')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
|
25 |
+
<?php echo Mage::helper('mpay24')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?><br/>
|
26 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/elv.phtml
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/>
|
22 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?><br/>
|
23 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?><br/>
|
24 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?><br/>
|
25 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/giropay.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/>
|
23 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?><br/>
|
24 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?><br/>
|
25 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?><br/>
|
26 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/mia.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/>
|
23 |
+
<?php echo $this->__('MIA Nr: %s', substr($this->getMiaNr(),0,strlen($this->getMiaNr())-3).'xxx')?><br/>
|
24 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/paybox.phtml
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/>
|
22 |
+
<?php echo $this->__('Paybox Nr: %s', substr($this->getPayboxNr(),0,strlen($this->getPayboxNr())-3).'xxx')?><br/>
|
23 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/paysafecard.phtml
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<p><b><?php echo $this->getMethod()->getTitle() ?></b><br/>
|
23 |
+
<?php echo Mage::helper('mpay24')->__('mPAY24 TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getMpayTid())) ?><br/>
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/cc.phtml
ADDED
@@ -0,0 +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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
|
22 |
+
{{pdf_row_separator}}
|
23 |
+
<?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
|
24 |
+
{{pdf_row_separator}}
|
25 |
+
<?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
|
26 |
+
{{pdf_row_separator}}
|
27 |
+
<?php echo Mage::helper('payment')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/elv.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?>
|
22 |
+
{{pdf_row_separator}}
|
23 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?>
|
24 |
+
{{pdf_row_separator}}
|
25 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?>
|
26 |
+
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/giropay.phtml
ADDED
@@ -0,0 +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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?>
|
23 |
+
{{pdf_row_separator}}
|
24 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?>
|
25 |
+
{{pdf_row_separator}}
|
26 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?>
|
27 |
+
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/mia.phtml
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<?php echo $this->__('MIA Nr: %s', substr($this->getMiaNr(),0,strlen($this->getMiaNr())-3).'xxx')?>
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/paybox.phtml
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo $this->__('Paybox Nr: %s', substr($this->getPayboxNr(),0,strlen($this->getPayboxNr())-3).'xxx')?>
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/paysafecard.phtml
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @copyright Copyright (c) 2009 mPAY24 (http://www.mpay24.com)
|
18 |
+
* @author Filipp Akinfiev
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
?>
|
22 |
+
<?php echo $this->__('Paysafecard')?>
|
app/design/adminhtml/default/default/template/mpay24/info/pdf/selectpayment.phtml
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?>
|
22 |
+
{{pdf_row_separator}}
|
app/design/adminhtml/default/default/template/mpay24/info/selectpayment.phtml
ADDED
@@ -0,0 +1,89 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php
|
22 |
+
$add_info = $this->getInfo()->getData('additional_information');
|
23 |
+
if(!empty($add_info)):
|
24 |
+
if(!array_key_exists('status', $add_info) || $add_info['status'] == false):
|
25 |
+
$this->redirectToCalled('backend', $this->getInfo()->getData('last_trans_id'));
|
26 |
+
endif;
|
27 |
+
endif;
|
28 |
+
?>
|
29 |
+
<p><b><?php if(strtoupper($this->getMethod()->getTitle()) !== $this->getBrand().' ('.Mage::getStoreConfig('payment/mpay24_sp_cc/title').')' && $this->getMethod()->getTitle() !== Mage::getStoreConfig('payment/mpay24_sp_cc/title')): ?>
|
30 |
+
<?php echo substr($this->getMethod()->getTitle(), 0, strlen($this->getMethod()->getTitle())-9) ?>
|
31 |
+
<?php elseif($this->getMethod()->getTitle() === Mage::getStoreConfig('payment/mpay24_sp_cc/title') && $this->getBrand() !== ''): ?>
|
32 |
+
<?php echo 'Credit Card ' ?>
|
33 |
+
<?php elseif($this->getMethod()->getTitle() === Mage::getStoreConfig('payment/mpay24_sp_cc/title') && $this->getBrand() === ''): ?>
|
34 |
+
<?php echo Mage::getStoreConfig('payment/mpay24_sp_cc/title')?>
|
35 |
+
<?php endif; ?>
|
36 |
+
<?php echo $this->getBrand().' ('.Mage::getStoreConfig('payment/mpay24_sp_cc/title').')' ?></b><br/>
|
37 |
+
<?php echo Mage::helper('mpay24')->__(Mage::getStoreConfig('payment/mpay24_sp_cc/title').' TID: %s', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('mpay_tid'))) ?><br/>
|
38 |
+
|
39 |
+
<?php if($this->getMethod()->getData('info_instance')->getOrder() !== null): ?>
|
40 |
+
<?php echo 'Approval Code: ', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('appr_code')) ?><br/>
|
41 |
+
<?php endif; ?>
|
42 |
+
|
43 |
+
<script type="text/javascript" src="../prototype.js"></script>
|
44 |
+
<script type="text/javascript">
|
45 |
+
function ajaxRequest(){
|
46 |
+
var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; //activeX versions to check for in IE
|
47 |
+
if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
|
48 |
+
for (var i=0; i<activexmodes.length; i++){
|
49 |
+
try{
|
50 |
+
return new ActiveXObject(activexmodes[i]);
|
51 |
+
}
|
52 |
+
catch(e){
|
53 |
+
alert("error: " + e);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
else if (window.XMLHttpRequest) // if Mozilla, Safari etc
|
58 |
+
return new XMLHttpRequest();
|
59 |
+
else
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
|
63 |
+
function sendRequest(tid, url, buttonId) {
|
64 |
+
var button = document.getElementById(buttonId);
|
65 |
+
button.disabled = true;
|
66 |
+
|
67 |
+
var mypostrequest=new ajaxRequest();
|
68 |
+
mypostrequest.onreadystatechange=function(){
|
69 |
+
if (mypostrequest.readyState==4){
|
70 |
+
if (mypostrequest.status==200 || window.location.href.indexOf("http")==-1){
|
71 |
+
alert(mypostrequest.responseText);
|
72 |
+
window.location.reload();
|
73 |
+
}
|
74 |
+
else{
|
75 |
+
alert("An error has occured making the request: " + mypostrequest.responseText);
|
76 |
+
}
|
77 |
+
button.disabled = false;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
var parameters="TID="+tid
|
81 |
+
mypostrequest.open("POST", url, true);
|
82 |
+
mypostrequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
83 |
+
mypostrequest.send(parameters);
|
84 |
+
}
|
85 |
+
</script>
|
86 |
+
|
87 |
+
<p>
|
88 |
+
<input id="mpay24_updateStatus" class="scalable scalable" onClick="sendRequest('<?php echo $this->getInfo()->getData('last_trans_id');?>', '<?php echo Mage::getUrl(Mpay24_Mpay24_Model_Api_Mpay24::UPDATE_URL,array('_secure' => true));?>', 'mpay24_updateStatus');" type="submit" value="Update transaction status" />
|
89 |
+
</p>
|
app/design/adminhtml/default/default/template/mpay24/prototype.js
ADDED
@@ -0,0 +1,3277 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/* Prototype JavaScript framework, version 1.5.1.1
|
2 |
+
* (c) 2005-2007 Sam Stephenson
|
3 |
+
*
|
4 |
+
* Prototype is freely distributable under the terms of an MIT-style license.
|
5 |
+
* For details, see the Prototype web site: http://www.prototypejs.org/
|
6 |
+
*
|
7 |
+
/*--------------------------------------------------------------------------*/
|
8 |
+
|
9 |
+
var Prototype = {
|
10 |
+
Version: '1.5.1.1',
|
11 |
+
|
12 |
+
Browser: {
|
13 |
+
IE: !!(window.attachEvent && !window.opera),
|
14 |
+
Opera: !!window.opera,
|
15 |
+
WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
|
16 |
+
Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1
|
17 |
+
},
|
18 |
+
|
19 |
+
BrowserFeatures: {
|
20 |
+
XPath: !!document.evaluate,
|
21 |
+
ElementExtensions: !!window.HTMLElement,
|
22 |
+
SpecificElementExtensions:
|
23 |
+
(document.createElement('div').__proto__ !==
|
24 |
+
document.createElement('form').__proto__)
|
25 |
+
},
|
26 |
+
|
27 |
+
ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
|
28 |
+
JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
|
29 |
+
|
30 |
+
emptyFunction: function() { },
|
31 |
+
K: function(x) { return x }
|
32 |
+
}
|
33 |
+
|
34 |
+
var Class = {
|
35 |
+
create: function() {
|
36 |
+
return function() {
|
37 |
+
this.initialize.apply(this, arguments);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
var Abstract = new Object();
|
43 |
+
|
44 |
+
Object.extend = function(destination, source) {
|
45 |
+
for (var property in source) {
|
46 |
+
destination[property] = source[property];
|
47 |
+
}
|
48 |
+
return destination;
|
49 |
+
}
|
50 |
+
|
51 |
+
Object.extend(Object, {
|
52 |
+
inspect: function(object) {
|
53 |
+
try {
|
54 |
+
if (object === undefined) return 'undefined';
|
55 |
+
if (object === null) return 'null';
|
56 |
+
return object.inspect ? object.inspect() : object.toString();
|
57 |
+
} catch (e) {
|
58 |
+
if (e instanceof RangeError) return '...';
|
59 |
+
throw e;
|
60 |
+
}
|
61 |
+
},
|
62 |
+
|
63 |
+
toJSON: function(object) {
|
64 |
+
var type = typeof object;
|
65 |
+
switch(type) {
|
66 |
+
case 'undefined':
|
67 |
+
case 'function':
|
68 |
+
case 'unknown': return;
|
69 |
+
case 'boolean': return object.toString();
|
70 |
+
}
|
71 |
+
if (object === null) return 'null';
|
72 |
+
if (object.toJSON) return object.toJSON();
|
73 |
+
if (object.ownerDocument === document) return;
|
74 |
+
var results = [];
|
75 |
+
for (var property in object) {
|
76 |
+
var value = Object.toJSON(object[property]);
|
77 |
+
if (value !== undefined)
|
78 |
+
results.push(property.toJSON() + ': ' + value);
|
79 |
+
}
|
80 |
+
return '{' + results.join(', ') + '}';
|
81 |
+
},
|
82 |
+
|
83 |
+
keys: function(object) {
|
84 |
+
var keys = [];
|
85 |
+
for (var property in object)
|
86 |
+
keys.push(property);
|
87 |
+
return keys;
|
88 |
+
},
|
89 |
+
|
90 |
+
values: function(object) {
|
91 |
+
var values = [];
|
92 |
+
for (var property in object)
|
93 |
+
values.push(object[property]);
|
94 |
+
return values;
|
95 |
+
},
|
96 |
+
|
97 |
+
clone: function(object) {
|
98 |
+
return Object.extend({}, object);
|
99 |
+
}
|
100 |
+
});
|
101 |
+
|
102 |
+
Function.prototype.bind = function() {
|
103 |
+
var __method = this, args = $A(arguments), object = args.shift();
|
104 |
+
return function() {
|
105 |
+
return __method.apply(object, args.concat($A(arguments)));
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
Function.prototype.bindAsEventListener = function(object) {
|
110 |
+
var __method = this, args = $A(arguments), object = args.shift();
|
111 |
+
return function(event) {
|
112 |
+
return __method.apply(object, [event || window.event].concat(args));
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
Object.extend(Number.prototype, {
|
117 |
+
toColorPart: function() {
|
118 |
+
return this.toPaddedString(2, 16);
|
119 |
+
},
|
120 |
+
|
121 |
+
succ: function() {
|
122 |
+
return this + 1;
|
123 |
+
},
|
124 |
+
|
125 |
+
times: function(iterator) {
|
126 |
+
$R(0, this, true).each(iterator);
|
127 |
+
return this;
|
128 |
+
},
|
129 |
+
|
130 |
+
toPaddedString: function(length, radix) {
|
131 |
+
var string = this.toString(radix || 10);
|
132 |
+
return '0'.times(length - string.length) + string;
|
133 |
+
},
|
134 |
+
|
135 |
+
toJSON: function() {
|
136 |
+
return isFinite(this) ? this.toString() : 'null';
|
137 |
+
}
|
138 |
+
});
|
139 |
+
|
140 |
+
Date.prototype.toJSON = function() {
|
141 |
+
return '"' + this.getFullYear() + '-' +
|
142 |
+
(this.getMonth() + 1).toPaddedString(2) + '-' +
|
143 |
+
this.getDate().toPaddedString(2) + 'T' +
|
144 |
+
this.getHours().toPaddedString(2) + ':' +
|
145 |
+
this.getMinutes().toPaddedString(2) + ':' +
|
146 |
+
this.getSeconds().toPaddedString(2) + '"';
|
147 |
+
};
|
148 |
+
|
149 |
+
var Try = {
|
150 |
+
these: function() {
|
151 |
+
var returnValue;
|
152 |
+
|
153 |
+
for (var i = 0, length = arguments.length; i < length; i++) {
|
154 |
+
var lambda = arguments[i];
|
155 |
+
try {
|
156 |
+
returnValue = lambda();
|
157 |
+
break;
|
158 |
+
} catch (e) {}
|
159 |
+
}
|
160 |
+
|
161 |
+
return returnValue;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
/*--------------------------------------------------------------------------*/
|
166 |
+
|
167 |
+
var PeriodicalExecuter = Class.create();
|
168 |
+
PeriodicalExecuter.prototype = {
|
169 |
+
initialize: function(callback, frequency) {
|
170 |
+
this.callback = callback;
|
171 |
+
this.frequency = frequency;
|
172 |
+
this.currentlyExecuting = false;
|
173 |
+
|
174 |
+
this.registerCallback();
|
175 |
+
},
|
176 |
+
|
177 |
+
registerCallback: function() {
|
178 |
+
this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
|
179 |
+
},
|
180 |
+
|
181 |
+
stop: function() {
|
182 |
+
if (!this.timer) return;
|
183 |
+
clearInterval(this.timer);
|
184 |
+
this.timer = null;
|
185 |
+
},
|
186 |
+
|
187 |
+
onTimerEvent: function() {
|
188 |
+
if (!this.currentlyExecuting) {
|
189 |
+
try {
|
190 |
+
this.currentlyExecuting = true;
|
191 |
+
this.callback(this);
|
192 |
+
} finally {
|
193 |
+
this.currentlyExecuting = false;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
Object.extend(String, {
|
199 |
+
interpret: function(value) {
|
200 |
+
return value == null ? '' : String(value);
|
201 |
+
},
|
202 |
+
specialChar: {
|
203 |
+
'\b': '\\b',
|
204 |
+
'\t': '\\t',
|
205 |
+
'\n': '\\n',
|
206 |
+
'\f': '\\f',
|
207 |
+
'\r': '\\r',
|
208 |
+
'\\': '\\\\'
|
209 |
+
}
|
210 |
+
});
|
211 |
+
|
212 |
+
Object.extend(String.prototype, {
|
213 |
+
gsub: function(pattern, replacement) {
|
214 |
+
var result = '', source = this, match;
|
215 |
+
replacement = arguments.callee.prepareReplacement(replacement);
|
216 |
+
|
217 |
+
while (source.length > 0) {
|
218 |
+
if (match = source.match(pattern)) {
|
219 |
+
result += source.slice(0, match.index);
|
220 |
+
result += String.interpret(replacement(match));
|
221 |
+
source = source.slice(match.index + match[0].length);
|
222 |
+
} else {
|
223 |
+
result += source, source = '';
|
224 |
+
}
|
225 |
+
}
|
226 |
+
return result;
|
227 |
+
},
|
228 |
+
|
229 |
+
sub: function(pattern, replacement, count) {
|
230 |
+
replacement = this.gsub.prepareReplacement(replacement);
|
231 |
+
count = count === undefined ? 1 : count;
|
232 |
+
|
233 |
+
return this.gsub(pattern, function(match) {
|
234 |
+
if (--count < 0) return match[0];
|
235 |
+
return replacement(match);
|
236 |
+
});
|
237 |
+
},
|
238 |
+
|
239 |
+
scan: function(pattern, iterator) {
|
240 |
+
this.gsub(pattern, iterator);
|
241 |
+
return this;
|
242 |
+
},
|
243 |
+
|
244 |
+
truncate: function(length, truncation) {
|
245 |
+
length = length || 30;
|
246 |
+
truncation = truncation === undefined ? '...' : truncation;
|
247 |
+
return this.length > length ?
|
248 |
+
this.slice(0, length - truncation.length) + truncation : this;
|
249 |
+
},
|
250 |
+
|
251 |
+
strip: function() {
|
252 |
+
return this.replace(/^\s+/, '').replace(/\s+$/, '');
|
253 |
+
},
|
254 |
+
|
255 |
+
stripTags: function() {
|
256 |
+
return this.replace(/<\/?[^>]+>/gi, '');
|
257 |
+
},
|
258 |
+
|
259 |
+
stripScripts: function() {
|
260 |
+
return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
|
261 |
+
},
|
262 |
+
|
263 |
+
extractScripts: function() {
|
264 |
+
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
|
265 |
+
var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
|
266 |
+
return (this.match(matchAll) || []).map(function(scriptTag) {
|
267 |
+
return (scriptTag.match(matchOne) || ['', ''])[1];
|
268 |
+
});
|
269 |
+
},
|
270 |
+
|
271 |
+
evalScripts: function() {
|
272 |
+
return this.extractScripts().map(function(script) { return eval(script) });
|
273 |
+
},
|
274 |
+
|
275 |
+
escapeHTML: function() {
|
276 |
+
var self = arguments.callee;
|
277 |
+
self.text.data = this;
|
278 |
+
return self.div.innerHTML;
|
279 |
+
},
|
280 |
+
|
281 |
+
unescapeHTML: function() {
|
282 |
+
var div = document.createElement('div');
|
283 |
+
div.innerHTML = this.stripTags();
|
284 |
+
return div.childNodes[0] ? (div.childNodes.length > 1 ?
|
285 |
+
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
|
286 |
+
div.childNodes[0].nodeValue) : '';
|
287 |
+
},
|
288 |
+
|
289 |
+
toQueryParams: function(separator) {
|
290 |
+
var match = this.strip().match(/([^?#]*)(#.*)?$/);
|
291 |
+
if (!match) return {};
|
292 |
+
|
293 |
+
return match[1].split(separator || '&').inject({}, function(hash, pair) {
|
294 |
+
if ((pair = pair.split('='))[0]) {
|
295 |
+
var key = decodeURIComponent(pair.shift());
|
296 |
+
var value = pair.length > 1 ? pair.join('=') : pair[0];
|
297 |
+
if (value != undefined) value = decodeURIComponent(value);
|
298 |
+
|
299 |
+
if (key in hash) {
|
300 |
+
if (hash[key].constructor != Array) hash[key] = [hash[key]];
|
301 |
+
hash[key].push(value);
|
302 |
+
}
|
303 |
+
else hash[key] = value;
|
304 |
+
}
|
305 |
+
return hash;
|
306 |
+
});
|
307 |
+
},
|
308 |
+
|
309 |
+
toArray: function() {
|
310 |
+
return this.split('');
|
311 |
+
},
|
312 |
+
|
313 |
+
succ: function() {
|
314 |
+
return this.slice(0, this.length - 1) +
|
315 |
+
String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
|
316 |
+
},
|
317 |
+
|
318 |
+
times: function(count) {
|
319 |
+
var result = '';
|
320 |
+
for (var i = 0; i < count; i++) result += this;
|
321 |
+
return result;
|
322 |
+
},
|
323 |
+
|
324 |
+
camelize: function() {
|
325 |
+
var parts = this.split('-'), len = parts.length;
|
326 |
+
if (len == 1) return parts[0];
|
327 |
+
|
328 |
+
var camelized = this.charAt(0) == '-'
|
329 |
+
? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
|
330 |
+
: parts[0];
|
331 |
+
|
332 |
+
for (var i = 1; i < len; i++)
|
333 |
+
camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
|
334 |
+
|
335 |
+
return camelized;
|
336 |
+
},
|
337 |
+
|
338 |
+
capitalize: function() {
|
339 |
+
return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
|
340 |
+
},
|
341 |
+
|
342 |
+
underscore: function() {
|
343 |
+
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
|
344 |
+
},
|
345 |
+
|
346 |
+
dasherize: function() {
|
347 |
+
return this.gsub(/_/,'-');
|
348 |
+
},
|
349 |
+
|
350 |
+
inspect: function(useDoubleQuotes) {
|
351 |
+
var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
|
352 |
+
var character = String.specialChar[match[0]];
|
353 |
+
return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
|
354 |
+
});
|
355 |
+
if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
|
356 |
+
return "'" + escapedString.replace(/'/g, '\\\'') + "'";
|
357 |
+
},
|
358 |
+
|
359 |
+
toJSON: function() {
|
360 |
+
return this.inspect(true);
|
361 |
+
},
|
362 |
+
|
363 |
+
unfilterJSON: function(filter) {
|
364 |
+
return this.sub(filter || Prototype.JSONFilter, '#{1}');
|
365 |
+
},
|
366 |
+
|
367 |
+
isJSON: function() {
|
368 |
+
var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
|
369 |
+
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
|
370 |
+
},
|
371 |
+
|
372 |
+
evalJSON: function(sanitize) {
|
373 |
+
var json = this.unfilterJSON();
|
374 |
+
try {
|
375 |
+
if (!sanitize || json.isJSON()) return eval('(' + json + ')');
|
376 |
+
} catch (e) { }
|
377 |
+
throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
|
378 |
+
},
|
379 |
+
|
380 |
+
include: function(pattern) {
|
381 |
+
return this.indexOf(pattern) > -1;
|
382 |
+
},
|
383 |
+
|
384 |
+
startsWith: function(pattern) {
|
385 |
+
return this.indexOf(pattern) === 0;
|
386 |
+
},
|
387 |
+
|
388 |
+
endsWith: function(pattern) {
|
389 |
+
var d = this.length - pattern.length;
|
390 |
+
return d >= 0 && this.lastIndexOf(pattern) === d;
|
391 |
+
},
|
392 |
+
|
393 |
+
empty: function() {
|
394 |
+
return this == '';
|
395 |
+
},
|
396 |
+
|
397 |
+
blank: function() {
|
398 |
+
return /^\s*$/.test(this);
|
399 |
+
}
|
400 |
+
});
|
401 |
+
|
402 |
+
if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
|
403 |
+
escapeHTML: function() {
|
404 |
+
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
405 |
+
},
|
406 |
+
unescapeHTML: function() {
|
407 |
+
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
|
408 |
+
}
|
409 |
+
});
|
410 |
+
|
411 |
+
String.prototype.gsub.prepareReplacement = function(replacement) {
|
412 |
+
if (typeof replacement == 'function') return replacement;
|
413 |
+
var template = new Template(replacement);
|
414 |
+
return function(match) { return template.evaluate(match) };
|
415 |
+
}
|
416 |
+
|
417 |
+
String.prototype.parseQuery = String.prototype.toQueryParams;
|
418 |
+
|
419 |
+
Object.extend(String.prototype.escapeHTML, {
|
420 |
+
div: document.createElement('div'),
|
421 |
+
text: document.createTextNode('')
|
422 |
+
});
|
423 |
+
|
424 |
+
with (String.prototype.escapeHTML) div.appendChild(text);
|
425 |
+
|
426 |
+
var Template = Class.create();
|
427 |
+
Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
|
428 |
+
Template.prototype = {
|
429 |
+
initialize: function(template, pattern) {
|
430 |
+
this.template = template.toString();
|
431 |
+
this.pattern = pattern || Template.Pattern;
|
432 |
+
},
|
433 |
+
|
434 |
+
evaluate: function(object) {
|
435 |
+
return this.template.gsub(this.pattern, function(match) {
|
436 |
+
var before = match[1];
|
437 |
+
if (before == '\\') return match[2];
|
438 |
+
return before + String.interpret(object[match[3]]);
|
439 |
+
});
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead');
|
444 |
+
|
445 |
+
var Enumerable = {
|
446 |
+
each: function(iterator) {
|
447 |
+
var index = 0;
|
448 |
+
try {
|
449 |
+
this._each(function(value) {
|
450 |
+
iterator(value, index++);
|
451 |
+
});
|
452 |
+
} catch (e) {
|
453 |
+
if (e != $break) throw e;
|
454 |
+
}
|
455 |
+
return this;
|
456 |
+
},
|
457 |
+
|
458 |
+
eachSlice: function(number, iterator) {
|
459 |
+
var index = -number, slices = [], array = this.toArray();
|
460 |
+
while ((index += number) < array.length)
|
461 |
+
slices.push(array.slice(index, index+number));
|
462 |
+
return slices.map(iterator);
|
463 |
+
},
|
464 |
+
|
465 |
+
all: function(iterator) {
|
466 |
+
var result = true;
|
467 |
+
this.each(function(value, index) {
|
468 |
+
result = result && !!(iterator || Prototype.K)(value, index);
|
469 |
+
if (!result) throw $break;
|
470 |
+
});
|
471 |
+
return result;
|
472 |
+
},
|
473 |
+
|
474 |
+
any: function(iterator) {
|
475 |
+
var result = false;
|
476 |
+
this.each(function(value, index) {
|
477 |
+
if (result = !!(iterator || Prototype.K)(value, index))
|
478 |
+
throw $break;
|
479 |
+
});
|
480 |
+
return result;
|
481 |
+
},
|
482 |
+
|
483 |
+
collect: function(iterator) {
|
484 |
+
var results = [];
|
485 |
+
this.each(function(value, index) {
|
486 |
+
results.push((iterator || Prototype.K)(value, index));
|
487 |
+
});
|
488 |
+
return results;
|
489 |
+
},
|
490 |
+
|
491 |
+
detect: function(iterator) {
|
492 |
+
var result;
|
493 |
+
this.each(function(value, index) {
|
494 |
+
if (iterator(value, index)) {
|
495 |
+
result = value;
|
496 |
+
throw $break;
|
497 |
+
}
|
498 |
+
});
|
499 |
+
return result;
|
500 |
+
},
|
501 |
+
|
502 |
+
findAll: function(iterator) {
|
503 |
+
var results = [];
|
504 |
+
this.each(function(value, index) {
|
505 |
+
if (iterator(value, index))
|
506 |
+
results.push(value);
|
507 |
+
});
|
508 |
+
return results;
|
509 |
+
},
|
510 |
+
|
511 |
+
grep: function(pattern, iterator) {
|
512 |
+
var results = [];
|
513 |
+
this.each(function(value, index) {
|
514 |
+
var stringValue = value.toString();
|
515 |
+
if (stringValue.match(pattern))
|
516 |
+
results.push((iterator || Prototype.K)(value, index));
|
517 |
+
})
|
518 |
+
return results;
|
519 |
+
},
|
520 |
+
|
521 |
+
include: function(object) {
|
522 |
+
var found = false;
|
523 |
+
this.each(function(value) {
|
524 |
+
if (value == object) {
|
525 |
+
found = true;
|
526 |
+
throw $break;
|
527 |
+
}
|
528 |
+
});
|
529 |
+
return found;
|
530 |
+
},
|
531 |
+
|
532 |
+
inGroupsOf: function(number, fillWith) {
|
533 |
+
fillWith = fillWith === undefined ? null : fillWith;
|
534 |
+
return this.eachSlice(number, function(slice) {
|
535 |
+
while(slice.length < number) slice.push(fillWith);
|
536 |
+
return slice;
|
537 |
+
});
|
538 |
+
},
|
539 |
+
|
540 |
+
inject: function(memo, iterator) {
|
541 |
+
this.each(function(value, index) {
|
542 |
+
memo = iterator(memo, value, index);
|
543 |
+
});
|
544 |
+
return memo;
|
545 |
+
},
|
546 |
+
|
547 |
+
invoke: function(method) {
|
548 |
+
var args = $A(arguments).slice(1);
|
549 |
+
return this.map(function(value) {
|
550 |
+
return value[method].apply(value, args);
|
551 |
+
});
|
552 |
+
},
|
553 |
+
|
554 |
+
max: function(iterator) {
|
555 |
+
var result;
|
556 |
+
this.each(function(value, index) {
|
557 |
+
value = (iterator || Prototype.K)(value, index);
|
558 |
+
if (result == undefined || value >= result)
|
559 |
+
result = value;
|
560 |
+
});
|
561 |
+
return result;
|
562 |
+
},
|
563 |
+
|
564 |
+
min: function(iterator) {
|
565 |
+
var result;
|
566 |
+
this.each(function(value, index) {
|
567 |
+
value = (iterator || Prototype.K)(value, index);
|
568 |
+
if (result == undefined || value < result)
|
569 |
+
result = value;
|
570 |
+
});
|
571 |
+
return result;
|
572 |
+
},
|
573 |
+
|
574 |
+
partition: function(iterator) {
|
575 |
+
var trues = [], falses = [];
|
576 |
+
this.each(function(value, index) {
|
577 |
+
((iterator || Prototype.K)(value, index) ?
|
578 |
+
trues : falses).push(value);
|
579 |
+
});
|
580 |
+
return [trues, falses];
|
581 |
+
},
|
582 |
+
|
583 |
+
pluck: function(property) {
|
584 |
+
var results = [];
|
585 |
+
this.each(function(value, index) {
|
586 |
+
results.push(value[property]);
|
587 |
+
});
|
588 |
+
return results;
|
589 |
+
},
|
590 |
+
|
591 |
+
reject: function(iterator) {
|
592 |
+
var results = [];
|
593 |
+
this.each(function(value, index) {
|
594 |
+
if (!iterator(value, index))
|
595 |
+
results.push(value);
|
596 |
+
});
|
597 |
+
return results;
|
598 |
+
},
|
599 |
+
|
600 |
+
sortBy: function(iterator) {
|
601 |
+
return this.map(function(value, index) {
|
602 |
+
return {value: value, criteria: iterator(value, index)};
|
603 |
+
}).sort(function(left, right) {
|
604 |
+
var a = left.criteria, b = right.criteria;
|
605 |
+
return a < b ? -1 : a > b ? 1 : 0;
|
606 |
+
}).pluck('value');
|
607 |
+
},
|
608 |
+
|
609 |
+
toArray: function() {
|
610 |
+
return this.map();
|
611 |
+
},
|
612 |
+
|
613 |
+
zip: function() {
|
614 |
+
var iterator = Prototype.K, args = $A(arguments);
|
615 |
+
if (typeof args.last() == 'function')
|
616 |
+
iterator = args.pop();
|
617 |
+
|
618 |
+
var collections = [this].concat(args).map($A);
|
619 |
+
return this.map(function(value, index) {
|
620 |
+
return iterator(collections.pluck(index));
|
621 |
+
});
|
622 |
+
},
|
623 |
+
|
624 |
+
size: function() {
|
625 |
+
return this.toArray().length;
|
626 |
+
},
|
627 |
+
|
628 |
+
inspect: function() {
|
629 |
+
return '#<Enumerable:' + this.toArray().inspect() + '>';
|
630 |
+
}
|
631 |
+
}
|
632 |
+
|
633 |
+
Object.extend(Enumerable, {
|
634 |
+
map: Enumerable.collect,
|
635 |
+
find: Enumerable.detect,
|
636 |
+
select: Enumerable.findAll,
|
637 |
+
member: Enumerable.include,
|
638 |
+
entries: Enumerable.toArray
|
639 |
+
});
|
640 |
+
var $A = Array.from = function(iterable) {
|
641 |
+
if (!iterable) return [];
|
642 |
+
if (iterable.toArray) {
|
643 |
+
return iterable.toArray();
|
644 |
+
} else {
|
645 |
+
var results = [];
|
646 |
+
for (var i = 0, length = iterable.length; i < length; i++)
|
647 |
+
results.push(iterable[i]);
|
648 |
+
return results;
|
649 |
+
}
|
650 |
+
}
|
651 |
+
|
652 |
+
if (Prototype.Browser.WebKit) {
|
653 |
+
$A = Array.from = function(iterable) {
|
654 |
+
if (!iterable) return [];
|
655 |
+
if (!(typeof iterable == 'function' && iterable == '[object NodeList]') &&
|
656 |
+
iterable.toArray) {
|
657 |
+
return iterable.toArray();
|
658 |
+
} else {
|
659 |
+
var results = [];
|
660 |
+
for (var i = 0, length = iterable.length; i < length; i++)
|
661 |
+
results.push(iterable[i]);
|
662 |
+
return results;
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
|
667 |
+
Object.extend(Array.prototype, Enumerable);
|
668 |
+
|
669 |
+
if (!Array.prototype._reverse)
|
670 |
+
Array.prototype._reverse = Array.prototype.reverse;
|
671 |
+
|
672 |
+
Object.extend(Array.prototype, {
|
673 |
+
_each: function(iterator) {
|
674 |
+
for (var i = 0, length = this.length; i < length; i++)
|
675 |
+
iterator(this[i]);
|
676 |
+
},
|
677 |
+
|
678 |
+
clear: function() {
|
679 |
+
this.length = 0;
|
680 |
+
return this;
|
681 |
+
},
|
682 |
+
|
683 |
+
first: function() {
|
684 |
+
return this[0];
|
685 |
+
},
|
686 |
+
|
687 |
+
last: function() {
|
688 |
+
return this[this.length - 1];
|
689 |
+
},
|
690 |
+
|
691 |
+
compact: function() {
|
692 |
+
return this.select(function(value) {
|
693 |
+
return value != null;
|
694 |
+
});
|
695 |
+
},
|
696 |
+
|
697 |
+
flatten: function() {
|
698 |
+
return this.inject([], function(array, value) {
|
699 |
+
return array.concat(value && value.constructor == Array ?
|
700 |
+
value.flatten() : [value]);
|
701 |
+
});
|
702 |
+
},
|
703 |
+
|
704 |
+
without: function() {
|
705 |
+
var values = $A(arguments);
|
706 |
+
return this.select(function(value) {
|
707 |
+
return !values.include(value);
|
708 |
+
});
|
709 |
+
},
|
710 |
+
|
711 |
+
indexOf: function(object) {
|
712 |
+
for (var i = 0, length = this.length; i < length; i++)
|
713 |
+
if (this[i] == object) return i;
|
714 |
+
return -1;
|
715 |
+
},
|
716 |
+
|
717 |
+
reverse: function(inline) {
|
718 |
+
return (inline !== false ? this : this.toArray())._reverse();
|
719 |
+
},
|
720 |
+
|
721 |
+
reduce: function() {
|
722 |
+
return this.length > 1 ? this : this[0];
|
723 |
+
},
|
724 |
+
|
725 |
+
uniq: function(sorted) {
|
726 |
+
return this.inject([], function(array, value, index) {
|
727 |
+
if (0 == index || (sorted ? array.last() != value : !array.include(value)))
|
728 |
+
array.push(value);
|
729 |
+
return array;
|
730 |
+
});
|
731 |
+
},
|
732 |
+
|
733 |
+
clone: function() {
|
734 |
+
return [].concat(this);
|
735 |
+
},
|
736 |
+
|
737 |
+
size: function() {
|
738 |
+
return this.length;
|
739 |
+
},
|
740 |
+
|
741 |
+
inspect: function() {
|
742 |
+
return '[' + this.map(Object.inspect).join(', ') + ']';
|
743 |
+
},
|
744 |
+
|
745 |
+
toJSON: function() {
|
746 |
+
var results = [];
|
747 |
+
this.each(function(object) {
|
748 |
+
var value = Object.toJSON(object);
|
749 |
+
if (value !== undefined) results.push(value);
|
750 |
+
});
|
751 |
+
return '[' + results.join(', ') + ']';
|
752 |
+
}
|
753 |
+
});
|
754 |
+
|
755 |
+
Array.prototype.toArray = Array.prototype.clone;
|
756 |
+
|
757 |
+
function $w(string) {
|
758 |
+
string = string.strip();
|
759 |
+
return string ? string.split(/\s+/) : [];
|
760 |
+
}
|
761 |
+
|
762 |
+
if (Prototype.Browser.Opera){
|
763 |
+
Array.prototype.concat = function() {
|
764 |
+
var array = [];
|
765 |
+
for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
|
766 |
+
for (var i = 0, length = arguments.length; i < length; i++) {
|
767 |
+
if (arguments[i].constructor == Array) {
|
768 |
+
for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
|
769 |
+
array.push(arguments[i][j]);
|
770 |
+
} else {
|
771 |
+
array.push(arguments[i]);
|
772 |
+
}
|
773 |
+
}
|
774 |
+
return array;
|
775 |
+
}
|
776 |
+
}
|
777 |
+
var Hash = function(object) {
|
778 |
+
if (object instanceof Hash) this.merge(object);
|
779 |
+
else Object.extend(this, object || {});
|
780 |
+
};
|
781 |
+
|
782 |
+
Object.extend(Hash, {
|
783 |
+
toQueryString: function(obj) {
|
784 |
+
var parts = [];
|
785 |
+
parts.add = arguments.callee.addPair;
|
786 |
+
|
787 |
+
this.prototype._each.call(obj, function(pair) {
|
788 |
+
if (!pair.key) return;
|
789 |
+
var value = pair.value;
|
790 |
+
|
791 |
+
if (value && typeof value == 'object') {
|
792 |
+
if (value.constructor == Array) value.each(function(value) {
|
793 |
+
parts.add(pair.key, value);
|
794 |
+
});
|
795 |
+
return;
|
796 |
+
}
|
797 |
+
parts.add(pair.key, value);
|
798 |
+
});
|
799 |
+
|
800 |
+
return parts.join('&');
|
801 |
+
},
|
802 |
+
|
803 |
+
toJSON: function(object) {
|
804 |
+
var results = [];
|
805 |
+
this.prototype._each.call(object, function(pair) {
|
806 |
+
var value = Object.toJSON(pair.value);
|
807 |
+
if (value !== undefined) results.push(pair.key.toJSON() + ': ' + value);
|
808 |
+
});
|
809 |
+
return '{' + results.join(', ') + '}';
|
810 |
+
}
|
811 |
+
});
|
812 |
+
|
813 |
+
Hash.toQueryString.addPair = function(key, value, prefix) {
|
814 |
+
key = encodeURIComponent(key);
|
815 |
+
if (value === undefined) this.push(key);
|
816 |
+
else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
|
817 |
+
}
|
818 |
+
|
819 |
+
Object.extend(Hash.prototype, Enumerable);
|
820 |
+
Object.extend(Hash.prototype, {
|
821 |
+
_each: function(iterator) {
|
822 |
+
for (var key in this) {
|
823 |
+
var value = this[key];
|
824 |
+
if (value && value == Hash.prototype[key]) continue;
|
825 |
+
|
826 |
+
var pair = [key, value];
|
827 |
+
pair.key = key;
|
828 |
+
pair.value = value;
|
829 |
+
iterator(pair);
|
830 |
+
}
|
831 |
+
},
|
832 |
+
|
833 |
+
keys: function() {
|
834 |
+
return this.pluck('key');
|
835 |
+
},
|
836 |
+
|
837 |
+
values: function() {
|
838 |
+
return this.pluck('value');
|
839 |
+
},
|
840 |
+
|
841 |
+
merge: function(hash) {
|
842 |
+
return $H(hash).inject(this, function(mergedHash, pair) {
|
843 |
+
mergedHash[pair.key] = pair.value;
|
844 |
+
return mergedHash;
|
845 |
+
});
|
846 |
+
},
|
847 |
+
|
848 |
+
remove: function() {
|
849 |
+
var result;
|
850 |
+
for(var i = 0, length = arguments.length; i < length; i++) {
|
851 |
+
var value = this[arguments[i]];
|
852 |
+
if (value !== undefined){
|
853 |
+
if (result === undefined) result = value;
|
854 |
+
else {
|
855 |
+
if (result.constructor != Array) result = [result];
|
856 |
+
result.push(value)
|
857 |
+
}
|
858 |
+
}
|
859 |
+
delete this[arguments[i]];
|
860 |
+
}
|
861 |
+
return result;
|
862 |
+
},
|
863 |
+
|
864 |
+
toQueryString: function() {
|
865 |
+
return Hash.toQueryString(this);
|
866 |
+
},
|
867 |
+
|
868 |
+
inspect: function() {
|
869 |
+
return '#<Hash:{' + this.map(function(pair) {
|
870 |
+
return pair.map(Object.inspect).join(': ');
|
871 |
+
}).join(', ') + '}>';
|
872 |
+
},
|
873 |
+
|
874 |
+
toJSON: function() {
|
875 |
+
return Hash.toJSON(this);
|
876 |
+
}
|
877 |
+
});
|
878 |
+
|
879 |
+
function $H(object) {
|
880 |
+
if (object instanceof Hash) return object;
|
881 |
+
return new Hash(object);
|
882 |
+
};
|
883 |
+
|
884 |
+
// Safari iterates over shadowed properties
|
885 |
+
if (function() {
|
886 |
+
var i = 0, Test = function(value) { this.key = value };
|
887 |
+
Test.prototype.key = 'foo';
|
888 |
+
for (var property in new Test('bar')) i++;
|
889 |
+
return i > 1;
|
890 |
+
}()) Hash.prototype._each = function(iterator) {
|
891 |
+
var cache = [];
|
892 |
+
for (var key in this) {
|
893 |
+
var value = this[key];
|
894 |
+
if ((value && value == Hash.prototype[key]) || cache.include(key)) continue;
|
895 |
+
cache.push(key);
|
896 |
+
var pair = [key, value];
|
897 |
+
pair.key = key;
|
898 |
+
pair.value = value;
|
899 |
+
iterator(pair);
|
900 |
+
}
|
901 |
+
};
|
902 |
+
ObjectRange = Class.create();
|
903 |
+
Object.extend(ObjectRange.prototype, Enumerable);
|
904 |
+
Object.extend(ObjectRange.prototype, {
|
905 |
+
initialize: function(start, end, exclusive) {
|
906 |
+
this.start = start;
|
907 |
+
this.end = end;
|
908 |
+
this.exclusive = exclusive;
|
909 |
+
},
|
910 |
+
|
911 |
+
_each: function(iterator) {
|
912 |
+
var value = this.start;
|
913 |
+
while (this.include(value)) {
|
914 |
+
iterator(value);
|
915 |
+
value = value.succ();
|
916 |
+
}
|
917 |
+
},
|
918 |
+
|
919 |
+
include: function(value) {
|
920 |
+
if (value < this.start)
|
921 |
+
return false;
|
922 |
+
if (this.exclusive)
|
923 |
+
return value < this.end;
|
924 |
+
return value <= this.end;
|
925 |
+
}
|
926 |
+
});
|
927 |
+
|
928 |
+
var $R = function(start, end, exclusive) {
|
929 |
+
return new ObjectRange(start, end, exclusive);
|
930 |
+
}
|
931 |
+
|
932 |
+
var Ajax = {
|
933 |
+
getTransport: function() {
|
934 |
+
return Try.these(
|
935 |
+
function() {return new XMLHttpRequest()},
|
936 |
+
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
|
937 |
+
function() {return new ActiveXObject('Microsoft.XMLHTTP')}
|
938 |
+
) || false;
|
939 |
+
},
|
940 |
+
|
941 |
+
activeRequestCount: 0
|
942 |
+
}
|
943 |
+
|
944 |
+
Ajax.Responders = {
|
945 |
+
responders: [],
|
946 |
+
|
947 |
+
_each: function(iterator) {
|
948 |
+
this.responders._each(iterator);
|
949 |
+
},
|
950 |
+
|
951 |
+
register: function(responder) {
|
952 |
+
if (!this.include(responder))
|
953 |
+
this.responders.push(responder);
|
954 |
+
},
|
955 |
+
|
956 |
+
unregister: function(responder) {
|
957 |
+
this.responders = this.responders.without(responder);
|
958 |
+
},
|
959 |
+
|
960 |
+
dispatch: function(callback, request, transport, json) {
|
961 |
+
this.each(function(responder) {
|
962 |
+
if (typeof responder[callback] == 'function') {
|
963 |
+
try {
|
964 |
+
responder[callback].apply(responder, [request, transport, json]);
|
965 |
+
} catch (e) {}
|
966 |
+
}
|
967 |
+
});
|
968 |
+
}
|
969 |
+
};
|
970 |
+
|
971 |
+
Object.extend(Ajax.Responders, Enumerable);
|
972 |
+
|
973 |
+
Ajax.Responders.register({
|
974 |
+
onCreate: function() {
|
975 |
+
Ajax.activeRequestCount++;
|
976 |
+
},
|
977 |
+
onComplete: function() {
|
978 |
+
Ajax.activeRequestCount--;
|
979 |
+
}
|
980 |
+
});
|
981 |
+
|
982 |
+
Ajax.Base = function() {};
|
983 |
+
Ajax.Base.prototype = {
|
984 |
+
setOptions: function(options) {
|
985 |
+
this.options = {
|
986 |
+
method: 'post',
|
987 |
+
asynchronous: true,
|
988 |
+
contentType: 'application/x-www-form-urlencoded',
|
989 |
+
encoding: 'UTF-8',
|
990 |
+
parameters: ''
|
991 |
+
}
|
992 |
+
Object.extend(this.options, options || {});
|
993 |
+
|
994 |
+
this.options.method = this.options.method.toLowerCase();
|
995 |
+
if (typeof this.options.parameters == 'string')
|
996 |
+
this.options.parameters = this.options.parameters.toQueryParams();
|
997 |
+
}
|
998 |
+
}
|
999 |
+
|
1000 |
+
Ajax.Request = Class.create();
|
1001 |
+
Ajax.Request.Events =
|
1002 |
+
['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
|
1003 |
+
|
1004 |
+
Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
|
1005 |
+
_complete: false,
|
1006 |
+
|
1007 |
+
initialize: function(url, options) {
|
1008 |
+
this.transport = Ajax.getTransport();
|
1009 |
+
this.setOptions(options);
|
1010 |
+
this.request(url);
|
1011 |
+
},
|
1012 |
+
|
1013 |
+
request: function(url) {
|
1014 |
+
this.url = url;
|
1015 |
+
this.method = this.options.method;
|
1016 |
+
var params = Object.clone(this.options.parameters);
|
1017 |
+
|
1018 |
+
if (!['get', 'post'].include(this.method)) {
|
1019 |
+
// simulate other verbs over post
|
1020 |
+
params['_method'] = this.method;
|
1021 |
+
this.method = 'post';
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
this.parameters = params;
|
1025 |
+
|
1026 |
+
if (params = Hash.toQueryString(params)) {
|
1027 |
+
// when GET, append parameters to URL
|
1028 |
+
if (this.method == 'get')
|
1029 |
+
this.url += (this.url.include('?') ? '&' : '?') + params;
|
1030 |
+
else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
|
1031 |
+
params += '&_=';
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
try {
|
1035 |
+
if (this.options.onCreate) this.options.onCreate(this.transport);
|
1036 |
+
Ajax.Responders.dispatch('onCreate', this, this.transport);
|
1037 |
+
|
1038 |
+
this.transport.open(this.method.toUpperCase(), this.url,
|
1039 |
+
this.options.asynchronous);
|
1040 |
+
|
1041 |
+
if (this.options.asynchronous)
|
1042 |
+
setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
|
1043 |
+
|
1044 |
+
this.transport.onreadystatechange = this.onStateChange.bind(this);
|
1045 |
+
this.setRequestHeaders();
|
1046 |
+
|
1047 |
+
this.body = this.method == 'post' ? (this.options.postBody || params) : null;
|
1048 |
+
this.transport.send(this.body);
|
1049 |
+
|
1050 |
+
/* Force Firefox to handle ready state 4 for synchronous requests */
|
1051 |
+
if (!this.options.asynchronous && this.transport.overrideMimeType)
|
1052 |
+
this.onStateChange();
|
1053 |
+
|
1054 |
+
}
|
1055 |
+
catch (e) {
|
1056 |
+
this.dispatchException(e);
|
1057 |
+
}
|
1058 |
+
},
|
1059 |
+
|
1060 |
+
onStateChange: function() {
|
1061 |
+
var readyState = this.transport.readyState;
|
1062 |
+
if (readyState > 1 && !((readyState == 4) && this._complete))
|
1063 |
+
this.respondToReadyState(this.transport.readyState);
|
1064 |
+
},
|
1065 |
+
|
1066 |
+
setRequestHeaders: function() {
|
1067 |
+
var headers = {
|
1068 |
+
'X-Requested-With': 'XMLHttpRequest',
|
1069 |
+
'X-Prototype-Version': Prototype.Version,
|
1070 |
+
'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
if (this.method == 'post') {
|
1074 |
+
headers['Content-type'] = this.options.contentType +
|
1075 |
+
(this.options.encoding ? '; charset=' + this.options.encoding : '');
|
1076 |
+
|
1077 |
+
/* Force "Connection: close" for older Mozilla browsers to work
|
1078 |
+
* around a bug where XMLHttpRequest sends an incorrect
|
1079 |
+
* Content-length header. See Mozilla Bugzilla #246651.
|
1080 |
+
*/
|
1081 |
+
if (this.transport.overrideMimeType &&
|
1082 |
+
(navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
|
1083 |
+
headers['Connection'] = 'close';
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
// user-defined headers
|
1087 |
+
if (typeof this.options.requestHeaders == 'object') {
|
1088 |
+
var extras = this.options.requestHeaders;
|
1089 |
+
|
1090 |
+
if (typeof extras.push == 'function')
|
1091 |
+
for (var i = 0, length = extras.length; i < length; i += 2)
|
1092 |
+
headers[extras[i]] = extras[i+1];
|
1093 |
+
else
|
1094 |
+
$H(extras).each(function(pair) { headers[pair.key] = pair.value });
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
for (var name in headers)
|
1098 |
+
this.transport.setRequestHeader(name, headers[name]);
|
1099 |
+
},
|
1100 |
+
|
1101 |
+
success: function() {
|
1102 |
+
return !this.transport.status
|
1103 |
+
|| (this.transport.status >= 200 && this.transport.status < 300);
|
1104 |
+
},
|
1105 |
+
|
1106 |
+
respondToReadyState: function(readyState) {
|
1107 |
+
var state = Ajax.Request.Events[readyState];
|
1108 |
+
var transport = this.transport, json = this.evalJSON();
|
1109 |
+
|
1110 |
+
if (state == 'Complete') {
|
1111 |
+
try {
|
1112 |
+
this._complete = true;
|
1113 |
+
(this.options['on' + this.transport.status]
|
1114 |
+
|| this.options['on' + (this.success() ? 'Success' : 'Failure')]
|
1115 |
+
|| Prototype.emptyFunction)(transport, json);
|
1116 |
+
} catch (e) {
|
1117 |
+
this.dispatchException(e);
|
1118 |
+
}
|
1119 |
+
|
1120 |
+
var contentType = this.getHeader('Content-type');
|
1121 |
+
if (contentType && contentType.strip().
|
1122 |
+
match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
|
1123 |
+
this.evalResponse();
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
try {
|
1127 |
+
(this.options['on' + state] || Prototype.emptyFunction)(transport, json);
|
1128 |
+
Ajax.Responders.dispatch('on' + state, this, transport, json);
|
1129 |
+
} catch (e) {
|
1130 |
+
this.dispatchException(e);
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
if (state == 'Complete') {
|
1134 |
+
// avoid memory leak in MSIE: clean up
|
1135 |
+
this.transport.onreadystatechange = Prototype.emptyFunction;
|
1136 |
+
}
|
1137 |
+
},
|
1138 |
+
|
1139 |
+
getHeader: function(name) {
|
1140 |
+
try {
|
1141 |
+
return this.transport.getResponseHeader(name);
|
1142 |
+
} catch (e) { return null }
|
1143 |
+
},
|
1144 |
+
|
1145 |
+
evalJSON: function() {
|
1146 |
+
try {
|
1147 |
+
var json = this.getHeader('X-JSON');
|
1148 |
+
return json ? json.evalJSON() : null;
|
1149 |
+
} catch (e) { return null }
|
1150 |
+
},
|
1151 |
+
|
1152 |
+
evalResponse: function() {
|
1153 |
+
try {
|
1154 |
+
return eval((this.transport.responseText || '').unfilterJSON());
|
1155 |
+
} catch (e) {
|
1156 |
+
this.dispatchException(e);
|
1157 |
+
}
|
1158 |
+
},
|
1159 |
+
|
1160 |
+
dispatchException: function(exception) {
|
1161 |
+
(this.options.onException || Prototype.emptyFunction)(this, exception);
|
1162 |
+
Ajax.Responders.dispatch('onException', this, exception);
|
1163 |
+
}
|
1164 |
+
});
|
1165 |
+
|
1166 |
+
Ajax.Updater = Class.create();
|
1167 |
+
|
1168 |
+
Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
|
1169 |
+
initialize: function(container, url, options) {
|
1170 |
+
this.container = {
|
1171 |
+
success: (container.success || container),
|
1172 |
+
failure: (container.failure || (container.success ? null : container))
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
this.transport = Ajax.getTransport();
|
1176 |
+
this.setOptions(options);
|
1177 |
+
|
1178 |
+
var onComplete = this.options.onComplete || Prototype.emptyFunction;
|
1179 |
+
this.options.onComplete = (function(transport, param) {
|
1180 |
+
this.updateContent();
|
1181 |
+
onComplete(transport, param);
|
1182 |
+
}).bind(this);
|
1183 |
+
|
1184 |
+
this.request(url);
|
1185 |
+
},
|
1186 |
+
|
1187 |
+
updateContent: function() {
|
1188 |
+
var receiver = this.container[this.success() ? 'success' : 'failure'];
|
1189 |
+
var response = this.transport.responseText;
|
1190 |
+
|
1191 |
+
if (!this.options.evalScripts) response = response.stripScripts();
|
1192 |
+
|
1193 |
+
if (receiver = $(receiver)) {
|
1194 |
+
if (this.options.insertion)
|
1195 |
+
new this.options.insertion(receiver, response);
|
1196 |
+
else
|
1197 |
+
receiver.update(response);
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
if (this.success()) {
|
1201 |
+
if (this.onComplete)
|
1202 |
+
setTimeout(this.onComplete.bind(this), 10);
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
});
|
1206 |
+
|
1207 |
+
Ajax.PeriodicalUpdater = Class.create();
|
1208 |
+
Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
|
1209 |
+
initialize: function(container, url, options) {
|
1210 |
+
this.setOptions(options);
|
1211 |
+
this.onComplete = this.options.onComplete;
|
1212 |
+
|
1213 |
+
this.frequency = (this.options.frequency || 2);
|
1214 |
+
this.decay = (this.options.decay || 1);
|
1215 |
+
|
1216 |
+
this.updater = {};
|
1217 |
+
this.container = container;
|
1218 |
+
this.url = url;
|
1219 |
+
|
1220 |
+
this.start();
|
1221 |
+
},
|
1222 |
+
|
1223 |
+
start: function() {
|
1224 |
+
this.options.onComplete = this.updateComplete.bind(this);
|
1225 |
+
this.onTimerEvent();
|
1226 |
+
},
|
1227 |
+
|
1228 |
+
stop: function() {
|
1229 |
+
this.updater.options.onComplete = undefined;
|
1230 |
+
clearTimeout(this.timer);
|
1231 |
+
(this.onComplete || Prototype.emptyFunction).apply(this, arguments);
|
1232 |
+
},
|
1233 |
+
|
1234 |
+
updateComplete: function(request) {
|
1235 |
+
if (this.options.decay) {
|
1236 |
+
this.decay = (request.responseText == this.lastText ?
|
1237 |
+
this.decay * this.options.decay : 1);
|
1238 |
+
|
1239 |
+
this.lastText = request.responseText;
|
1240 |
+
}
|
1241 |
+
this.timer = setTimeout(this.onTimerEvent.bind(this),
|
1242 |
+
this.decay * this.frequency * 1000);
|
1243 |
+
},
|
1244 |
+
|
1245 |
+
onTimerEvent: function() {
|
1246 |
+
this.updater = new Ajax.Updater(this.container, this.url, this.options);
|
1247 |
+
}
|
1248 |
+
});
|
1249 |
+
function $(element) {
|
1250 |
+
if (arguments.length > 1) {
|
1251 |
+
for (var i = 0, elements = [], length = arguments.length; i < length; i++)
|
1252 |
+
elements.push($(arguments[i]));
|
1253 |
+
return elements;
|
1254 |
+
}
|
1255 |
+
if (typeof element == 'string')
|
1256 |
+
element = document.getElementById(element);
|
1257 |
+
return Element.extend(element);
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
if (Prototype.BrowserFeatures.XPath) {
|
1261 |
+
document._getElementsByXPath = function(expression, parentElement) {
|
1262 |
+
var results = [];
|
1263 |
+
var query = document.evaluate(expression, $(parentElement) || document,
|
1264 |
+
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
1265 |
+
for (var i = 0, length = query.snapshotLength; i < length; i++)
|
1266 |
+
results.push(query.snapshotItem(i));
|
1267 |
+
return results;
|
1268 |
+
};
|
1269 |
+
|
1270 |
+
document.getElementsByClassName = function(className, parentElement) {
|
1271 |
+
var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
|
1272 |
+
return document._getElementsByXPath(q, parentElement);
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
} else document.getElementsByClassName = function(className, parentElement) {
|
1276 |
+
var children = ($(parentElement) || document.body).getElementsByTagName('*');
|
1277 |
+
var elements = [], child, pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
|
1278 |
+
for (var i = 0, length = children.length; i < length; i++) {
|
1279 |
+
child = children[i];
|
1280 |
+
var elementClassName = child.className;
|
1281 |
+
if (elementClassName.length == 0) continue;
|
1282 |
+
if (elementClassName == className || elementClassName.match(pattern))
|
1283 |
+
elements.push(Element.extend(child));
|
1284 |
+
}
|
1285 |
+
return elements;
|
1286 |
+
};
|
1287 |
+
|
1288 |
+
/*--------------------------------------------------------------------------*/
|
1289 |
+
|
1290 |
+
if (!window.Element) var Element = {};
|
1291 |
+
|
1292 |
+
Element.extend = function(element) {
|
1293 |
+
var F = Prototype.BrowserFeatures;
|
1294 |
+
if (!element || !element.tagName || element.nodeType == 3 ||
|
1295 |
+
element._extended || F.SpecificElementExtensions || element == window)
|
1296 |
+
return element;
|
1297 |
+
|
1298 |
+
var methods = {}, tagName = element.tagName, cache = Element.extend.cache,
|
1299 |
+
T = Element.Methods.ByTag;
|
1300 |
+
|
1301 |
+
// extend methods for all tags (Safari doesn't need this)
|
1302 |
+
if (!F.ElementExtensions) {
|
1303 |
+
Object.extend(methods, Element.Methods),
|
1304 |
+
Object.extend(methods, Element.Methods.Simulated);
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
// extend methods for specific tags
|
1308 |
+
if (T[tagName]) Object.extend(methods, T[tagName]);
|
1309 |
+
|
1310 |
+
for (var property in methods) {
|
1311 |
+
var value = methods[property];
|
1312 |
+
if (typeof value == 'function' && !(property in element))
|
1313 |
+
element[property] = cache.findOrStore(value);
|
1314 |
+
}
|
1315 |
+
|
1316 |
+
element._extended = Prototype.emptyFunction;
|
1317 |
+
return element;
|
1318 |
+
};
|
1319 |
+
|
1320 |
+
Element.extend.cache = {
|
1321 |
+
findOrStore: function(value) {
|
1322 |
+
return this[value] = this[value] || function() {
|
1323 |
+
return value.apply(null, [this].concat($A(arguments)));
|
1324 |
+
}
|
1325 |
+
}
|
1326 |
+
};
|
1327 |
+
|
1328 |
+
Element.Methods = {
|
1329 |
+
visible: function(element) {
|
1330 |
+
return $(element).style.display != 'none';
|
1331 |
+
},
|
1332 |
+
|
1333 |
+
toggle: function(element) {
|
1334 |
+
element = $(element);
|
1335 |
+
Element[Element.visible(element) ? 'hide' : 'show'](element);
|
1336 |
+
return element;
|
1337 |
+
},
|
1338 |
+
|
1339 |
+
hide: function(element) {
|
1340 |
+
$(element).style.display = 'none';
|
1341 |
+
return element;
|
1342 |
+
},
|
1343 |
+
|
1344 |
+
show: function(element) {
|
1345 |
+
$(element).style.display = '';
|
1346 |
+
return element;
|
1347 |
+
},
|
1348 |
+
|
1349 |
+
remove: function(element) {
|
1350 |
+
element = $(element);
|
1351 |
+
element.parentNode.removeChild(element);
|
1352 |
+
return element;
|
1353 |
+
},
|
1354 |
+
|
1355 |
+
update: function(element, html) {
|
1356 |
+
html = typeof html == 'undefined' ? '' : html.toString();
|
1357 |
+
$(element).innerHTML = html.stripScripts();
|
1358 |
+
setTimeout(function() {html.evalScripts()}, 10);
|
1359 |
+
return element;
|
1360 |
+
},
|
1361 |
+
|
1362 |
+
replace: function(element, html) {
|
1363 |
+
element = $(element);
|
1364 |
+
html = typeof html == 'undefined' ? '' : html.toString();
|
1365 |
+
if (element.outerHTML) {
|
1366 |
+
element.outerHTML = html.stripScripts();
|
1367 |
+
} else {
|
1368 |
+
var range = element.ownerDocument.createRange();
|
1369 |
+
range.selectNodeContents(element);
|
1370 |
+
element.parentNode.replaceChild(
|
1371 |
+
range.createContextualFragment(html.stripScripts()), element);
|
1372 |
+
}
|
1373 |
+
setTimeout(function() {html.evalScripts()}, 10);
|
1374 |
+
return element;
|
1375 |
+
},
|
1376 |
+
|
1377 |
+
inspect: function(element) {
|
1378 |
+
element = $(element);
|
1379 |
+
var result = '<' + element.tagName.toLowerCase();
|
1380 |
+
$H({'id': 'id', 'className': 'class'}).each(function(pair) {
|
1381 |
+
var property = pair.first(), attribute = pair.last();
|
1382 |
+
var value = (element[property] || '').toString();
|
1383 |
+
if (value) result += ' ' + attribute + '=' + value.inspect(true);
|
1384 |
+
});
|
1385 |
+
return result + '>';
|
1386 |
+
},
|
1387 |
+
|
1388 |
+
recursivelyCollect: function(element, property) {
|
1389 |
+
element = $(element);
|
1390 |
+
var elements = [];
|
1391 |
+
while (element = element[property])
|
1392 |
+
if (element.nodeType == 1)
|
1393 |
+
elements.push(Element.extend(element));
|
1394 |
+
return elements;
|
1395 |
+
},
|
1396 |
+
|
1397 |
+
ancestors: function(element) {
|
1398 |
+
return $(element).recursivelyCollect('parentNode');
|
1399 |
+
},
|
1400 |
+
|
1401 |
+
descendants: function(element) {
|
1402 |
+
return $A($(element).getElementsByTagName('*')).each(Element.extend);
|
1403 |
+
},
|
1404 |
+
|
1405 |
+
firstDescendant: function(element) {
|
1406 |
+
element = $(element).firstChild;
|
1407 |
+
while (element && element.nodeType != 1) element = element.nextSibling;
|
1408 |
+
return $(element);
|
1409 |
+
},
|
1410 |
+
|
1411 |
+
immediateDescendants: function(element) {
|
1412 |
+
if (!(element = $(element).firstChild)) return [];
|
1413 |
+
while (element && element.nodeType != 1) element = element.nextSibling;
|
1414 |
+
if (element) return [element].concat($(element).nextSiblings());
|
1415 |
+
return [];
|
1416 |
+
},
|
1417 |
+
|
1418 |
+
previousSiblings: function(element) {
|
1419 |
+
return $(element).recursivelyCollect('previousSibling');
|
1420 |
+
},
|
1421 |
+
|
1422 |
+
nextSiblings: function(element) {
|
1423 |
+
return $(element).recursivelyCollect('nextSibling');
|
1424 |
+
},
|
1425 |
+
|
1426 |
+
siblings: function(element) {
|
1427 |
+
element = $(element);
|
1428 |
+
return element.previousSiblings().reverse().concat(element.nextSiblings());
|
1429 |
+
},
|
1430 |
+
|
1431 |
+
match: function(element, selector) {
|
1432 |
+
if (typeof selector == 'string')
|
1433 |
+
selector = new Selector(selector);
|
1434 |
+
return selector.match($(element));
|
1435 |
+
},
|
1436 |
+
|
1437 |
+
up: function(element, expression, index) {
|
1438 |
+
element = $(element);
|
1439 |
+
if (arguments.length == 1) return $(element.parentNode);
|
1440 |
+
var ancestors = element.ancestors();
|
1441 |
+
return expression ? Selector.findElement(ancestors, expression, index) :
|
1442 |
+
ancestors[index || 0];
|
1443 |
+
},
|
1444 |
+
|
1445 |
+
down: function(element, expression, index) {
|
1446 |
+
element = $(element);
|
1447 |
+
if (arguments.length == 1) return element.firstDescendant();
|
1448 |
+
var descendants = element.descendants();
|
1449 |
+
return expression ? Selector.findElement(descendants, expression, index) :
|
1450 |
+
descendants[index || 0];
|
1451 |
+
},
|
1452 |
+
|
1453 |
+
previous: function(element, expression, index) {
|
1454 |
+
element = $(element);
|
1455 |
+
if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
|
1456 |
+
var previousSiblings = element.previousSiblings();
|
1457 |
+
return expression ? Selector.findElement(previousSiblings, expression, index) :
|
1458 |
+
previousSiblings[index || 0];
|
1459 |
+
},
|
1460 |
+
|
1461 |
+
next: function(element, expression, index) {
|
1462 |
+
element = $(element);
|
1463 |
+
if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
|
1464 |
+
var nextSiblings = element.nextSiblings();
|
1465 |
+
return expression ? Selector.findElement(nextSiblings, expression, index) :
|
1466 |
+
nextSiblings[index || 0];
|
1467 |
+
},
|
1468 |
+
|
1469 |
+
getElementsBySelector: function() {
|
1470 |
+
var args = $A(arguments), element = $(args.shift());
|
1471 |
+
return Selector.findChildElements(element, args);
|
1472 |
+
},
|
1473 |
+
|
1474 |
+
getElementsByClassName: function(element, className) {
|
1475 |
+
return document.getElementsByClassName(className, element);
|
1476 |
+
},
|
1477 |
+
|
1478 |
+
readAttribute: function(element, name) {
|
1479 |
+
element = $(element);
|
1480 |
+
if (Prototype.Browser.IE) {
|
1481 |
+
if (!element.attributes) return null;
|
1482 |
+
var t = Element._attributeTranslations;
|
1483 |
+
if (t.values[name]) return t.values[name](element, name);
|
1484 |
+
if (t.names[name]) name = t.names[name];
|
1485 |
+
var attribute = element.attributes[name];
|
1486 |
+
return attribute ? attribute.nodeValue : null;
|
1487 |
+
}
|
1488 |
+
return element.getAttribute(name);
|
1489 |
+
},
|
1490 |
+
|
1491 |
+
getHeight: function(element) {
|
1492 |
+
return $(element).getDimensions().height;
|
1493 |
+
},
|
1494 |
+
|
1495 |
+
getWidth: function(element) {
|
1496 |
+
return $(element).getDimensions().width;
|
1497 |
+
},
|
1498 |
+
|
1499 |
+
classNames: function(element) {
|
1500 |
+
return new Element.ClassNames(element);
|
1501 |
+
},
|
1502 |
+
|
1503 |
+
hasClassName: function(element, className) {
|
1504 |
+
if (!(element = $(element))) return;
|
1505 |
+
var elementClassName = element.className;
|
1506 |
+
if (elementClassName.length == 0) return false;
|
1507 |
+
if (elementClassName == className ||
|
1508 |
+
elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
|
1509 |
+
return true;
|
1510 |
+
return false;
|
1511 |
+
},
|
1512 |
+
|
1513 |
+
addClassName: function(element, className) {
|
1514 |
+
if (!(element = $(element))) return;
|
1515 |
+
Element.classNames(element).add(className);
|
1516 |
+
return element;
|
1517 |
+
},
|
1518 |
+
|
1519 |
+
removeClassName: function(element, className) {
|
1520 |
+
if (!(element = $(element))) return;
|
1521 |
+
Element.classNames(element).remove(className);
|
1522 |
+
return element;
|
1523 |
+
},
|
1524 |
+
|
1525 |
+
toggleClassName: function(element, className) {
|
1526 |
+
if (!(element = $(element))) return;
|
1527 |
+
Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
|
1528 |
+
return element;
|
1529 |
+
},
|
1530 |
+
|
1531 |
+
observe: function() {
|
1532 |
+
Event.observe.apply(Event, arguments);
|
1533 |
+
return $A(arguments).first();
|
1534 |
+
},
|
1535 |
+
|
1536 |
+
stopObserving: function() {
|
1537 |
+
Event.stopObserving.apply(Event, arguments);
|
1538 |
+
return $A(arguments).first();
|
1539 |
+
},
|
1540 |
+
|
1541 |
+
// removes whitespace-only text node children
|
1542 |
+
cleanWhitespace: function(element) {
|
1543 |
+
element = $(element);
|
1544 |
+
var node = element.firstChild;
|
1545 |
+
while (node) {
|
1546 |
+
var nextNode = node.nextSibling;
|
1547 |
+
if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
|
1548 |
+
element.removeChild(node);
|
1549 |
+
node = nextNode;
|
1550 |
+
}
|
1551 |
+
return element;
|
1552 |
+
},
|
1553 |
+
|
1554 |
+
empty: function(element) {
|
1555 |
+
return $(element).innerHTML.blank();
|
1556 |
+
},
|
1557 |
+
|
1558 |
+
descendantOf: function(element, ancestor) {
|
1559 |
+
element = $(element), ancestor = $(ancestor);
|
1560 |
+
while (element = element.parentNode)
|
1561 |
+
if (element == ancestor) return true;
|
1562 |
+
return false;
|
1563 |
+
},
|
1564 |
+
|
1565 |
+
scrollTo: function(element) {
|
1566 |
+
element = $(element);
|
1567 |
+
var pos = Position.cumulativeOffset(element);
|
1568 |
+
window.scrollTo(pos[0], pos[1]);
|
1569 |
+
return element;
|
1570 |
+
},
|
1571 |
+
|
1572 |
+
getStyle: function(element, style) {
|
1573 |
+
element = $(element);
|
1574 |
+
style = style == 'float' ? 'cssFloat' : style.camelize();
|
1575 |
+
var value = element.style[style];
|
1576 |
+
if (!value) {
|
1577 |
+
var css = document.defaultView.getComputedStyle(element, null);
|
1578 |
+
value = css ? css[style] : null;
|
1579 |
+
}
|
1580 |
+
if (style == 'opacity') return value ? parseFloat(value) : 1.0;
|
1581 |
+
return value == 'auto' ? null : value;
|
1582 |
+
},
|
1583 |
+
|
1584 |
+
getOpacity: function(element) {
|
1585 |
+
return $(element).getStyle('opacity');
|
1586 |
+
},
|
1587 |
+
|
1588 |
+
setStyle: function(element, styles, camelized) {
|
1589 |
+
element = $(element);
|
1590 |
+
var elementStyle = element.style;
|
1591 |
+
|
1592 |
+
for (var property in styles)
|
1593 |
+
if (property == 'opacity') element.setOpacity(styles[property])
|
1594 |
+
else
|
1595 |
+
elementStyle[(property == 'float' || property == 'cssFloat') ?
|
1596 |
+
(elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
|
1597 |
+
(camelized ? property : property.camelize())] = styles[property];
|
1598 |
+
|
1599 |
+
return element;
|
1600 |
+
},
|
1601 |
+
|
1602 |
+
setOpacity: function(element, value) {
|
1603 |
+
element = $(element);
|
1604 |
+
element.style.opacity = (value == 1 || value === '') ? '' :
|
1605 |
+
(value < 0.00001) ? 0 : value;
|
1606 |
+
return element;
|
1607 |
+
},
|
1608 |
+
|
1609 |
+
getDimensions: function(element) {
|
1610 |
+
element = $(element);
|
1611 |
+
var display = $(element).getStyle('display');
|
1612 |
+
if (display != 'none' && display != null) // Safari bug
|
1613 |
+
return {width: element.offsetWidth, height: element.offsetHeight};
|
1614 |
+
|
1615 |
+
// All *Width and *Height properties give 0 on elements with display none,
|
1616 |
+
// so enable the element temporarily
|
1617 |
+
var els = element.style;
|
1618 |
+
var originalVisibility = els.visibility;
|
1619 |
+
var originalPosition = els.position;
|
1620 |
+
var originalDisplay = els.display;
|
1621 |
+
els.visibility = 'hidden';
|
1622 |
+
els.position = 'absolute';
|
1623 |
+
els.display = 'block';
|
1624 |
+
var originalWidth = element.clientWidth;
|
1625 |
+
var originalHeight = element.clientHeight;
|
1626 |
+
els.display = originalDisplay;
|
1627 |
+
els.position = originalPosition;
|
1628 |
+
els.visibility = originalVisibility;
|
1629 |
+
return {width: originalWidth, height: originalHeight};
|
1630 |
+
},
|
1631 |
+
|
1632 |
+
makePositioned: function(element) {
|
1633 |
+
element = $(element);
|
1634 |
+
var pos = Element.getStyle(element, 'position');
|
1635 |
+
if (pos == 'static' || !pos) {
|
1636 |
+
element._madePositioned = true;
|
1637 |
+
element.style.position = 'relative';
|
1638 |
+
// Opera returns the offset relative to the positioning context, when an
|
1639 |
+
// element is position relative but top and left have not been defined
|
1640 |
+
if (window.opera) {
|
1641 |
+
element.style.top = 0;
|
1642 |
+
element.style.left = 0;
|
1643 |
+
}
|
1644 |
+
}
|
1645 |
+
return element;
|
1646 |
+
},
|
1647 |
+
|
1648 |
+
undoPositioned: function(element) {
|
1649 |
+
element = $(element);
|
1650 |
+
if (element._madePositioned) {
|
1651 |
+
element._madePositioned = undefined;
|
1652 |
+
element.style.position =
|
1653 |
+
element.style.top =
|
1654 |
+
element.style.left =
|
1655 |
+
element.style.bottom =
|
1656 |
+
element.style.right = '';
|
1657 |
+
}
|
1658 |
+
return element;
|
1659 |
+
},
|
1660 |
+
|
1661 |
+
makeClipping: function(element) {
|
1662 |
+
element = $(element);
|
1663 |
+
if (element._overflow) return element;
|
1664 |
+
element._overflow = element.style.overflow || 'auto';
|
1665 |
+
if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
|
1666 |
+
element.style.overflow = 'hidden';
|
1667 |
+
return element;
|
1668 |
+
},
|
1669 |
+
|
1670 |
+
undoClipping: function(element) {
|
1671 |
+
element = $(element);
|
1672 |
+
if (!element._overflow) return element;
|
1673 |
+
element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
|
1674 |
+
element._overflow = null;
|
1675 |
+
return element;
|
1676 |
+
}
|
1677 |
+
};
|
1678 |
+
|
1679 |
+
Object.extend(Element.Methods, {
|
1680 |
+
childOf: Element.Methods.descendantOf,
|
1681 |
+
childElements: Element.Methods.immediateDescendants
|
1682 |
+
});
|
1683 |
+
|
1684 |
+
if (Prototype.Browser.Opera) {
|
1685 |
+
Element.Methods._getStyle = Element.Methods.getStyle;
|
1686 |
+
Element.Methods.getStyle = function(element, style) {
|
1687 |
+
switch(style) {
|
1688 |
+
case 'left':
|
1689 |
+
case 'top':
|
1690 |
+
case 'right':
|
1691 |
+
case 'bottom':
|
1692 |
+
if (Element._getStyle(element, 'position') == 'static') return null;
|
1693 |
+
default: return Element._getStyle(element, style);
|
1694 |
+
}
|
1695 |
+
};
|
1696 |
+
}
|
1697 |
+
else if (Prototype.Browser.IE) {
|
1698 |
+
Element.Methods.getStyle = function(element, style) {
|
1699 |
+
element = $(element);
|
1700 |
+
style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
|
1701 |
+
var value = element.style[style];
|
1702 |
+
if (!value && element.currentStyle) value = element.currentStyle[style];
|
1703 |
+
|
1704 |
+
if (style == 'opacity') {
|
1705 |
+
if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
|
1706 |
+
if (value[1]) return parseFloat(value[1]) / 100;
|
1707 |
+
return 1.0;
|
1708 |
+
}
|
1709 |
+
|
1710 |
+
if (value == 'auto') {
|
1711 |
+
if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
|
1712 |
+
return element['offset'+style.capitalize()] + 'px';
|
1713 |
+
return null;
|
1714 |
+
}
|
1715 |
+
return value;
|
1716 |
+
};
|
1717 |
+
|
1718 |
+
Element.Methods.setOpacity = function(element, value) {
|
1719 |
+
element = $(element);
|
1720 |
+
var filter = element.getStyle('filter'), style = element.style;
|
1721 |
+
if (value == 1 || value === '') {
|
1722 |
+
style.filter = filter.replace(/alpha\([^\)]*\)/gi,'');
|
1723 |
+
return element;
|
1724 |
+
} else if (value < 0.00001) value = 0;
|
1725 |
+
style.filter = filter.replace(/alpha\([^\)]*\)/gi, '') +
|
1726 |
+
'alpha(opacity=' + (value * 100) + ')';
|
1727 |
+
return element;
|
1728 |
+
};
|
1729 |
+
|
1730 |
+
// IE is missing .innerHTML support for TABLE-related elements
|
1731 |
+
Element.Methods.update = function(element, html) {
|
1732 |
+
element = $(element);
|
1733 |
+
html = typeof html == 'undefined' ? '' : html.toString();
|
1734 |
+
var tagName = element.tagName.toUpperCase();
|
1735 |
+
if (['THEAD','TBODY','TR','TD'].include(tagName)) {
|
1736 |
+
var div = document.createElement('div');
|
1737 |
+
switch (tagName) {
|
1738 |
+
case 'THEAD':
|
1739 |
+
case 'TBODY':
|
1740 |
+
div.innerHTML = '<table><tbody>' + html.stripScripts() + '</tbody></table>';
|
1741 |
+
depth = 2;
|
1742 |
+
break;
|
1743 |
+
case 'TR':
|
1744 |
+
div.innerHTML = '<table><tbody><tr>' + html.stripScripts() + '</tr></tbody></table>';
|
1745 |
+
depth = 3;
|
1746 |
+
break;
|
1747 |
+
case 'TD':
|
1748 |
+
div.innerHTML = '<table><tbody><tr><td>' + html.stripScripts() + '</td></tr></tbody></table>';
|
1749 |
+
depth = 4;
|
1750 |
+
}
|
1751 |
+
$A(element.childNodes).each(function(node) { element.removeChild(node) });
|
1752 |
+
depth.times(function() { div = div.firstChild });
|
1753 |
+
$A(div.childNodes).each(function(node) { element.appendChild(node) });
|
1754 |
+
} else {
|
1755 |
+
element.innerHTML = html.stripScripts();
|
1756 |
+
}
|
1757 |
+
setTimeout(function() { html.evalScripts() }, 10);
|
1758 |
+
return element;
|
1759 |
+
}
|
1760 |
+
}
|
1761 |
+
else if (Prototype.Browser.Gecko) {
|
1762 |
+
Element.Methods.setOpacity = function(element, value) {
|
1763 |
+
element = $(element);
|
1764 |
+
element.style.opacity = (value == 1) ? 0.999999 :
|
1765 |
+
(value === '') ? '' : (value < 0.00001) ? 0 : value;
|
1766 |
+
return element;
|
1767 |
+
};
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
Element._attributeTranslations = {
|
1771 |
+
names: {
|
1772 |
+
colspan: "colSpan",
|
1773 |
+
rowspan: "rowSpan",
|
1774 |
+
valign: "vAlign",
|
1775 |
+
datetime: "dateTime",
|
1776 |
+
accesskey: "accessKey",
|
1777 |
+
tabindex: "tabIndex",
|
1778 |
+
enctype: "encType",
|
1779 |
+
maxlength: "maxLength",
|
1780 |
+
readonly: "readOnly",
|
1781 |
+
longdesc: "longDesc"
|
1782 |
+
},
|
1783 |
+
values: {
|
1784 |
+
_getAttr: function(element, attribute) {
|
1785 |
+
return element.getAttribute(attribute, 2);
|
1786 |
+
},
|
1787 |
+
_flag: function(element, attribute) {
|
1788 |
+
return $(element).hasAttribute(attribute) ? attribute : null;
|
1789 |
+
},
|
1790 |
+
style: function(element) {
|
1791 |
+
return element.style.cssText.toLowerCase();
|
1792 |
+
},
|
1793 |
+
title: function(element) {
|
1794 |
+
var node = element.getAttributeNode('title');
|
1795 |
+
return node.specified ? node.nodeValue : null;
|
1796 |
+
}
|
1797 |
+
}
|
1798 |
+
};
|
1799 |
+
|
1800 |
+
(function() {
|
1801 |
+
Object.extend(this, {
|
1802 |
+
href: this._getAttr,
|
1803 |
+
src: this._getAttr,
|
1804 |
+
type: this._getAttr,
|
1805 |
+
disabled: this._flag,
|
1806 |
+
checked: this._flag,
|
1807 |
+
readonly: this._flag,
|
1808 |
+
multiple: this._flag
|
1809 |
+
});
|
1810 |
+
}).call(Element._attributeTranslations.values);
|
1811 |
+
|
1812 |
+
Element.Methods.Simulated = {
|
1813 |
+
hasAttribute: function(element, attribute) {
|
1814 |
+
var t = Element._attributeTranslations, node;
|
1815 |
+
attribute = t.names[attribute] || attribute;
|
1816 |
+
node = $(element).getAttributeNode(attribute);
|
1817 |
+
return node && node.specified;
|
1818 |
+
}
|
1819 |
+
};
|
1820 |
+
|
1821 |
+
Element.Methods.ByTag = {};
|
1822 |
+
|
1823 |
+
Object.extend(Element, Element.Methods);
|
1824 |
+
|
1825 |
+
if (!Prototype.BrowserFeatures.ElementExtensions &&
|
1826 |
+
document.createElement('div').__proto__) {
|
1827 |
+
window.HTMLElement = {};
|
1828 |
+
window.HTMLElement.prototype = document.createElement('div').__proto__;
|
1829 |
+
Prototype.BrowserFeatures.ElementExtensions = true;
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
Element.hasAttribute = function(element, attribute) {
|
1833 |
+
if (element.hasAttribute) return element.hasAttribute(attribute);
|
1834 |
+
return Element.Methods.Simulated.hasAttribute(element, attribute);
|
1835 |
+
};
|
1836 |
+
|
1837 |
+
Element.addMethods = function(methods) {
|
1838 |
+
var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
|
1839 |
+
|
1840 |
+
if (!methods) {
|
1841 |
+
Object.extend(Form, Form.Methods);
|
1842 |
+
Object.extend(Form.Element, Form.Element.Methods);
|
1843 |
+
Object.extend(Element.Methods.ByTag, {
|
1844 |
+
"FORM": Object.clone(Form.Methods),
|
1845 |
+
"INPUT": Object.clone(Form.Element.Methods),
|
1846 |
+
"SELECT": Object.clone(Form.Element.Methods),
|
1847 |
+
"TEXTAREA": Object.clone(Form.Element.Methods)
|
1848 |
+
});
|
1849 |
+
}
|
1850 |
+
|
1851 |
+
if (arguments.length == 2) {
|
1852 |
+
var tagName = methods;
|
1853 |
+
methods = arguments[1];
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
if (!tagName) Object.extend(Element.Methods, methods || {});
|
1857 |
+
else {
|
1858 |
+
if (tagName.constructor == Array) tagName.each(extend);
|
1859 |
+
else extend(tagName);
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
function extend(tagName) {
|
1863 |
+
tagName = tagName.toUpperCase();
|
1864 |
+
if (!Element.Methods.ByTag[tagName])
|
1865 |
+
Element.Methods.ByTag[tagName] = {};
|
1866 |
+
Object.extend(Element.Methods.ByTag[tagName], methods);
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
function copy(methods, destination, onlyIfAbsent) {
|
1870 |
+
onlyIfAbsent = onlyIfAbsent || false;
|
1871 |
+
var cache = Element.extend.cache;
|
1872 |
+
for (var property in methods) {
|
1873 |
+
var value = methods[property];
|
1874 |
+
if (!onlyIfAbsent || !(property in destination))
|
1875 |
+
destination[property] = cache.findOrStore(value);
|
1876 |
+
}
|
1877 |
+
}
|
1878 |
+
|
1879 |
+
function findDOMClass(tagName) {
|
1880 |
+
var klass;
|
1881 |
+
var trans = {
|
1882 |
+
"OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
|
1883 |
+
"FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
|
1884 |
+
"DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
|
1885 |
+
"H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
|
1886 |
+
"INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
|
1887 |
+
"TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
|
1888 |
+
"TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
|
1889 |
+
"TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
|
1890 |
+
"FrameSet", "IFRAME": "IFrame"
|
1891 |
+
};
|
1892 |
+
if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
|
1893 |
+
if (window[klass]) return window[klass];
|
1894 |
+
klass = 'HTML' + tagName + 'Element';
|
1895 |
+
if (window[klass]) return window[klass];
|
1896 |
+
klass = 'HTML' + tagName.capitalize() + 'Element';
|
1897 |
+
if (window[klass]) return window[klass];
|
1898 |
+
|
1899 |
+
window[klass] = {};
|
1900 |
+
window[klass].prototype = document.createElement(tagName).__proto__;
|
1901 |
+
return window[klass];
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
if (F.ElementExtensions) {
|
1905 |
+
copy(Element.Methods, HTMLElement.prototype);
|
1906 |
+
copy(Element.Methods.Simulated, HTMLElement.prototype, true);
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
if (F.SpecificElementExtensions) {
|
1910 |
+
for (var tag in Element.Methods.ByTag) {
|
1911 |
+
var klass = findDOMClass(tag);
|
1912 |
+
if (typeof klass == "undefined") continue;
|
1913 |
+
copy(T[tag], klass.prototype);
|
1914 |
+
}
|
1915 |
+
}
|
1916 |
+
|
1917 |
+
Object.extend(Element, Element.Methods);
|
1918 |
+
delete Element.ByTag;
|
1919 |
+
};
|
1920 |
+
|
1921 |
+
var Toggle = { display: Element.toggle };
|
1922 |
+
|
1923 |
+
/*--------------------------------------------------------------------------*/
|
1924 |
+
|
1925 |
+
Abstract.Insertion = function(adjacency) {
|
1926 |
+
this.adjacency = adjacency;
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
Abstract.Insertion.prototype = {
|
1930 |
+
initialize: function(element, content) {
|
1931 |
+
this.element = $(element);
|
1932 |
+
this.content = content.stripScripts();
|
1933 |
+
|
1934 |
+
if (this.adjacency && this.element.insertAdjacentHTML) {
|
1935 |
+
try {
|
1936 |
+
this.element.insertAdjacentHTML(this.adjacency, this.content);
|
1937 |
+
} catch (e) {
|
1938 |
+
var tagName = this.element.tagName.toUpperCase();
|
1939 |
+
if (['TBODY', 'TR'].include(tagName)) {
|
1940 |
+
this.insertContent(this.contentFromAnonymousTable());
|
1941 |
+
} else {
|
1942 |
+
throw e;
|
1943 |
+
}
|
1944 |
+
}
|
1945 |
+
} else {
|
1946 |
+
this.range = this.element.ownerDocument.createRange();
|
1947 |
+
if (this.initializeRange) this.initializeRange();
|
1948 |
+
this.insertContent([this.range.createContextualFragment(this.content)]);
|
1949 |
+
}
|
1950 |
+
|
1951 |
+
setTimeout(function() {content.evalScripts()}, 10);
|
1952 |
+
},
|
1953 |
+
|
1954 |
+
contentFromAnonymousTable: function() {
|
1955 |
+
var div = document.createElement('div');
|
1956 |
+
div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
|
1957 |
+
return $A(div.childNodes[0].childNodes[0].childNodes);
|
1958 |
+
}
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
var Insertion = new Object();
|
1962 |
+
|
1963 |
+
Insertion.Before = Class.create();
|
1964 |
+
Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
|
1965 |
+
initializeRange: function() {
|
1966 |
+
this.range.setStartBefore(this.element);
|
1967 |
+
},
|
1968 |
+
|
1969 |
+
insertContent: function(fragments) {
|
1970 |
+
fragments.each((function(fragment) {
|
1971 |
+
this.element.parentNode.insertBefore(fragment, this.element);
|
1972 |
+
}).bind(this));
|
1973 |
+
}
|
1974 |
+
});
|
1975 |
+
|
1976 |
+
Insertion.Top = Class.create();
|
1977 |
+
Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
|
1978 |
+
initializeRange: function() {
|
1979 |
+
this.range.selectNodeContents(this.element);
|
1980 |
+
this.range.collapse(true);
|
1981 |
+
},
|
1982 |
+
|
1983 |
+
insertContent: function(fragments) {
|
1984 |
+
fragments.reverse(false).each((function(fragment) {
|
1985 |
+
this.element.insertBefore(fragment, this.element.firstChild);
|
1986 |
+
}).bind(this));
|
1987 |
+
}
|
1988 |
+
});
|
1989 |
+
|
1990 |
+
Insertion.Bottom = Class.create();
|
1991 |
+
Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
|
1992 |
+
initializeRange: function() {
|
1993 |
+
this.range.selectNodeContents(this.element);
|
1994 |
+
this.range.collapse(this.element);
|
1995 |
+
},
|
1996 |
+
|
1997 |
+
insertContent: function(fragments) {
|
1998 |
+
fragments.each((function(fragment) {
|
1999 |
+
this.element.appendChild(fragment);
|
2000 |
+
}).bind(this));
|
2001 |
+
}
|
2002 |
+
});
|
2003 |
+
|
2004 |
+
Insertion.After = Class.create();
|
2005 |
+
Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
|
2006 |
+
initializeRange: function() {
|
2007 |
+
this.range.setStartAfter(this.element);
|
2008 |
+
},
|
2009 |
+
|
2010 |
+
insertContent: function(fragments) {
|
2011 |
+
fragments.each((function(fragment) {
|
2012 |
+
this.element.parentNode.insertBefore(fragment,
|
2013 |
+
this.element.nextSibling);
|
2014 |
+
}).bind(this));
|
2015 |
+
}
|
2016 |
+
});
|
2017 |
+
|
2018 |
+
/*--------------------------------------------------------------------------*/
|
2019 |
+
|
2020 |
+
Element.ClassNames = Class.create();
|
2021 |
+
Element.ClassNames.prototype = {
|
2022 |
+
initialize: function(element) {
|
2023 |
+
this.element = $(element);
|
2024 |
+
},
|
2025 |
+
|
2026 |
+
_each: function(iterator) {
|
2027 |
+
this.element.className.split(/\s+/).select(function(name) {
|
2028 |
+
return name.length > 0;
|
2029 |
+
})._each(iterator);
|
2030 |
+
},
|
2031 |
+
|
2032 |
+
set: function(className) {
|
2033 |
+
this.element.className = className;
|
2034 |
+
},
|
2035 |
+
|
2036 |
+
add: function(classNameToAdd) {
|
2037 |
+
if (this.include(classNameToAdd)) return;
|
2038 |
+
this.set($A(this).concat(classNameToAdd).join(' '));
|
2039 |
+
},
|
2040 |
+
|
2041 |
+
remove: function(classNameToRemove) {
|
2042 |
+
if (!this.include(classNameToRemove)) return;
|
2043 |
+
this.set($A(this).without(classNameToRemove).join(' '));
|
2044 |
+
},
|
2045 |
+
|
2046 |
+
toString: function() {
|
2047 |
+
return $A(this).join(' ');
|
2048 |
+
}
|
2049 |
+
};
|
2050 |
+
|
2051 |
+
Object.extend(Element.ClassNames.prototype, Enumerable);
|
2052 |
+
/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
|
2053 |
+
* part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
|
2054 |
+
* license. Please see http://www.yui-ext.com/ for more information. */
|
2055 |
+
|
2056 |
+
var Selector = Class.create();
|
2057 |
+
|
2058 |
+
Selector.prototype = {
|
2059 |
+
initialize: function(expression) {
|
2060 |
+
this.expression = expression.strip();
|
2061 |
+
this.compileMatcher();
|
2062 |
+
},
|
2063 |
+
|
2064 |
+
compileMatcher: function() {
|
2065 |
+
// Selectors with namespaced attributes can't use the XPath version
|
2066 |
+
if (Prototype.BrowserFeatures.XPath && !(/\[[\w-]*?:/).test(this.expression))
|
2067 |
+
return this.compileXPathMatcher();
|
2068 |
+
|
2069 |
+
var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
|
2070 |
+
c = Selector.criteria, le, p, m;
|
2071 |
+
|
2072 |
+
if (Selector._cache[e]) {
|
2073 |
+
this.matcher = Selector._cache[e]; return;
|
2074 |
+
}
|
2075 |
+
this.matcher = ["this.matcher = function(root) {",
|
2076 |
+
"var r = root, h = Selector.handlers, c = false, n;"];
|
2077 |
+
|
2078 |
+
while (e && le != e && (/\S/).test(e)) {
|
2079 |
+
le = e;
|
2080 |
+
for (var i in ps) {
|
2081 |
+
p = ps[i];
|
2082 |
+
if (m = e.match(p)) {
|
2083 |
+
this.matcher.push(typeof c[i] == 'function' ? c[i](m) :
|
2084 |
+
new Template(c[i]).evaluate(m));
|
2085 |
+
e = e.replace(m[0], '');
|
2086 |
+
break;
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
}
|
2090 |
+
|
2091 |
+
this.matcher.push("return h.unique(n);\n}");
|
2092 |
+
eval(this.matcher.join('\n'));
|
2093 |
+
Selector._cache[this.expression] = this.matcher;
|
2094 |
+
},
|
2095 |
+
|
2096 |
+
compileXPathMatcher: function() {
|
2097 |
+
var e = this.expression, ps = Selector.patterns,
|
2098 |
+
x = Selector.xpath, le, m;
|
2099 |
+
|
2100 |
+
if (Selector._cache[e]) {
|
2101 |
+
this.xpath = Selector._cache[e]; return;
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
this.matcher = ['.//*'];
|
2105 |
+
while (e && le != e && (/\S/).test(e)) {
|
2106 |
+
le = e;
|
2107 |
+
for (var i in ps) {
|
2108 |
+
if (m = e.match(ps[i])) {
|
2109 |
+
this.matcher.push(typeof x[i] == 'function' ? x[i](m) :
|
2110 |
+
new Template(x[i]).evaluate(m));
|
2111 |
+
e = e.replace(m[0], '');
|
2112 |
+
break;
|
2113 |
+
}
|
2114 |
+
}
|
2115 |
+
}
|
2116 |
+
|
2117 |
+
this.xpath = this.matcher.join('');
|
2118 |
+
Selector._cache[this.expression] = this.xpath;
|
2119 |
+
},
|
2120 |
+
|
2121 |
+
findElements: function(root) {
|
2122 |
+
root = root || document;
|
2123 |
+
if (this.xpath) return document._getElementsByXPath(this.xpath, root);
|
2124 |
+
return this.matcher(root);
|
2125 |
+
},
|
2126 |
+
|
2127 |
+
match: function(element) {
|
2128 |
+
return this.findElements(document).include(element);
|
2129 |
+
},
|
2130 |
+
|
2131 |
+
toString: function() {
|
2132 |
+
return this.expression;
|
2133 |
+
},
|
2134 |
+
|
2135 |
+
inspect: function() {
|
2136 |
+
return "#<Selector:" + this.expression.inspect() + ">";
|
2137 |
+
}
|
2138 |
+
};
|
2139 |
+
|
2140 |
+
Object.extend(Selector, {
|
2141 |
+
_cache: {},
|
2142 |
+
|
2143 |
+
xpath: {
|
2144 |
+
descendant: "//*",
|
2145 |
+
child: "/*",
|
2146 |
+
adjacent: "/following-sibling::*[1]",
|
2147 |
+
laterSibling: '/following-sibling::*',
|
2148 |
+
tagName: function(m) {
|
2149 |
+
if (m[1] == '*') return '';
|
2150 |
+
return "[local-name()='" + m[1].toLowerCase() +
|
2151 |
+
"' or local-name()='" + m[1].toUpperCase() + "']";
|
2152 |
+
},
|
2153 |
+
className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
|
2154 |
+
id: "[@id='#{1}']",
|
2155 |
+
attrPresence: "[@#{1}]",
|
2156 |
+
attr: function(m) {
|
2157 |
+
m[3] = m[5] || m[6];
|
2158 |
+
return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
|
2159 |
+
},
|
2160 |
+
pseudo: function(m) {
|
2161 |
+
var h = Selector.xpath.pseudos[m[1]];
|
2162 |
+
if (!h) return '';
|
2163 |
+
if (typeof h === 'function') return h(m);
|
2164 |
+
return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
|
2165 |
+
},
|
2166 |
+
operators: {
|
2167 |
+
'=': "[@#{1}='#{3}']",
|
2168 |
+
'!=': "[@#{1}!='#{3}']",
|
2169 |
+
'^=': "[starts-with(@#{1}, '#{3}')]",
|
2170 |
+
'$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
|
2171 |
+
'*=': "[contains(@#{1}, '#{3}')]",
|
2172 |
+
'~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
|
2173 |
+
'|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
|
2174 |
+
},
|
2175 |
+
pseudos: {
|
2176 |
+
'first-child': '[not(preceding-sibling::*)]',
|
2177 |
+
'last-child': '[not(following-sibling::*)]',
|
2178 |
+
'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
|
2179 |
+
'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",
|
2180 |
+
'checked': "[@checked]",
|
2181 |
+
'disabled': "[@disabled]",
|
2182 |
+
'enabled': "[not(@disabled)]",
|
2183 |
+
'not': function(m) {
|
2184 |
+
var e = m[6], p = Selector.patterns,
|
2185 |
+
x = Selector.xpath, le, m, v;
|
2186 |
+
|
2187 |
+
var exclusion = [];
|
2188 |
+
while (e && le != e && (/\S/).test(e)) {
|
2189 |
+
le = e;
|
2190 |
+
for (var i in p) {
|
2191 |
+
if (m = e.match(p[i])) {
|
2192 |
+
v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m);
|
2193 |
+
exclusion.push("(" + v.substring(1, v.length - 1) + ")");
|
2194 |
+
e = e.replace(m[0], '');
|
2195 |
+
break;
|
2196 |
+
}
|
2197 |
+
}
|
2198 |
+
}
|
2199 |
+
return "[not(" + exclusion.join(" and ") + ")]";
|
2200 |
+
},
|
2201 |
+
'nth-child': function(m) {
|
2202 |
+
return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
|
2203 |
+
},
|
2204 |
+
'nth-last-child': function(m) {
|
2205 |
+
return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
|
2206 |
+
},
|
2207 |
+
'nth-of-type': function(m) {
|
2208 |
+
return Selector.xpath.pseudos.nth("position() ", m);
|
2209 |
+
},
|
2210 |
+
'nth-last-of-type': function(m) {
|
2211 |
+
return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
|
2212 |
+
},
|
2213 |
+
'first-of-type': function(m) {
|
2214 |
+
m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
|
2215 |
+
},
|
2216 |
+
'last-of-type': function(m) {
|
2217 |
+
m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
|
2218 |
+
},
|
2219 |
+
'only-of-type': function(m) {
|
2220 |
+
var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
|
2221 |
+
},
|
2222 |
+
nth: function(fragment, m) {
|
2223 |
+
var mm, formula = m[6], predicate;
|
2224 |
+
if (formula == 'even') formula = '2n+0';
|
2225 |
+
if (formula == 'odd') formula = '2n+1';
|
2226 |
+
if (mm = formula.match(/^(\d+)$/)) // digit only
|
2227 |
+
return '[' + fragment + "= " + mm[1] + ']';
|
2228 |
+
if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
|
2229 |
+
if (mm[1] == "-") mm[1] = -1;
|
2230 |
+
var a = mm[1] ? Number(mm[1]) : 1;
|
2231 |
+
var b = mm[2] ? Number(mm[2]) : 0;
|
2232 |
+
predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
|
2233 |
+
"((#{fragment} - #{b}) div #{a} >= 0)]";
|
2234 |
+
return new Template(predicate).evaluate({
|
2235 |
+
fragment: fragment, a: a, b: b });
|
2236 |
+
}
|
2237 |
+
}
|
2238 |
+
}
|
2239 |
+
},
|
2240 |
+
|
2241 |
+
criteria: {
|
2242 |
+
tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
|
2243 |
+
className: 'n = h.className(n, r, "#{1}", c); c = false;',
|
2244 |
+
id: 'n = h.id(n, r, "#{1}", c); c = false;',
|
2245 |
+
attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
|
2246 |
+
attr: function(m) {
|
2247 |
+
m[3] = (m[5] || m[6]);
|
2248 |
+
return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
|
2249 |
+
},
|
2250 |
+
pseudo: function(m) {
|
2251 |
+
if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
|
2252 |
+
return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
|
2253 |
+
},
|
2254 |
+
descendant: 'c = "descendant";',
|
2255 |
+
child: 'c = "child";',
|
2256 |
+
adjacent: 'c = "adjacent";',
|
2257 |
+
laterSibling: 'c = "laterSibling";'
|
2258 |
+
},
|
2259 |
+
|
2260 |
+
patterns: {
|
2261 |
+
// combinators must be listed first
|
2262 |
+
// (and descendant needs to be last combinator)
|
2263 |
+
laterSibling: /^\s*~\s*/,
|
2264 |
+
child: /^\s*>\s*/,
|
2265 |
+
adjacent: /^\s*\+\s*/,
|
2266 |
+
descendant: /^\s/,
|
2267 |
+
|
2268 |
+
// selectors follow
|
2269 |
+
tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
|
2270 |
+
id: /^#([\w\-\*]+)(\b|$)/,
|
2271 |
+
className: /^\.([\w\-\*]+)(\b|$)/,
|
2272 |
+
pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,
|
2273 |
+
attrPresence: /^\[([\w]+)\]/,
|
2274 |
+
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/
|
2275 |
+
},
|
2276 |
+
|
2277 |
+
handlers: {
|
2278 |
+
// UTILITY FUNCTIONS
|
2279 |
+
// joins two collections
|
2280 |
+
concat: function(a, b) {
|
2281 |
+
for (var i = 0, node; node = b[i]; i++)
|
2282 |
+
a.push(node);
|
2283 |
+
return a;
|
2284 |
+
},
|
2285 |
+
|
2286 |
+
// marks an array of nodes for counting
|
2287 |
+
mark: function(nodes) {
|
2288 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2289 |
+
node._counted = true;
|
2290 |
+
return nodes;
|
2291 |
+
},
|
2292 |
+
|
2293 |
+
unmark: function(nodes) {
|
2294 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2295 |
+
node._counted = undefined;
|
2296 |
+
return nodes;
|
2297 |
+
},
|
2298 |
+
|
2299 |
+
// mark each child node with its position (for nth calls)
|
2300 |
+
// "ofType" flag indicates whether we're indexing for nth-of-type
|
2301 |
+
// rather than nth-child
|
2302 |
+
index: function(parentNode, reverse, ofType) {
|
2303 |
+
parentNode._counted = true;
|
2304 |
+
if (reverse) {
|
2305 |
+
for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
|
2306 |
+
node = nodes[i];
|
2307 |
+
if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
|
2308 |
+
}
|
2309 |
+
} else {
|
2310 |
+
for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
|
2311 |
+
if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
|
2312 |
+
}
|
2313 |
+
},
|
2314 |
+
|
2315 |
+
// filters out duplicates and extends all nodes
|
2316 |
+
unique: function(nodes) {
|
2317 |
+
if (nodes.length == 0) return nodes;
|
2318 |
+
var results = [], n;
|
2319 |
+
for (var i = 0, l = nodes.length; i < l; i++)
|
2320 |
+
if (!(n = nodes[i])._counted) {
|
2321 |
+
n._counted = true;
|
2322 |
+
results.push(Element.extend(n));
|
2323 |
+
}
|
2324 |
+
return Selector.handlers.unmark(results);
|
2325 |
+
},
|
2326 |
+
|
2327 |
+
// COMBINATOR FUNCTIONS
|
2328 |
+
descendant: function(nodes) {
|
2329 |
+
var h = Selector.handlers;
|
2330 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2331 |
+
h.concat(results, node.getElementsByTagName('*'));
|
2332 |
+
return results;
|
2333 |
+
},
|
2334 |
+
|
2335 |
+
child: function(nodes) {
|
2336 |
+
var h = Selector.handlers;
|
2337 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++) {
|
2338 |
+
for (var j = 0, children = [], child; child = node.childNodes[j]; j++)
|
2339 |
+
if (child.nodeType == 1 && child.tagName != '!') results.push(child);
|
2340 |
+
}
|
2341 |
+
return results;
|
2342 |
+
},
|
2343 |
+
|
2344 |
+
adjacent: function(nodes) {
|
2345 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++) {
|
2346 |
+
var next = this.nextElementSibling(node);
|
2347 |
+
if (next) results.push(next);
|
2348 |
+
}
|
2349 |
+
return results;
|
2350 |
+
},
|
2351 |
+
|
2352 |
+
laterSibling: function(nodes) {
|
2353 |
+
var h = Selector.handlers;
|
2354 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2355 |
+
h.concat(results, Element.nextSiblings(node));
|
2356 |
+
return results;
|
2357 |
+
},
|
2358 |
+
|
2359 |
+
nextElementSibling: function(node) {
|
2360 |
+
while (node = node.nextSibling)
|
2361 |
+
if (node.nodeType == 1) return node;
|
2362 |
+
return null;
|
2363 |
+
},
|
2364 |
+
|
2365 |
+
previousElementSibling: function(node) {
|
2366 |
+
while (node = node.previousSibling)
|
2367 |
+
if (node.nodeType == 1) return node;
|
2368 |
+
return null;
|
2369 |
+
},
|
2370 |
+
|
2371 |
+
// TOKEN FUNCTIONS
|
2372 |
+
tagName: function(nodes, root, tagName, combinator) {
|
2373 |
+
tagName = tagName.toUpperCase();
|
2374 |
+
var results = [], h = Selector.handlers;
|
2375 |
+
if (nodes) {
|
2376 |
+
if (combinator) {
|
2377 |
+
// fastlane for ordinary descendant combinators
|
2378 |
+
if (combinator == "descendant") {
|
2379 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2380 |
+
h.concat(results, node.getElementsByTagName(tagName));
|
2381 |
+
return results;
|
2382 |
+
} else nodes = this[combinator](nodes);
|
2383 |
+
if (tagName == "*") return nodes;
|
2384 |
+
}
|
2385 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2386 |
+
if (node.tagName.toUpperCase() == tagName) results.push(node);
|
2387 |
+
return results;
|
2388 |
+
} else return root.getElementsByTagName(tagName);
|
2389 |
+
},
|
2390 |
+
|
2391 |
+
id: function(nodes, root, id, combinator) {
|
2392 |
+
var targetNode = $(id), h = Selector.handlers;
|
2393 |
+
if (!nodes && root == document) return targetNode ? [targetNode] : [];
|
2394 |
+
if (nodes) {
|
2395 |
+
if (combinator) {
|
2396 |
+
if (combinator == 'child') {
|
2397 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2398 |
+
if (targetNode.parentNode == node) return [targetNode];
|
2399 |
+
} else if (combinator == 'descendant') {
|
2400 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2401 |
+
if (Element.descendantOf(targetNode, node)) return [targetNode];
|
2402 |
+
} else if (combinator == 'adjacent') {
|
2403 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2404 |
+
if (Selector.handlers.previousElementSibling(targetNode) == node)
|
2405 |
+
return [targetNode];
|
2406 |
+
} else nodes = h[combinator](nodes);
|
2407 |
+
}
|
2408 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2409 |
+
if (node == targetNode) return [targetNode];
|
2410 |
+
return [];
|
2411 |
+
}
|
2412 |
+
return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
|
2413 |
+
},
|
2414 |
+
|
2415 |
+
className: function(nodes, root, className, combinator) {
|
2416 |
+
if (nodes && combinator) nodes = this[combinator](nodes);
|
2417 |
+
return Selector.handlers.byClassName(nodes, root, className);
|
2418 |
+
},
|
2419 |
+
|
2420 |
+
byClassName: function(nodes, root, className) {
|
2421 |
+
if (!nodes) nodes = Selector.handlers.descendant([root]);
|
2422 |
+
var needle = ' ' + className + ' ';
|
2423 |
+
for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
|
2424 |
+
nodeClassName = node.className;
|
2425 |
+
if (nodeClassName.length == 0) continue;
|
2426 |
+
if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
|
2427 |
+
results.push(node);
|
2428 |
+
}
|
2429 |
+
return results;
|
2430 |
+
},
|
2431 |
+
|
2432 |
+
attrPresence: function(nodes, root, attr) {
|
2433 |
+
var results = [];
|
2434 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2435 |
+
if (Element.hasAttribute(node, attr)) results.push(node);
|
2436 |
+
return results;
|
2437 |
+
},
|
2438 |
+
|
2439 |
+
attr: function(nodes, root, attr, value, operator) {
|
2440 |
+
if (!nodes) nodes = root.getElementsByTagName("*");
|
2441 |
+
var handler = Selector.operators[operator], results = [];
|
2442 |
+
for (var i = 0, node; node = nodes[i]; i++) {
|
2443 |
+
var nodeValue = Element.readAttribute(node, attr);
|
2444 |
+
if (nodeValue === null) continue;
|
2445 |
+
if (handler(nodeValue, value)) results.push(node);
|
2446 |
+
}
|
2447 |
+
return results;
|
2448 |
+
},
|
2449 |
+
|
2450 |
+
pseudo: function(nodes, name, value, root, combinator) {
|
2451 |
+
if (nodes && combinator) nodes = this[combinator](nodes);
|
2452 |
+
if (!nodes) nodes = root.getElementsByTagName("*");
|
2453 |
+
return Selector.pseudos[name](nodes, value, root);
|
2454 |
+
}
|
2455 |
+
},
|
2456 |
+
|
2457 |
+
pseudos: {
|
2458 |
+
'first-child': function(nodes, value, root) {
|
2459 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++) {
|
2460 |
+
if (Selector.handlers.previousElementSibling(node)) continue;
|
2461 |
+
results.push(node);
|
2462 |
+
}
|
2463 |
+
return results;
|
2464 |
+
},
|
2465 |
+
'last-child': function(nodes, value, root) {
|
2466 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++) {
|
2467 |
+
if (Selector.handlers.nextElementSibling(node)) continue;
|
2468 |
+
results.push(node);
|
2469 |
+
}
|
2470 |
+
return results;
|
2471 |
+
},
|
2472 |
+
'only-child': function(nodes, value, root) {
|
2473 |
+
var h = Selector.handlers;
|
2474 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2475 |
+
if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
|
2476 |
+
results.push(node);
|
2477 |
+
return results;
|
2478 |
+
},
|
2479 |
+
'nth-child': function(nodes, formula, root) {
|
2480 |
+
return Selector.pseudos.nth(nodes, formula, root);
|
2481 |
+
},
|
2482 |
+
'nth-last-child': function(nodes, formula, root) {
|
2483 |
+
return Selector.pseudos.nth(nodes, formula, root, true);
|
2484 |
+
},
|
2485 |
+
'nth-of-type': function(nodes, formula, root) {
|
2486 |
+
return Selector.pseudos.nth(nodes, formula, root, false, true);
|
2487 |
+
},
|
2488 |
+
'nth-last-of-type': function(nodes, formula, root) {
|
2489 |
+
return Selector.pseudos.nth(nodes, formula, root, true, true);
|
2490 |
+
},
|
2491 |
+
'first-of-type': function(nodes, formula, root) {
|
2492 |
+
return Selector.pseudos.nth(nodes, "1", root, false, true);
|
2493 |
+
},
|
2494 |
+
'last-of-type': function(nodes, formula, root) {
|
2495 |
+
return Selector.pseudos.nth(nodes, "1", root, true, true);
|
2496 |
+
},
|
2497 |
+
'only-of-type': function(nodes, formula, root) {
|
2498 |
+
var p = Selector.pseudos;
|
2499 |
+
return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
|
2500 |
+
},
|
2501 |
+
|
2502 |
+
// handles the an+b logic
|
2503 |
+
getIndices: function(a, b, total) {
|
2504 |
+
if (a == 0) return b > 0 ? [b] : [];
|
2505 |
+
return $R(1, total).inject([], function(memo, i) {
|
2506 |
+
if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
|
2507 |
+
return memo;
|
2508 |
+
});
|
2509 |
+
},
|
2510 |
+
|
2511 |
+
// handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
|
2512 |
+
nth: function(nodes, formula, root, reverse, ofType) {
|
2513 |
+
if (nodes.length == 0) return [];
|
2514 |
+
if (formula == 'even') formula = '2n+0';
|
2515 |
+
if (formula == 'odd') formula = '2n+1';
|
2516 |
+
var h = Selector.handlers, results = [], indexed = [], m;
|
2517 |
+
h.mark(nodes);
|
2518 |
+
for (var i = 0, node; node = nodes[i]; i++) {
|
2519 |
+
if (!node.parentNode._counted) {
|
2520 |
+
h.index(node.parentNode, reverse, ofType);
|
2521 |
+
indexed.push(node.parentNode);
|
2522 |
+
}
|
2523 |
+
}
|
2524 |
+
if (formula.match(/^\d+$/)) { // just a number
|
2525 |
+
formula = Number(formula);
|
2526 |
+
for (var i = 0, node; node = nodes[i]; i++)
|
2527 |
+
if (node.nodeIndex == formula) results.push(node);
|
2528 |
+
} else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
|
2529 |
+
if (m[1] == "-") m[1] = -1;
|
2530 |
+
var a = m[1] ? Number(m[1]) : 1;
|
2531 |
+
var b = m[2] ? Number(m[2]) : 0;
|
2532 |
+
var indices = Selector.pseudos.getIndices(a, b, nodes.length);
|
2533 |
+
for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
|
2534 |
+
for (var j = 0; j < l; j++)
|
2535 |
+
if (node.nodeIndex == indices[j]) results.push(node);
|
2536 |
+
}
|
2537 |
+
}
|
2538 |
+
h.unmark(nodes);
|
2539 |
+
h.unmark(indexed);
|
2540 |
+
return results;
|
2541 |
+
},
|
2542 |
+
|
2543 |
+
'empty': function(nodes, value, root) {
|
2544 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++) {
|
2545 |
+
// IE treats comments as element nodes
|
2546 |
+
if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue;
|
2547 |
+
results.push(node);
|
2548 |
+
}
|
2549 |
+
return results;
|
2550 |
+
},
|
2551 |
+
|
2552 |
+
'not': function(nodes, selector, root) {
|
2553 |
+
var h = Selector.handlers, selectorType, m;
|
2554 |
+
var exclusions = new Selector(selector).findElements(root);
|
2555 |
+
h.mark(exclusions);
|
2556 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2557 |
+
if (!node._counted) results.push(node);
|
2558 |
+
h.unmark(exclusions);
|
2559 |
+
return results;
|
2560 |
+
},
|
2561 |
+
|
2562 |
+
'enabled': function(nodes, value, root) {
|
2563 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2564 |
+
if (!node.disabled) results.push(node);
|
2565 |
+
return results;
|
2566 |
+
},
|
2567 |
+
|
2568 |
+
'disabled': function(nodes, value, root) {
|
2569 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2570 |
+
if (node.disabled) results.push(node);
|
2571 |
+
return results;
|
2572 |
+
},
|
2573 |
+
|
2574 |
+
'checked': function(nodes, value, root) {
|
2575 |
+
for (var i = 0, results = [], node; node = nodes[i]; i++)
|
2576 |
+
if (node.checked) results.push(node);
|
2577 |
+
return results;
|
2578 |
+
}
|
2579 |
+
},
|
2580 |
+
|
2581 |
+
operators: {
|
2582 |
+
'=': function(nv, v) { return nv == v; },
|
2583 |
+
'!=': function(nv, v) { return nv != v; },
|
2584 |
+
'^=': function(nv, v) { return nv.startsWith(v); },
|
2585 |
+
'$=': function(nv, v) { return nv.endsWith(v); },
|
2586 |
+
'*=': function(nv, v) { return nv.include(v); },
|
2587 |
+
'~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
|
2588 |
+
'|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
|
2589 |
+
},
|
2590 |
+
|
2591 |
+
matchElements: function(elements, expression) {
|
2592 |
+
var matches = new Selector(expression).findElements(), h = Selector.handlers;
|
2593 |
+
h.mark(matches);
|
2594 |
+
for (var i = 0, results = [], element; element = elements[i]; i++)
|
2595 |
+
if (element._counted) results.push(element);
|
2596 |
+
h.unmark(matches);
|
2597 |
+
return results;
|
2598 |
+
},
|
2599 |
+
|
2600 |
+
findElement: function(elements, expression, index) {
|
2601 |
+
if (typeof expression == 'number') {
|
2602 |
+
index = expression; expression = false;
|
2603 |
+
}
|
2604 |
+
return Selector.matchElements(elements, expression || '*')[index || 0];
|
2605 |
+
},
|
2606 |
+
|
2607 |
+
findChildElements: function(element, expressions) {
|
2608 |
+
var exprs = expressions.join(','), expressions = [];
|
2609 |
+
exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
|
2610 |
+
expressions.push(m[1].strip());
|
2611 |
+
});
|
2612 |
+
var results = [], h = Selector.handlers;
|
2613 |
+
for (var i = 0, l = expressions.length, selector; i < l; i++) {
|
2614 |
+
selector = new Selector(expressions[i].strip());
|
2615 |
+
h.concat(results, selector.findElements(element));
|
2616 |
+
}
|
2617 |
+
return (l > 1) ? h.unique(results) : results;
|
2618 |
+
}
|
2619 |
+
});
|
2620 |
+
|
2621 |
+
function $$() {
|
2622 |
+
return Selector.findChildElements(document, $A(arguments));
|
2623 |
+
}
|
2624 |
+
var Form = {
|
2625 |
+
reset: function(form) {
|
2626 |
+
$(form).reset();
|
2627 |
+
return form;
|
2628 |
+
},
|
2629 |
+
|
2630 |
+
serializeElements: function(elements, getHash) {
|
2631 |
+
var data = elements.inject({}, function(result, element) {
|
2632 |
+
if (!element.disabled && element.name) {
|
2633 |
+
var key = element.name, value = $(element).getValue();
|
2634 |
+
if (value != null) {
|
2635 |
+
if (key in result) {
|
2636 |
+
if (result[key].constructor != Array) result[key] = [result[key]];
|
2637 |
+
result[key].push(value);
|
2638 |
+
}
|
2639 |
+
else result[key] = value;
|
2640 |
+
}
|
2641 |
+
}
|
2642 |
+
return result;
|
2643 |
+
});
|
2644 |
+
|
2645 |
+
return getHash ? data : Hash.toQueryString(data);
|
2646 |
+
}
|
2647 |
+
};
|
2648 |
+
|
2649 |
+
Form.Methods = {
|
2650 |
+
serialize: function(form, getHash) {
|
2651 |
+
return Form.serializeElements(Form.getElements(form), getHash);
|
2652 |
+
},
|
2653 |
+
|
2654 |
+
getElements: function(form) {
|
2655 |
+
return $A($(form).getElementsByTagName('*')).inject([],
|
2656 |
+
function(elements, child) {
|
2657 |
+
if (Form.Element.Serializers[child.tagName.toLowerCase()])
|
2658 |
+
elements.push(Element.extend(child));
|
2659 |
+
return elements;
|
2660 |
+
}
|
2661 |
+
);
|
2662 |
+
},
|
2663 |
+
|
2664 |
+
getInputs: function(form, typeName, name) {
|
2665 |
+
form = $(form);
|
2666 |
+
var inputs = form.getElementsByTagName('input');
|
2667 |
+
|
2668 |
+
if (!typeName && !name) return $A(inputs).map(Element.extend);
|
2669 |
+
|
2670 |
+
for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
|
2671 |
+
var input = inputs[i];
|
2672 |
+
if ((typeName && input.type != typeName) || (name && input.name != name))
|
2673 |
+
continue;
|
2674 |
+
matchingInputs.push(Element.extend(input));
|
2675 |
+
}
|
2676 |
+
|
2677 |
+
return matchingInputs;
|
2678 |
+
},
|
2679 |
+
|
2680 |
+
disable: function(form) {
|
2681 |
+
form = $(form);
|
2682 |
+
Form.getElements(form).invoke('disable');
|
2683 |
+
return form;
|
2684 |
+
},
|
2685 |
+
|
2686 |
+
enable: function(form) {
|
2687 |
+
form = $(form);
|
2688 |
+
Form.getElements(form).invoke('enable');
|
2689 |
+
return form;
|
2690 |
+
},
|
2691 |
+
|
2692 |
+
findFirstElement: function(form) {
|
2693 |
+
return $(form).getElements().find(function(element) {
|
2694 |
+
return element.type != 'hidden' && !element.disabled &&
|
2695 |
+
['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
|
2696 |
+
});
|
2697 |
+
},
|
2698 |
+
|
2699 |
+
focusFirstElement: function(form) {
|
2700 |
+
form = $(form);
|
2701 |
+
form.findFirstElement().activate();
|
2702 |
+
return form;
|
2703 |
+
},
|
2704 |
+
|
2705 |
+
request: function(form, options) {
|
2706 |
+
form = $(form), options = Object.clone(options || {});
|
2707 |
+
|
2708 |
+
var params = options.parameters;
|
2709 |
+
options.parameters = form.serialize(true);
|
2710 |
+
|
2711 |
+
if (params) {
|
2712 |
+
if (typeof params == 'string') params = params.toQueryParams();
|
2713 |
+
Object.extend(options.parameters, params);
|
2714 |
+
}
|
2715 |
+
|
2716 |
+
if (form.hasAttribute('method') && !options.method)
|
2717 |
+
options.method = form.method;
|
2718 |
+
|
2719 |
+
return new Ajax.Request(form.readAttribute('action'), options);
|
2720 |
+
}
|
2721 |
+
}
|
2722 |
+
|
2723 |
+
/*--------------------------------------------------------------------------*/
|
2724 |
+
|
2725 |
+
Form.Element = {
|
2726 |
+
focus: function(element) {
|
2727 |
+
$(element).focus();
|
2728 |
+
return element;
|
2729 |
+
},
|
2730 |
+
|
2731 |
+
select: function(element) {
|
2732 |
+
$(element).select();
|
2733 |
+
return element;
|
2734 |
+
}
|
2735 |
+
}
|
2736 |
+
|
2737 |
+
Form.Element.Methods = {
|
2738 |
+
serialize: function(element) {
|
2739 |
+
element = $(element);
|
2740 |
+
if (!element.disabled && element.name) {
|
2741 |
+
var value = element.getValue();
|
2742 |
+
if (value != undefined) {
|
2743 |
+
var pair = {};
|
2744 |
+
pair[element.name] = value;
|
2745 |
+
return Hash.toQueryString(pair);
|
2746 |
+
}
|
2747 |
+
}
|
2748 |
+
return '';
|
2749 |
+
},
|
2750 |
+
|
2751 |
+
getValue: function(element) {
|
2752 |
+
element = $(element);
|
2753 |
+
var method = element.tagName.toLowerCase();
|
2754 |
+
return Form.Element.Serializers[method](element);
|
2755 |
+
},
|
2756 |
+
|
2757 |
+
clear: function(element) {
|
2758 |
+
$(element).value = '';
|
2759 |
+
return element;
|
2760 |
+
},
|
2761 |
+
|
2762 |
+
present: function(element) {
|
2763 |
+
return $(element).value != '';
|
2764 |
+
},
|
2765 |
+
|
2766 |
+
activate: function(element) {
|
2767 |
+
element = $(element);
|
2768 |
+
try {
|
2769 |
+
element.focus();
|
2770 |
+
if (element.select && (element.tagName.toLowerCase() != 'input' ||
|
2771 |
+
!['button', 'reset', 'submit'].include(element.type)))
|
2772 |
+
element.select();
|
2773 |
+
} catch (e) {}
|
2774 |
+
return element;
|
2775 |
+
},
|
2776 |
+
|
2777 |
+
disable: function(element) {
|
2778 |
+
element = $(element);
|
2779 |
+
element.blur();
|
2780 |
+
element.disabled = true;
|
2781 |
+
return element;
|
2782 |
+
},
|
2783 |
+
|
2784 |
+
enable: function(element) {
|
2785 |
+
element = $(element);
|
2786 |
+
element.disabled = false;
|
2787 |
+
return element;
|
2788 |
+
}
|
2789 |
+
}
|
2790 |
+
|
2791 |
+
/*--------------------------------------------------------------------------*/
|
2792 |
+
|
2793 |
+
var Field = Form.Element;
|
2794 |
+
var $F = Form.Element.Methods.getValue;
|
2795 |
+
|
2796 |
+
/*--------------------------------------------------------------------------*/
|
2797 |
+
|
2798 |
+
Form.Element.Serializers = {
|
2799 |
+
input: function(element) {
|
2800 |
+
switch (element.type.toLowerCase()) {
|
2801 |
+
case 'checkbox':
|
2802 |
+
case 'radio':
|
2803 |
+
return Form.Element.Serializers.inputSelector(element);
|
2804 |
+
default:
|
2805 |
+
return Form.Element.Serializers.textarea(element);
|
2806 |
+
}
|
2807 |
+
},
|
2808 |
+
|
2809 |
+
inputSelector: function(element) {
|
2810 |
+
return element.checked ? element.value : null;
|
2811 |
+
},
|
2812 |
+
|
2813 |
+
textarea: function(element) {
|
2814 |
+
return element.value;
|
2815 |
+
},
|
2816 |
+
|
2817 |
+
select: function(element) {
|
2818 |
+
return this[element.type == 'select-one' ?
|
2819 |
+
'selectOne' : 'selectMany'](element);
|
2820 |
+
},
|
2821 |
+
|
2822 |
+
selectOne: function(element) {
|
2823 |
+
var index = element.selectedIndex;
|
2824 |
+
return index >= 0 ? this.optionValue(element.options[index]) : null;
|
2825 |
+
},
|
2826 |
+
|
2827 |
+
selectMany: function(element) {
|
2828 |
+
var values, length = element.length;
|
2829 |
+
if (!length) return null;
|
2830 |
+
|
2831 |
+
for (var i = 0, values = []; i < length; i++) {
|
2832 |
+
var opt = element.options[i];
|
2833 |
+
if (opt.selected) values.push(this.optionValue(opt));
|
2834 |
+
}
|
2835 |
+
return values;
|
2836 |
+
},
|
2837 |
+
|
2838 |
+
optionValue: function(opt) {
|
2839 |
+
// extend element because hasAttribute may not be native
|
2840 |
+
return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
|
2841 |
+
}
|
2842 |
+
}
|
2843 |
+
|
2844 |
+
/*--------------------------------------------------------------------------*/
|
2845 |
+
|
2846 |
+
Abstract.TimedObserver = function() {}
|
2847 |
+
Abstract.TimedObserver.prototype = {
|
2848 |
+
initialize: function(element, frequency, callback) {
|
2849 |
+
this.frequency = frequency;
|
2850 |
+
this.element = $(element);
|
2851 |
+
this.callback = callback;
|
2852 |
+
|
2853 |
+
this.lastValue = this.getValue();
|
2854 |
+
this.registerCallback();
|
2855 |
+
},
|
2856 |
+
|
2857 |
+
registerCallback: function() {
|
2858 |
+
setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
|
2859 |
+
},
|
2860 |
+
|
2861 |
+
onTimerEvent: function() {
|
2862 |
+
var value = this.getValue();
|
2863 |
+
var changed = ('string' == typeof this.lastValue && 'string' == typeof value
|
2864 |
+
? this.lastValue != value : String(this.lastValue) != String(value));
|
2865 |
+
if (changed) {
|
2866 |
+
this.callback(this.element, value);
|
2867 |
+
this.lastValue = value;
|
2868 |
+
}
|
2869 |
+
}
|
2870 |
+
}
|
2871 |
+
|
2872 |
+
Form.Element.Observer = Class.create();
|
2873 |
+
Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
|
2874 |
+
getValue: function() {
|
2875 |
+
return Form.Element.getValue(this.element);
|
2876 |
+
}
|
2877 |
+
});
|
2878 |
+
|
2879 |
+
Form.Observer = Class.create();
|
2880 |
+
Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
|
2881 |
+
getValue: function() {
|
2882 |
+
return Form.serialize(this.element);
|
2883 |
+
}
|
2884 |
+
});
|
2885 |
+
|
2886 |
+
/*--------------------------------------------------------------------------*/
|
2887 |
+
|
2888 |
+
Abstract.EventObserver = function() {}
|
2889 |
+
Abstract.EventObserver.prototype = {
|
2890 |
+
initialize: function(element, callback) {
|
2891 |
+
this.element = $(element);
|
2892 |
+
this.callback = callback;
|
2893 |
+
|
2894 |
+
this.lastValue = this.getValue();
|
2895 |
+
if (this.element.tagName.toLowerCase() == 'form')
|
2896 |
+
this.registerFormCallbacks();
|
2897 |
+
else
|
2898 |
+
this.registerCallback(this.element);
|
2899 |
+
},
|
2900 |
+
|
2901 |
+
onElementEvent: function() {
|
2902 |
+
var value = this.getValue();
|
2903 |
+
if (this.lastValue != value) {
|
2904 |
+
this.callback(this.element, value);
|
2905 |
+
this.lastValue = value;
|
2906 |
+
}
|
2907 |
+
},
|
2908 |
+
|
2909 |
+
registerFormCallbacks: function() {
|
2910 |
+
Form.getElements(this.element).each(this.registerCallback.bind(this));
|
2911 |
+
},
|
2912 |
+
|
2913 |
+
registerCallback: function(element) {
|
2914 |
+
if (element.type) {
|
2915 |
+
switch (element.type.toLowerCase()) {
|
2916 |
+
case 'checkbox':
|
2917 |
+
case 'radio':
|
2918 |
+
Event.observe(element, 'click', this.onElementEvent.bind(this));
|
2919 |
+
break;
|
2920 |
+
default:
|
2921 |
+
Event.observe(element, 'change', this.onElementEvent.bind(this));
|
2922 |
+
break;
|
2923 |
+
}
|
2924 |
+
}
|
2925 |
+
}
|
2926 |
+
}
|
2927 |
+
|
2928 |
+
Form.Element.EventObserver = Class.create();
|
2929 |
+
Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
|
2930 |
+
getValue: function() {
|
2931 |
+
return Form.Element.getValue(this.element);
|
2932 |
+
}
|
2933 |
+
});
|
2934 |
+
|
2935 |
+
Form.EventObserver = Class.create();
|
2936 |
+
Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
|
2937 |
+
getValue: function() {
|
2938 |
+
return Form.serialize(this.element);
|
2939 |
+
}
|
2940 |
+
});
|
2941 |
+
if (!window.Event) {
|
2942 |
+
var Event = new Object();
|
2943 |
+
}
|
2944 |
+
|
2945 |
+
Object.extend(Event, {
|
2946 |
+
KEY_BACKSPACE: 8,
|
2947 |
+
KEY_TAB: 9,
|
2948 |
+
KEY_RETURN: 13,
|
2949 |
+
KEY_ESC: 27,
|
2950 |
+
KEY_LEFT: 37,
|
2951 |
+
KEY_UP: 38,
|
2952 |
+
KEY_RIGHT: 39,
|
2953 |
+
KEY_DOWN: 40,
|
2954 |
+
KEY_DELETE: 46,
|
2955 |
+
KEY_HOME: 36,
|
2956 |
+
KEY_END: 35,
|
2957 |
+
KEY_PAGEUP: 33,
|
2958 |
+
KEY_PAGEDOWN: 34,
|
2959 |
+
|
2960 |
+
element: function(event) {
|
2961 |
+
return $(event.target || event.srcElement);
|
2962 |
+
},
|
2963 |
+
|
2964 |
+
isLeftClick: function(event) {
|
2965 |
+
return (((event.which) && (event.which == 1)) ||
|
2966 |
+
((event.button) && (event.button == 1)));
|
2967 |
+
},
|
2968 |
+
|
2969 |
+
pointerX: function(event) {
|
2970 |
+
return event.pageX || (event.clientX +
|
2971 |
+
(document.documentElement.scrollLeft || document.body.scrollLeft));
|
2972 |
+
},
|
2973 |
+
|
2974 |
+
pointerY: function(event) {
|
2975 |
+
return event.pageY || (event.clientY +
|
2976 |
+
(document.documentElement.scrollTop || document.body.scrollTop));
|
2977 |
+
},
|
2978 |
+
|
2979 |
+
stop: function(event) {
|
2980 |
+
if (event.preventDefault) {
|
2981 |
+
event.preventDefault();
|
2982 |
+
event.stopPropagation();
|
2983 |
+
} else {
|
2984 |
+
event.returnValue = false;
|
2985 |
+
event.cancelBubble = true;
|
2986 |
+
}
|
2987 |
+
},
|
2988 |
+
|
2989 |
+
// find the first node with the given tagName, starting from the
|
2990 |
+
// node the event was triggered on; traverses the DOM upwards
|
2991 |
+
findElement: function(event, tagName) {
|
2992 |
+
var element = Event.element(event);
|
2993 |
+
while (element.parentNode && (!element.tagName ||
|
2994 |
+
(element.tagName.toUpperCase() != tagName.toUpperCase())))
|
2995 |
+
element = element.parentNode;
|
2996 |
+
return element;
|
2997 |
+
},
|
2998 |
+
|
2999 |
+
observers: false,
|
3000 |
+
|
3001 |
+
_observeAndCache: function(element, name, observer, useCapture) {
|
3002 |
+
if (!this.observers) this.observers = [];
|
3003 |
+
if (element.addEventListener) {
|
3004 |
+
this.observers.push([element, name, observer, useCapture]);
|
3005 |
+
element.addEventListener(name, observer, useCapture);
|
3006 |
+
} else if (element.attachEvent) {
|
3007 |
+
this.observers.push([element, name, observer, useCapture]);
|
3008 |
+
element.attachEvent('on' + name, observer);
|
3009 |
+
}
|
3010 |
+
},
|
3011 |
+
|
3012 |
+
unloadCache: function() {
|
3013 |
+
if (!Event.observers) return;
|
3014 |
+
for (var i = 0, length = Event.observers.length; i < length; i++) {
|
3015 |
+
Event.stopObserving.apply(this, Event.observers[i]);
|
3016 |
+
Event.observers[i][0] = null;
|
3017 |
+
}
|
3018 |
+
Event.observers = false;
|
3019 |
+
},
|
3020 |
+
|
3021 |
+
observe: function(element, name, observer, useCapture) {
|
3022 |
+
element = $(element);
|
3023 |
+
useCapture = useCapture || false;
|
3024 |
+
|
3025 |
+
if (name == 'keypress' &&
|
3026 |
+
(Prototype.Browser.WebKit || element.attachEvent))
|
3027 |
+
name = 'keydown';
|
3028 |
+
|
3029 |
+
Event._observeAndCache(element, name, observer, useCapture);
|
3030 |
+
},
|
3031 |
+
|
3032 |
+
stopObserving: function(element, name, observer, useCapture) {
|
3033 |
+
element = $(element);
|
3034 |
+
useCapture = useCapture || false;
|
3035 |
+
|
3036 |
+
if (name == 'keypress' &&
|
3037 |
+
(Prototype.Browser.WebKit || element.attachEvent))
|
3038 |
+
name = 'keydown';
|
3039 |
+
|
3040 |
+
if (element.removeEventListener) {
|
3041 |
+
element.removeEventListener(name, observer, useCapture);
|
3042 |
+
} else if (element.detachEvent) {
|
3043 |
+
try {
|
3044 |
+
element.detachEvent('on' + name, observer);
|
3045 |
+
} catch (e) {}
|
3046 |
+
}
|
3047 |
+
}
|
3048 |
+
});
|
3049 |
+
|
3050 |
+
/* prevent memory leaks in IE */
|
3051 |
+
if (Prototype.Browser.IE)
|
3052 |
+
Event.observe(window, 'unload', Event.unloadCache, false);
|
3053 |
+
var Position = {
|
3054 |
+
// set to true if needed, warning: firefox performance problems
|
3055 |
+
// NOT neeeded for page scrolling, only if draggable contained in
|
3056 |
+
// scrollable elements
|
3057 |
+
includeScrollOffsets: false,
|
3058 |
+
|
3059 |
+
// must be called before calling withinIncludingScrolloffset, every time the
|
3060 |
+
// page is scrolled
|
3061 |
+
prepare: function() {
|
3062 |
+
this.deltaX = window.pageXOffset
|
3063 |
+
|| document.documentElement.scrollLeft
|
3064 |
+
|| document.body.scrollLeft
|
3065 |
+
|| 0;
|
3066 |
+
this.deltaY = window.pageYOffset
|
3067 |
+
|| document.documentElement.scrollTop
|
3068 |
+
|| document.body.scrollTop
|
3069 |
+
|| 0;
|
3070 |
+
},
|
3071 |
+
|
3072 |
+
realOffset: function(element) {
|
3073 |
+
var valueT = 0, valueL = 0;
|
3074 |
+
do {
|
3075 |
+
valueT += element.scrollTop || 0;
|
3076 |
+
valueL += element.scrollLeft || 0;
|
3077 |
+
element = element.parentNode;
|
3078 |
+
} while (element);
|
3079 |
+
return [valueL, valueT];
|
3080 |
+
},
|
3081 |
+
|
3082 |
+
cumulativeOffset: function(element) {
|
3083 |
+
var valueT = 0, valueL = 0;
|
3084 |
+
do {
|
3085 |
+
valueT += element.offsetTop || 0;
|
3086 |
+
valueL += element.offsetLeft || 0;
|
3087 |
+
element = element.offsetParent;
|
3088 |
+
} while (element);
|
3089 |
+
return [valueL, valueT];
|
3090 |
+
},
|
3091 |
+
|
3092 |
+
positionedOffset: function(element) {
|
3093 |
+
var valueT = 0, valueL = 0;
|
3094 |
+
do {
|
3095 |
+
valueT += element.offsetTop || 0;
|
3096 |
+
valueL += element.offsetLeft || 0;
|
3097 |
+
element = element.offsetParent;
|
3098 |
+
if (element) {
|
3099 |
+
if(element.tagName=='BODY') break;
|
3100 |
+
var p = Element.getStyle(element, 'position');
|
3101 |
+
if (p == 'relative' || p == 'absolute') break;
|
3102 |
+
}
|
3103 |
+
} while (element);
|
3104 |
+
return [valueL, valueT];
|
3105 |
+
},
|
3106 |
+
|
3107 |
+
offsetParent: function(element) {
|
3108 |
+
if (element.offsetParent) return element.offsetParent;
|
3109 |
+
if (element == document.body) return element;
|
3110 |
+
|
3111 |
+
while ((element = element.parentNode) && element != document.body)
|
3112 |
+
if (Element.getStyle(element, 'position') != 'static')
|
3113 |
+
return element;
|
3114 |
+
|
3115 |
+
return document.body;
|
3116 |
+
},
|
3117 |
+
|
3118 |
+
// caches x/y coordinate pair to use with overlap
|
3119 |
+
within: function(element, x, y) {
|
3120 |
+
if (this.includeScrollOffsets)
|
3121 |
+
return this.withinIncludingScrolloffsets(element, x, y);
|
3122 |
+
this.xcomp = x;
|
3123 |
+
this.ycomp = y;
|
3124 |
+
this.offset = this.cumulativeOffset(element);
|
3125 |
+
|
3126 |
+
return (y >= this.offset[1] &&
|
3127 |
+
y < this.offset[1] + element.offsetHeight &&
|
3128 |
+
x >= this.offset[0] &&
|
3129 |
+
x < this.offset[0] + element.offsetWidth);
|
3130 |
+
},
|
3131 |
+
|
3132 |
+
withinIncludingScrolloffsets: function(element, x, y) {
|
3133 |
+
var offsetcache = this.realOffset(element);
|
3134 |
+
|
3135 |
+
this.xcomp = x + offsetcache[0] - this.deltaX;
|
3136 |
+
this.ycomp = y + offsetcache[1] - this.deltaY;
|
3137 |
+
this.offset = this.cumulativeOffset(element);
|
3138 |
+
|
3139 |
+
return (this.ycomp >= this.offset[1] &&
|
3140 |
+
this.ycomp < this.offset[1] + element.offsetHeight &&
|
3141 |
+
this.xcomp >= this.offset[0] &&
|
3142 |
+
this.xcomp < this.offset[0] + element.offsetWidth);
|
3143 |
+
},
|
3144 |
+
|
3145 |
+
// within must be called directly before
|
3146 |
+
overlap: function(mode, element) {
|
3147 |
+
if (!mode) return 0;
|
3148 |
+
if (mode == 'vertical')
|
3149 |
+
return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
|
3150 |
+
element.offsetHeight;
|
3151 |
+
if (mode == 'horizontal')
|
3152 |
+
return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
|
3153 |
+
element.offsetWidth;
|
3154 |
+
},
|
3155 |
+
|
3156 |
+
page: function(forElement) {
|
3157 |
+
var valueT = 0, valueL = 0;
|
3158 |
+
|
3159 |
+
var element = forElement;
|
3160 |
+
do {
|
3161 |
+
valueT += element.offsetTop || 0;
|
3162 |
+
valueL += element.offsetLeft || 0;
|
3163 |
+
|
3164 |
+
// Safari fix
|
3165 |
+
if (element.offsetParent == document.body)
|
3166 |
+
if (Element.getStyle(element,'position')=='absolute') break;
|
3167 |
+
|
3168 |
+
} while (element = element.offsetParent);
|
3169 |
+
|
3170 |
+
element = forElement;
|
3171 |
+
do {
|
3172 |
+
if (!window.opera || element.tagName=='BODY') {
|
3173 |
+
valueT -= element.scrollTop || 0;
|
3174 |
+
valueL -= element.scrollLeft || 0;
|
3175 |
+
}
|
3176 |
+
} while (element = element.parentNode);
|
3177 |
+
|
3178 |
+
return [valueL, valueT];
|
3179 |
+
},
|
3180 |
+
|
3181 |
+
clone: function(source, target) {
|
3182 |
+
var options = Object.extend({
|
3183 |
+
setLeft: true,
|
3184 |
+
setTop: true,
|
3185 |
+
setWidth: true,
|
3186 |
+
setHeight: true,
|
3187 |
+
offsetTop: 0,
|
3188 |
+
offsetLeft: 0
|
3189 |
+
}, arguments[2] || {})
|
3190 |
+
|
3191 |
+
// find page position of source
|
3192 |
+
source = $(source);
|
3193 |
+
var p = Position.page(source);
|
3194 |
+
|
3195 |
+
// find coordinate system to use
|
3196 |
+
target = $(target);
|
3197 |
+
var delta = [0, 0];
|
3198 |
+
var parent = null;
|
3199 |
+
// delta [0,0] will do fine with position: fixed elements,
|
3200 |
+
// position:absolute needs offsetParent deltas
|
3201 |
+
if (Element.getStyle(target,'position') == 'absolute') {
|
3202 |
+
parent = Position.offsetParent(target);
|
3203 |
+
delta = Position.page(parent);
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
// correct by body offsets (fixes Safari)
|
3207 |
+
if (parent == document.body) {
|
3208 |
+
delta[0] -= document.body.offsetLeft;
|
3209 |
+
delta[1] -= document.body.offsetTop;
|
3210 |
+
}
|
3211 |
+
|
3212 |
+
// set position
|
3213 |
+
if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
|
3214 |
+
if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
|
3215 |
+
if(options.setWidth) target.style.width = source.offsetWidth + 'px';
|
3216 |
+
if(options.setHeight) target.style.height = source.offsetHeight + 'px';
|
3217 |
+
},
|
3218 |
+
|
3219 |
+
absolutize: function(element) {
|
3220 |
+
element = $(element);
|
3221 |
+
if (element.style.position == 'absolute') return;
|
3222 |
+
Position.prepare();
|
3223 |
+
|
3224 |
+
var offsets = Position.positionedOffset(element);
|
3225 |
+
var top = offsets[1];
|
3226 |
+
var left = offsets[0];
|
3227 |
+
var width = element.clientWidth;
|
3228 |
+
var height = element.clientHeight;
|
3229 |
+
|
3230 |
+
element._originalLeft = left - parseFloat(element.style.left || 0);
|
3231 |
+
element._originalTop = top - parseFloat(element.style.top || 0);
|
3232 |
+
element._originalWidth = element.style.width;
|
3233 |
+
element._originalHeight = element.style.height;
|
3234 |
+
|
3235 |
+
element.style.position = 'absolute';
|
3236 |
+
element.style.top = top + 'px';
|
3237 |
+
element.style.left = left + 'px';
|
3238 |
+
element.style.width = width + 'px';
|
3239 |
+
element.style.height = height + 'px';
|
3240 |
+
},
|
3241 |
+
|
3242 |
+
relativize: function(element) {
|
3243 |
+
element = $(element);
|
3244 |
+
if (element.style.position == 'relative') return;
|
3245 |
+
Position.prepare();
|
3246 |
+
|
3247 |
+
element.style.position = 'relative';
|
3248 |
+
var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
|
3249 |
+
var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
|
3250 |
+
|
3251 |
+
element.style.top = top + 'px';
|
3252 |
+
element.style.left = left + 'px';
|
3253 |
+
element.style.height = element._originalHeight;
|
3254 |
+
element.style.width = element._originalWidth;
|
3255 |
+
}
|
3256 |
+
}
|
3257 |
+
|
3258 |
+
// Safari returns margins on body which is incorrect if the child is absolutely
|
3259 |
+
// positioned. For performance reasons, redefine Position.cumulativeOffset for
|
3260 |
+
// KHTML/WebKit only.
|
3261 |
+
if (Prototype.Browser.WebKit) {
|
3262 |
+
Position.cumulativeOffset = function(element) {
|
3263 |
+
var valueT = 0, valueL = 0;
|
3264 |
+
do {
|
3265 |
+
valueT += element.offsetTop || 0;
|
3266 |
+
valueL += element.offsetLeft || 0;
|
3267 |
+
if (element.offsetParent == document.body)
|
3268 |
+
if (Element.getStyle(element, 'position') == 'absolute') break;
|
3269 |
+
|
3270 |
+
element = element.offsetParent;
|
3271 |
+
} while (element);
|
3272 |
+
|
3273 |
+
return [valueL, valueT];
|
3274 |
+
}
|
3275 |
+
}
|
3276 |
+
|
3277 |
+
Element.addMethods();
|
app/design/adminhtml/default/default/template/mpay24/system/config/fieldset/global.phtml
ADDED
@@ -0,0 +1,515 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mpay24_Mpay24_Block_Adminhtml_System_Config_Fieldset_Global
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php echo "<h3>mPAY24 Payment Gateway Extension Version - " . $this->getMpay24ExtensionVersion() . "</h3>"?>
|
33 |
+
<?php if(Mage::getStoreConfig('payment/mpay24_sp_cc/active')):?>
|
34 |
+
<table class="mpay24-selection" id="mpay24_checkout" cellspacing="0">
|
35 |
+
<col width="75%" />
|
36 |
+
<col width="25%" />
|
37 |
+
<thead>
|
38 |
+
<tr>
|
39 |
+
<th><?php echo $this->escapeHtml($this->getFieldsetLabel()) ?></th>
|
40 |
+
</tr>
|
41 |
+
</thead>
|
42 |
+
<tbody>
|
43 |
+
<?php $activeMethods = array();?>
|
44 |
+
<?php foreach($this->getElements() as $htmlId => $element):?>
|
45 |
+
|
46 |
+
<?php if($htmlId == 'mpay24_global_mpay24_sp_active'): ?>
|
47 |
+
|
48 |
+
<input id="mpay24_global_mpay24_sp_active_value" name="groups[global][fields][mpay24_sp_active][value]" value="0" type="hidden"/>
|
49 |
+
<input id='mpay24_global_mpay24_sp_active' value='Select/Deselect all' class='' type='button' name='groups[global][fields][mpay24_sp_active][value]' onclick='clickAll();'/>
|
50 |
+
|
51 |
+
<?php endif;?>
|
52 |
+
|
53 |
+
<?php foreach(explode(',', Mage::getStoreConfig('mpay24/mpay24as/payment_methods')) as $k => $brand):?>
|
54 |
+
<?php if(($brand == 'AMEX' || $brand == 'DINERS' || $brand == 'JCB' || $brand == 'VISA' || $brand == 'MASTERCARD') &&
|
55 |
+
!in_array('cc', $activeMethods)): ?>
|
56 |
+
<?php $paymentMethod = 'cc'?>
|
57 |
+
<?php elseif(($brand == 'ATOS' || $brand == 'HOBEX-AT' || $brand == 'HOBEX-DE' || $brand == 'HOBEX-NL') &&
|
58 |
+
!in_array('elv', $activeMethods)): ?>
|
59 |
+
<?php $paymentMethod = 'elv'?>
|
60 |
+
<?php elseif(($brand == 'ARZ' || $brand == 'ERSTE' || $brand == 'HYPO' || $brand == 'BAWAG' || $brand == 'BA' || $brand == 'RZB') &&
|
61 |
+
!in_array('eps', $activeMethods)): ?>
|
62 |
+
<?php $paymentMethod = 'eps'?>
|
63 |
+
<?php elseif($brand == 'CASH-TICKET'): ?>
|
64 |
+
<?php $paymentMethod = 'cashTicket'?>
|
65 |
+
<?php elseif($brand == 'PB'): ?>
|
66 |
+
<?php $paymentMethod = 'paybox'?>
|
67 |
+
<?php else: ?>
|
68 |
+
<?php $paymentMethod = strtolower($brand) ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
|
71 |
+
<?php if('mpay24_global_mpay24_sp_'.$paymentMethod == $htmlId): ?>
|
72 |
+
<?php $activeMethods[$paymentMethod] = $paymentMethod ?>
|
73 |
+
<tr>
|
74 |
+
<td>
|
75 |
+
<?php if($htmlId !== 'mpay24_global_mpay24_sp_active'): ?>
|
76 |
+
<label for="<?php echo $htmlId?>">
|
77 |
+
<?php echo $this->getElementHtml($element) ?>
|
78 |
+
<strong><?php echo $this->escapeHtml($this->getElementLabel($element))?></strong> <?php echo $this->escapeHtml($this->getElementComment($element))?>
|
79 |
+
</label>
|
80 |
+
<?php endif; ?>
|
81 |
+
</td>
|
82 |
+
<td class="mpay24-selection-info">
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php endforeach;?>
|
87 |
+
<?php endforeach;?>
|
88 |
+
</tbody>
|
89 |
+
</table>
|
90 |
+
|
91 |
+
|
92 |
+
<?php endif;?>
|
93 |
+
<script type="text/javascript" src="../../../prototype.js"></script>
|
94 |
+
<script type="text/javascript">
|
95 |
+
function ajaxRequest(){
|
96 |
+
var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; //activeX versions to check for in IE
|
97 |
+
if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
|
98 |
+
for (var i=0; i<activexmodes.length; i++){
|
99 |
+
try{
|
100 |
+
return new ActiveXObject(activexmodes[i]);
|
101 |
+
}
|
102 |
+
catch(e){
|
103 |
+
alert("error: " + e);
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
else if (window.XMLHttpRequest) // if Mozilla, Safari etc
|
108 |
+
return new XMLHttpRequest();
|
109 |
+
else
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
function sendRequest(url, buttonId) {
|
114 |
+
var button = document.getElementById(buttonId);
|
115 |
+
button.disabled = true;
|
116 |
+
var mypostrequest=new ajaxRequest();
|
117 |
+
mypostrequest.onreadystatechange=function(){
|
118 |
+
if (mypostrequest.readyState==4){
|
119 |
+
if (mypostrequest.status==200 || window.location.href.indexOf("http")==-1){
|
120 |
+
alert(mypostrequest.responseText);
|
121 |
+
if(mypostrequest.responseText == "The payment systems was successfully updated!")
|
122 |
+
configForm.submit();
|
123 |
+
//window.location.reload();
|
124 |
+
}
|
125 |
+
else{
|
126 |
+
alert("An error has occured making the request: " + mypostrequest.responseText);
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
button.disabled = false;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
var merchantID = document.getElementById("mpay24_mpay24as_merchantid").value;
|
133 |
+
var soapPass = document.getElementById("mpay24_mpay24as_soap_pass").value;
|
134 |
+
var parameters="merchantID="+merchantID+"&soapPass="+escape(soapPass);
|
135 |
+
mypostrequest.open("POST", url, true);
|
136 |
+
mypostrequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
137 |
+
mypostrequest.send(parameters);
|
138 |
+
}
|
139 |
+
</script>
|
140 |
+
|
141 |
+
<script type="text/javascript">
|
142 |
+
|
143 |
+
|
144 |
+
clicked = true;
|
145 |
+
|
146 |
+
function clickAll(){
|
147 |
+
|
148 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cc') && document.getElementById('mpay24_global_mpay24_sp_cc').checked == clicked)
|
149 |
+
document.getElementById('mpay24_global_mpay24_sp_cc').click();
|
150 |
+
if(document.getElementById('mpay24_global_mpay24_sp_elv') && document.getElementById('mpay24_global_mpay24_sp_elv').checked == clicked)
|
151 |
+
document.getElementById('mpay24_global_mpay24_sp_elv').click();
|
152 |
+
if(document.getElementById('mpay24_global_mpay24_sp_eps') && document.getElementById('mpay24_global_mpay24_sp_eps').checked == clicked)
|
153 |
+
document.getElementById('mpay24_global_mpay24_sp_eps').click();
|
154 |
+
if(document.getElementById('mpay24_global_mpay24_sp_giropay') && document.getElementById('mpay24_global_mpay24_sp_giropay').checked == clicked)
|
155 |
+
document.getElementById('mpay24_global_mpay24_sp_giropay').click();
|
156 |
+
if(document.getElementById('mpay24_global_mpay24_sp_maestro') && document.getElementById('mpay24_global_mpay24_sp_maestro').checked == clicked)
|
157 |
+
document.getElementById('mpay24_global_mpay24_sp_maestro').click();
|
158 |
+
if(document.getElementById('mpay24_global_mpay24_sp_psc') && document.getElementById('mpay24_global_mpay24_sp_psc').checked == clicked)
|
159 |
+
document.getElementById('mpay24_global_mpay24_sp_psc').click();
|
160 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paybox') && document.getElementById('mpay24_global_mpay24_sp_paybox').checked == clicked)
|
161 |
+
document.getElementById('mpay24_global_mpay24_sp_paybox').click();
|
162 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paypal') && document.getElementById('mpay24_global_mpay24_sp_paypal').checked == clicked)
|
163 |
+
document.getElementById('mpay24_global_mpay24_sp_paypal').click();
|
164 |
+
if(document.getElementById('mpay24_global_mpay24_sp_mpass') && document.getElementById('mpay24_global_mpay24_sp_mpass').checked == clicked)
|
165 |
+
document.getElementById('mpay24_global_mpay24_sp_mpass').click();
|
166 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cashTicket') && document.getElementById('mpay24_global_mpay24_sp_cashTicket').checked == clicked)
|
167 |
+
document.getElementById('mpay24_global_mpay24_sp_cashTicket').click();
|
168 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cb') && document.getElementById('mpay24_global_mpay24_sp_cb').checked == clicked)
|
169 |
+
document.getElementById('mpay24_global_mpay24_sp_cb').click();
|
170 |
+
if(clicked == false)
|
171 |
+
clicked = true;
|
172 |
+
else
|
173 |
+
clicked = false;
|
174 |
+
}
|
175 |
+
|
176 |
+
Event.observe(window, 'load', function() {
|
177 |
+
var pConfig = new PaypalConfig;
|
178 |
+
|
179 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cc'))
|
180 |
+
Element.observe('mpay24_global_mpay24_sp_cc', 'click', pConfig.trackCc.bind(pConfig));
|
181 |
+
if(document.getElementById('mpay24_global_mpay24_sp_elv'))
|
182 |
+
Element.observe('mpay24_global_mpay24_sp_elv', 'click', pConfig.trackElv.bind(pConfig));
|
183 |
+
if(document.getElementById('mpay24_global_mpay24_sp_eps'))
|
184 |
+
Element.observe('mpay24_global_mpay24_sp_eps', 'click', pConfig.trackEps.bind(pConfig));
|
185 |
+
if(document.getElementById('mpay24_global_mpay24_sp_giropay'))
|
186 |
+
Element.observe('mpay24_global_mpay24_sp_giropay', 'click', pConfig.trackGiropay.bind(pConfig));
|
187 |
+
if(document.getElementById('mpay24_global_mpay24_sp_maestro'))
|
188 |
+
Element.observe('mpay24_global_mpay24_sp_maestro', 'click', pConfig.trackMaestro.bind(pConfig));
|
189 |
+
if(document.getElementById('mpay24_global_mpay24_sp_psc'))
|
190 |
+
Element.observe('mpay24_global_mpay24_sp_psc', 'click', pConfig.trackPsc.bind(pConfig));
|
191 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paybox'))
|
192 |
+
Element.observe('mpay24_global_mpay24_sp_paybox', 'click', pConfig.trackPaybox.bind(pConfig));
|
193 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paypal'))
|
194 |
+
Element.observe('mpay24_global_mpay24_sp_paypal', 'click', pConfig.trackPaypal.bind(pConfig));
|
195 |
+
if(document.getElementById('mpay24_global_mpay24_sp_mpass'))
|
196 |
+
Element.observe('mpay24_global_mpay24_sp_mpass', 'click', pConfig.trackMpass.bind(pConfig));
|
197 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cashTicket'))
|
198 |
+
Element.observe('mpay24_global_mpay24_sp_cashTicket', 'click', pConfig.trackCashTicket.bind(pConfig));
|
199 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cb'))
|
200 |
+
Element.observe('mpay24_global_mpay24_sp_cb', 'click', pConfig.trackCb.bind(pConfig));
|
201 |
+
|
202 |
+
pConfig.fastMode = true;
|
203 |
+
|
204 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cc'))
|
205 |
+
pConfig.trackCc();
|
206 |
+
if(document.getElementById('mpay24_global_mpay24_sp_elv'))
|
207 |
+
pConfig.trackElv();
|
208 |
+
if(document.getElementById('mpay24_global_mpay24_sp_eps'))
|
209 |
+
pConfig.trackEps();
|
210 |
+
if(document.getElementById('mpay24_global_mpay24_sp_maestro'))
|
211 |
+
pConfig.trackMaestro();
|
212 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paybox'))
|
213 |
+
pConfig.trackPaybox();
|
214 |
+
if(document.getElementById('mpay24_global_mpay24_sp_psc'))
|
215 |
+
pConfig.trackPsc();
|
216 |
+
if(document.getElementById('mpay24_global_mpay24_sp_giropay'))
|
217 |
+
pConfig.trackGiropay();
|
218 |
+
if(document.getElementById('mpay24_global_mpay24_sp_paypal'))
|
219 |
+
pConfig.trackPaypal();
|
220 |
+
if(document.getElementById('mpay24_global_mpay24_sp_mpass'))
|
221 |
+
pConfig.trackMpass();
|
222 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cashTicket'))
|
223 |
+
pConfig.trackCashTicket();
|
224 |
+
if(document.getElementById('mpay24_global_mpay24_sp_cb'))
|
225 |
+
pConfig.trackCb();
|
226 |
+
|
227 |
+
pConfig.fastMode = false;
|
228 |
+
pConfig.destruct();
|
229 |
+
});
|
230 |
+
|
231 |
+
PaypalConfig = Class.create();
|
232 |
+
PaypalConfig.prototype = {
|
233 |
+
initialize: function(){
|
234 |
+
this.methods = $H({
|
235 |
+
mpay24spcc: $H({switcher: 'mpay24_sp_cc', fieldset: 'mpay24_sp_cc'}),
|
236 |
+
mpay24paypal: $H({switcher: 'mpay24_sp_paypal', fieldset: 'mpay24_sp_paypal'}),
|
237 |
+
mpay24spelv: $H({switcher: 'mpay24_sp_elv', fieldset: 'mpay24_sp_elv'}),
|
238 |
+
mpay24speps: $H({switcher: 'mpay24_sp_eps', fieldset: 'mpay24_sp_eps'}),
|
239 |
+
mpay24spgiropay: $H({switcher: 'mpay24_sp_giropay', fieldset: 'mpay24_sp_giropay'}),
|
240 |
+
mpay24spmaestro: $H({switcher: 'mpay24_sp_maestro', fieldset: 'mpay24_sp_maestro'}),
|
241 |
+
mpay24sppaybox: $H({switcher: 'mpay24_sp_paybox', fieldset: 'mpay24_sp_paybox'}),
|
242 |
+
mpay24sppsc: $H({switcher: 'mpay24_sp_psc', fieldset: 'mpay24_sp_psc'}),
|
243 |
+
mpay24mpass: $H({switcher: 'mpay24_sp_mpass', fieldset: 'mpay24_sp_mpass'}),
|
244 |
+
mpay24cashticket: $H({switcher: 'mpay24_sp_cashTicket', fieldset: 'mpay24_sp_cashTicket'}),
|
245 |
+
mpay24cb: $H({switcher: 'mpay24_sp_cb', fieldset: 'mpay24_sp_cb'})
|
246 |
+
});
|
247 |
+
|
248 |
+
this.disabledMethods = [];
|
249 |
+
},
|
250 |
+
|
251 |
+
getMethods: function()
|
252 |
+
{
|
253 |
+
return this.methods;
|
254 |
+
},
|
255 |
+
|
256 |
+
getMethod: function(method)
|
257 |
+
{
|
258 |
+
return this.methods.get(method);
|
259 |
+
},
|
260 |
+
|
261 |
+
isDisabled: function(method)
|
262 |
+
{
|
263 |
+
return this.disabledMethods.indexOf(method) != -1;
|
264 |
+
},
|
265 |
+
|
266 |
+
isHidden: function(method)
|
267 |
+
{
|
268 |
+
if (this.getMethod(method).get('hidden')) {
|
269 |
+
return true;
|
270 |
+
}
|
271 |
+
return false;
|
272 |
+
},
|
273 |
+
|
274 |
+
getMethodFieldset: function(method)
|
275 |
+
{
|
276 |
+
var fieldsetId = 'mpay24_' + this.getMethod(method).get('fieldset');
|
277 |
+
return $(fieldsetId);
|
278 |
+
|
279 |
+
},
|
280 |
+
|
281 |
+
getMethodSwitcher: function(method)
|
282 |
+
{
|
283 |
+
var switcherId = 'mpay24_global_' + this.getMethod(method).get('switcher');
|
284 |
+
return $(switcherId);
|
285 |
+
},
|
286 |
+
|
287 |
+
getMethodSwitcherValue: function(method)
|
288 |
+
{
|
289 |
+
var switcherValueId = 'mpay24_global_' + this.getMethod(method).get('switcher') + '_value';
|
290 |
+
return $(switcherValueId);
|
291 |
+
},
|
292 |
+
|
293 |
+
getMethodSwitcherInherit: function(method)
|
294 |
+
{
|
295 |
+
var inheritId = 'mpay24_global_' + this.getMethod(method).get('switcher') + '_inherit';
|
296 |
+
return $(inheritId);
|
297 |
+
},
|
298 |
+
|
299 |
+
markMethodAsReadonly: function(method, readonly)
|
300 |
+
{
|
301 |
+
if (readonly == undefined) {
|
302 |
+
readonly = true;
|
303 |
+
}
|
304 |
+
if (this.isDisabled(method) && !readonly || this.isHidden(method)) {
|
305 |
+
return;
|
306 |
+
}
|
307 |
+
if (this.fastMode) {
|
308 |
+
this.getMethod(method).set('readonly', readonly);
|
309 |
+
return;
|
310 |
+
}
|
311 |
+
var inherit = this.getMethodSwitcherInherit(method);
|
312 |
+
if (inherit != undefined) {
|
313 |
+
inherit.disabled = readonly;
|
314 |
+
if (!inherit.disabled && inherit.checked) {
|
315 |
+
readonly = true;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
this.getMethodSwitcherValue(method).value = this.getMethodSwitcher(method).checked ? '1' : '0';
|
319 |
+
this.getMethodSwitcher(method).disabled = readonly;
|
320 |
+
},
|
321 |
+
|
322 |
+
enableMethod: function(method, readonly)
|
323 |
+
{
|
324 |
+
if (this.isDisabled(method) || this.isHidden(method)) {
|
325 |
+
return;
|
326 |
+
}
|
327 |
+
readonly = (readonly == undefined ? false : readonly);
|
328 |
+
if (this.fastMode) {
|
329 |
+
this.getMethod(method).set('disabled', false);
|
330 |
+
this.getMethod(method).set('readonly', readonly);
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
this.getMethodSwitcher(method).checked = true;
|
334 |
+
this.markMethodAsReadonly(method, readonly);
|
335 |
+
this.toggleFieldset(this.getMethodFieldset(method), this.getMethodSwitcher(method));
|
336 |
+
},
|
337 |
+
|
338 |
+
disableMethod: function(method, readonly)
|
339 |
+
{
|
340 |
+
if (this.isHidden(method)) {
|
341 |
+
return;
|
342 |
+
}
|
343 |
+
readonly = (readonly == undefined ? true : readonly);
|
344 |
+
if (this.fastMode) {
|
345 |
+
this.getMethod(method).set('disabled', true);
|
346 |
+
this.getMethod(method).set('readonly', readonly);
|
347 |
+
return;
|
348 |
+
}
|
349 |
+
this.getMethodSwitcher(method).checked = false;
|
350 |
+
this.markMethodAsReadonly(method, readonly);
|
351 |
+
this.toggleFieldset(this.getMethodFieldset(method), this.getMethodSwitcher(method));
|
352 |
+
},
|
353 |
+
|
354 |
+
toggleMethodVisibility: function(method, isHidden)
|
355 |
+
{
|
356 |
+
var selection = this.getMethodSwitcher(method).up('tr');
|
357 |
+
var fieldset = this.getMethodFieldset(method);
|
358 |
+
var fieldsetHead = fieldset.previous('div');
|
359 |
+
[selection, fieldset, fieldsetHead].each(function(e) {
|
360 |
+
isHidden ? e.hide() : e.show();
|
361 |
+
});
|
362 |
+
// do not show fieldset for turned off methods
|
363 |
+
if (!isHidden && !this.getMethodSwitcher(method).checked) {
|
364 |
+
fieldset.hide();
|
365 |
+
}
|
366 |
+
this.getMethod(method).set('hidden', isHidden);
|
367 |
+
},
|
368 |
+
|
369 |
+
hideMethod: function(method)
|
370 |
+
{
|
371 |
+
this.toggleMethodVisibility(method, true);
|
372 |
+
},
|
373 |
+
|
374 |
+
showMethod: function(method)
|
375 |
+
{
|
376 |
+
this.toggleMethodVisibility(method, false);
|
377 |
+
},
|
378 |
+
|
379 |
+
trackMethod: function(method)
|
380 |
+
{
|
381 |
+
var switcher = this.getMethodSwitcher(method);
|
382 |
+
if (!switcher.checked && this.fastMode || !this.fastMode) {
|
383 |
+
this.toggleFieldset(this.getMethodFieldset(method), switcher);
|
384 |
+
}
|
385 |
+
this.getMethodSwitcherValue(method).value = switcher.checked ? '1' : '0';
|
386 |
+
},
|
387 |
+
|
388 |
+
trackCc: function()
|
389 |
+
{
|
390 |
+
this.trackMethod('mpay24spcc');
|
391 |
+
},
|
392 |
+
|
393 |
+
trackPaypal: function()
|
394 |
+
{
|
395 |
+
this.trackMethod('mpay24paypal');
|
396 |
+
},
|
397 |
+
|
398 |
+
trackElv: function()
|
399 |
+
{
|
400 |
+
this.trackMethod('mpay24spelv');
|
401 |
+
},
|
402 |
+
|
403 |
+
trackEps: function()
|
404 |
+
{
|
405 |
+
this.trackMethod('mpay24speps');
|
406 |
+
},
|
407 |
+
|
408 |
+
trackGiropay: function()
|
409 |
+
{
|
410 |
+
this.trackMethod('mpay24spgiropay');
|
411 |
+
},
|
412 |
+
|
413 |
+
trackMaestro: function()
|
414 |
+
{
|
415 |
+
this.trackMethod('mpay24spmaestro');
|
416 |
+
},
|
417 |
+
|
418 |
+
trackPaybox: function()
|
419 |
+
{
|
420 |
+
this.trackMethod('mpay24sppaybox');
|
421 |
+
},
|
422 |
+
|
423 |
+
trackPsc: function()
|
424 |
+
{
|
425 |
+
this.trackMethod('mpay24sppsc');
|
426 |
+
},
|
427 |
+
|
428 |
+
trackMpass: function()
|
429 |
+
{
|
430 |
+
this.trackMethod('mpay24mpass');
|
431 |
+
},
|
432 |
+
|
433 |
+
trackCashTicket: function()
|
434 |
+
{
|
435 |
+
this.trackMethod('mpay24cashticket');
|
436 |
+
},
|
437 |
+
|
438 |
+
trackCb: function()
|
439 |
+
{
|
440 |
+
this.trackMethod('mpay24cb');
|
441 |
+
},
|
442 |
+
|
443 |
+
enableRow: function(rowId)
|
444 |
+
{
|
445 |
+
$(rowId).select('input','select').each(function(e) {
|
446 |
+
e.disabled = false;
|
447 |
+
});
|
448 |
+
$(rowId).show();
|
449 |
+
},
|
450 |
+
|
451 |
+
disableRow: function(rowId)
|
452 |
+
{
|
453 |
+
$(rowId).select('input','select').each(function(e) {
|
454 |
+
e.disabled = true;
|
455 |
+
});
|
456 |
+
$(rowId).hide();
|
457 |
+
},
|
458 |
+
|
459 |
+
toggleFieldset: function(fieldset, checkbox)
|
460 |
+
{
|
461 |
+
var isHidden = !checkbox.checked;
|
462 |
+
|
463 |
+
this.toggleValueElements(checkbox, fieldset, isHidden);
|
464 |
+
isHidden ? fieldset.hide() : fieldset.show();
|
465 |
+
var heading = fieldset.previous('div');
|
466 |
+
var headingLink = heading.down('a');
|
467 |
+
isHidden ? heading.addClassName('disabled') : heading.removeClassName('disabled');
|
468 |
+
if (isHidden) {
|
469 |
+
headingLink.oldHref = headingLink.href;
|
470 |
+
headingLink.oldOnclick = headingLink.onclick;
|
471 |
+
headingLink.onclick = "return false;";
|
472 |
+
headingLink.href = "javascript:void(0)";
|
473 |
+
} else {
|
474 |
+
if (headingLink.oldOnclick && headingLink.oldHref) {
|
475 |
+
headingLink.onclick = headingLink.oldOnclick;
|
476 |
+
headingLink.href = headingLink.oldHref;
|
477 |
+
}
|
478 |
+
}
|
479 |
+
},
|
480 |
+
|
481 |
+
toggleValueElements: function(checkbox, container, checked)
|
482 |
+
{
|
483 |
+
var isDisabled = (checked != undefined ? checked : $(checkbox).checked);
|
484 |
+
var elemInherit, currIsDisabled;
|
485 |
+
$(container).select('select', 'input', 'textarea', 'button').each (function(elem) {
|
486 |
+
// avoid inherit checkbox functionality rewrite
|
487 |
+
currIsDisabled = isDisabled;
|
488 |
+
if (!currIsDisabled) {
|
489 |
+
elemInherit = $(elem.id + '_inherit');
|
490 |
+
if (elemInherit != undefined && elemInherit.checked) {
|
491 |
+
currIsDisabled = true;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
elem.disabled=currIsDisabled;
|
495 |
+
if (currIsDisabled) {
|
496 |
+
elem.addClassName('disabled');
|
497 |
+
} else {
|
498 |
+
elem.removeClassName('disabled');
|
499 |
+
}
|
500 |
+
});
|
501 |
+
},
|
502 |
+
|
503 |
+
destruct: function()
|
504 |
+
{
|
505 |
+
this.getMethods().each(function(method) {
|
506 |
+
if (method.value.get('disabled') != undefined) {
|
507 |
+
method.value.get('disabled') ? this.disableMethod(method.key) : this.enableMethod(method.key);
|
508 |
+
}
|
509 |
+
if (method.value.get('readonly') != undefined) {
|
510 |
+
this.markMethodAsReadonly(method.key, method.value.get('readonly'));
|
511 |
+
}
|
512 |
+
}.bind(this));
|
513 |
+
}
|
514 |
+
}
|
515 |
+
</script>
|
app/design/frontend/default/default/layout/mpay24.xml
ADDED
@@ -0,0 +1,27 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<mpay24_payment_payment>
|
4 |
+
<reference name="root">
|
5 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
6 |
+
</reference>
|
7 |
+
<reference name="content">
|
8 |
+
<block type="mpay24/mpay24" name="payment_redirect" template="mpay24/payment.phtml"/>
|
9 |
+
</reference>
|
10 |
+
|
11 |
+
|
12 |
+
<!-- reference name="head">
|
13 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
14 |
+
</reference>
|
15 |
+
<reference name="content">
|
16 |
+
<block type="mpay24/index" name="payment_index" template="mpay24/paymen.phtml" />
|
17 |
+
</reference -->
|
18 |
+
</mpay24_payment_payment>
|
19 |
+
<mpay24_payment_errormsg>
|
20 |
+
<reference name="root">
|
21 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="mpay24/mpay24" name="errormsg" template="mpay24/error.phtml"/>
|
25 |
+
</reference>
|
26 |
+
</mpay24_payment_errormsg>
|
27 |
+
</layout>
|
app/design/frontend/default/default/template/mpay24/error.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
?><div>
|
4 |
+
<h2><?php echo $this->__('Payment was not successfull. Checkout was cancelled.');?></h2>
|
5 |
+
<h2><?php echo $this->__('Please check your payment details and try again.');?></h2></div>
|
app/design/frontend/default/default/template/mpay24/form/cc.phtml
ADDED
@@ -0,0 +1,94 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/* JCB
|
21 |
+
* 'JC', [new RegExp('^(35[0-9]{14}|(2131|1800)[0-9]{11})$'), new RegExp('^([0-9]{3})?$'), true]);
|
22 |
+
* 'JC', [new RegExp('(^3[0-9]{15}$)|(^(2131|1800)[0-9]{11}$)'), new RegExp('^[0-9]{4}$'), true]
|
23 |
+
* Diners Club
|
24 |
+
* 'DC', [new RegExp('^3(?:0[0-5]|[68][0-9])[0-9]{11}$'), new RegExp('^[0-9]{3}$'), true]
|
25 |
+
*
|
26 |
+
*
|
27 |
+
* # 6725/6726 - Maestro debit cards (Germany)
|
28 |
+
* # 6759 - Maestro (formerly Switch) debit cards
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<fieldset class="form-list">
|
32 |
+
<?php $_code=$this->getMethodCode() ?>
|
33 |
+
<script type="text/javascript">
|
34 |
+
Validation.creditCartTypes.set('JC', [new RegExp('(^3[0-9]{15}$)|(^(2131|1800)[0-9]{11}$)'), new RegExp('^[0-9]{4}$'), true]);
|
35 |
+
Validation.creditCartTypes.set('DC', [new RegExp('^3(?:0[0-5]|[68][0-9])[0-9]{11}$'), new RegExp('^[0-9]{3}$'), true]);
|
36 |
+
</script>
|
37 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
38 |
+
<!--li>
|
39 |
+
<div class="input-box">
|
40 |
+
<label for="<?php echo $_code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
|
41 |
+
<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="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
42 |
+
</div>
|
43 |
+
</li-->
|
44 |
+
<li>
|
45 |
+
<div class="input-box">
|
46 |
+
<label for="<?php echo $_code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
|
47 |
+
<select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
|
48 |
+
<option value=""><?php echo $this->__('--Please Select--')?></option>
|
49 |
+
<?php $_ccType = $this->getInfoData('cc_type') ?>
|
50 |
+
<?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
51 |
+
<option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
52 |
+
<?php endforeach ?>
|
53 |
+
</select>
|
54 |
+
</div>
|
55 |
+
</li>
|
56 |
+
<li>
|
57 |
+
<div class="input-box">
|
58 |
+
<label for="<?php echo $_code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
|
59 |
+
<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="" />
|
60 |
+
</div>
|
61 |
+
</li>
|
62 |
+
<li>
|
63 |
+
<div class="input-box">
|
64 |
+
<label for="<?php echo $_code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
|
65 |
+
<div class="v-fix">
|
66 |
+
<select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
|
67 |
+
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
68 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
69 |
+
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
70 |
+
<?php endforeach ?>
|
71 |
+
</select>
|
72 |
+
</div>
|
73 |
+
<div class="v-fix" style="padding-left:5px;">
|
74 |
+
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
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?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?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 |
+
|
89 |
+
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
90 |
+
</div>
|
91 |
+
</li>
|
92 |
+
<?php endif; ?>
|
93 |
+
</ul>
|
94 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/elv.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<div class="input-box">
|
26 |
+
<label for="<?php echo $_code?>_bank_code"><?php echo $this->__('Holder')?> <span class="required">*</span></label><br/>
|
27 |
+
<input type="text" title="<?php echo $this->__('Holder')?>" class="required-entry input-text" id="<?php echo $_code?>_holder" name="payment[mpay_holder]" value="<?php echo $this->getInfoData('mpay_holder')?>"/>
|
28 |
+
</div>
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
<div class="input-box">
|
32 |
+
<label for="<?php echo $_code?>_account_number"><?php echo $this->__('Account number')?> <span class="required">*</span></label><br/>
|
33 |
+
<input type="text" title="<?php echo $this->__('Account number')?>" class="required-entry input-text" id="<?php echo $_code?>_account_number" name="payment[mpay_account_number]" value="<?php echo $this->getInfoData('mpay_account_number')?>"/>
|
34 |
+
</div>
|
35 |
+
</li>
|
36 |
+
<li>
|
37 |
+
<div class="input-box">
|
38 |
+
<label for="<?php echo $_code?>_bank_code"><?php echo $this->__('Bank code')?> <span class="required">*</span></label><br/>
|
39 |
+
<input type="text" title="<?php echo $this->__('Bank code')?>" class="required-entry input-text" id="<?php echo $_code?>_bank_code" name="payment[mpay_bank_code]" value="<?php echo $this->getInfoData('mpay_bank_code')?>"/>
|
40 |
+
</div>
|
41 |
+
</li>
|
42 |
+
<li>
|
43 |
+
<div class="input-box">
|
44 |
+
<label for="<?php echo $_code?>_bank_code"><?php echo $this->__('AGB Hobex AG')?> <span class="required">*</span></label><br/>
|
45 |
+
<input type="checkbox" title="<?php echo $this->__('AGB Hobex AG')?>" class="required-entry" value=1 />
|
46 |
+
</div>
|
47 |
+
</li>
|
48 |
+
<li>
|
49 |
+
<textarea rows="5" cols="60" readonly="readonly"><?php echo $this->__('AGB HOBEX')?></textarea>
|
50 |
+
</li>
|
51 |
+
</ul>
|
52 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/giropay.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<div class="input-box">
|
26 |
+
<label for="<?php echo $_code?>_bank_code"><?php echo $this->__('Holder')?> <span class="required">*</span></label><br/>
|
27 |
+
<input type="text" title="<?php echo $this->__('Holder')?>" class="required-entry input-text" id="<?php echo $_code?>_holder" name="payment[mpay_holder]" value="<?php echo $this->getInfoData('mpay_holder')?>"/>
|
28 |
+
</div>
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
<div class="input-box">
|
32 |
+
<label for="<?php echo $_code?>_account_number"><?php echo $this->__('Account number')?> <span class="required">*</span></label><br/>
|
33 |
+
<input type="text" title="<?php echo $this->__('Account number')?>" class="required-entry input-text" id="<?php echo $_code?>_account_number" name="payment[mpay_account_number]" value="<?php echo $this->getInfoData('mpay_account_number')?>"/>
|
34 |
+
</div>
|
35 |
+
</li>
|
36 |
+
<li>
|
37 |
+
<div class="input-box">
|
38 |
+
<label for="<?php echo $_code?>_bank_code"><?php echo $this->__('Bank code')?> <span class="required">*</span></label><br/>
|
39 |
+
<input type="text" title="<?php echo $this->__('Bank code')?>" class="required-entry input-text" id="<?php echo $_code?>_bank_code" name="payment[mpay_bank_code]" value="<?php echo $this->getInfoData('mpay_bank_code')?>"/>
|
40 |
+
</div>
|
41 |
+
</li>
|
42 |
+
</ul>
|
43 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/mia.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
|
24 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
25 |
+
<li>
|
26 |
+
<div class="input-box">
|
27 |
+
<label for="<?php echo $_code?>_mia_account_number"><?php echo $this->__('MIA Number')?> <span class="required">*</span></label><br/>
|
28 |
+
</div>
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
<div class="input-box">
|
32 |
+
<div class="v-fix">
|
33 |
+
<select id="<?php echo $_code ?>_mia_country_code" name="payment[mpay_mia_country_code]" class="required-entry" style="width: 50px;">
|
34 |
+
<option value="43">+43</option>
|
35 |
+
</select>
|
36 |
+
</div>
|
37 |
+
<div class="v-fix" style="padding-left:5px;">
|
38 |
+
<select id="<?php echo $_code ?>_mia_area_code" name="payment[mpay_mia_area_code]" class="required-entry" style="width: 50px;">
|
39 |
+
<option value=""><?php echo $this->__('----')?></option>
|
40 |
+
<?php $_areaCode = $this->getInfoData('mpay_mia_area_code') ?>
|
41 |
+
<?php foreach ($this->getMiaAvailableAreaCodes() as $_typeCode => $_typeName): ?>
|
42 |
+
<option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_areaCode): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
43 |
+
<?php endforeach ?>
|
44 |
+
</select>
|
45 |
+
</div>
|
46 |
+
<div class="v-fix" style="padding-left:5px;">
|
47 |
+
<input type="text" title="<?php echo $this->__('MIA Number')?>" class="required-entry input-text" id="<?php echo $_code?>_mia_account_number" name="payment[mpay_mia_number]" value="<?php echo $this->getInfoData('mpay_mia_number')?>" style="width: 150px;"/>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
</li>
|
51 |
+
</ul>
|
52 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/paybox.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
|
24 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
25 |
+
<li>
|
26 |
+
<div class="input-box">
|
27 |
+
<label for="<?php echo $_code?>_pb_account_number"><?php echo $this->__('Paybox Number')?> <span class="required">*</span></label><br/>
|
28 |
+
</div>
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
<div class="input-box">
|
32 |
+
<div class="v-fix">
|
33 |
+
<select id="<?php echo $_code ?>_pb_country_code" name="payment[mpay_pb_country_code]" class="required-entry" style="width: 50px;">
|
34 |
+
<option value="43">+43</option>
|
35 |
+
</select>
|
36 |
+
</div>
|
37 |
+
<div class="v-fix" style="padding-left:5px;">
|
38 |
+
<select id="<?php echo $_code ?>_pb_area_code" name="payment[mpay_pb_area_code]" class="required-entry" style="width: 50px;">
|
39 |
+
<option value=""><?php echo $this->__('----')?></option>
|
40 |
+
<?php $_areaCode = $this->getInfoData('mpay_pb_area_code') ?>
|
41 |
+
<?php foreach ($this->getPayboxAvailableAreaCodes() as $_typeCode => $_typeName): ?>
|
42 |
+
<option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_areaCode): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
43 |
+
<?php endforeach ?>
|
44 |
+
</select>
|
45 |
+
</div>
|
46 |
+
<div class="v-fix" style="padding-left:5px;">
|
47 |
+
<input type="text" title="<?php echo $this->__('Paybox Number')?>" class="required-entry input-text" id="<?php echo $_code?>_pb_account_number" name="payment[mpay_pb_number]" value="<?php echo $this->getInfoData('mpay_pb_number')?>" style="width: 150px;"/>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
</li>
|
51 |
+
</ul>
|
52 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/paysafecard.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
</ul>
|
28 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpayment.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
</ul>
|
28 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentCashTicket.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="CASH_TICKET" src="<?php echo $this->getSkinUrl('images/mpay24/cashTicket.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentCc.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php $_code=$this->getMethodCode() ?>
|
22 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
23 |
+
<li>
|
24 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
25 |
+
</li>
|
26 |
+
</ul>
|
27 |
+
<div style="padding:10px 15px 15px;">
|
28 |
+
<table cellpadding="0" cellspacing="0" border="0">
|
29 |
+
<tr>
|
30 |
+
<td height="1" colspan="3"></td>
|
31 |
+
<td height="1" bgcolor="#b3b3b3"></td>
|
32 |
+
<td height="1" colspan="3"></td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td height="1" colspan="2"></td>
|
36 |
+
<td height="1" width="2" bgcolor="#b3b3b3"></td>
|
37 |
+
<td height="1" bgcolor="#ffffff"></td>
|
38 |
+
<td height="1" width="2" bgcolor="#b3b3b3"></td>
|
39 |
+
<td height="1" colspan="2"></td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td height="2" width="1"></td>
|
43 |
+
<td height="2" width="1" bgcolor="#b3b3b3"></td>
|
44 |
+
<td height="2" colspan="3" bgcolor="#ffffff"></td>
|
45 |
+
<td height="2" width="1" bgcolor="#b3b3b3"></td>
|
46 |
+
<td height="2" width="1"></td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td width="1" bgcolor="#b3b3b3"></td>
|
50 |
+
<td width="3" colspan="2" bgcolor="#ffffff"></td>
|
51 |
+
<td bgcolor="#ffffff">
|
52 |
+
<table>
|
53 |
+
<tr>
|
54 |
+
<td colspan="2">
|
55 |
+
<div style="width: 248px;">
|
56 |
+
<?php $hobex = false;?>
|
57 |
+
<?php foreach ($this->getActiveMethods() as $_method): ?>
|
58 |
+
<?php if($_method === 'PAYBOX'): ?>
|
59 |
+
<div style="border:5px solid transparent; float:left;">
|
60 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/PB.gif')?>" hspace="2" vspace="2" alt="paybox">
|
61 |
+
</div>
|
62 |
+
<?php elseif($_method === 'MC'): ?>
|
63 |
+
<div style="border:5px solid transparent; float:left;">
|
64 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/MASTERCARD.gif')?>" hspace="2" vspace="2" alt="MASTERCARD">
|
65 |
+
</div>
|
66 |
+
<?php elseif($_method === 'VI'): ?>
|
67 |
+
<div style="border:5px solid transparent; float:left;">
|
68 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/VISA.gif')?>" hspace="2" vspace="2" alt="VISA">
|
69 |
+
</div>
|
70 |
+
<?php elseif(strstr($_method, 'HOBEX')): ?>
|
71 |
+
<?php if($hobex === false):?>
|
72 |
+
<?php $hobex = true;?>
|
73 |
+
<div style="border:5px solid transparent; float:left;">
|
74 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/'.$_method.'.gif')?>" hspace="2" vspace="2" alt="<?php $_method ?>">
|
75 |
+
</div>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php else: ?>
|
78 |
+
<div style="border:5px solid transparent; float:left;">
|
79 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/'.$_method.'.gif')?>" hspace="2" vspace="2" alt="<?php $_method ?>">
|
80 |
+
</div>
|
81 |
+
<?php endif; ?>
|
82 |
+
<?php endforeach; ?>
|
83 |
+
</div>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td colspan="3">
|
88 |
+
<div style="padding-bottom: 2px; border-top: 1px solid #b3b3b3"></div>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<td></td>
|
93 |
+
<td></td>
|
94 |
+
<td>
|
95 |
+
<img src="<?php echo $this->getSkinUrl('images/mpay24/mpay24_section.png')?>" alt="mPAY24">
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
</table>
|
99 |
+
</td>
|
100 |
+
<td width="3" colspan="2" bgcolor="#ffffff"></td>
|
101 |
+
<td width="1" bgcolor="#b3b3b3"></td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<td height="2" width="1"></td>
|
105 |
+
<td height="2" width="1" bgcolor="#b3b3b3"></td>
|
106 |
+
<td height="2" colspan="3" bgcolor="#ffffff"></td>
|
107 |
+
<td height="2" width="1" bgcolor="#b3b3b3"></td>
|
108 |
+
<td height="2" width="1"></td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<td height="1" colspan="2"></td>
|
112 |
+
<td height="1" width="2" bgcolor="#b3b3b3"></td>
|
113 |
+
<td height="1" bgcolor="#ffffff"></td>
|
114 |
+
<td height="1" width="2" bgcolor="#b3b3b3"></td>
|
115 |
+
<td height="1" colspan="2"></td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td height="1" colspan="3"></td>
|
119 |
+
<td height="1" bgcolor="#b3b3b3"></td>
|
120 |
+
<td height="1" colspan="3"></td>
|
121 |
+
</tr>
|
122 |
+
</table>
|
123 |
+
</div>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentElv.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="HOBEX" src="<?php echo $this->getSkinUrl('images/mpay24/hobex.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentEps.phtml
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<?php foreach ($this->getBrands() as $brand):?>
|
29 |
+
<img alt="<?php echo $brand ?>" src="<?php echo $this->getSkinUrl('images/mpay24/'.strtolower($brand).'.png')?>"/>
|
30 |
+
|
31 |
+
<?php endforeach;?>
|
32 |
+
</li>
|
33 |
+
</ul>
|
34 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentGiropay.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="GIROPAY" src="<?php echo $this->getSkinUrl('images/mpay24/giropay.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentMaestro.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="maestro" src="<?php echo $this->getSkinUrl('images/mpay24/maestro.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentMia.phtml
ADDED
@@ -0,0 +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 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<?php foreach ($this->getBrands() as $brand):?>
|
29 |
+
<img alt="<?php echo $brand ?>" src="<?php echo $this->getSkinUrl('images/mpay24/'.strtolower($brand).'.png')?>"/>
|
30 |
+
<?php endforeach;?>
|
31 |
+
</li>
|
32 |
+
</ul>
|
33 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentMpass.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="MPASS" src="<?php echo $this->getSkinUrl('images/mpay24/mpass.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentPaybox.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="paybox" src="<?php echo $this->getSkinUrl('images/mpay24/pb.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentPaypal.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="PAYPAL" src="<?php echo $this->getSkinUrl('images/mpay24/paypal.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentPsc.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="paysafecard" src="<?php echo $this->getSkinUrl('images/mpay24/psc.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/form/selectpaymentQuick.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to our secure payment page when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
<li>
|
28 |
+
<img alt="QUICK" src="<?php echo $this->getSkinUrl('images/mpay24/quick.png')?>"/>
|
29 |
+
</li>
|
30 |
+
</ul>
|
31 |
+
</fieldset>
|
app/design/frontend/default/default/template/mpay24/info/cc.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php if($_info = $this->getInfo()): ?>
|
22 |
+
<!-- ?php echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br /-->
|
23 |
+
<?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
|
24 |
+
<?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br />
|
25 |
+
<?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
|
26 |
+
<?php else: ?>
|
27 |
+
|
28 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/info/elv.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
22 |
+
<?php if($_info = $this->getInfo()):?>
|
23 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?><br/>
|
24 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?><br/>
|
25 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?><br/>
|
26 |
+
<?php else: ?>
|
27 |
+
|
28 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/info/giropay.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
22 |
+
<?php if($_info = $this->getInfo()):?>
|
23 |
+
<?php echo $this->__('Account holder: %s', $this->getInfo()->getMpayHolder())?><br/>
|
24 |
+
<?php echo $this->__('Account number: %s', 'xxxx'.substr($this->getInfo()->getMpayAccountNumber(),4,strlen($this->getInfo()->getMpayAccountNumber())))?><br/>
|
25 |
+
<?php echo $this->__('Bank code: %s', $this->getInfo()->getMpayBankCode())?><br/>
|
26 |
+
<?php else: ?>
|
27 |
+
|
28 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/info/mia.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
22 |
+
<?php if($_info = $this->getInfo()):?>
|
23 |
+
<?php echo $this->__('MIA Nr: %s', substr($this->getMiaNr(),0,strlen($this->getMiaNr())-3).'xxx')?><br/>
|
24 |
+
<?php else: ?>
|
25 |
+
|
26 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/info/paybox.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
22 |
+
<?php if($_info = $this->getInfo()):?>
|
23 |
+
<?php echo $this->__('Paybox Nr: %s', substr($this->getPayboxNr(),0,strlen($this->getPayboxNr())-3).'xxx')?><br/>
|
24 |
+
<?php else: ?>
|
25 |
+
|
26 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/info/paysafecard.phtml
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<p><?php echo $this->getMethod()->getTitle() ?></p>
|
app/design/frontend/default/default/template/mpay24/info/selectpayment.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mpay24
|
16 |
+
* @package Mpay24_Mpay24
|
17 |
+
* @author Filipp Akinfiev
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php
|
22 |
+
$add_info = $this->getInfo()->getData('additional_information');
|
23 |
+
if(!empty($add_info)):
|
24 |
+
if(!array_key_exists('status', $add_info) || $add_info['status'] == false):
|
25 |
+
$this->redirectToCalled('frontend', $this->getInfo()->getData('last_trans_id'));
|
26 |
+
endif;
|
27 |
+
endif;
|
28 |
+
?>
|
29 |
+
|
30 |
+
<p><b><?php if(strtoupper($this->getMethod()->getTitle()) !== $this->getBrand().' ('.Mage::getStoreConfig('payment/mpay24_sp_cc/title')
|
31 |
+
.')' && $this->getMethod()->getTitle() !== Mage::getStoreConfig('payment/mpay24_sp_cc/title')): ?>
|
32 |
+
<?php echo substr($this->getMethod()->getTitle(), 0, strlen($this->getMethod()->getTitle())-9) ?>
|
33 |
+
<?php elseif($this->getMethod()->getTitle() === Mage::getStoreConfig('payment/mpay24_sp_cc/title') && $this->getBrand() !== ''): ?>
|
34 |
+
<?php echo 'Credit Card ' ?>
|
35 |
+
<?php elseif($this->getMethod()->getTitle() === Mage::getStoreConfig('payment/mpay24_sp_cc/title') && $this->getBrand() === ''): ?>
|
36 |
+
<?php echo Mage::getStoreConfig('payment/mpay24_sp_cc/title')?>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php echo $this->getBrand().' ('.Mage::getStoreConfig('payment/mpay24_sp_cc/title').')' ?></b><br/>
|
39 |
+
<?php if($this->getMethod()->getData('info_instance')->getOrder() !== null): ?>
|
40 |
+
<?php echo 'Approval Code: ', $this->htmlEscape($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('appr_code')) ?><br/>
|
41 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/mpay24/mpay24.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<h4><?php echo $this->__('Module List') ?></h4>
|
2 |
+
<?php
|
3 |
+
|
4 |
+
/*
|
5 |
+
This shows how to load specific fields from a record in the database.
|
6 |
+
1) Note the load(15), this corresponds to saying "select * from table where table_id = 15"
|
7 |
+
2) You can then just use the get(fieldname) to pull specific data from the table.
|
8 |
+
3) If you have a field named news_id, then it becomes getNewsId, etc.
|
9 |
+
*/
|
10 |
+
/*
|
11 |
+
$news = Mage::getModel('mpay24/mpay24')->load(15);
|
12 |
+
echo $news->getNewsId();
|
13 |
+
echo $news->getTitle();
|
14 |
+
echo $news->getContent();
|
15 |
+
echo $news->getStatus();
|
16 |
+
*/
|
17 |
+
|
18 |
+
/*
|
19 |
+
This shows an alternate way of loading datas from a record using the database the "Magento Way" (using blocks and controller).
|
20 |
+
Uncomment blocks in /app/code/local/Namespace/Module/controllers/IndexController.php if you want to use it.
|
21 |
+
|
22 |
+
*/
|
23 |
+
/*
|
24 |
+
$object = $this->getMpay24();
|
25 |
+
echo 'id: '.$object['test_id'].'<br/>';
|
26 |
+
echo 'title: '.$object['title'].'<br/>';
|
27 |
+
echo 'content: '.$object['content'].'<br/>';
|
28 |
+
echo 'status: '.$object['status'].'<br/>';
|
29 |
+
*/
|
30 |
+
|
31 |
+
|
32 |
+
/*
|
33 |
+
This shows how to load multiple rows in a collection and save a change to them.
|
34 |
+
1) The setPageSize function will load only 5 records per page and you can set the current Page with the setCurPage function.
|
35 |
+
2) The $collection->walk('save') allows you to save everything in the collection after all changes have been made.
|
36 |
+
*/
|
37 |
+
/*
|
38 |
+
$i = 0;
|
39 |
+
|
40 |
+
$collection = Mage::getModel('mpay24/mpay24')->getCollection();
|
41 |
+
$collection->setPageSize(5);
|
42 |
+
$collection->setCurPage(2);
|
43 |
+
$size = $collection->getSize();
|
44 |
+
$cnt = count($collection);
|
45 |
+
foreach ($collection as $item) {
|
46 |
+
$i = $i+1;
|
47 |
+
$item->setTitle($i);
|
48 |
+
echo $item->getTitle();
|
49 |
+
}
|
50 |
+
|
51 |
+
$collection->walk('save');
|
52 |
+
*/
|
53 |
+
|
54 |
+
/*
|
55 |
+
This shows how to load a single record and save a change.
|
56 |
+
1) Note the setTitle, this corresponds to the table field name, title, and then you pass it the text to change.
|
57 |
+
2) Call the save() function only on a single record.
|
58 |
+
*/
|
59 |
+
/*
|
60 |
+
$object = Mage::getModel('mpay24/mpay24')->load(1);
|
61 |
+
$object->setTitle('This is a changed title');
|
62 |
+
$object->save();
|
63 |
+
*/
|
64 |
+
|
65 |
+
?>
|
app/design/frontend/default/default/template/mpay24/redirect.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 Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-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 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_PayPal_Block_Express_Form
|
30 |
+
* @see Mage_PayPal_Block_Standard_Form
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
|
34 |
+
<li class="form-alt"><?php echo $this->getRedirectMessage() ?></li>
|
35 |
+
</ul>
|
app/etc/modules/Mpay24_Mpay24.xml
ADDED
@@ -0,0 +1,13 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Mpay24_Mpay24>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Payment />
|
9 |
+
</depends>
|
10 |
+
<version>1.1.8</version>
|
11 |
+
</Mpay24_Mpay24>
|
12 |
+
</modules>
|
13 |
+
</config>
|
app/locale/de_AT/Mpay24_Mpay24.csv
ADDED
@@ -0,0 +1,46 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"Your credit card was declined, sorry.","Your credit card was declined, sorry."
|
2 |
+
"Payment authorization error.","Payment authorization error."
|
3 |
+
"Invalid amount for authorization.","Invalid amount for authorization."
|
4 |
+
"Gateway request error: %s","Gateway request error: %s"
|
5 |
+
"Authorization","Autorisierung"
|
6 |
+
"Sale","Verkauf"
|
7 |
+
"Incorrect credit card expiration date","Incorrect credit card expiration date"
|
8 |
+
"Credit card number mismatch with credit card type","Credit card number mismatch with credit card type"
|
9 |
+
"Invalid Credit Card Number","Invalid Credit Card Number"
|
10 |
+
"Credit card type is not allowed for this payment method","Credit card type is not allowed for this payment method"
|
11 |
+
"Can not retrieve payment method model object.","Can not retrieve payment method model object."
|
12 |
+
"Month","Monat"
|
13 |
+
"Year","Jahr"
|
14 |
+
"Payment Reserved","Zahlung reserviert"
|
15 |
+
"Payment Billed","Zahlung erfolgreich"
|
16 |
+
"Payment Credited","Zahlung gutgeschrieben"
|
17 |
+
"Redirected to a 3D secure form","Redirected to a 3D secure form"
|
18 |
+
"Customer cancled payment or payment error","Der Kunde hat die Zahlung abgebrochen oder es gab einen Zahlungsfehler"
|
19 |
+
"Payment was successful.","Zahlung war erfolgreich."
|
20 |
+
"AGB HOBEX","Ich ermächtige hiermit den Raiffeisenverband Salzburg/Hobex AG, den angegebenen Betrag von meinem genannten Konto durch Lastschrift einzuziehen. Für den Fall der Nichteinlösung der Lastschrift oder des Widerspruchs gegen die Lastschrift weise ich meine Bank unwiderruflich an, HOBEX AG oder Dritten auf Anforderung meinen Namen, Adresse und Geburtsdatum vollständig mitzuteilen."
|
21 |
+
"Payment was not successfull. Checkout was cancelled.","Ihrer Zahlung war nicht möglich. Ihre Bestellung wurde storniert."
|
22 |
+
"Please check your payment details and try again.","Überprüfen Sie bitte Ihre Zahlungsinformationen und versuchen Sie es erneut."
|
23 |
+
"mPAY24 enabled","mPAY24 aktiviert"
|
24 |
+
"SOAP password","SOAP Passwort"
|
25 |
+
"Merchant ID","Merchant ID"
|
26 |
+
"API uses proxy","API benutzt Proxy"
|
27 |
+
"Billing address mode","Rechnungsadresse-Modus"
|
28 |
+
"Title","Titel"
|
29 |
+
"AUTH 3DS","AUTH 3DS"
|
30 |
+
"New order status","Neuer Bestellstatus"
|
31 |
+
"Credit Card Types","Kreditkartentypen"
|
32 |
+
"Credit Card Verification","Kreditkartenverifikation"
|
33 |
+
"Payment from applicable countries","Zahlung aus zugelassenen Ländern"
|
34 |
+
"Payment from Specific countries","Zahlung aus bestimmten Ländern"
|
35 |
+
"Minimum Order Total","Mindestwert für Gesamtbestellung"
|
36 |
+
"Maximum Order Total","Höchstwert für Gesamtbestellung"
|
37 |
+
"Sort order","Reihenfolge"
|
38 |
+
"Austria","Österreich"
|
39 |
+
"Germany","Deutschland"
|
40 |
+
"Netherland","Niederlande"
|
41 |
+
"Example: <b>https://www.mPAY24.com/app/bin/etpv5</b>","Beispiel: <b>https://www.mPAY24.com/app/bin/etpv5</b>"
|
42 |
+
"Credit Cards","Kreditkarten"
|
43 |
+
"eps Online Bank Transfer","eps Online-Ãœberweisung"
|
44 |
+
"Payment Action","Zahlungsaktivität"
|
45 |
+
"paybox - Pay with mobile phone","paybox - Zahl's mit dem Handy"
|
46 |
+
"You will be redirected to the mPAY24 payment window in a few seconds.","In wenige Sekunden werden Sie zu dem Bezahlfenster von mPAY24 weitergeleitet."
|
app/locale/de_CH/Mpay24_Mpay24.csv
ADDED
@@ -0,0 +1,46 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"Your credit card was declined, sorry.","Your credit card was declined, sorry."
|
2 |
+
"Payment authorization error.","Payment authorization error."
|
3 |
+
"Invalid amount for authorization.","Invalid amount for authorization."
|
4 |
+
"Gateway request error: %s","Gateway request error: %s"
|
5 |
+
"Authorization","Autorisierung"
|
6 |
+
"Sale","Verkauf"
|
7 |
+
"Incorrect credit card expiration date","Incorrect credit card expiration date"
|
8 |
+
"Credit card number mismatch with credit card type","Credit card number mismatch with credit card type"
|
9 |
+
"Invalid Credit Card Number","Invalid Credit Card Number"
|
10 |
+
"Credit card type is not allowed for this payment method","Credit card type is not allowed for this payment method"
|
11 |
+
"Can not retrieve payment method model object.","Can not retrieve payment method model object."
|
12 |
+
"Month","Monat"
|
13 |
+
"Year","Jahr"
|
14 |
+
"Payment Reserved","Zahlung reserviert"
|
15 |
+
"Payment Billed","Zahlung erfolgreich"
|
16 |
+
"Payment Credited","Zahlung gutgeschrieben"
|
17 |
+
"Redirected to a 3D secure form","Redirected to a 3D secure form"
|
18 |
+
"Customer cancled payment or payment error","Der Kunde hat die Zahlung abgebrochen oder es gab einen Zahlungsfehler"
|
19 |
+
"Payment was successful.","Zahlung war erfolgreich."
|
20 |
+
"AGB HOBEX","Ich ermächtige hiermit den Raiffeisenverband Salzburg/Hobex AG, den angegebenen Betrag von meinem genannten Konto durch Lastschrift einzuziehen. Für den Fall der Nichteinlösung der Lastschrift oder des Widerspruchs gegen die Lastschrift weise ich meine Bank unwiderruflich an, HOBEX AG oder Dritten auf Anforderung meinen Namen, Adresse und Geburtsdatum vollständig mitzuteilen."
|
21 |
+
"Payment was not successfull. Checkout was cancelled.","Ihrer Zahlung war nicht möglich. Ihre Bestellung wurde storniert."
|
22 |
+
"Please check your payment details and try again.","Überprüfen Sie bitte Ihre Zahlungsinformationen und versuchen Sie es erneut."
|
23 |
+
"mPAY24 enabled","mPAY24 aktiviert"
|
24 |
+
"SOAP password","SOAP Passwort"
|
25 |
+
"Merchant ID","Merchant ID"
|
26 |
+
"API uses proxy","API benutzt Proxy"
|
27 |
+
"Billing address mode","Rechnungsadresse-Modus"
|
28 |
+
"Title","Titel"
|
29 |
+
"AUTH 3DS","AUTH 3DS"
|
30 |
+
"New order status","Neuer Bestellstatus"
|
31 |
+
"Credit Card Types","Kreditkartentypen"
|
32 |
+
"Credit Card Verification","Kreditkartenverifikation"
|
33 |
+
"Payment from applicable countries","Zahlung aus zugelassenen Ländern"
|
34 |
+
"Payment from Specific countries","Zahlung aus bestimmten Ländern"
|
35 |
+
"Minimum Order Total","Mindestwert für Gesamtbestellung"
|
36 |
+
"Maximum Order Total","Höchstwert für Gesamtbestellung"
|
37 |
+
"Sort order","Reihenfolge"
|
38 |
+
"Austria","Österreich"
|
39 |
+
"Germany","Deutschland"
|
40 |
+
"Netherland","Niederlande"
|
41 |
+
"Example: <b>https://www.mPAY24.com/app/bin/etpv5</b>","Beispiel: <b>https://www.mPAY24.com/app/bin/etpv5</b>"
|
42 |
+
"Credit Cards","Kreditkarten"
|
43 |
+
"eps Online Bank Transfer","eps Online-Ãœberweisung"
|
44 |
+
"Payment Action","Zahlungsaktivität"
|
45 |
+
"paybox - Pay with mobile phone","paybox - Zahl's mit dem Handy"
|
46 |
+
"You will be redirected to the mPAY24 payment window in a few seconds.","In wenige Sekunden werden Sie zu dem Bezahlfenster von mPAY24 weitergeleitet."
|
app/locale/de_DE/Mpay24_Mpay24.csv
ADDED
@@ -0,0 +1,46 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"Your credit card was declined, sorry.","Your credit card was declined, sorry."
|
2 |
+
"Payment authorization error.","Payment authorization error."
|
3 |
+
"Invalid amount for authorization.","Invalid amount for authorization."
|
4 |
+
"Gateway request error: %s","Gateway request error: %s"
|
5 |
+
"Authorization","Autorisierung"
|
6 |
+
"Sale","Verkauf"
|
7 |
+
"Incorrect credit card expiration date","Incorrect credit card expiration date"
|
8 |
+
"Credit card number mismatch with credit card type","Credit card number mismatch with credit card type"
|
9 |
+
"Invalid Credit Card Number","Invalid Credit Card Number"
|
10 |
+
"Credit card type is not allowed for this payment method","Credit card type is not allowed for this payment method"
|
11 |
+
"Can not retrieve payment method model object.","Can not retrieve payment method model object."
|
12 |
+
"Month","Monat"
|
13 |
+
"Year","Jahr"
|
14 |
+
"Payment Reserved","Zahlung reserviert"
|
15 |
+
"Payment Billed","Zahlung erfolgreich"
|
16 |
+
"Payment Credited","Zahlung gutgeschrieben"
|
17 |
+
"Redirected to a 3D secure form","Redirected to a 3D secure form"
|
18 |
+
"Customer cancled payment or payment error","Der Kunde hat die Zahlung abgebrochen oder es gab einen Zahlungsfehler"
|
19 |
+
"Payment was successful.","Zahlung war erfolgreich."
|
20 |
+
"AGB HOBEX","Ich ermächtige hiermit den Raiffeisenverband Salzburg/Hobex AG, den angegebenen Betrag von meinem genannten Konto durch Lastschrift einzuziehen. Für den Fall der Nichteinlösung der Lastschrift oder des Widerspruchs gegen die Lastschrift weise ich meine Bank unwiderruflich an, HOBEX AG oder Dritten auf Anforderung meinen Namen, Adresse und Geburtsdatum vollständig mitzuteilen."
|
21 |
+
"Payment was not successfull. Checkout was cancelled.","Ihrer Zahlung war nicht möglich. Ihre Bestellung wurde storniert."
|
22 |
+
"Please check your payment details and try again.","Überprüfen Sie bitte Ihre Zahlungsinformationen und versuchen Sie es erneut."
|
23 |
+
"mPAY24 enabled","mPAY24 aktiviert"
|
24 |
+
"SOAP password","SOAP Passwort"
|
25 |
+
"Merchant ID","Merchant ID"
|
26 |
+
"API uses proxy","API benutzt Proxy"
|
27 |
+
"Billing address mode","Rechnungsadresse-Modus"
|
28 |
+
"Title","Titel"
|
29 |
+
"AUTH 3DS","AUTH 3DS"
|
30 |
+
"New order status","Neuer Bestellstatus"
|
31 |
+
"Credit Card Types","Kreditkartentypen"
|
32 |
+
"Credit Card Verification","Kreditkartenverifikation"
|
33 |
+
"Payment from applicable countries","Zahlung aus zugelassenen Ländern"
|
34 |
+
"Payment from Specific countries","Zahlung aus bestimmten Ländern"
|
35 |
+
"Minimum Order Total","Mindestwert für Gesamtbestellung"
|
36 |
+
"Maximum Order Total","Höchstwert für Gesamtbestellung"
|
37 |
+
"Sort order","Reihenfolge"
|
38 |
+
"Austria","Österreich"
|
39 |
+
"Germany","Deutschland"
|
40 |
+
"Netherland","Niederlande"
|
41 |
+
"Example: <b>https://www.mPAY24.com/app/bin/etpv5</b>","Beispiel: <b>https://www.mPAY24.com/app/bin/etpv5</b>"
|
42 |
+
"Credit Cards","Kreditkarten"
|
43 |
+
"eps Online Bank Transfer","eps Online-Ãœberweisung"
|
44 |
+
"Payment Action","Zahlungsaktivität"
|
45 |
+
"paybox - Pay with mobile phone","paybox - Zahl's mit dem Handy"
|
46 |
+
"You will be redirected to the mPAY24 payment window in a few seconds.","In wenige Sekunden werden Sie zu dem Bezahlfenster von mPAY24 weitergeleitet."
|
app/locale/en_US/Mpay24_Mpay24.csv
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"API Login ID","API Login ID"
|
2 |
+
"Authorize Only","Authorize Only"
|
3 |
+
"Authorize and Capture","Authorize and Capture"
|
4 |
+
"Authorize.net","Authorize.net"
|
5 |
+
"Credit Card Types","Credit Card Types"
|
6 |
+
"Credit Card Verification","Credit Card Verification"
|
7 |
+
"Debug","Debug"
|
8 |
+
"Email customer","Email customer"
|
9 |
+
"Enabled","Enabled"
|
10 |
+
"Error in authorizing the payment","Error in authorizing the payment"
|
11 |
+
"Error in capturing the payment","Error in capturing the payment"
|
12 |
+
"Error in payment gateway","Error in payment gateway"
|
13 |
+
"Error in refunding the payment","Error in refunding the payment"
|
14 |
+
"Error in refunding the payment.","Error in refunding the payment."
|
15 |
+
"Error in retrieving the transaction","Error in retrieving the transaction"
|
16 |
+
"Fraud order status","Fraud order status"
|
17 |
+
"Gateway request error: %s","Gateway request error: %s"
|
18 |
+
"Invalid amount for authorization","Invalid amount for authorization"
|
19 |
+
"Invalid amount for authorization.","Invalid amount for authorization."
|
20 |
+
"Invalid transaction id","Invalid transaction id"
|
21 |
+
"Maximum Order Total","Maximum Order Total"
|
22 |
+
"Merchant Login","Merchant Login"
|
23 |
+
"Merchant's email","Merchant's email"
|
24 |
+
"Minimum Order Total","Minimum Order Total"
|
25 |
+
"New order status","New order status"
|
26 |
+
"Partner","Partner"
|
27 |
+
"Payflow Pro","Payflow Pro"
|
28 |
+
"Payment Action","Payment Action"
|
29 |
+
"Payment authorization error.","Payment authorization error."
|
30 |
+
"Payment authorization transaction has been declined.","Payment authorization transaction has been declined."
|
31 |
+
"Payment from Specific countries","Payment from Specific countries"
|
32 |
+
"Payment from applicable countries","Payment from applicable countries"
|
33 |
+
"Proxy Host","Proxy Host"
|
34 |
+
"Proxy Port","Proxy Port"
|
35 |
+
"Sort order","Sort order"
|
36 |
+
"TENDER","TENDER"
|
37 |
+
"Test mode","Test mode"
|
38 |
+
"mPAY24 enabled","mPAY24 aktiviert"
|
39 |
+
"SOAP password","SOAP Passwort"
|
40 |
+
"Merchant ID","Händler ID"
|
41 |
+
"API uses proxy","API benutzt Proxy"
|
42 |
+
"Billing address mode","Rechnungsadresse-Modus"
|
43 |
+
"Title","Title"
|
44 |
+
"Transaction key","Transaction key"
|
45 |
+
"URL","URL"
|
46 |
+
"User","User"
|
47 |
+
"VERBOSITY","VERBOSITY"
|
48 |
+
"Voided transaction","Voided transaction"
|
49 |
+
"Credit Cards","Credit Cards"
|
50 |
+
"eps Online Bank Transfer","eps Online Bank Transfer"
|
51 |
+
"Payment Action","Payment Action"
|
52 |
+
"paybox - Pay with mobile phone","paybox - Pay with mobile phone"
|
package.xml
ADDED
@@ -0,0 +1,19 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>mPAY24</name>
|
4 |
+
<version>1.1.8</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>mPAY24 Payment Gateway Extension</summary>
|
10 |
+
<description>mPAY24 Payment Gateway Extension</description>
|
11 |
+
<notes>Update transaction status button.
|
12 |
+
Bugs fixed</notes>
|
13 |
+
<authors><author><name>firedrago</name><user>firedrago</user><email>firedrago.magento@gmail.com</email></author></authors>
|
14 |
+
<date>2012-02-09</date>
|
15 |
+
<time>16:34:39</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Mpay24"><dir name="Mpay24"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fieldset.php" hash="7b86fa8df17ac9e0f79c9388b5e01cb6"/><file name="Global.php" hash="92022ba17fea976b08fe547c80beb2ac"/></dir></dir></dir></dir><dir name="Form"><file name="Cc.php" hash="d34edd468b0d1156fd18cd91b832436a"/><file name="Elv.php" hash="c5f8cc33c2eb7024c781f4db127db07c"/><file name="Paybox.php" hash="169b26fa7022d62bd7960bdf48dba021"/><file name="Selectpayment.php" hash="610264c143b81e1bb27b6a70bd247aed"/><file name="SelectpaymentCashTicket.php" hash="58fc72ad7bd1a8e08013857232ace901"/><file name="SelectpaymentCb.php" hash="93534820ebf17ba9c0c27a1500d20dfe"/><file name="SelectpaymentCc.php" hash="bdd168eb37347db7b0d55f57b28b06ac"/><file name="SelectpaymentElv.php" hash="749481779f2e12f25eb65bc19391d247"/><file name="SelectpaymentEps.php" hash="9e8756a04b091eae40ec375f7b10ece6"/><file name="SelectpaymentGiropay.php" hash="ebfa3a8d0699b16a0a44944cc91f7b56"/><file name="SelectpaymentMaestro.php" hash="2ab61e32916b4a300324d81df6f1b117"/><file name="SelectpaymentMia.php" hash="8a3e82716642b70ade2f1075b41b0b73"/><file name="SelectpaymentMpass.php" hash="cc6589e1b4663d143212a855b60b7e32"/><file name="SelectpaymentPaybox.php" hash="8ec711a3a3d7a4a15b9106b8d075f48b"/><file name="SelectpaymentPaypal.php" hash="5f59fe972dfc32a961a3a79dfa49a99c"/><file name="SelectpaymentPsc.php" hash="d9894098d3f49cdd3a239e8b4eddc387"/><file name="SelectpaymentQuick.php" hash="c646a216363ae5fa247a08c95a27db9c"/></dir><file name="Form.php" hash="c8dd1e3310104415c48a2468096f0651"/><dir name="Info"><file name="Cc.php" hash="a5e1e5f95e9245c575584ccbd32358f1"/><file name="Elv.php" hash="b62c956847b2317c8e9b1d2406dec71b"/><file name="Paybox.php" hash="218fc843217cd5666cb2b2d4d07138e7"/><file name="Selectpayment.php" hash="b57a59ac32aaca7062642d63cff60ffa"/></dir><file name="Mpay24.php" hash="031da85ef3f418bf6bb2ee8012744a28"/><file name="ParentRedirect.php" hash="1e605fff3228873be8d4d152b39ac4fb"/><file name="Redirect.php" hash="db93c92def39b802c505761264a2af9d"/><file name="Update.php" hash="f77f7ae0ac249aa3203107400c0bc8d8"/></dir><dir name="Helper"><file name="Data.php" hash="68796f21a053b6ffb8df950ad57327ba"/></dir><dir name="Model"><dir name="Api"><file name="Mpay24.php" hash="1f73328d1fef1e3abae3e0a132ee0f80"/></dir><file name="Cc.php" hash="b351bc17cdd25c3f4a3d08f6fac3550f"/><file name="Config.php" hash="3713c081802de5e7ecab82504c44b1ff"/><dir name="Convert"><file name="Order.php" hash="19fddfcaa3409d119f6a1b87bc46faa9"/><file name="Quote.php" hash="830b05485248ba64a6e708baa73fc8bd"/></dir><file name="Elv.php" hash="00b4c4c96854b19987526e74bd909f5d"/><dir name="Entity"><file name="Setup.php" hash="56afc7ebd003e0ec3172d80c71a06150"/></dir><dir name="Method"><file name="Abstract.php" hash="c6bc1e03ad958a89328251d1ce8a528c"/><file name="Cc.php" hash="f3a69fce349c5221f54f9230ff5e4dde"/><file name="Selectpayment.php" hash="888e885496d665f0dce1d55177bb9ebc"/><file name="Selectpayment.php.new~" hash="a3ece754734a6631bc3dffd58cee17a4"/></dir><dir name="Mpay24"><file name="Debug.php" hash="d3fc645284637ff57d23077d7ff2d9da"/></dir><dir name="Mysql4"><dir name="Mpay24"><dir name="Debug"><file name="Collection.php" hash="25ec4cf49408d5fa58b35056b0f7143d"/></dir><file name="Debug.php" hash="d4e62e8e94746a21087c589f9e6e5309"/></dir><file name="Setup.php" hash="0b297e82c7a741e2d9f89601645a345e"/></dir><file name="Paybox.php" hash="99b05688112a8682e26cc36a89846980"/><file name="Selectpayment.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="SelectpaymentCashTicket.php" hash="5708a3877cceab75086da93878501023"/><file name="SelectpaymentCb.php" hash="69ab19301938679ca063c0e2d1eb1ed6"/><file name="SelectpaymentCc.php" hash="bd89b09be6bb55a29a0887e945eca0fc"/><file name="SelectpaymentElv.php" hash="5639a207c6aa9188ad4b66e05d67e620"/><file name="SelectpaymentEps.php" hash="e970bee49ee60a8ca81663ddd14d6733"/><file name="SelectpaymentGiropay.php" hash="7b8b8d327d481cea69a2a7d376985c69"/><file name="SelectpaymentMaestro.php" hash="36e11cdf113a98d7122149bff47ddb56"/><file name="SelectpaymentMia.php" hash="14ae653ed4ee141424a33e070c528de7"/><file name="SelectpaymentMpass.php" hash="15a4349da7ac6eef0a70f395e0d6609f"/><file name="SelectpaymentPaybox.php" hash="c47f810e9de2a706c2732c6d0adb6b40"/><file name="SelectpaymentPaypal.php" hash="99a5f9e667dff0ee5aad086326e770b1"/><file name="SelectpaymentPsc.php" hash="9f37dadb18309ee931dda6417ad00a3e"/><file name="SelectpaymentQuick.php" hash="ea5336abb2c6194b7e61aa3ec439710c"/><file name="Session.php" hash="cf500259e1b03ab8db48daac82054bda"/><dir name="Source"><file name="BillAddr.php" hash="cb1faf47ce3d71c573eb1ec2a2500302"/><file name="Cctype.php" hash="54551d8c1e9e5c0fc95e2769229c8ac6"/><file name="ClearingAction.php" hash="5231a2a01f9ab504f0b1be3fb5efd92f"/><file name="ElvCountryAction.php" hash="e794d6917d4c49b16700acd7e035b941"/><file name="Elvtype.php" hash="abba5804d736b0a3750c605da7471e95"/><file name="EpsCountryAction.php" hash="dead4bfaeb98e09dcb16b8f5044e36c6"/><file name="EpsTypesAction.php" hash="ae2c137d078516d0dfb110fecd8d079d"/><file name="GiropayCountryAction.php" hash="98eb15d6b23999dc2264e9a4aa48c491"/><file name="MaestroCountryAction.php" hash="88eb4d802e8e698ead51ea3746f971d1"/><file name="MiaCountryAction.php" hash="ab3c05c86cf269b10081020949bb19c5"/><file name="MiaTypesAction.php" hash="a037d3b216cf0bd4d8030d1bd7109b11"/><file name="PayboxCountryAction.php" hash="0406520d3e0b56d454b469628f0fd045"/><file name="PaysafecardCountryAction.php" hash="856a4893024c4e4ea22dd916e3fb7d82"/><file name="Request.php" hash="03bd37ec9c750ae538a0618be7b4e502"/><file name="Result.php" hash="1d72cbfc9a37b393062a7ffbc97a500f"/><file name="ShoppingCartRowsAction.php" hash="54f07a0898d9a69523177a259ec33203"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Encrypted.php" hash="0c1584d4fee7ae327606ca9bee09e0de"/></dir></dir></dir></dir><dir name="controllers"><file name="AdminhtmlController.php" hash="3e8807889753a88fc926e15344eadccc"/><file name="IndexController.php" hash="99da957f09faeec9418fc6cd5dad8213"/><file name="PaymentController.php" hash="26143490faaf01f74243fde48f899ede"/></dir><dir name="etc"><file name="config.xml" hash="c84914e8c037043f4acf0151aa5bd64d"/><file name="system.xml" hash="05013ca3e95898ff79435f5f2e5be10f"/></dir><dir name="sql"><dir name="mpay24_setup"><file name="mysql4-install-1.1.8.php" hash="95cf2dc16087e8df896104b7969d0530"/><file name="mysql4-uninstall-1.1.8.php" hash="44849c417affeac4ebf217fd1308e0bb"/><file name="mysql4-upgrade-0.6.2-1.1.8.php" hash="44849c417affeac4ebf217fd1308e0bb"/><file name="mysql4-upgrade-0.6.3-1.1.8.php" hash="44849c417affeac4ebf217fd1308e0bb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mpay24_Mpay24.xml" hash="a6a735fd8022f531deb92f2868ef5ad7"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mpay24"><dir name="info"><file name="ajaxRequest.txt" hash="b03cef79eba586de4eaf9a036ea1b506"/><file name="cc.phtml" hash="547ba0f70a0f951e0259bcdc98ea5e24"/><file name="elv.phtml" hash="b12c350601ba11994114d471adac5ac2"/><file name="giropay.phtml" hash="ba8489b15dc0610ce9fb47839ca08cbe"/><file name="mia.phtml" hash="3a1afd46fe0c395207ba7d9a84c66112"/><file name="paybox.phtml" hash="ffc4a25361be2851e8d47fc5e14eceef"/><file name="paysafecard.phtml" hash="298a7ac26e4ec9345282ad01d8f76f7a"/><dir name="pdf"><file name="cc.phtml" hash="2a7e3641ffe1c0d7abe0c43eb1c3d4bc"/><file name="elv.phtml" hash="bc6f97c37b31e1f9ce143af1f342121f"/><file name="giropay.phtml" hash="c567d41e33085c7ff02835786b507686"/><file name="mia.phtml" hash="fa9601f6fb4681e095e1266b586d970f"/><file name="paybox.phtml" hash="bff25c53bd824bd1e2ab753e6efff93f"/><file name="paysafecard.phtml" hash="b7b467f648f59413b38a18d916563a39"/><file name="selectpayment.phtml" hash="ddc700b32b4476ac4ff8895e8abd2829"/></dir><file name="selectpayment.phtml" hash="1e4a893986e4a3b1cbe6c3ba72bf3a13"/></dir><file name="prototype.js" hash="c88ad55f47e32f870a79c85e6ed7b9e1"/><dir name="system"><dir name="config"><dir name="fieldset"><file name="global.phtml" hash="254e2a5d0cd042b828b23eb917ff77a6"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="mpay24.xml" hash="0088625b92fdde06eca5156cb04f93a4"/></dir><dir name="template"><dir name="mpay24"><file name="error.phtml" hash="0da15c227827b3e637592a682fb7fa1f"/><dir name="form"><file name="cc.phtml" hash="2399f5d8e33c18506537acdb113135b6"/><file name="elv.phtml" hash="57c1b08be21be16733ba19340f3fb6ef"/><file name="giropay.phtml" hash="fa5de740f397fc06e669a2c560652753"/><file name="mia.phtml" hash="97b5977dd547c7519e5c2f8e2a641560"/><file name="paybox.phtml" hash="4c0b6bd28db7b92e745beed2edeab466"/><file name="paysafecard.phtml" hash="a1d6f52d0ea8eb4cff25b78eedb4667f"/><file name="selectpayment.phtml" hash="a1d6f52d0ea8eb4cff25b78eedb4667f"/><file name="selectpaymentCashTicket.phtml" hash="915ac7aa5b31f32d38e526dc163d4463"/><file name="selectpaymentCc.phtml" hash="56e9626ead78f73bfa90343fb20e859c"/><file name="selectpaymentElv.phtml" hash="5d923b140b2e7539774083ddcbf2be8e"/><file name="selectpaymentEps.phtml" hash="3157efcb7fe7bdecb9d428141493f930"/><file name="selectpaymentGiropay.phtml" hash="a51ef6be9562b54fcba742d3c7360032"/><file name="selectpaymentMaestro.phtml" hash="df25f680e6ef4f6a7280183bc3752229"/><file name="selectpaymentMia.phtml" hash="9ea82afa4a2ad98c6611ce9907ecd91e"/><file name="selectpaymentMpass.phtml" hash="9136f1e206712570fd580702a3f3c9f6"/><file name="selectpaymentPaybox.phtml" hash="7f1abd9105990c9dc0f3b3480cb91e17"/><file name="selectpaymentPaypal.phtml" hash="64556967a98aaea1f65b6bbf2a3a41a9"/><file name="selectpaymentPsc.phtml" hash="810af3a4cf28964554eb132deba0d95e"/><file name="selectpaymentQuick.phtml" hash="1e4b979b2f5969fd68cf34494f9c06d7"/></dir><dir name="info"><file name="cc.phtml" hash="fad2ea573f5d2e1cb12d76ba250ce43d"/><file name="elv.phtml" hash="af3642f767eedfb62f43d350177c2488"/><file name="giropay.phtml" hash="af3642f767eedfb62f43d350177c2488"/><file name="mia.phtml" hash="de20c6556a3ebcfb17bab642cc0c3859"/><file name="paybox.phtml" hash="f7be9ba11f2dd4a6c2e7ed2bbcaf6550"/><file name="paysafecard.phtml" hash="c7a03aa3657d4ae508c7797d5f6ba5d8"/><file name="selectpayment.phtml" hash="bc1038869d9a4e44d667c5e8e2d62314"/></dir><file name="mpay24.phtml" hash="fbc3551e06aff14032d60cbdf1d94b0d"/><file name="redirect.phtml" hash="76cce21167bf862c9126f4fe6a7fe482"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_AT"><file name="Mpay24_Mpay24.csv" hash="1895ad485ffcd5a6860a0dddcb824917"/></dir><dir name="de_CH"><file name="Mpay24_Mpay24.csv" hash="1895ad485ffcd5a6860a0dddcb824917"/></dir><dir name="de_DE"><file name="Mpay24_Mpay24.csv" hash="1895ad485ffcd5a6860a0dddcb824917"/></dir><dir name="en_US"><file name="Mpay24_Mpay24.csv" hash="1a802f8e4d6230201ace16dc092bdba2"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="mpay24"><file name="mpay24_header.png" hash="13ee6dd4b21ad8ba55039e2a25ce8b7f"/><file name="mpay24_logo.gif" hash="d2bb404ccfefb20be01fa1bd3d1ec0e1"/><file name="mpay24_section.png" hash="d93e41decbbe25aa237c1593b1cedb05"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="mpay24"><file name="AE.gif" hash="6a3911a1c5ec784fffed04714cf86edc"/><file name="AE.png" hash="4eef89614e0a408dfc742c303f34f898"/><file name="ARZ.gif" hash="8f4d8a69aba117bf0ec1dcff1f6dc1ba"/><file name="ARZ.png" hash="a55b9c710af5d16e38c845db414c2e03"/><file name="ARZ_002.gif" hash="6151fa7b5ce8d261d88b90133ac9d1e8"/><file name="ARZ_011.gif" hash="768018b646f527f06d30fc285ffd8ab1"/><file name="ARZ_015.gif" hash="fcb46a5500f04e073705c2879d89bb29"/><file name="ARZ_019.gif" hash="8458f71b8d9c91a3337a56cb9098179d"/><file name="ARZ_023.gif" hash="3f5dc9b2d7332c7ca5ce35da0749444a"/><file name="ARZ_029.gif" hash="376d0f00784f76d4907f9c06d9c12c28"/><file name="ARZ_045.gif" hash="f9e4e23dd9d5b252f7bd76b962c66bc4"/><file name="ARZ_089.gif" hash="44636ddfcea19452cae3306b601e985a"/><file name="ARZ_093.gif" hash="d4afda87c096d3d2278ab3e5cb8c662a"/><file name="ARZ_101_0.gif" hash="8f4d8a69aba117bf0ec1dcff1f6dc1ba"/><file name="ARZ_101_1.gif" hash="04711beb18cb443cbeb739202add84ff"/><file name="ARZ_101_2.gif" hash="b3a503fd85a6899dd2503584c756ad90"/><file name="ARZ_107.gif" hash="69b3de2f378f7a31eaaacdc151c01ff4"/><file name="ARZ_109.gif" hash="a5a7ac03d31952206213796dc00283c7"/><file name="ATOS.gif" hash="db19eb48cdec0ba1ccc61190d33c9105"/><file name="ATOS.png" hash="de55f71a969b592576cb59df95a7f9fb"/><file name="BA.gif" hash="eb33c9bc9f35dc1205d221ed18cab98d"/><file name="BA.png" hash="31a20df4d9cc54a25f0019a39cb0380c"/><file name="BAWAG.gif" hash="1865a98adc2d1c58ec9b2684d1786be8"/><file name="BAWAG.png" hash="ca2a26fc70b5db55dccdd99d081b6458"/><file name="BAWAG_1.gif" hash="83a077741746f75c8a813399b1e7acab"/><file name="BAWAG_2.gif" hash="52192d29e77466fa659f29d785655175"/><file name="BAWAG_3.gif" hash="3b3c8d5c96ae361437f5cfb2e239de63"/><file name="BAWAG_4.gif" hash="7787e7a402f80e8ffa1381f11b1fdd76"/><file name="CASHTICKET.gif" hash="47e2caa29c8f10443a27b82e58f2372c"/><file name="CASHTICKET.png" hash="2982009ba6c9e181e1c638821647cad3"/><file name="CC.gif" hash="56347538f9603e7b4d1020d37a19b8df"/><file name="DC.gif" hash="d9ecea27e4263603a0c03e7380de69e3"/><file name="DC.png" hash="7fb2e4066b55a25e1670637b61e5d5be"/><file name="ELV.gif" hash="db19eb48cdec0ba1ccc61190d33c9105"/><file name="ELV.png" hash="334ff32e1800c5e78e3fdf7058acd5f1"/><file name="EPS.gif" hash="c78c2bebf157b781aeece2d0b96a4a38"/><file name="EPS.png" hash="a2c0c6dc6d7a27deb44d1e0f0a46b325"/><file name="EPS_small.gif" hash="2f88da00b5b27102e39aaac3c6a2aea8"/><file name="ERSTE.gif" hash="a2980f2dec7e935e7b9291bf45de12a8"/><file name="ERSTE.png" hash="35cf1df49c9abf281666ecfc4a0e8c77"/><file name="ERSTE_1.gif" hash="6fae580c74791a70c7217c8daf6a5a7f"/><file name="ERSTE_2.gif" hash="53254c9ad6e610ba3068087a4f45ff5e"/><file name="GIROPAY.gif" hash="5766c3a44216894cb9f3c6960c4cb455"/><file name="GIROPAY.png" hash="d50bbbe3e20f8a4e210ca13bec1a42eb"/><file name="HOBEX-AT.gif" hash="d4e416204907810cd615be859b93b42f"/><file name="HOBEX-AT.png" hash="d0bf14f98a6001f9d7e33e8ce941ac15"/><file name="HOBEX-DE.gif" hash="d4e416204907810cd615be859b93b42f"/><file name="HOBEX-DE.png" hash="227225ac963fb57db79067c1d4840f98"/><file name="HOBEX-NL.gif" hash="d4e416204907810cd615be859b93b42f"/><file name="HOBEX-NL.png" hash="d0bf14f98a6001f9d7e33e8ce941ac15"/><file name="HOBEX.gif" hash="d4e416204907810cd615be859b93b42f"/><file name="HOBEX.png" hash="d0bf14f98a6001f9d7e33e8ce941ac15"/><file name="HYPO.gif" hash="54b1817e3dd93fa0fbc234505902a467"/><file name="HYPO.png" hash="cebeb77fec73d83862f681e0054215d2"/><file name="JC.gif" hash="d71967aee3cfb13cae485456f4c0bc61"/><file name="JC.png" hash="3e939b84a54b38349ea442b24c117a8d"/><file name="MAESTRO.gif" hash="2dabf6b517f65c601a4b926bd5742c5f"/><file name="MAESTRO.png" hash="35fa8bb5d1efb1c43f29c6b08c7b7acb"/><file name="MASTERCARD.gif" hash="58fea2d4f67212b4906d9ddfb341fa6f"/><file name="MASTERCARD_3DS.gif" hash="5e8c5969db257a10b17aea41e3121000"/><file name="MASTERCARD_NON_3DS.png" hash="c5e159cd4d24c7e299eb78c2dce67746"/><file name="MC.png" hash="7333ac0e9f956be7504f8e8a2afaa561"/><file name="MIA.gif" hash="7c1df08d83e94c143fb523e172efbf30"/><file name="MPASS.gif" hash="c820bbabdc142e4b5bdfea81828404cf"/><file name="MPASS.png" hash="2e147ad00cb1f8f9d90454c3e8e65830"/><file name="ONE.gif" hash="7c19e01ab98ddeb1df041bb7b7c2c7cb"/><file name="ONE.png" hash="b133e480269521df38f095403f14ada9"/><file name="ORANGE.gif" hash="7c19e01ab98ddeb1df041bb7b7c2c7cb"/><file name="ORANGE.png" hash="7ef01839dfc13611573c9dff113fe91a"/><file name="PAYPAL.gif" hash="89169a93473f2c770dc3ccb0da73c6a0"/><file name="PAYPAL.png" hash="92cc6e32636babc4ab208b892a53fb3b"/><file name="PB.gif" hash="7c19e01ab98ddeb1df041bb7b7c2c7cb"/><file name="PB.png" hash="39142dbe72280236f1eee64fdd840835"/><file name="PSC.gif" hash="7a1f3ec606584c6f7c3052e1ea00ce16"/><file name="PSC.png" hash="26828aa128d580d8ace709edea1fb92b"/><file name="QUICK.gif" hash="ab5988699e024e55352b5dea5dc4361f"/><file name="QUICK.png" hash="5c3a7a618b2b6b046e6e1f1569c394f6"/><file name="RZB.gif" hash="f1a205f90bd1a4a5a0973882a3c88c46"/><file name="RZB.png" hash="c934829a2e7220f1578234787b437ee3"/><file name="T-MOBILE.gif" hash="7c19e01ab98ddeb1df041bb7b7c2c7cb"/><file name="T-MOBILE.png" hash="e6fd2da0dca9c1aa00e2d2fed7177c54"/><file name="VI.png" hash="5a3698b8ae00256f3582ace488c24a43"/><file name="VISA.gif" hash="7011e2135e0b62ed0fe0263d2321d571"/><file name="VISA_3DS.gif" hash="2d2e1520eb74e29004008894f8bb6e0e"/><file name="VISA_NON_3DS.png" hash="eb414c54e1a941ed75afbff2d9b61ab6"/><file name="VOLKSBANK.gif" hash="8f4d8a69aba117bf0ec1dcff1f6dc1ba"/><file name="VOLKSBANK.png" hash="e2d1e436b98982b5154bee2d39f0f9b5"/><file name="brands.png" hash="6dfd4a3f3658462c3d4a8dd2e967663e"/><file name="mpay24.png" hash="13ee6dd4b21ad8ba55039e2a25ce8b7f"/><file name="mpay24_section.png" hash="d93e41decbbe25aa237c1593b1cedb05"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
+
<compatible/>
|
18 |
+
<dependencies><required><php><min>5.2.17</min><max>5.3.8</max></php></required></dependencies>
|
19 |
+
</package>
|
skin/adminhtml/default/default/images/mpay24/mpay24_header.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/mpay24/mpay24_logo.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/mpay24/mpay24_section.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/AE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/AE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_002.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_011.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_015.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_019.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_023.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_029.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_045.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_089.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_093.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_101_0.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_101_1.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_101_2.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_107.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ARZ_109.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ATOS.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ATOS.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BA.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BA.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG_1.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG_2.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG_3.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/BAWAG_4.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/CASHTICKET.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/CASHTICKET.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/CC.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/DC.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/DC.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ELV.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ELV.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/EPS.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/EPS.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/EPS_small.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ERSTE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ERSTE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ERSTE_1.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ERSTE_2.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/GIROPAY.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/GIROPAY.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-AT.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-AT.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-DE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-DE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-NL.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX-NL.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HOBEX.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HYPO.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/HYPO.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/JC.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/JC.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MAESTRO.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MAESTRO.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MASTERCARD.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MASTERCARD_3DS.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MASTERCARD_NON_3DS.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MC.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MIA.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MPASS.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/MPASS.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ONE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ONE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ORANGE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/ORANGE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PAYPAL.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PAYPAL.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PB.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PB.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PSC.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/PSC.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/QUICK.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/QUICK.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/RZB.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/RZB.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/T-MOBILE.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/T-MOBILE.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VI.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VISA.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VISA_3DS.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VISA_NON_3DS.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VOLKSBANK.gif
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/VOLKSBANK.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/brands.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/mpay24.png
ADDED
Binary file
|
skin/frontend/default/default/images/mpay24/mpay24_section.png
ADDED
Binary file
|