ZerebroInternet_Barzahlen - Version 1.1.9

Version Notes

In this version the following things were already tested successfully on 1.4.2.0,1.5.0.1,1.5.1.0,1.6.0.0,1.6.1.0,1.6.2.0,1.7.0.0,1.7.0.1,1.7.0.2

Download this release

Release Info

Developer Magento Core Team
Extension ZerebroInternet_Barzahlen
Version 1.1.9
Comparing to
See all releases


Code changes from version 1.1.8 to 1.1.9

app/code/community/ZerebroInternet/Barzahlen/Model/Api/Request/Cancel.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Barzahlen Payment Module SDK for 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 info@barzahlen.de so we can send you a copy immediately.
14
+ *
15
+ * @category ZerebroInternet
16
+ * @package ZerebroInternet_Barzahlen
17
+ * @copyright Copyright (c) 2012 Zerebro Internet GmbH (http://www.barzahlen.de)
18
+ * @author Alexander Diebler
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL-3.0)
20
+ */
21
+
22
+ class ZerebroInternet_Barzahlen_Model_Api_Request_Cancel extends ZerebroInternet_Barzahlen_Model_Api_Request_Abstract {
23
+
24
+ protected $_type = 'cancel'; //!< request type
25
+ protected $_transactionId; //!< transaction id
26
+
27
+ protected $_xmlAttributes = array('transaction-id', 'result', 'hash'); //!< cancel xml content
28
+
29
+ /**
30
+ * Construtor to set variable request settings. Adjusted for Magento
31
+ *
32
+ * @param array $arguements array with settings
33
+ */
34
+ public function __construct(array $arguments) {
35
+
36
+ $this->_transactionId = $arguments['transactionId'];
37
+ }
38
+
39
+ /**
40
+ * Builds array for request.
41
+ *
42
+ * @param string $shopId merchants shop id
43
+ * @param string $paymentKey merchants payment key
44
+ * @param string $language langauge code (ISO 639-1)
45
+ * @param array $customVar custom variables from merchant
46
+ * @return array for resend request
47
+ */
48
+ public function buildRequestArray($shopId, $paymentKey, $language) {
49
+
50
+ $requestArray = array();
51
+ $requestArray['shop_id'] = $shopId;
52
+ $requestArray['transaction_id'] = $this->_transactionId;
53
+ $requestArray['language'] = $language;
54
+ $requestArray['hash'] = $this->_createHash($requestArray, $paymentKey);
55
+
56
+ $this->_removeEmptyValues($requestArray);
57
+ return $requestArray;
58
+ }
59
+
60
+ /**
61
+ * Returns transaction id from xml array.
62
+ *
63
+ * @return received transaction id
64
+ */
65
+ public function getTransactionId() {
66
+ return $this->getXmlArray('transaction-id');
67
+ }
68
+ }
69
+ ?>
app/code/community/ZerebroInternet/Barzahlen/Model/Cancel.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Barzahlen Payment Module
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 info@barzahlen.de so we can send you a copy immediately.
14
+ *
15
+ * @category ZerebroInternet
16
+ * @package ZerebroInternet_Barzahlen
17
+ * @copyright Copyright (c) 2012 Zerebro Internet GmbH (http://www.barzahlen.de)
18
+ * @author Martin Seener
19
+ * @author Alexander Diebler
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL-3.0)
21
+ */
22
+
23
+ class ZerebroInternet_Barzahlen_Model_Cancel extends Mage_Core_Model_Abstract {
24
+
25
+ /**
26
+ *
27
+ * @return null
28
+ */
29
+ public function cancelObserver($order) {
30
+
31
+ $order = $order->getOrder();
32
+
33
+ if(!$order->getId()) {
34
+ Mage::throwException('No valid order choosen.');
35
+ }
36
+
37
+ if($order->getPayment()->getMethod() != ZerebroInternet_Barzahlen_Model_Barzahlen::PAYMENT_CODE) {
38
+ return;
39
+ }
40
+
41
+ $transactionId = $order->getPayment()->getAdditionalInformation('transaction_id');
42
+
43
+ $cancel = Mage::getModel('barzahlen/api_request_cancel', array('transactionId' => $transactionId));
44
+
45
+ try {
46
+ Mage::getSingleton('barzahlen/barzahlen')->getBarzahlenApi()->handleRequest($cancel);
47
+ }
48
+ catch(Exception $e) {
49
+ Mage::helper('barzahlen')->bzLog($e);
50
+ }
51
+
52
+ return $cancel->isValid();
53
+ }
54
+ }
app/code/community/ZerebroInternet/Barzahlen/etc/config.xml CHANGED
@@ -25,7 +25,7 @@
25
 
