Orba_Payupl - Version 1.0.1

Version Notes

- send new order e-mail only if it wasn't sent already

Download this release

Release Info

Developer ORBA
Extension Orba_Payupl
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Orba/Payupl/Model/Resource/Setup.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @copyright Copyright (c) 2016 Orba Sp. z o.o. (http://orba.pl)
4
+ */
5
+
6
+ class Orba_Payupl_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
7
+ {
8
+ const ORBA_EMAIL = 'magento@orba.co';
9
+ const MODULE_NAME = 'Payu.pl';
10
+
11
+ public function sendPing($version, $upgrade = false) {
12
+ try {
13
+ $mail = new Zend_Mail();
14
+ $from = Mage::getStoreConfig('general/store_information/email_address');
15
+ if (!$from) {
16
+ $from = self::ORBA_EMAIL;
17
+ }
18
+ $mail->setFrom($from, $from);
19
+ $mail->addTo(self::ORBA_EMAIL, self::ORBA_EMAIL);
20
+ $subject = '[' . ($upgrade ? 'Aktualizacja' : 'Instalacja') . '] ' . self::MODULE_NAME . ' ' . $version;
21
+ $mail->setSubject($subject);
22
+ $mail->setBodyHtml("IP: " . $_SERVER['SERVER_ADDR'] . "<br />Host: " . gethostbyaddr($_SERVER['SERVER_ADDR']) . "<br />URL: " . Mage::getBaseUrl());
23
+ $mail->setBodyText("IP: " . $_SERVER['SERVER_ADDR'] . "\r\nHost: " . gethostbyaddr($_SERVER['SERVER_ADDR']) . "\r\nURL: " . Mage::getBaseUrl());
24
+ $mail->send();
25
+ } catch(Exception $e) {}
26
+ }
27
+ }
app/code/community/Orba/Payupl/controllers/PaymentController.php CHANGED
@@ -1,9 +1,21 @@
1
  <?php
2
 
3
- class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action {
4
-
 
 
 
 
5
  protected $_session = null;
 
 
 
 
6
  protected $_order = null;
 
 
 
 
7
  protected $_payment = null;
8
 
9
  /* initiates new payment */
@@ -12,7 +24,9 @@ class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action {
12
  $this->setOrder();
13
  $this->forceNewOrderStatus();
14
  $this->setPayment(true);
15
- $this->_order->sendNewOrderEmail();
 
 
16
  $this->loadLayout();
17
  $this->getLayout()->getBlock('payupl_child')->setOrder($this->_order);
18
  $this->renderLayout();
1
  <?php
2
 
3
+ class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action
4
+ {
5
+
6
+ /**
7
+ * @var Mage_Checkout_Model_Session
8
+ */
9
  protected $_session = null;
10
+
11
+ /**
12
+ * @var Mage_Sales_Model_Order
13
+ */
14
  protected $_order = null;
15
+
16
+ /**
17
+ * @var Mage_Sales_Model_Order_Payment
18
+ */
19
  protected $_payment = null;
20
 
21
  /* initiates new payment */
24
  $this->setOrder();
25
  $this->forceNewOrderStatus();
26
  $this->setPayment(true);
27
+ if (!$this->_order->getEmailSent() == 1) {
28
+ $this->_order->sendNewOrderEmail();
29
+ }
30
  $this->loadLayout();
31
  $this->getLayout()->getBlock('payupl_child')->setOrder($this->_order);
32
  $this->renderLayout();
app/code/community/Orba/Payupl/data/payupl_setup/data-upgrade-1.0.0-1.0.1.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @copyright Copyright (c) 2016 Orba Sp. z o.o. (http://orba.pl)
4
+ */
5
+
6
+ /**
7
+ * @var $this Orba_Payupl_Model_Resource_Setup
8
+ */
9
+
10
+ $this->sendPing('1.0.1', true);
app/code/community/Orba/Payupl/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Orba_Payupl>
5
- <version>1.0.0</version>
6
  </Orba_Payupl>
7
  </modules>
8
  <frontend>
@@ -47,6 +47,7 @@
47
  <payupl_setup>
48
  <setup>
49
  <module>Orba_Payupl</module>
 
50
  </setup>
51
  <connection>
52
  <use>core_setup</use>
2
  <config>
3
  <modules>
4
  <Orba_Payupl>
5
+ <version>1.0.1</version>
6
  </Orba_Payupl>
7
  </modules>
8
  <frontend>
47
  <payupl_setup>
48
  <setup>
49
  <module>Orba_Payupl</module>
50
+ <class>Orba_Payupl_Model_Resource_Setup</class>
51
  </setup>
52
  <connection>
53
  <use>core_setup</use>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Orba_Payupl</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
7
  <channel>community</channel>
@@ -9,17 +9,16 @@
9
  <summary>Payu.pl integration / Integracja Payu.pl</summary>
10
  <description>The extension adds a new payment method to your shop which gives your customers the possibility to use Payu.pl system to pay for their orders.&#xD;
11
  It allows to integrate production accounts as well as sandbox ones.&#xD;
12
- If you are interested in the paid version of our extension with additional features and technical support, e-mail us at magento@orba.pl.&#xD;
13
  &#xD;
14
  Modu&#x142; dodaje do sklepu nowy spos&#xF3;b p&#x142;atno&#x15B;ci, kt&#xF3;ry daje klientom mo&#x17C;liwo&#x15B;&#x107; u&#x17C;ycia serwisu Payu.pl do dokonania zap&#x142;aty za zakupy.&#xD;
15
  Istnieje mo&#x17C;liwo&#x15B;&#x107; integracji zar&#xF3;wno kont produkcyjnych jak i tych typu "sandbox".&#xD;
16
- Je&#x15B;li jeste&#x15B; zainteresowany p&#x142;atn&#x105; wersj&#x105; naszego modu&#x142;u, kt&#xF3;ry zawiera dodatkowe funkcjonalno&#x15B;ci oraz pomoc technicz&#x105; w cenie, wy&#x15B;lij do nas wiadomo&#x15B;&#x107; e-mail na adres magento@orba.pl.</description>
17
- <notes>- new Payu.pl logo used in checkout,&#xD;
18
- - minor change of payment request</notes>
19
- <authors><author><name>ORBA</name><user>orba</user><email>magento@orba.pl</email></author></authors>
20
- <date>2015-08-10</date>
21
- <time>12:12:53</time>
22
- <contents><target name="magecommunity"><dir name="Orba"><dir name="Payupl"><dir name="Block"><file name="Form.php" hash="3e1aef6a9a88ba68d86aa12ae0cbe7b8"/><file name="Redirect.php" hash="1a1dfa1fdd2e4d7c22ea8a0c98772313"/></dir><dir name="Helper"><file name="Data.php" hash="1b90374540c95121de2146a0dc8d56e0"/></dir><dir name="Model"><file name="Config.php" hash="3e933a833c5448bb641435a42a9aaa06"/><file name="Encoding.php" hash="54e9e22bd447dcf581c3b00c84f6d693"/><file name="Gateway.php" hash="10f12edec745c038a1d5b6d06180692c"/><file name="Payment.php" hash="fcd23e483b3b0adf10fa8c8b03ce553b"/><file name="Session.php" hash="aad733c0d69beb14192e22415339343e"/></dir><dir name="controllers"><file name="IndexController.php" hash="2ee7e3bcd53c0eda0eb06f000cf23afb"/><file name="PaymentController.php" hash="a305b45ae9bafc0138760f524cc77363"/></dir><dir name="etc"><file name="config.xml" hash="562712d90bf4a542c6fe6af20bcf8a02"/><file name="system.xml" hash="a8cb0a42337a6fe401d06a5973e098a1"/></dir><dir name="sql"><dir name="payupl_setup"><file name="install-1.0.0.php" hash="1931aca4052a946a3dc82911dac86b4c"/><file name="mysql4-install-0.1.0.php" hash="1c24d60e370bb07d601e02fcd1833c12"/><file name="mysql4-install-0.1.1.php" hash="8a734508ca8764fe397e8e98b2abda45"/><file name="mysql4-install-0.1.10.php" hash="59f3be8df67ac4eb1af1382b32f82d61"/><file name="mysql4-install-0.1.2.php" hash="212e958f7dcaca1209844703f1946b4e"/><file name="mysql4-install-0.1.3.php" hash="964592d00bb4cf8224ab5d2d73669d25"/><file name="mysql4-install-0.1.4.1.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.4.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.5.php" hash="af851501e249c0f711539724c129ef75"/><file name="mysql4-install-0.1.6.php" hash="86e34723c7192e7b3e63f9f6d6209140"/><file name="mysql4-install-0.1.7.php" hash="ef811c98a328f0c405435bb8d5baf2b3"/><file name="mysql4-install-0.1.8.php" hash="9f772cd5cbec3a46cd0b421ad482e965"/><file name="mysql4-install-0.1.9.php" hash="81a8706be704903850ed23ed63992b43"/><file name="mysql4-install-0.2.0.php" hash="008b767fc311dc1b4ac398a4fe3617da"/><file name="mysql4-install-0.2.1.php" hash="c84b836e0a171a74475c3e68419221c9"/><file name="mysql4-install-0.2.2.php" hash="acfff9b789376eeee001f1785def2156"/><file name="mysql4-install-0.3.0.php" hash="8383ea831bd6aac0393a709533b931b3"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a5d9fc9d94f987f268c7b8246fcfd2b1"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="f1af4499aecb9280a23c73d98f860394"/><file name="mysql4-upgrade-0.1.10.1-0.2.0.php" hash="162f980728001e13b060b93d6b7007fd"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="6e517684413036f0420a48d8524a74e9"/><file name="mysql4-upgrade-0.1.3-0.1.4.1.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="5a6e25ac859b99b1abbeeb8f71ca5acc"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="679f29891e5dfb59dff039926a58abf1"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="9673754430b1c8479b5f7472dfa85a0b"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="74939b2e76798c32b5c2893dccbbfa40"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="0d8819335f562e651c5b8ee4235a9cfb"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="24c14abbcaaeb35abee2535235d4c97d"/><file name="mysql4-upgrade-0.2.0-0.2.1.php" hash="47b9ce56d9cc39db3b17fa51033bce22"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="8ed509924a148aec16e761e352619d58"/><file name="mysql4-upgrade-0.2.2-0.2.3.php" hash="7344d966b7ebc86cef5dc94e715ef426"/><file name="mysql4-upgrade-0.2.3.1-0.2.4.php" hash="7a38b316c2745a076b0c870b648dddc6"/><file name="mysql4-upgrade-0.2.4-0.3.0.php" hash="e590f960ae315da9f18c0340bcec60d5"/><file name="mysql4-upgrade-0.3.0-0.3.1.php" hash="5f2e4427c96931db2b292977b7c1e99d"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="0198f162233a34fb55c2a3569ff76901"/><file name="upgrade-0.3.2.1-1.0.0.php" hash="1831d5deda98b05c657aca54cebf1b4c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payupl.xml" hash="274346eac15bbeaf17e820d96ae19c63"/></dir><dir name="template"><dir name="payupl"><file name="empty.phtml" hash="ed465deabe832b50373acb983787dac7"/><file name="form.phtml" hash="1924fced96f1f107ce02d2636f4e3671"/><file name="online.phtml" hash="cf1636fb4cfeeec6bd6c17e7da07456e"/><file name="redirect.phtml" hash="e3c9e028dba4a49e410b5ed99cc3e0f0"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orba_Payupl.xml" hash="59211173152eb267325c65e2498faa01"/></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Orba_Payupl.csv" hash="c2d3b32461648b66ee016fa177cbc890"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="payupl"><file name="logo.png" hash="68c034f40b4bfcd3aea9b0082ca218a0"/></dir></dir><dir name="css"><file name="payupl.css" hash="00f2fc8150ef59c5d318d211e9ef123a"/></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Orba_Payupl</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
7
  <channel>community</channel>
9
  <summary>Payu.pl integration / Integracja Payu.pl</summary>
10
  <description>The extension adds a new payment method to your shop which gives your customers the possibility to use Payu.pl system to pay for their orders.&#xD;
11
  It allows to integrate production accounts as well as sandbox ones.&#xD;
12
+ If you are interested in the paid version of our extension with additional features and technical support, e-mail us at magento@orba.co.&#xD;
13
  &#xD;
14
  Modu&#x142; dodaje do sklepu nowy spos&#xF3;b p&#x142;atno&#x15B;ci, kt&#xF3;ry daje klientom mo&#x17C;liwo&#x15B;&#x107; u&#x17C;ycia serwisu Payu.pl do dokonania zap&#x142;aty za zakupy.&#xD;
15
  Istnieje mo&#x17C;liwo&#x15B;&#x107; integracji zar&#xF3;wno kont produkcyjnych jak i tych typu "sandbox".&#xD;
16
+ Je&#x15B;li jeste&#x15B; zainteresowany p&#x142;atn&#x105; wersj&#x105; naszego modu&#x142;u, kt&#xF3;ry zawiera dodatkowe funkcjonalno&#x15B;ci oraz pomoc technicz&#x105; w cenie, wy&#x15B;lij do nas wiadomo&#x15B;&#x107; e-mail na adres magento@orba.co.</description>
17
+ <notes>- send new order e-mail only if it wasn't sent already</notes>
18
+ <authors><author><name>ORBA</name><user>orba</user><email>magento@orba.co</email></author></authors>
19
+ <date>2016-04-12</date>
20
+ <time>10:06:49</time>
21
+ <contents><target name="magecommunity"><dir name="Orba"><dir name="Payupl"><dir name="Block"><file name="Form.php" hash="3e1aef6a9a88ba68d86aa12ae0cbe7b8"/><file name="Redirect.php" hash="1a1dfa1fdd2e4d7c22ea8a0c98772313"/></dir><dir name="Helper"><file name="Data.php" hash="1b90374540c95121de2146a0dc8d56e0"/></dir><dir name="Model"><file name="Config.php" hash="3e933a833c5448bb641435a42a9aaa06"/><file name="Encoding.php" hash="54e9e22bd447dcf581c3b00c84f6d693"/><file name="Gateway.php" hash="10f12edec745c038a1d5b6d06180692c"/><file name="Payment.php" hash="fcd23e483b3b0adf10fa8c8b03ce553b"/><dir name="Resource"><file name="Setup.php" hash="b78e8212e539e24c4bdcb70715232cb4"/></dir><file name="Session.php" hash="aad733c0d69beb14192e22415339343e"/></dir><dir name="controllers"><file name="IndexController.php" hash="2ee7e3bcd53c0eda0eb06f000cf23afb"/><file name="PaymentController.php" hash="fa4d2dcd1a0eebdf65fbda7886415b67"/></dir><dir name="data"><dir name="payupl_setup"><file name="data-upgrade-1.0.0-1.0.1.php" hash="67a8889d30236cb87e288d39a7601a06"/></dir></dir><dir name="etc"><file name="config.xml" hash="b6b09886a1aa4c44dbdee8ed77adfe97"/><file name="system.xml" hash="a8cb0a42337a6fe401d06a5973e098a1"/></dir><dir name="sql"><dir name="payupl_setup"><file name="install-1.0.0.php" hash="1931aca4052a946a3dc82911dac86b4c"/><file name="mysql4-install-0.1.0.php" hash="1c24d60e370bb07d601e02fcd1833c12"/><file name="mysql4-install-0.1.1.php" hash="8a734508ca8764fe397e8e98b2abda45"/><file name="mysql4-install-0.1.10.php" hash="59f3be8df67ac4eb1af1382b32f82d61"/><file name="mysql4-install-0.1.2.php" hash="212e958f7dcaca1209844703f1946b4e"/><file name="mysql4-install-0.1.3.php" hash="964592d00bb4cf8224ab5d2d73669d25"/><file name="mysql4-install-0.1.4.1.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.4.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.5.php" hash="af851501e249c0f711539724c129ef75"/><file name="mysql4-install-0.1.6.php" hash="86e34723c7192e7b3e63f9f6d6209140"/><file name="mysql4-install-0.1.7.php" hash="ef811c98a328f0c405435bb8d5baf2b3"/><file name="mysql4-install-0.1.8.php" hash="9f772cd5cbec3a46cd0b421ad482e965"/><file name="mysql4-install-0.1.9.php" hash="81a8706be704903850ed23ed63992b43"/><file name="mysql4-install-0.2.0.php" hash="008b767fc311dc1b4ac398a4fe3617da"/><file name="mysql4-install-0.2.1.php" hash="c84b836e0a171a74475c3e68419221c9"/><file name="mysql4-install-0.2.2.php" hash="acfff9b789376eeee001f1785def2156"/><file name="mysql4-install-0.3.0.php" hash="8383ea831bd6aac0393a709533b931b3"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a5d9fc9d94f987f268c7b8246fcfd2b1"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="f1af4499aecb9280a23c73d98f860394"/><file name="mysql4-upgrade-0.1.10.1-0.2.0.php" hash="162f980728001e13b060b93d6b7007fd"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="6e517684413036f0420a48d8524a74e9"/><file name="mysql4-upgrade-0.1.3-0.1.4.1.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="5a6e25ac859b99b1abbeeb8f71ca5acc"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="679f29891e5dfb59dff039926a58abf1"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="9673754430b1c8479b5f7472dfa85a0b"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="74939b2e76798c32b5c2893dccbbfa40"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="0d8819335f562e651c5b8ee4235a9cfb"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="24c14abbcaaeb35abee2535235d4c97d"/><file name="mysql4-upgrade-0.2.0-0.2.1.php" hash="47b9ce56d9cc39db3b17fa51033bce22"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="8ed509924a148aec16e761e352619d58"/><file name="mysql4-upgrade-0.2.2-0.2.3.php" hash="7344d966b7ebc86cef5dc94e715ef426"/><file name="mysql4-upgrade-0.2.3.1-0.2.4.php" hash="7a38b316c2745a076b0c870b648dddc6"/><file name="mysql4-upgrade-0.2.4-0.3.0.php" hash="e590f960ae315da9f18c0340bcec60d5"/><file name="mysql4-upgrade-0.3.0-0.3.1.php" hash="5f2e4427c96931db2b292977b7c1e99d"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="0198f162233a34fb55c2a3569ff76901"/><file name="upgrade-0.3.2.1-1.0.0.php" hash="1831d5deda98b05c657aca54cebf1b4c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payupl.xml" hash="274346eac15bbeaf17e820d96ae19c63"/></dir><dir name="template"><dir name="payupl"><file name="empty.phtml" hash="ed465deabe832b50373acb983787dac7"/><file name="form.phtml" hash="1924fced96f1f107ce02d2636f4e3671"/><file name="online.phtml" hash="cf1636fb4cfeeec6bd6c17e7da07456e"/><file name="redirect.phtml" hash="e3c9e028dba4a49e410b5ed99cc3e0f0"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orba_Payupl.xml" hash="59211173152eb267325c65e2498faa01"/></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Orba_Payupl.csv" hash="c2d3b32461648b66ee016fa177cbc890"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="payupl"><file name="logo.png" hash="68c034f40b4bfcd3aea9b0082ca218a0"/></dir></dir><dir name="css"><file name="payupl.css" hash="00f2fc8150ef59c5d318d211e9ef123a"/></dir></dir></dir></dir></target></contents>
 
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>