payu_payment - Version 2.0.3

Version Notes

payu released version

Download this release

Release Info

Developer Ramakant
Extension payu_payment
Version 2.0.3
Comparing to
See all releases


Code changes from version 2.0.2 to 2.0.3

app/code/community/Payu/PayuCheckout/Model/Shared.php CHANGED
@@ -323,10 +323,11 @@ else
323
  {
324
  $order->loadByIncrementId($orderid);
325
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
326
- $order->cancel()->save();
327
- // Invento updated
328
  $this->updateInventory($orderid);
329
 
 
 
330
  if ($debug_mode==1) {
331
  $debugId=$response['udf1'];
332
  $data = array('response_body'=>implode(",",$response));
@@ -339,12 +340,10 @@ else
339
  {
340
  $order->loadByIncrementId($orderid);
341
  $order->setState(Mage_Sales_Model_Order::STATE_NEW, true);
342
- $order->cancel()->save();
343
- // Invento updated
344
  $this->updateInventory($orderid);
345
-
346
-
347
-
348
  if ($debug_mode==1) {
349
  $debugId=$response['udf1'];
350
  $data = array('response_body'=>implode(",",$response));
@@ -360,10 +359,12 @@ else
360
 
361
  $order->loadByIncrementId($response['id']);
362
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
363
- $order->cancel()->save();
364
- // Invento updated
365
  $order_id=$response['id'];
366
  $this->updateInventory($order_id);
 
 
 
367
 
368
  }
369
  }
@@ -371,7 +372,7 @@ else
371
  public function updateInventory($order_id)
372
  {
373
 
374
- $order = Mage::getModel('sales/order')->loadByIncrementId('100000005');
375
  $items = $order->getAllItems();
376
  foreach ($items as $itemId => $item)
377
  {
@@ -380,7 +381,7 @@ else
380
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
381
  $qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->getQty();
382
 
383
- $updated_inventory=$qtyStock+ $ordered_quantity;
384
 
385
  $stockData = $product->getStockItem();
386
  $stockData->setData('qty',$updated_inventory);
323
  {
324
  $order->loadByIncrementId($orderid);
325
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
326
+ // Invento updated
 
327
  $this->updateInventory($orderid);
328
 
329
+ $order->cancel()->save();
330
+
331
  if ($debug_mode==1) {
332
  $debugId=$response['udf1'];
333
  $data = array('response_body'=>implode(",",$response));
340
  {
341
  $order->loadByIncrementId($orderid);
342
  $order->setState(Mage_Sales_Model_Order::STATE_NEW, true);
343
+ // Invento updated
 
344
  $this->updateInventory($orderid);
345
+ $order->cancel()->save();
346
+
 
347
  if ($debug_mode==1) {
348
  $debugId=$response['udf1'];
349
  $data = array('response_body'=>implode(",",$response));
359
 
360
  $order->loadByIncrementId($response['id']);
361
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
362
+ // Invento updated
 
363
  $order_id=$response['id'];
364
  $this->updateInventory($order_id);
365
+
366
+ $order->cancel()->save();
367
+
368
 
369
  }
370
  }
372
  public function updateInventory($order_id)
373
  {
374
 
375
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
376
  $items = $order->getAllItems();
377
  foreach ($items as $itemId => $item)
378
  {
381
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
382
  $qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->getQty();
383
 
384
+ $updated_inventory=$qtyStock+ $ordered_quantity;
385
 
386
  $stockData = $product->getStockItem();
387
  $stockData->setData('qty',$updated_inventory);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>payu_payment</name>
4
- <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license>Payu v1.0.5</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>payu released version</notes>
12
  <authors><author><name>Ramakant</name><user>ramakant2you</user><email>ramakant2you@gmail.com</email></author></authors>
13
  <date>2012-02-29</date>
14
- <time>14:26:44</time>
15
- <contents><target name="magecommunity"><dir name="Payu"><dir name="PayuCheckout"><dir name="Block"><dir name="Shared"><file name="Canceled.php" hash="bb19a12f92b3f4813dfbea0b39d54239"/><file name="Failure.php" hash="08abafbca12b0b90026f868f94baff29"/><file name="Form.php" hash="1910d6be84e75325aea85821133ce73c"/><file name="Redirect.php" hash="62bd8f284ca07038f11b81ddcdefe1ff"/></dir></dir><dir name="Controller"><file name="Abstract.php" hash="35e4b83aa3aed060125fbeb653192b4f"/></dir><dir name="Helper"><file name="Data.php" hash="896c95a620ad4ecc5aaa93e157e369fb"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="b841c48492958030919d40f1e106755c"/></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="f6c9e33b04b46242737204488fcd9081"/></dir><file name="Debug.php" hash="7d02543559f7d7cca60d8339898ad76b"/></dir><file name="Setup.php" hash="a03cdaf2dda7cb47e5cab334aa15cebd"/></dir><file name="Shared.php" hash="24a17e1e4ee41ae9552266331d57fa98"/><dir name="Source"><file name="DemoModes.php" hash="3bd1cc16836adecb9d29a55ba9d3bffc"/><file name="DirectReturn.php" hash="be10b40fe41199d36d1d49c1e1af59cb"/><file name="PaymentRoutines.php" hash="5e6e78e13cf245c790762bf5e754fad3"/></dir></dir><dir name="controllers"><file name="SharedController.php" hash="a4979e849b15b46ff7d5133b2a4c43b8"/><file name="SharedController26.php" hash="2af9a71dc45c8e7f6c3a7c731dce8b25"/></dir><dir name="etc"><file name="config.xml" hash="8d61170d5acbebf04feefffd6e00b468"/><file name="system.xml" hash="f4c823828cb787d107c6e204f4342226"/></dir><dir name="sql"><dir name="payucheckout_setup"><file name="mysql4-install-0.1.0.php" hash="e551af7989f2bdca0e863ccdd14cfa56"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="payucheckout"><file name="form.phtml" hash="68b329da9893e34099c7d8ad5cb9c940"/><file name="info.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><dir name="shared"><file name="canceled.phtml" hash="bdef89131c08a83d3c1742399d58b433"/><file name="failure.phtml" hash="a54ece778621c5e2b35f4983923bfeb3"/><file name="form.phtml" hash="f8f62958bac1bf15fde40ed24078d97f"/></dir></dir></dir><dir name="layout"><file name="payucheckout.xml" hash="c77d92a6c0a9fe598e61525658382fe6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Payu_PayuCheckout.xml" hash="284666c8d3fdb0742ceb390ee7081e80"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>payu_payment</name>
4
+ <version>2.0.3</version>
5
  <stability>stable</stability>
6
  <license>Payu v1.0.5</license>
7
  <channel>community</channel>
11
  <notes>payu released version</notes>
12
  <authors><author><name>Ramakant</name><user>ramakant2you</user><email>ramakant2you@gmail.com</email></author></authors>
13
  <date>2012-02-29</date>
14
+ <time>14:32:52</time>
15
+ <contents><target name="magecommunity"><dir name="Payu"><dir name="PayuCheckout"><dir name="Block"><dir name="Shared"><file name="Canceled.php" hash="bb19a12f92b3f4813dfbea0b39d54239"/><file name="Failure.php" hash="08abafbca12b0b90026f868f94baff29"/><file name="Form.php" hash="1910d6be84e75325aea85821133ce73c"/><file name="Redirect.php" hash="62bd8f284ca07038f11b81ddcdefe1ff"/></dir></dir><dir name="Controller"><file name="Abstract.php" hash="35e4b83aa3aed060125fbeb653192b4f"/></dir><dir name="Helper"><file name="Data.php" hash="896c95a620ad4ecc5aaa93e157e369fb"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="b841c48492958030919d40f1e106755c"/></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="f6c9e33b04b46242737204488fcd9081"/></dir><file name="Debug.php" hash="7d02543559f7d7cca60d8339898ad76b"/></dir><file name="Setup.php" hash="a03cdaf2dda7cb47e5cab334aa15cebd"/></dir><file name="Shared.php" hash="6e01b7754d98d99092fc9a83343dd1ff"/><dir name="Source"><file name="DemoModes.php" hash="3bd1cc16836adecb9d29a55ba9d3bffc"/><file name="DirectReturn.php" hash="be10b40fe41199d36d1d49c1e1af59cb"/><file name="PaymentRoutines.php" hash="5e6e78e13cf245c790762bf5e754fad3"/></dir></dir><dir name="controllers"><file name="SharedController.php" hash="a4979e849b15b46ff7d5133b2a4c43b8"/><file name="SharedController26.php" hash="2af9a71dc45c8e7f6c3a7c731dce8b25"/></dir><dir name="etc"><file name="config.xml" hash="8d61170d5acbebf04feefffd6e00b468"/><file name="system.xml" hash="f4c823828cb787d107c6e204f4342226"/></dir><dir name="sql"><dir name="payucheckout_setup"><file name="mysql4-install-0.1.0.php" hash="e551af7989f2bdca0e863ccdd14cfa56"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="payucheckout"><file name="form.phtml" hash="68b329da9893e34099c7d8ad5cb9c940"/><file name="info.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><dir name="shared"><file name="canceled.phtml" hash="bdef89131c08a83d3c1742399d58b433"/><file name="failure.phtml" hash="a54ece778621c5e2b35f4983923bfeb3"/><file name="form.phtml" hash="f8f62958bac1bf15fde40ed24078d97f"/></dir></dir></dir><dir name="layout"><file name="payucheckout.xml" hash="c77d92a6c0a9fe598e61525658382fe6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Payu_PayuCheckout.xml" hash="284666c8d3fdb0742ceb390ee7081e80"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>