mollie / Shopware6

MIT License
53 stars 54 forks source link

Process for partial refunds with Klarna pay later #234

Closed azngeek closed 2 years ago

azngeek commented 3 years ago

How to do a partial refund for Klarna pay later

I have a customer who ordered 2 Items. The customer payed with Klarna Pay Later. For example:

  1. Item A : 100
  2. Item B: 150

Total: 250

Check for items in ERP

The customer checked, if the items are available in the ERP and unfortunately there was an error so we could not sell Item B. What we want to do now is to refund Item B, so that the customer will not have to pay 250 but only 100. So updating the invoice.

How is this possible?

boxblinkracer commented 3 years ago

Hi @azngeek

thank you for your message

so the 100 can be easily refunded inside the order in the Shopware Administration here is a guide on how to do this https://github.com/mollie/Shopware6/wiki/Refunds

this can also be done inside the Mollie Dashboard.

the "Ship through Mollie" features directly next to the line item in the administration is a legacy feature I think and might not work as expected (just found that a few days ago)

but the thing written above should help you i think so this is also the most important thing, to satisfy the customer and give him his money

the update of the invoice is a plain shopware thing so you might just need to remove that line item in there, or set it as cancelled...

let me know if this helps you

boxblinkracer commented 2 years ago

Hi

I just wanted to reach out and ask if the above did help you? in addition to this, v2.0 brought back Ship through Mollie for single line items and way more features.

azngeek commented 2 years ago

Current state

The refund-feature does not work as expected as you can only refund a dynamic amount but not a specific item. We need to be able to keep a reference of the refunded amount to the any line item in the order.

However this is something which we now understand will be solved in the future by Shopware when a sort of PaymentRefundHandlerInterface is implemented. In the meanwhile this ticket can be closed.

boxblinkracer commented 2 years ago

Hi

yes and no so the reason why the refund is only based on the amount is the problem with promotions.

lets imagine you have a promotion, buy 3 t-shirts and get 1 OFF...(2 x 10 EUR = 20 EUR) now the customer returns 1 t-shirt...what do you do? refund 10 EUR, refund (20/3) EUR...refund nothing because its the free one?...so really depends

technically the problem is. mollie has 2 line items...1 with t-shirts (qty 3 and amount 20) and 1 promotion with amount -10 EUR. so that means we need to combine providing a custom amount and somehow telling Mollie what items and quantities will be done. so we need to see what we can come up with :)

the Shopware solution itself however might not be the final-solution for this...but maybe it helps :) also...we have something planned ;)

azngeek commented 2 years ago

Thanks for the feedback. I still have some feedback about promotions and how this could be solved.

Example Order

  1. Line Item (type=product)
  2. Line Item (type=product)
  3. Line Item (type=promotion). Applied to all products.

Actually the promotion line item contains a composition which contains every applied amount for any affected line item. In that way it is possible to calculate the exact amount you need to refund (in case you want to count in promotions). It is not a technical constraint but a decision, the merchant needs to choose. Just take this random example.

`

... "type": "promotion", "composition": [ { "id": "8baa6926a08f415e880f17b37e402a2f", "discount": 0.8805740999999999, "quantity": 7 }, { "id": "15c081afe4604235aef35234b0ba0a58", "discount": 0.666, "quantity": 4 }, ] ... `

boxblinkracer commented 2 years ago

thank you

hehe funny..the composition is something i'm thinking of integrating in the flow. i'm actually the guy who invented the composition data in the promotions for ERP integrations :)

with technical, i was more relating on building a good UX for the merchant to have all options with the technical requirements in combination :) sorry for being confusing

azngeek commented 2 years ago

Haha okay. This is the parameter we also use for the ERP-exports 👍

So should we keep this ticket opened until the composition-integration is done? We would also alpha/beta-test it :)

boxblinkracer commented 2 years ago

:) great that you use it, makes me happy, thats why it exists

yeah..I think we can keep it open for now :) and thanks, I'll try to reach out if necessary

boxblinkracer commented 2 years ago

theres a new refund manager available now does it solve this issue? because i think so? then i would close this ticket @azngeek ?