Update Order after it has been paid, and send new information to Payment API

2 weeks ago
Hi every one,
I have a payment plugin that includes refunding, updating order details or cancel the order after it's paid.
there are some question:
1- Why editing order in admin panel (like add or remove Items , edit discount,..) doesnt change total amount automatically?
2- after partially Refund, Refund button will be disabled,why?
2 weeks ago
Hi,
1. You need to enable the Automatically update order totals setting at the Admin/Setting/Order under the Order totals section for auto-updating the order totals. There has been some discussion already on the topic and the feature was introduced at Nop3.8 but the setting is disabled by default. You can check this discussion
2. Refund action refunds the entire order amount. So once partially refunded, refund is disabled as you have already refunded some amount and you can't refund all the order total again.
2 weeks ago
Thank you
you are right,I found the Option.
but about refund, My payment Api supports canceling order and returning money to customer,(even ir partially refunded) where do you recommend , calling this method?
2 weeks ago
Think, you can use the partial refund option more than once.
For example, an order with a total of 100 is placed,
1st partial refund: 80
2nd partial refund available = ordertotal - order.refundedAmount: 100-80:20
2 weeks ago
hshadmehr wrote:

2- after partially Refund, Refund button will be disabled,why?


This straightforward rule states that a refund will always return 100% of your money; however, if you utilise a partial refund, it will only return a portion of your money, in which case the 100% refund will be disabled.  

I hope you fully understand now.