0

I am getting issue with paypal standard on my Magento 1.5.1.0 ,Below is the scenario:

  • I am working with sandbox account
  • After payment , paypal IPN changes my order state to "Processing" from "Pending Payment".
  • Now I go to my paypal account and issue a partial refund like if order total is 20$ , I refund 2$.
  • Now in response Paypal IPN do two things on magento

    1. Change order state to complete [This is the issue it shouldn't change the state to complete because I had done a partial refund from order amount]

    2. Create credit memo of 2$ and send email to customer.

The code I found is :

File : app/code/core/Mage/Paypal/Model/Ipn.php

function : _registerPaymentRefund

Code :

**Here order status is "Processing" checked via Mage::log**

    $payment = $this->_order->getPayment()
                ->setPreparedMessage($this->_createIpnComment($this->_info->explainReasonCode($reason)))
                ->setTransactionId($this->getRequestData('txn_id'))
                ->setParentTransactionId($this->getRequestData('parent_txn_id'))
                ->setIsTransactionClosed($isRefundFinal)
                ->registerRefundNotification(-1 * $this->getRequestData('mc_gross'));

        $this->_order->save();

**Here order status is "Complete" checked via Mage::log**

Below are the screen for more clear view first one is for magento and another one is for paypal :

Screen at magento

screen at paypal

It will be really appreciable if some one can guide me which function in above code changing order state from "Processing" to "Complete"

3
  • I got some sort of solution here magento.stackexchange.com/questions/3405/… , but they are disabling automatic credit memo creation and sending admin notification to create credit memo manually.I want credit memo remain automated,please help guys ?
    – Ravinder
    Aug 14, 2013 at 4:36
  • Hi, If you read the referred question, you will see the persons involved are well experienced in magento, and they came up with the most viable solution. Their reasoning is sound, and I am sure they tried everything to make this automated. You are asking the same thing, thus marking the question as duplicate of that. sorry.
    – ProxiBlue
    Aug 14, 2013 at 15:25
  • Hi.sorry I can't agree.I am trying for fix,not to convert the things for manual processing.any help will be really appreciated to debug this magento core issue.
    – Ravinder
    Aug 14, 2013 at 16:49

0

Browse other questions tagged or ask your own question.