26
  <modules>
27
  <ZerebroInternet_Barzahlen>
28
- <version>1.1.8</version>
29
  </ZerebroInternet_Barzahlen>
30
  </modules>
31
 
@@ -124,6 +124,15 @@
124
  </barzahlen_observer>
125
  </observers>
126
  </checkout_submit_all_after>
 
 
 
 
 
 
 
 
 
127
  <sales_order_creditmemo_refund>
128
  <observers>
129
  <barzahlen_observer>
25
 
26
  <modules>
27
  <ZerebroInternet_Barzahlen>
28
+ <version>1.1.9</version>
29
  </ZerebroInternet_Barzahlen>
30
  </modules>
31
 
124
  </barzahlen_observer>
125
  </observers>
126
  </checkout_submit_all_after>
127
+ <order_cancel_after>
128
+ <observers>
129
+ <barzahlen_observer>
130
+ <type>singleton</type>
131
+ <class>barzahlen/cancel</class>
132
+ <method>cancelObserver</method>
133
+ </barzahlen_observer>
134
+ </observers>
135
+ </order_cancel_after>
136
  <sales_order_creditmemo_refund>
137
  <observers>
138
  <barzahlen_observer>
app/design/adminhtml/base/default/template/barzahlen/.DS_Store DELETED
Binary file
app/design/frontend/base/default/layout/barzahlen.xml CHANGED
@@ -21,7 +21,7 @@
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL-3.0)
22
  */
23
  -->
24
- <layout version="1.1.8">
25
  <barzahlen_checkout_processing>
26
  <reference name="root">
27
  <action method="setTemplate"><template>page/1column.phtml</template></action>
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL-3.0)
22
  */
23
  -->
24
+ <layout version="1.1.9">
25
  <barzahlen_checkout_processing>
26
  <reference name="root">
27
  <action method="setTemplate"><template>page/1column.phtml</template></action>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ZerebroInternet_Barzahlen</name>
4
- <version>1.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Source License (OSL) 3.0</license>
7
  <channel>community</channel>
@@ -14,9 +14,9 @@
14
  Barzahlen let's your customers pay cash online. You get a payment confirmation in real-time and you benefit from our payment guarantee and new customer groups. See how Barzahlen works: http://www.barzahlen.de/partner/funktionsweise</description>
15
  <notes>In this version the following things were already tested successfully on 1.4.2.0,1.5.0.1,1.5.1.0,1.6.0.0,1.6.1.0,1.6.2.0,1.7.0.0,1.7.0.1,1.7.0.2</notes>
16
  <authors><author><name>Martin Seener</name><user>auto-converted</user><email>support@barzahlen.de</email></author><author><name>Alexander Diebler</name><user>auto-converted</user><email>support@barzahlen.de</email></author></authors>
