ET_PaymentRobokassa - Version 1.0.1

Version Notes

stable release

Download this release

Release Info

Developer Magento Core Team
Extension ET_PaymentRobokassa
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/ET/PaymentRobokassa/Controller/Router.php CHANGED
@@ -53,7 +53,7 @@ class ET_PaymentRobokassa_Controller_Router extends Mage_Core_Controller_Varien_
53
  $allpath = explode("/", $identifier);
54
 
55
  //ne nash modulj
56
- if ($allpath[0] != $this->_routerName) {
57
  return false;
58
  }
59
 
@@ -76,4 +76,13 @@ class ET_PaymentRobokassa_Controller_Router extends Mage_Core_Controller_Varien_
76
 
77
  return true;
78
  }
 
 
 
 
 
 
 
 
 
79
  }
53
  $allpath = explode("/", $identifier);
54
 
55
  //ne nash modulj
56
+ if ($this->_isOurModule($allpath[0])) {
57
  return false;
58
  }
59
 
76
 
77
  return true;
78
  }
79
+
80
+ /**
81
+ * @param $allpath
82
+ * @return bool
83
+ */
84
+ protected function _isOurModule($urlKey)
85
+ {
86
+ return ($urlKey != $this->_routerName);
87
+ }
88
  }
app/code/community/ET/PaymentRobokassa/controllers/GateController.php CHANGED
@@ -49,9 +49,6 @@ class ET_PaymentRobokassa_GateController extends Mage_Core_Controller_Front_Acti
49
  $status,
50
  $this->__('Customer redirected to payment Gateway Robokassa'),
51
  false);
52
- // send new order email
53
- $order->sendNewOrderEmail();
54
- $order->setEmailSent(true);
55
  $order->save();
56
 
57
  $payment = $order->getPayment()->getMethodInstance();
@@ -77,6 +74,7 @@ class ET_PaymentRobokassa_GateController extends Mage_Core_Controller_Front_Acti
77
  $answer = $this->getRequest()->getParams();
78
  $payment = Mage::getSingleton(self::MODULENAME . "/method_" . self::PAYMENTNAME);
79
  if ($payment->getOrderId($answer)) {
 
80
  $order = Mage::getModel('sales/order')->load($payment->getOrderId($answer));
81
 
82
  //true un success, false on fail or array of text on error
@@ -95,7 +93,7 @@ class ET_PaymentRobokassa_GateController extends Mage_Core_Controller_Front_Acti
95
  Mage::helper("etpaymentrobokassa")->log($answer);
96
 
97
  if ($checkedAnswer === true) {
98
- Mage::dispatchEvent('robokassa_success_answer_without_error', $answer);
99
  if ($order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
100
  if ($order->canInvoice()) {
101
  $invoice = $order->prepareInvoice();
@@ -109,6 +107,7 @@ class ET_PaymentRobokassa_GateController extends Mage_Core_Controller_Front_Acti
109
  'The amount has been authorized and captured by Robokassa.')
110
  ),
111
  false);
 
112
  $order->save();
113
  }
114
  print 'OK' . $payment->getOrderId($answer);
@@ -174,4 +173,15 @@ class ET_PaymentRobokassa_GateController extends Mage_Core_Controller_Front_Acti
174
  $this->_redirect("checkout/onepage/success");
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
 
177
  }
49
  $status,
50
  $this->__('Customer redirected to payment Gateway Robokassa'),
51
  false);
 
 
 
52
  $order->save();
53
 
54
  $payment = $order->getPayment()->getMethodInstance();
74
  $answer = $this->getRequest()->getParams();
75
  $payment = Mage::getSingleton(self::MODULENAME . "/method_" . self::PAYMENTNAME);
