diff --git a/vendor/payuindia/payu/Controller/Standard/Response.php b/vendor/payuindia/payu/Controller/Standard/Response.php
index 85bb662..1d2c973 100644
--- a/vendor/payuindia/payu/Controller/Standard/Response.php
+++ b/vendor/payuindia/payu/Controller/Standard/Response.php
@@ -30,7 +30,6 @@ class Response extends \PayUIndia\Payu\Controller\PayuAbstract implements CsrfAw
 
     public function execute() {
         $returnUrl = $this->getCheckoutHelper()->getUrl('checkout');
-
         try {
             $paymentMethod = $this->getPaymentMethod();
 
@@ -91,8 +90,6 @@ class Response extends \PayUIndia\Payu\Controller\PayuAbstract implements CsrfAw
 
 				
 				$order = $this->getOrderById($quote->getReservedOrderId());
-				$this->getCheckoutHelper()->updateOrderFromResponse($order,$params);
-				
 				if($paymentMethod->getConfigData('debuglog')==true)
 					$this->_logger->debug("PayU Created Order ...");
 				
diff --git a/vendor/payuindia/payu/Cron/OrderUpdate.php b/vendor/payuindia/payu/Cron/OrderUpdate.php
index ef921c7..c150ef4 100644
--- a/vendor/payuindia/payu/Cron/OrderUpdate.php
+++ b/vendor/payuindia/payu/Cron/OrderUpdate.php
@@ -52,24 +52,22 @@ class OrderUpdate
             $paymentVerData=$this->paymentVerify($order,$txnid);
             $paymentResponse=json_decode($paymentVerData,true);
 
-            $this->logger->info('order id ' . json_encode($order->getIncrementId()));
-            $this->logger->info('Response from payu');
-            $this->logger->info('response '.json_encode($paymentVerData));
-
-            if($order->getState()=='pending_payment' && $paymentResponse['transaction_details'][$txnid]['status']=='success'){
-                $this->payuHelper->updateOrderFromResponse($order,$paymentResponse['transaction_details'][$txnid]);
+            $orderState=$order->getState();
+            if($orderState == 'pending_payment' && $paymentResponse['transaction_details'][$txnid]['status']=='success'){
                 $payment = $order->getPayment();
                 $this->postProcessing($order, $payment, $paymentResponse['transaction_details'][$txnid]);
+                //add the order history comment
+                $order->addStatusHistoryComment('SUCCESS Registered notification about captured amount of '.$paymentResponse['transaction_details'][$txnid]['transaction_amount'].' by the payu cron.  Transaction ID: '.$txnid);
+                $order->save();
  
- 
-            } elseif ($order->getState() == 'pending_payment' && $paymentResponse['transaction_details'][$txnid]['status'] == 'pending') {
+            } elseif ($orderState == 'pending_payment' && $paymentResponse['transaction_details'][$txnid]['status'] == 'pending') {
  
                 $order->setStatus('pending_payment');
                 $order->setState('pending_payment');
                 $order->addStatusHistoryComment('set pending status from payu');
                 $order->save();
                 
-            }elseif ($order->getState()=='pending_payment' && $paymentResponse['transaction_details'][$txnid]['status'] == 'failure'){
+            }elseif ($orderState == 'pending_payment' && $paymentResponse['transaction_details'][$txnid]['status'] == 'failure'){
                 
                 $order->setStatus('canceled');
                 $order->setState('canceled');
@@ -140,13 +138,10 @@ class OrderUpdate
 				->setAdditionalInformation('payu_mihpayid', $response['mihpayid'])
 				->setAdditionalInformation('payu_order_status', 'approved');    
 				
-				If (isset($response['additional_charges'])) {
-					$payment->setAdditionalInformation('Additional Charges', $response['additional_charges']);		
-					
-					
+				if (isset($response['additional_charges'])) {
+					$payment->setAdditionalInformation('Additional Charges', $response['additional_charges']);			
 				}
-				
-				$order->save();
+                $payment->save();
 				if($this->payuHelper->getConfigData('debuglog')==true)
 					$this->logger->debug($response);					
 				
@@ -158,21 +153,13 @@ class OrderUpdate
 
 				}
 				
-				$order->setTotalPaid($response['amt'])->save();
-				$order->setState(\Magento\Sales\Model\Order::STATE_PROCESSING,true)->setStatus(\Magento\Sales\Model\Order::STATE_PROCESSING)->save();				
-				$order->setCanSendNewEmailFlag(true)->save();
-				$order->setIsCustomerNotified(true)->save();
-				
+				$order->setTotalPaid($response['transaction_amount'])->setState(\Magento\Sales\Model\Order::STATE_PROCESSING,true)->setStatus(\Magento\Sales\Model\Order::STATE_PROCESSING)->setCanSendNewEmailFlag(true)->setIsCustomerNotified(true)->save();
 				if($orderemail)
 					$this->orderSender->send($order);
 				
 				if($geninvoice && $order->canInvoice()) {
 					$invoice = $order->prepareInvoice();
-					$invoice->register();
-					$logger->info('invoice data '.json_encode($invoice->getData()));
-
-					$invoice->save();
-
+					$invoice->register()->setState(\Magento\Sales\Model\Order\Invoice::STATE_PAID)->save();
 					if($emailinvoice) {
 						$objManager = \Magento\Framework\App\ObjectManager::getInstance();
 						$sender = $objManager->get('\Magento\Sales\Model\Order\Email\Sender\InvoiceSender'); 
diff --git a/vendor/payuindia/payu/Helper/Payu.php b/vendor/payuindia/payu/Helper/Payu.php
index 1a3dcd3..3842055 100644
--- a/vendor/payuindia/payu/Helper/Payu.php
+++ b/vendor/payuindia/payu/Helper/Payu.php
@@ -7,7 +7,6 @@ use Magento\Sales\Model\Order;
 use Magento\Framework\App\Helper\AbstractHelper;
 use Magento\Framework\Exception\LocalizedException;
 
-
 class Payu extends AbstractHelper
 {
     private $session;
@@ -29,8 +28,6 @@ class Payu extends AbstractHelper
     protected $payuWebhookCollection;
     protected $customerCollectionFactory;
 
-
-
     public function __construct(
         Context $context,
         \Magento\Checkout\Model\Session $session,
@@ -201,80 +198,4 @@ class Payu extends AbstractHelper
             \Magento\Store\Model\ScopeInterface::SCOPE_STORE
         );
     }
-
-    public function updateOrderFromResponse($order,$params)
-    {
-        if(isset($params['offer']) && isset($params['offer_availed']) && isset($params['transaction_offer']))
-        {
-            $offerArr = $params['transaction_offer'];
-            if (!is_array($offerArr)) {
-                $offerArr = json_decode($offerArr, true);
-            }
-            if(isset($offerArr['offer_data'])){
-                $des=$offerArr['offer_data'];
-                $description=$des[0];
-                $discountDescription="Title - ".$description['offer_title']." | Offer Key - ".$description['offer_key']." |  Type - ".$description['offer_type'];
-                $customDiscount=$offerArr['discount_data']['total_discount'];
-                if($customDiscount > 0){
-                    $this->setDiscount($order,$customDiscount,$discountDescription);
-                }
-            }
-
-        }else{
-            if(isset($params['disc']) && $params['disc']>0)
-            {
-                $discountDescription='Payu Offer';
-                $customDiscount=$params['disc'];
-                $this->setDiscount($order,$customDiscount,$discountDescription);
-            }
-        }
-
-    }
-
-    public function setDiscount($order,$customDiscount,$discountDescription)
-    {
-        $total=$order->getBaseSubtotal();
-        $order->setDiscountAmount($customDiscount);
-        $order->setBaseDiscountAmount($customDiscount);
-        $order->setBaseGrandTotal($order->getBaseGrandTotal()-$customDiscount);
-        $order->setGrandTotal($order->getGrandTotal()-$customDiscount);
-        $order->setDiscountDescription($discountDescription);
-        $shippingAddress = $order->getShippingAddress();
-        if ($shippingAddress) {
-            $shippingAddress->setDiscountAmount($customDiscount);
-            $shippingAddress->setDiscountDescription($discountDescription);
-            $shippingAddress->setBaseDiscountAmount($customDiscount);
-        }
-        $orderBillingAddress = $order->getBillingAddress();
-        $orderBillingAddress->setDiscountAmount($customDiscount);
-        $orderBillingAddress->setDiscountDescription($discountDescription);
-        $orderBillingAddress->setBaseDiscountAmount($customDiscount);
-
-        $order->setSubtotal((float) $order->getSubTotal());
-        $order->setBaseSubtotal((float) $order->getBaseSubtotal());
-        $order->setGrandTotal((float)  $order->getGrandTotal());
-        $order->setBaseGrandTotal((float) $order->getBaseGrandTotal());
-        $order ->save();
-      
-
-        $order->setBaseTotalInvoiced($order->getGrandTotal());
-        $order->setTotalInvoiced($order->getGrandTotal());
-        $payment=$order->getpayment();
-        $payment->setBaseAmountPaid($order->getGrandTotal());
-        $payment->setAmountPaid($order->getGrandTotal());
-        $payment->setBaseAmountOrdered($order->getGrandTotal());
-        $payment->setAmountOrdered($order->getGrandTotal());
-        $payment->save();
-        foreach($order->getAllItems() as $item){
-            $rat=$item->getPriceInclTax()/$total;
-            $ratdisc=abs($customDiscount)*$rat;
-            $discountAmt=($item->getDiscountAmount()+$ratdisc) * $item->getQtyOrdered();
-            $base=($item->getBaseDiscountAmount()+$ratdisc) * $item->getQtyOrdered();
-            $item->setBaseDiscountAmount($base);
-            $item->setDiscountAmount($discountAmt);
-            $item->save();
-        }
-        $order->save();
-    }
-
 }
diff --git a/vendor/payuindia/payu/Model/Payu.php b/vendor/payuindia/payu/Model/Payu.php
index 7f0b34d..9689b05 100644
--- a/vendor/payuindia/payu/Model/Payu.php
+++ b/vendor/payuindia/payu/Model/Payu.php
@@ -380,14 +380,11 @@ class Payu extends \Magento\Payment\Model\Method\AbstractMethod {
 				->setAdditionalInformation('payu_mihpayid', $response['mihpayid'])
 				->setAdditionalInformation('payu_order_status', 'approved');
 				
-				If (isset($response['additionalCharges'])) {
-					$payment->setAdditionalInformation('Additional Charges', (float)$response['additionalCharges']);		
-					$payment->registerCaptureNotification(($response['net_amount_debit']+(float)$response['additionalCharges']),true);
-					$logger->info('response 3');
-					$order->save();
+				if (isset($response['additionalCharges'])) {
+					$payment->setAdditionalInformation('Additional Charges', (float)$response['additionalCharges'])->registerCaptureNotification(($response['amount']+(float)$response['additionalCharges']),true)->save();
 				}
 				else {
-					$payment->registerCaptureNotification($response['net_amount_debit'],true)->save();
+					$payment->registerCaptureNotification($response['amount'],true)->save();
 				}
 				if($this->getConfigData('debuglog')==true)
 					$this->logger->debug($response);					
@@ -402,25 +399,14 @@ class Payu extends \Magento\Payment\Model\Method\AbstractMethod {
 				}
 				
 
-				$order->setTotalPaid($response['net_amount_debit'])->save();
-
-				$order->setState(Order::STATE_PROCESSING,true)->setStatus(Order::STATE_PROCESSING)->save();				
-				
-				$order->setCanSendNewEmailFlag(true)->save();
-				
-				$order->setIsCustomerNotified(true)->save();
-
+				$order->setTotalPaid($response['amount'])->setState(Order::STATE_PROCESSING,true)->setStatus(Order::STATE_PROCESSING)->setCanSendNewEmailFlag(true)->setIsCustomerNotified(true)->save();	
 				
 				if($orderemail)
 					$this->orderSender->send($order);
 				
 				if($geninvoice && $order->canInvoice()) {
 					$invoice = $order->prepareInvoice();
-					$invoice->register();
-					$logger->info('invoice data '.json_encode($invoice->getData()));
-
-					$invoice->save();
-
+					$invoice->register()->save();
 					if($emailinvoice) {
 						$objManager = \Magento\Framework\App\ObjectManager::getInstance();
 						$sender = $objManager->get('\Magento\Sales\Model\Order\Email\Sender\InvoiceSender'); 
@@ -511,8 +497,7 @@ class Payu extends \Magento\Payment\Model\Method\AbstractMethod {
 	{
 		try
 		{
-			$orderId=$order->getId();			
-	
+			$orderId=$order->getId();
 			if($order->canCancel())
 			{
 				$order->setTotalPaid(0); 
