Barpay_Payment_Standard - Version 0.1.9

Version Notes

Keine Hinweise

Download this release

Release Info

Developer Christian Lakits
Extension Barpay_Payment_Standard
Version 0.1.9
Comparing to
See all releases


Code changes from version 0.1.8 to 0.1.9

app/code/community/Inite/Barpay/Block/Info.php CHANGED
@@ -13,33 +13,51 @@
13
  <?php
14
  class Inite_Barpay_Block_Info extends Mage_Payment_Block_Info
15
  {
 
 
 
16
  protected function _construct()
17
  {
18
  parent::_construct();
19
- $this->setTemplate('barpay/info.phtml');
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
22
  public function getPdfUrl()
23
  {
24
- return Mage::helper('barpay')->getPdfUrl($this->getInfo()->getOrder()->getId());
 
25
  }
26
 
27
  public function canDownloadPdf()
28
  {
29
- return Mage::helper('barpay')->canDownloadPdf($this->getInfo()->getOrder()->getId());
 
 
 
30
  }
31
 
32
  public function canRepay()
33
  {
34
  $session = Mage::getSingleton('admin/session');
35
- if($session->getUser() && $this->getInfo()->getOrder()->getState() == 'pending_payment')
36
  return true;
37
-
38
- return false;
39
  }
40
 
41
  public function getRepayUrl()
42
  {
43
- return Mage::helper('adminhtml')->getUrl('barpayadmin/admin/repay', array('order_id'=>$this->getInfo()->getOrder()->getId()));
 
44
  }
45
  }
13
  <?php
14
  class Inite_Barpay_Block_Info extends Mage_Payment_Block_Info
15
  {
16
+
17
+ private $_order;
18
+
19
  protected function _construct()
20
  {
21
  parent::_construct();
22
+ $this->setTemplate('barpay/info.phtml');
23
  }
24
 
25
+ private function getOrder()
26
+ {
27
+ //this code is ugly but it works
28
+ try{
29
+ $this->_order = $this->getInfo()->getOrder();
30
+ } catch(Exception $e) { }
31
+
32
+ return $this->_order;
33
+ }
34
+
35
  public function getPdfUrl()
36
  {
37
+ if($this->getOrder())
38
+ return Mage::helper('barpay')->getPdfUrl($this->getOrder()->getId());
39
  }
40
 
41
  public function canDownloadPdf()
42
  {
43
+ if($this->getOrder())
44
+ return Mage::helper('barpay')->canDownloadPdf($this->getOrder()->getId());
45
+ else
46
+ return false;
47
  }
48
 
49
  public function canRepay()
50
  {
51
  $session = Mage::getSingleton('admin/session');
52
+ if($session->getUser() && $this->getOrder() && $this->getOrder()->getState() == 'pending_payment')
53
  return true;
54
+ else
55
+ return false;
56
  }
57
 
58
  public function getRepayUrl()
59
  {
60
+ if($this->getOrder())
61
+ return Mage::helper('adminhtml')->getUrl('barpayadmin/admin/repay', array('order_id'=>$this->getOrder()->getId()));
62
  }
63
  }
app/code/community/Inite/Barpay/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Inite_Barpay>
5
- <version>0.1.8</version>
6
  </Inite_Barpay>
7
  </modules>
8
 
@@ -132,7 +132,7 @@
132
  <model>barpay/standard</model>
133
  <active>0</active>
134
  <order_status>pending</order_status>
135
- <title>Barpay (0.1.8)</title>
136
  <comment>
137
  <![CDATA[This text appears just beneath the field with a small arrow.
138
  <span class="notice">It can contain HTML formatting too!</span>]]>
2
  <config>
3
  <modules>
4
  <Inite_Barpay>
5
+ <version>0.1.9</version>
6
  </Inite_Barpay>
7
  </modules>
8
 
132
  <model>barpay/standard</model>
133
  <active>0</active>
134
  <order_status>pending</order_status>
135
+ <title>Barpay (0.1.9)</title>
136
  <comment>
137
  <![CDATA[This text appears just beneath the field with a small arrow.
138
  <span class="notice">It can contain HTML formatting too!</span>]]>
package.xml CHANGED
@@ -1,35 +1,52 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Barpay_Payment_Standard</name>
4
- <version>0.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Secure, quick and without any fees: Pay online in cash with BarPay.</summary>
10
  <description>Online retailers lose many customers at the checkout. They cancel their&#xD;
 
11
  purchase, in most cases due to the payment methods. The solution for this is&#xD;
 
12
  called BarPay, which is an alternative to all existing online payment methods.&#xD;
 
13
  Consumers do not need a bank account or credit card but pay in cash as they&#xD;
 
14
  are used to: simple, convenient and safe.&#xD;
15
  &#xD;
 
 
16
  The BarPay principle is simple. Directly after the conclusion of the order&#xD;
 
17
  process, the buyer is sent an individual barcode via e-mail, invoice&#xD;
 
18
  attachment or directly in the browser. This can be printed out or presented&#xD;
 
19
  via smartphone to more than 18,000 local BarPay acceptance points like&#xD;
 
20
  petrol stations, shops and kiosks in Germany. If the consumer pays the&#xD;
 
21
  invoice at one of these sales outlets, the code is scanned, the payment&#xD;
 
22
  booked and the incoming payment reported to the retailer via the BarPay&#xD;
 
23
  system. The goods can then be dispatched.&#xD;
24
  &#xD;
 
 
25
  --------------------------------------------------&#xD;
26
  &#xD;
 
 
27
  Nach Auswahl von BarPay wird dem K&#xE4;ufer ein individueller Barcode per E-Mail, Rechnungsanhang oder zum Download &#xFC;bermittelt. Dieser kann ausgedruckt und beim BarPay Akezptanznetzwerk bezahlt werden. Dazu z&#xE4;hlen rund 18.000 Handelsketten, Tankstellen und Kiosk-Systeme in ganz Deutschland. Der Zahlungseingang wird dem Online-H&#xE4;ndler in Echtzeit &#xFC;bermittelt, und die bestellte Ware kann umgehend in den Versand gehen.</description>
28
  <notes>Keine Hinweise</notes>
29
  <authors><author><name>Christian Lakits</name><user>lakits</user><email>barpay@munichx-media.de</email></author><author><name>Gerry Schlegel</name><user>bertdireins</user><email>barpay@munichx-media.de</email></author></authors>
30
- <date>2012-10-07</date>
31
- <time>23:22:34</time>
32
- <contents><target name="magecommunity"><dir name="Inite"><dir name="Barpay"><dir name="Block"><dir name="Checkout"><file name="Error.php" hash="dacb79ceca05b5ff50d63af49bebd254"/><file name="Success.php" hash="4fdf541d5dff39219e0b87732eaeca4c"/></dir><file name="Form.php" hash="e993c0ada3a0799242a8d479acc4a6e2"/><file name="Info.php" hash="94e7e22b327828becac92a4b3402d6f1"/><dir name="Order"><file name="View.php" hash="29c1a2b0c261a8697d552a6e61d4a491"/></dir></dir><dir name="Helper"><file name="Data.php" hash="5c635785c203f501e8b812ab7d3ae5c7"/></dir><file name="LICENSE.txt" hash="d32239bcb673463ab874e80d47fae504"/><dir name="Model"><dir name="Email"><dir name="Template"><file name="Mailer.php" hash="ff641d075f29cd36063bb08722c23636"/></dir><file name="Template.php" hash="2896c0ee6c25c076ede3611afe4d1cec"/></dir><dir name="Sales"><file name="Order.php" hash="e72f0b7eb0d193fde0fe77081190ff55"/></dir><file name="Standard.php" hash="f9726cffc273dc461a47c47b06255dd6"/></dir><dir name="controllers"><file name="AdminController.php" hash="a303fbabed06cc96253d38ebf603771e"/><file name="StandardController.php" hash="afb4c860eed0f2209c771306b7ceaf72"/></dir><dir name="etc"><file name="config.xml" hash="a39d352ba67bba10af23bdda163c85dd"/><file name="system.xml" hash="f5ed718accbabf3309592835ca159d5e"/></dir><dir name="sql"><dir name="barpay_setup"><file name="mysql4-install-0.0.9.php" hash="0e77bf3ab173e36edebc38644ecb7051"/></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="barpay"><file name="barpay_callout.gif" hash="60114fdd50afa0cefbfa38e0a17f17e0"/><file name="barpay_checkout.gif" hash="041df1836a58b31aa6ae7c09b4a6cfef"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="barpay"><file name="form.phtml" hash="7952ea1d3770923ea32106fbe19e076c"/><file name="info.phtml" hash="aa01243cc33bdd606360e464d0cfb7ad"/><file name="infobox.phtml" hash="eb5642d9454a19ca40d1fae0a846d10d"/><file name="pay.phtml" hash="34c2dc92c6536d0070a50cf8404e3101"/><dir name="payment"><file name="mark.phtml" hash="d264e027f75b8d1cc79ccc24c28a68ca"/></dir><file name="success.phtml" hash="232bf0f5f38d665eb6109a0053ef65c2"/></dir></dir><dir name="layout"><file name="barpay.xml" hash="58a8f6484b33f3d8952e3b6a01758fda"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="barpay"><file name="info.phtml" hash="aa01243cc33bdd606360e464d0cfb7ad"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Inite_Barpay.xml" hash="b6587e6f382c8083dba6c0f681f1b2a3"/></dir></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Barpay_Payment_Standard</name>
4
+ <version>0.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Secure, quick and without any fees: Pay online in cash with BarPay.</summary>
10
  <description>Online retailers lose many customers at the checkout. They cancel their&#xD;
11
+ &#xD;
12
  purchase, in most cases due to the payment methods. The solution for this is&#xD;
13
+ &#xD;
14
  called BarPay, which is an alternative to all existing online payment methods.&#xD;
15
+ &#xD;
16
  Consumers do not need a bank account or credit card but pay in cash as they&#xD;
17
+ &#xD;
18
  are used to: simple, convenient and safe.&#xD;
19
  &#xD;
20
+ &#xD;
21
+ &#xD;
22
  The BarPay principle is simple. Directly after the conclusion of the order&#xD;
23
+ &#xD;
24
  process, the buyer is sent an individual barcode via e-mail, invoice&#xD;
25
+ &#xD;
26
  attachment or directly in the browser. This can be printed out or presented&#xD;
27
+ &#xD;
28
  via smartphone to more than 18,000 local BarPay acceptance points like&#xD;
29
+ &#xD;
30
  petrol stations, shops and kiosks in Germany. If the consumer pays the&#xD;
31
+ &#xD;
32
  invoice at one of these sales outlets, the code is scanned, the payment&#xD;
33
+ &#xD;
34
  booked and the incoming payment reported to the retailer via the BarPay&#xD;
35
+ &#xD;
36
  system. The goods can then be dispatched.&#xD;
37
  &#xD;
38
+ &#xD;
39
+ &#xD;
40
  --------------------------------------------------&#xD;
41
  &#xD;
42
+ &#xD;
43
+ &#xD;
44
  Nach Auswahl von BarPay wird dem K&#xE4;ufer ein individueller Barcode per E-Mail, Rechnungsanhang oder zum Download &#xFC;bermittelt. Dieser kann ausgedruckt und beim BarPay Akezptanznetzwerk bezahlt werden. Dazu z&#xE4;hlen rund 18.000 Handelsketten, Tankstellen und Kiosk-Systeme in ganz Deutschland. Der Zahlungseingang wird dem Online-H&#xE4;ndler in Echtzeit &#xFC;bermittelt, und die bestellte Ware kann umgehend in den Versand gehen.</description>
45
  <notes>Keine Hinweise</notes>
46
  <authors><author><name>Christian Lakits</name><user>lakits</user><email>barpay@munichx-media.de</email></author><author><name>Gerry Schlegel</name><user>bertdireins</user><email>barpay@munichx-media.de</email></author></authors>
47
+ <date>2012-10-08</date>
48
+ <time>11:03:02</time>
49
+ <contents><target name="magecommunity"><dir name="Inite"><dir name="Barpay"><dir name="Block"><dir name="Checkout"><file name="Error.php" hash="dacb79ceca05b5ff50d63af49bebd254"/><file name="Success.php" hash="4fdf541d5dff39219e0b87732eaeca4c"/></dir><file name="Form.php" hash="e993c0ada3a0799242a8d479acc4a6e2"/><file name="Info.php" hash="e962a4dbe7d322d21a9ada7cb6fe7bd9"/><dir name="Order"><file name="View.php" hash="29c1a2b0c261a8697d552a6e61d4a491"/></dir></dir><dir name="Helper"><file name="Data.php" hash="5c635785c203f501e8b812ab7d3ae5c7"/></dir><file name="LICENSE.txt" hash="d32239bcb673463ab874e80d47fae504"/><dir name="Model"><dir name="Email"><dir name="Template"><file name="Mailer.php" hash="ff641d075f29cd36063bb08722c23636"/></dir><file name="Template.php" hash="2896c0ee6c25c076ede3611afe4d1cec"/></dir><dir name="Sales"><file name="Order.php" hash="e72f0b7eb0d193fde0fe77081190ff55"/></dir><file name="Standard.php" hash="f9726cffc273dc461a47c47b06255dd6"/></dir><dir name="controllers"><file name="AdminController.php" hash="a303fbabed06cc96253d38ebf603771e"/><file name="StandardController.php" hash="afb4c860eed0f2209c771306b7ceaf72"/></dir><dir name="etc"><file name="config.xml" hash="6223a2900f7eeb7d3122295ceec6bc83"/><file name="system.xml" hash="f5ed718accbabf3309592835ca159d5e"/></dir><dir name="sql"><dir name="barpay_setup"><file name="mysql4-install-0.0.9.php" hash="0e77bf3ab173e36edebc38644ecb7051"/></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="barpay"><file name="barpay_callout.gif" hash="60114fdd50afa0cefbfa38e0a17f17e0"/><file name="barpay_checkout.gif" hash="041df1836a58b31aa6ae7c09b4a6cfef"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="barpay"><file name="form.phtml" hash="7952ea1d3770923ea32106fbe19e076c"/><file name="info.phtml" hash="aa01243cc33bdd606360e464d0cfb7ad"/><file name="infobox.phtml" hash="eb5642d9454a19ca40d1fae0a846d10d"/><file name="pay.phtml" hash="34c2dc92c6536d0070a50cf8404e3101"/><dir name="payment"><file name="mark.phtml" hash="d264e027f75b8d1cc79ccc24c28a68ca"/></dir><file name="success.phtml" hash="232bf0f5f38d665eb6109a0053ef65c2"/></dir></dir><dir name="layout"><file name="barpay.xml" hash="58a8f6484b33f3d8952e3b6a01758fda"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="barpay"><file name="info.phtml" hash="aa01243cc33bdd606360e464d0cfb7ad"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Inite_Barpay.xml" hash="b6587e6f382c8083dba6c0f681f1b2a3"/></dir></dir></target></contents>
50
  <compatible/>
51
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
52
  </package>