17
- <date>2013-04-02</date>
18
- <time>15:52:01</time>
19
- <contents><target name="magecommunity"><dir name="ZerebroInternet"><dir name="Barzahlen"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="View.php" hash="b5debd20e6e4610d445c8939eb604755"/></dir><file name="View.php" hash="356e39bbf6ec60ebc629e4db7250a2b8"/></dir></dir></dir><file name="Form.php" hash="7b8757345dd8078bc2656d4d6ff1bc5a"/><file name="Info.php" hash="aa843fd0bc613227083ebe1fc9758b23"/></dir><dir name="Helper"><file name="Data.php" hash="b09cbe4014347450f8acc16969489f0e"/></dir><dir name="Model"><dir name="Adminexceptions"><file name="Allspecificcountries.php" hash="050286cb2d67238f6d2a04657bcd47c7"/><file name="Maxordertotal.php" hash="1c1647bdf769bc7c4e7890b10212f655"/><file name="Notificationkey.php" hash="90c05ffb94c780c735e4d4a9f2e5e80c"/><file name="Paymentkey.php" hash="010bf4c06ec5c52f1a0b2ede1860bbdc"/><file name="Shopid.php" hash="028283a7457170e0d3082d43be5d4d54"/><file name="Specificcountry.php" hash="30ec14a1769fa2bbfc9473588e395a7f"/><file name="Title.php" hash="2d5aaaa22a305f0d17ec7f0b33708689"/></dir><dir name="Api"><dir name="Request"><file name="Abstract.php" hash="389992774bdd28ae2c87640c8076a793"/><file name="Payment.php" hash="5155bd60a89f6d1e81b7d9e6fc9ef18d"/><file name="Refund.php" hash="a2d7293d6f582f11189dbba1f5f8dce9"/><file name="Resend.php" hash="03a9f603503b2c95a137b3afa074ea1a"/><file name="Update.php" hash="2609e7a4e9eab13910b25734dd506c3c"/></dir><dir name="certs"><file name="ca-bundle.crt" hash="7e78dcc7f5a3aefffbb327141dd7ddcf"/></dir><file name="Abstract.php" hash="ddbdffce737e21b046c6e18001f658f1"/><file name="Notification.php" hash="472ee435c75ba6f0340f9bdbd12a8c7c"/></dir><file name="Api.php" hash="c30b68aeb92278f7c4535469d66a1df7"/><file name="Barzahlen.php" hash="e6e36f0c635cccfe695ef4290600f278"/><file name="Ipn.php" hash="b20fbfeac48d12b1da9492016dac5d39"/><file name="Payment.php" hash="68a0d90a04b1a8e3b44aa472b59a9db7"/><file name="Refund.php" hash="f8639e94dbd5e1cdca46f516df6a9187"/><file name="Resend.php" hash="9e096207ac0408f6d757f9e4cafc81f2"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="0cd1ea9ea6d1372d1997eec682e4a7c9"/><file name="IpnController.php" hash="69c1f025b92054a8e798310c263b78a6"/><file name="ResendController.php" hash="3ff28616c405317300edff7bd8eee7e0"/></dir><dir name="etc"><file name="config.xml" hash="d51c6013da78a3c38a9add0bf84d9fa0"/><file name="system.xml" hash="d5678376c647bd0e575b7c0d58ed8a9b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ZerebroInternet_Barzahlen.xml" hash="870d1ed9a0977ca9bfd861850ed8d72c"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="ZerebroInternet_Barzahlen_Admin.csv" hash="30585ffc5af26b4679faefb881e89896"/><file name="ZerebroInternet_Barzahlen_Frontend.csv" hash="eca00f201a8a75063a90b69e12586596"/></dir><dir name="en_US"><file name="ZerebroInternet_Barzahlen_Admin.csv" hash="269b49811ec9c1e842c955a8087d99ab"/><file name="ZerebroInternet_Barzahlen_Frontend.csv" hash="ba4c7050219ab94072c1acc567db96dd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="barzahlen"><file name="info.phtml" hash="a4d8e7a934b5ed3c934ed232cb8c4b72"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="barzahlen"><file name="form.phtml" hash="424b059387d5c4314ce710a498141498"/><file name="info.phtml" hash="74d5570ff6cc50fbd94ebed0e709435a"/><file name="mark.phtml" hash="e5180d493829dcd1c58837eec9d6e989"/><file name=".DS_Store" hash="e63f052ac3b1909750adf0115c4a7c21"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="barzahlen.xml" hash="839b61537cf246b9e01516ec7bc56981"/></dir><dir name="template"><dir name="barzahlen"><file name="form.phtml" hash="cd4c65c40c68a70050ab1f43c9db1e89"/><file name="info.phtml" hash="74d5570ff6cc50fbd94ebed0e709435a"/><file name="mark.phtml" hash="e5180d493829dcd1c58837eec9d6e989"/><file name="processing.phtml" hash="7cbfff204dfec836d69d7a8ab7790488"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ZerebroInternet_Barzahlen</name>
4
+ <version>1.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Source License (OSL) 3.0</license>
7
  <channel>community</channel>
14
  Barzahlen let's your customers pay cash online. You get a payment confirmation in real-time and you benefit from our payment guarantee and new customer groups. See how Barzahlen works: http://www.barzahlen.de/partner/funktionsweise</description>
15
  <notes>In this version the following things were already tested successfully on 1.4.2.0,1.5.0.1,1.5.1.0,1.6.0.0,1.6.1.0,1.6.2.0,1.7.0.0,1.7.0.1,1.7.0.2</notes>
16
  <authors><author><name>Martin Seener</name><user>auto-converted</user><email>support@barzahlen.de</email></author><author><name>Alexander Diebler</name><user>auto-converted</user><email>support@barzahlen.de</email></author></authors>