76
  if ($payment->getOrderId($answer)) {
77
+ /* @var $order Mage_Sales_Model_Order*/
78
  $order = Mage::getModel('sales/order')->load($payment->getOrderId($answer));
79
 
80
  //true un success, false on fail or array of text on error
93
  Mage::helper("etpaymentrobokassa")->log($answer);
94
 
95
  if ($checkedAnswer === true) {
96
+ Mage::dispatchEvent('robokassa_success_answer_without_error', $result);
97
  if ($order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
98
  if ($order->canInvoice()) {
99
  $invoice = $order->prepareInvoice();
107
  'The amount has been authorized and captured by Robokassa.')
108
  ),
109
  false);
110
+ $this->_sendEmailAfterPaymentSuccess($order);
111
  $order->save();
112
  }
113
  print 'OK' . $payment->getOrderId($answer);
173
  $this->_redirect("checkout/onepage/success");
174
  }
175
 
176
+ /**
177
+ * Send new order email
178
+ * @param $order Mage_Sales_Model_Order
179
+ */
180
+ protected function _sendEmailAfterPaymentSuccess($order)
181
+ {
182
+ $order->sendNewOrderEmail();
183
+ $order->setEmailSent(true);
184
+ return $this;
185
+ }
186
+
187
  }
app/code/community/ET/PaymentRobokassa/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <modules>
23
  <ET_PaymentRobokassa>
24
  <name>ET Payment Robokassa</name>
25
- <version>1.0.0</version>
26
  <descr>
27
  <ru_RU><![CDATA[Платёжный модуль Robokassa. Позволяет использовать сервис приёма платежей Robokassa (robokassa.ru) на вашем Magento сайте.]]>
28
  </ru_RU>
22
  <modules>
23
  <ET_PaymentRobokassa>
24
  <name>ET Payment Robokassa</name>
25
+ <version>1.0.1</version>
26
  <descr>
27
  <ru_RU><![CDATA[Платёжный модуль Robokassa. Позволяет использовать сервис приёма платежей Robokassa (robokassa.ru) на вашем Magento сайте.]]>
28
  </ru_RU>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_PaymentRobokassa</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>_Free payment extension ET Payment Robokassa allows you to use payment gateway Robokassa (robokassa.ru) on your website._</description>
11
  <notes>stable release</notes>
12
  <authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
13
- <date>2013-07-26</date>
14
- <time>09:27:21</time>
15
- <contents><target name="magecommunity"><dir name="ET"><dir name="PaymentRobokassa"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="71c419849070047ca9f024b08ea2cd1e"/><file name="Linktoinfo.php" hash="c4dc4b21897d093dbd9736c3079ce03b"/><file name="Linktooptions.php" hash="687813f8551ed509486fc7da6dc60540"/></dir></dir></dir></dir><file name="Support.php" hash="4a8096c7c8bf37e78c6715ac2ef3024a"/></dir><dir name="Single"><file name="Form.php" hash="748fa65742a34d66a80209dad81f23ea"/><file name="Info.php" hash="6ca2b3f7f318164f520144419ac3720e"/></dir><file name="Form.php" hash="3f3773311e029601aa6755fd2fc6a7f2"/><file name="Info.php" hash="3fc0ac20cd14002acdf8deff3359c68e"/><file name="Redirect.php" hash="45e05f5cc2869584eb90bd0a05e8fbc1"/></dir><dir name="Controller"><file name="Router.php" hash="c68e036cbd21a2199e853b3aacb02a12"/></dir><dir name="Helper"><file name="Data.php" hash="8e427557290d5bee091f3a181af45a4e"/></dir><dir name="Model"><dir name="Method"><file name="Etrobokassa.php" hash="83113ff54cde836f4f05feffdc2636fa"/></dir><file name="Culture.php" hash="1f549bdc0bcb2dcf53b656bcf2bc4677"/><file name="Paysystem.php" hash="dbe855edb31265e13c389fc5d964fc62"/></dir><dir name="controllers"><file name="GateController.php" hash="c2b5b18cc9ece88622e8a87d74a8b5b2"/></dir><dir name="etc"><file name="config.xml" hash="b29c35dd9db31b4afa2896aa8b2a5a9b"/><file name="system.xml" hash="75d61cc3824fbc62e4d89c67b320d4fd"/></dir><dir name="sql"><dir name="etpaymentrobokassa_setup"><file name="mysql4-install-1.0.0.php" hash="550cabe108b7453b09d2de7e8720459d"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="ET_PaymentRobokassa.csv" hash="c798137a7dbffc17355220887e33f871"/></dir><dir name="en_US"><file name="ET_PaymentRobokassa.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageetc"><dir name="modules"><file name="ET_PaymentRobokassa.xml" hash="29a6a6d442729714e93aded22ce4b1b2"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="et_paymentrobokassa"><dir name="single"><file name="form.phtml" hash="ffdb96cd7677d5b256a49bb8fe5d9145"/><file name="info.phtml" hash="460b5111ae8b9d78e0a320c5878cc30d"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="et_paymentrobokassa"><dir name="single"><file name="form.phtml" hash="594645a04acfd21185ba89fbc3752f60"/><file name="info.phtml" hash="460b5111ae8b9d78e0a320c5878cc30d"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_PaymentRobokassa</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
7
  <channel>community</channel>
