0

Does order_creditmemo.create API call ( ie: http://www.magentocommerce.com/api/soap/sales/salesOrderCreditMemo/sales_order_creditmemo.create.html do anything in the way of actually refunding?

It doesn't appear to in a way similar to creating a credit memo online manually does. I am not seeing any credits in paypal manager backend nor when I do the order_invoice.info call for invoices that have been credit memo'd I get the following values:

...
    public 'is_used_for_refund' => null
...

SOLUTION: My solution was to override Magento's exiting credit memo API with one that created the online credit memo. public 'base_total_refunded' => null ...

I really am struggling to figure out how to trigger a refund, via API calls. credit_memo I thought was that right place.

  • I am also struggling with this right now. The method we're trying, available in the api, only does offline refunds. It's the same as if you went to the order and tried to do a refund. Instead, to do an online refund, we have to go to the order, then to it's invoice, and then refund the invoice. That works in the backend, and I think something similar needs to happen programmatically. I'm working on a solution to refund the invoice which does appear to hit the payment processor code, when I get it to work I'll post the answer. I wish it was in the api, it's not. – RightClick Jun 8 '15 at 15:57
1

The refund functionality in the credit memo only provides a hook for Payment Service Provider modules to execute any actual refund.

So it depends on the Payment Service Provider (like Paypal, Ogone, etc) whether a refund is sent to the customer. Check the documentation provided by the payment method or contact the Payment module's developer to find out if they support the online refund option

  • They do support refunds. When manually creating credit memo's refunds are sent and processed correctly by paypal. when memo's are created w/ the api nothing actually gets refunded to paypal. – richv Mar 26 '15 at 16:45
  • Also I looked at the create code for sales_order_creditmemo.create and i do not see anything that would stand out to me as creating a refund. – richv Mar 26 '15 at 16:46
  • the api call he is using does not support magento's "online refund" feature. All signs point to that needing to happen with sales model service order – RightClick Jun 8 '15 at 15:59
  • This is true, i overrode Magento's API to explicitly force online refunds. – richv Jun 17 '15 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.