17
+ <date>2013-04-11</date>
18
+ <time>14:55:50</time>
19
+ <contents><target name="magecommunity"><dir name="ZerebroInternet"><dir name="Barzahlen"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="View.php" hash="b5debd20e6e4610d445c8939eb604755"/></dir><file name="View.php" hash="356e39bbf6ec60ebc629e4db7250a2b8"/></dir></dir></dir><file name="Form.php" hash="7b8757345dd8078bc2656d4d6ff1bc5a"/><file name="Info.php" hash="aa843fd0bc613227083ebe1fc9758b23"/></dir><dir name="Helper"><file name="Data.php" hash="b09cbe4014347450f8acc16969489f0e"/></dir><dir name="Model"><dir name="Adminexceptions"><file name="Allspecificcountries.php" hash="050286cb2d67238f6d2a04657bcd47c7"/><file name="Maxordertotal.php" hash="1c1647bdf769bc7c4e7890b10212f655"/><file name="Notificationkey.php" hash="90c05ffb94c780c735e4d4a9f2e5e80c"/><file name="Paymentkey.php" hash="010bf4c06ec5c52f1a0b2ede1860bbdc"/><file name="Shopid.php" hash="028283a7457170e0d3082d43be5d4d54"/><file name="Specificcountry.php" hash="30ec14a1769fa2bbfc9473588e395a7f"/><file name="Title.php" hash="2d5aaaa22a305f0d17ec7f0b33708689"/></dir><dir name="Api"><dir name="Request"><file name="Abstract.php" hash="389992774bdd28ae2c87640c8076a793"/><file name="Cancel.php" hash="1f30288f1f92f4485de7cbee8cf82667"/><file name="Payment.php" hash="5155bd60a89f6d1e81b7d9e6fc9ef18d"/><file name="Refund.php" hash="a2d7293d6f582f11189dbba1f5f8dce9"/><file name="Resend.php" hash="03a9f603503b2c95a137b3afa074ea1a"/><file name="Update.php" hash="2609e7a4e9eab13910b25734dd506c3c"/></dir><dir name="certs"><file name="ca-bundle.crt" hash="7e78dcc7f5a3aefffbb327141dd7ddcf"/></dir><file name="Abstract.php" hash="ddbdffce737e21b046c6e18001f658f1"/><file name="Notification.php" hash="472ee435c75ba6f0340f9bdbd12a8c7c"/></dir><file name="Api.php" hash="c30b68aeb92278f7c4535469d66a1df7"/><file name="Barzahlen.php" hash="e6e36f0c635cccfe695ef4290600f278"/><file name="Cancel.php" hash="a5c18bef84348cfc9642467f5eedf471"/><file name="Ipn.php" hash="b20fbfeac48d12b1da9492016dac5d39"/><file name="Payment.php" hash="68a0d90a04b1a8e3b44aa472b59a9db7"/><file name="Refund.php" hash="f8639e94dbd5e1cdca46f516df6a9187"/><file name="Resend.php" hash="9e096207ac0408f6d757f9e4cafc81f2"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="0cd1ea9ea6d1372d1997eec682e4a7c9"/><file name="IpnController.php" hash="69c1f025b92054a8e798310c263b78a6"/><file name="ResendController.php" hash="3ff28616c405317300edff7bd8eee7e0"/></dir><dir name="etc"><file name="config.xml" hash="4ce20ef5e1517c8180797f6472d9078c"/><file name="system.xml" hash="d5678376c647bd0e575b7c0d58ed8a9b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ZerebroInternet_Barzahlen.xml" hash="870d1ed9a0977ca9bfd861850ed8d72c"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="ZerebroInternet_Barzahlen_Admin.csv" hash="30585ffc5af26b4679faefb881e89896"/><file name="ZerebroInternet_Barzahlen_Frontend.csv" hash="eca00f201a8a75063a90b69e12586596"/></dir><dir name="en_US"><file name="ZerebroInternet_Barzahlen_Admin.csv" hash="269b49811ec9c1e842c955a8087d99ab"/><file name="ZerebroInternet_Barzahlen_Frontend.csv" hash="ba4c7050219ab94072c1acc567db96dd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="barzahlen"><file name="info.phtml" hash="a4d8e7a934b5ed3c934ed232cb8c4b72"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="barzahlen"><file name="form.phtml" hash="424b059387d5c4314ce710a498141498"/><file name="info.phtml" hash="74d5570ff6cc50fbd94ebed0e709435a"/><file name="mark.phtml" hash="e5180d493829dcd1c58837eec9d6e989"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="barzahlen.xml" hash="5fb1f620398f334e3ac59443e76fbd52"/></dir><dir name="template"><dir name="barzahlen"><file name="form.phtml" hash="cd4c65c40c68a70050ab1f43c9db1e89"/><file name="info.phtml" hash="74d5570ff6cc50fbd94ebed0e709435a"/><file name="mark.phtml" hash="e5180d493829dcd1c58837eec9d6e989"/><file name="processing.phtml" hash="7cbfff204dfec836d69d7a8ab7790488"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>