10
  <description>_Free payment extension ET Payment Robokassa allows you to use payment gateway Robokassa (robokassa.ru) on your website._</description>
11
  <notes>stable release</notes>
12
  <authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
13
+ <date>2013-08-29</date>
14
+ <time>08:33:47</time>
15
+ <contents><target name="magecommunity"><dir name="ET"><dir name="PaymentRobokassa"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="71c419849070047ca9f024b08ea2cd1e"/><file name="Linktoinfo.php" hash="c4dc4b21897d093dbd9736c3079ce03b"/><file name="Linktooptions.php" hash="687813f8551ed509486fc7da6dc60540"/></dir></dir></dir></dir><file name="Support.php" hash="4a8096c7c8bf37e78c6715ac2ef3024a"/></dir><dir name="Single"><file name="Form.php" hash="748fa65742a34d66a80209dad81f23ea"/><file name="Info.php" hash="6ca2b3f7f318164f520144419ac3720e"/></dir><file name="Form.php" hash="3f3773311e029601aa6755fd2fc6a7f2"/><file name="Info.php" hash="3fc0ac20cd14002acdf8deff3359c68e"/><file name="Redirect.php" hash="45e05f5cc2869584eb90bd0a05e8fbc1"/></dir><dir name="Controller"><file name="Router.php" hash="8271139fa6af2cd57d6a5f45d767d4a1"/></dir><dir name="Helper"><file name="Data.php" hash="8e427557290d5bee091f3a181af45a4e"/></dir><dir name="Model"><dir name="Method"><file name="Etrobokassa.php" hash="83113ff54cde836f4f05feffdc2636fa"/></dir><file name="Culture.php" hash="1f549bdc0bcb2dcf53b656bcf2bc4677"/><file name="Paysystem.php" hash="dbe855edb31265e13c389fc5d964fc62"/></dir><dir name="controllers"><file name="GateController.php" hash="f4b3c46eb19aa7112efe3ab90265b4ce"/></dir><dir name="etc"><file name="config.xml" hash="4ee8e582fbc6cb381c6f527978c7f003"/><file name="system.xml" hash="75d61cc3824fbc62e4d89c67b320d4fd"/></dir><dir name="sql"><dir name="etpaymentrobokassa_setup"><file name="mysql4-install-1.0.0.php" hash="550cabe108b7453b09d2de7e8720459d"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="ET_PaymentRobokassa.csv" hash="c798137a7dbffc17355220887e33f871"/></dir><dir name="en_US"><file name="ET_PaymentRobokassa.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageetc"><dir name="modules"><file name="ET_PaymentRobokassa.xml" hash="29a6a6d442729714e93aded22ce4b1b2"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="et_paymentrobokassa"><dir name="single"><file name="form.phtml" hash="ffdb96cd7677d5b256a49bb8fe5d9145"/><file name="info.phtml" hash="460b5111ae8b9d78e0a320c5878cc30d"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="et_paymentrobokassa"><dir name="single"><file name="form.phtml" hash="594645a04acfd21185ba89fbc3752f60"/><file name="info.phtml" hash="460b5111ae8b9d78e0a320c5878cc30d"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>