mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
98 stars 49 forks source link

[BUG] Issue creating creditmemo for orders with bundle products that are paid with Klarna #755

Closed gjportegies closed 1 month ago

gjportegies commented 4 months ago

Describe the bug Unable to credit orders with bundle products that are paid via Karna.

Mollie.ERROR: error: [2024-03-04T12:39:48+0000] Error executing API call (422: Unprocessable Entity): Cannot create a refund for these lines, the total amount shipped is zero.. Field: lines. Documentation: https://docs.mollie.com/reference/v2/orders-api/create-order-refund [] []

Used versions

To Reproduce Steps to reproduce the behavior:

  1. Go to an order that is completed, has a bundle product and is paid with Klarna.
  2. Click on the invoice and create a creditmemo.
  3. Check the bundle product to refund.
  4. Click on "Refund".
  5. See error

Expected behavior When a creditmemo is created we would expect Mollie to refund the given amound.

Actual behavior The creditmemo is created in the Magento backend, but the order is not refunded in Mollie. Or in most cases an error is thrown:

Mollie.ERROR: error: [2024-03-04T12:39:48+0000] Error executing API call (422: Unprocessable Entity): Cannot create a refund for these lines, the total amount shipped is zero.. Field: lines. Documentation: https://docs.mollie.com/reference/v2/orders-api/create-order-refund [] []

Additional context If an order contains a bundle product combined with other simple or configurable products there is no error thrown in the backend. The problem then is that in Mollie only the simple products are refunded and not the bundle product.

Frank-Magmodules commented 3 months ago

Hi there @gjportegies Thank you for bringing this issue to our attention. Regrettably, we haven't been able to replicate it. We've successfully ordered a bundle product and processed a refund using the default Magento sample data.

Could you attempt this on a clean Magento environment with only the Mollie extension installed? This will help us eliminate any potential interference from other extensions.

Thank you!

Frank-Magmodules commented 3 months ago

Hi There @gjportegies , could you find a moment to review this? As i'm eager to explore this issue with you!

gjportegies commented 3 months ago

@Frank-Magmodules unfortunately I've been sick for quite some time. So I've not yet found the time. But it's on the list.

Frank-Magmodules commented 3 months ago

Oh, that's unfortunate for you @gjportegies , get well soon. We'll leave this open for now.

Frank-Magmodules commented 2 months ago

Hello there, @gjportegies! I hope you're feeling better, of course. Have you managed to reproduce this on the latest version?

gjportegies commented 2 months ago

Hello @Frank-Magmodules, luckily I'm feeling way better.

I've setup a Magento 2.4.6-p5 installation with sample data and am able to reproduce the issue. In this environment I've installed Mollie (2.34.0) and I'm able to reproduce the issue.

Screenshot 2024-04-12 at 12 19 52

https://github.com/mollie/magento2/assets/6707410/894dbe37-0f03-4c0a-997a-d5f445b9d582

gjportegies commented 2 months ago

Product export of the two configurable products and bundle product I've added in the backend:

export_catalog_product_20240415_094237.csv

sku store_view_code attribute_set_code product_type categories product_websites name description short_description weight product_online tax_class_name visibility price special_price special_price_from_date special_price_to_date url_key meta_title meta_keywords meta_description base_image base_image_label small_image small_image_label thumbnail_image thumbnail_image_label swatch_image swatch_image_label created_at updated_at new_from_date new_to_date display_product_options_in map_price msrp_price map_enabled gift_message_available custom_design custom_design_from custom_design_to custom_layout_update page_layout product_options_container msrp_display_actual_price_type country_of_manufacture additional_attributes qty out_of_stock_qty use_config_min_qty is_qty_decimal allow_backorders use_config_backorders min_cart_qty use_config_min_sale_qty max_cart_qty use_config_max_sale_qty is_in_stock notify_on_stock_below use_config_notify_stock_qty manage_stock use_config_manage_stock use_config_qty_increments qty_increments use_config_enable_qty_inc enable_qty_increments is_decimal_divided website_id related_skus related_position crosssell_skus crosssell_position upsell_skus upsell_position additional_images additional_image_labels hide_from_product_page custom_options bundle_price_type bundle_sku_type bundle_price_view bundle_weight_type bundle_values bundle_shipment_type associated_skus downloadable_links downloadable_samples configurable_variations configurable_variation_labels
16.OLUGC0002.BL.200-44 (XS) Default simple base Australian duo jack zwarte borstbies 2.0 zwart - navy-XS 1.000000 1 Taxable Goods Not Visible Individually 169.950000 australian-duo-jack-zwarte-borstbies-2-0-zwart-navy-xs Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy 4/11/24, 3:59 PM 4/11/24, 3:59 PM Block after Info Column No Product -- Full Width Use config size=XS 2.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUGC0002.BL.200-46 (S) Default simple base Australian duo jack zwarte borstbies 2.0 zwart - navy-S 1.000000 1 Taxable Goods Not Visible Individually 169.950000 australian-duo-jack-zwarte-borstbies-2-0-zwart-navy-s Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy 4/11/24, 3:59 PM 4/11/24, 3:59 PM Block after Info Column No Product -- Full Width Use config size=S 2.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUGC0002.BL.200-48 (M) Default simple base Australian duo jack zwarte borstbies 2.0 zwart - navy-M 1.000000 1 Taxable Goods Not Visible Individually 169.950000 australian-duo-jack-zwarte-borstbies-2-0-zwart-navy-m Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy 4/11/24, 3:59 PM 4/11/24, 3:59 PM Block after Info Column No Product -- Full Width Use config size=M 0.0000 0.0000 1 0 0 1 1 1 10000 1 0 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUGC0002.BL.200-50 (L) Default simple base Australian duo jack zwarte borstbies 2.0 zwart - navy-L 1.000000 1 Taxable Goods Not Visible Individually 169.950000 australian-duo-jack-zwarte-borstbies-2-0-zwart-navy-l Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy 4/11/24, 3:59 PM 4/11/24, 3:59 PM Block after Info Column No Product -- Full Width Use config size=L 0.0000 0.0000 1 0 0 1 1 1 10000 1 0 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUGC0002.BL.200-52 (XL) Default simple base Australian duo jack zwarte borstbies 2.0 zwart - navy-XL 1.000000 1 Taxable Goods Not Visible Individually 169.950000 australian-duo-jack-zwarte-borstbies-2-0-zwart-navy-xl Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy 4/11/24, 3:59 PM 4/11/24, 3:59 PM Block after Info Column No Product -- Full Width Use config size=XL 0.0000 0.0000 1 0 0 1 1 1 10000 1 0 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUGC0002.BL.200 Default configurable Default Category/Training,Default Category/Men,Default Category/Women,Default Category/Men/Tops,Default Category/Men/Tops/Jackets,Default Category/Women/Tops,Default Category/Women/Tops/Jackets base Australian duo jack zwarte borstbies 2.0 zwart - navy 1.000000 1 Taxable Goods Catalog, Search australian-duo-jack-zwarte-borstbies-2-0-zwart-navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy Australian duo jack zwarte borstbies 2.0 zwart - navy /1/6/16.olugc0002.bl-200-1.jpg /1/6/16.olugc0002.bl-200-1.jpg /1/6/16.olugc0002.bl-200-1.jpg 4/11/24, 3:59 PM 4/11/24, 4:16 PM Block after Info Column Use config Product -- Full Width Use config 0.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0 /1/6/16.olugc0002.bl-200-1.jpg sku=16.OLUGC0002.BL.200-44 (XS),size=XS sku=16.OLUGC0002.BL.200-46 (S),size=S sku=16.OLUGC0002.BL.200-48 (M),size=M sku=16.OLUGC0002.BL.200-50 (L),size=L sku=16.OLUGC0002.BL.200-52 (XL),size=XL size=Size
16.OLUPA0001.BL.200-44 (XS) Default simple Default Category/Training,Default Category/Men,Default Category/Women base Australian broek met 2 ritsen en zwarte bies 2.0 navy-XS 1.000000 1 Taxable Goods Not Visible Individually 109.950000 australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy-xs Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy 4/11/24, 4:14 PM 4/11/24, 4:14 PM Block after Info Column No Product -- Full Width Use config size=XS 1.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUPA0001.BL.200-46 (S) Default simple Default Category/Training,Default Category/Men,Default Category/Women base Australian broek met 2 ritsen en zwarte bies 2.0 navy-S 1.000000 1 Taxable Goods Not Visible Individually 109.950000 australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy-s Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy 4/11/24, 4:14 PM 4/11/24, 4:14 PM Block after Info Column No Product -- Full Width Use config size=S 0.0000 0.0000 1 0 0 1 1 1 10000 1 0 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUPA0001.BL.200-48 (M) Default simple Default Category/Training,Default Category/Men,Default Category/Women base Australian broek met 2 ritsen en zwarte bies 2.0 navy-M 1.000000 1 Taxable Goods Not Visible Individually 109.950000 australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy-m Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy 4/11/24, 4:14 PM 4/11/24, 4:14 PM Block after Info Column No Product -- Full Width Use config size=M 3.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUPA0001.BL.200-50 (L) Default simple Default Category/Training,Default Category/Men,Default Category/Women base Australian broek met 2 ritsen en zwarte bies 2.0 navy-L 1.000000 1 Taxable Goods Not Visible Individually 109.950000 australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy-l Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy 4/11/24, 4:14 PM 4/11/24, 4:14 PM Block after Info Column No Product -- Full Width Use config size=L 4.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUPA0001.BL.200-52 (XL) Default simple Default Category/Training,Default Category/Men,Default Category/Women base Australian broek met 2 ritsen en zwarte bies 2.0 navy-XL 1.000000 1 Taxable Goods Not Visible Individually 109.950000 australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy-xl Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy 4/11/24, 4:14 PM 4/11/24, 4:14 PM Block after Info Column No Product -- Full Width Use config size=XL 0.0000 0.0000 1 0 0 1 1 1 10000 1 0 1.0000 1 1 1 1 1.0000 1 0 0 0
16.OLUPA0001.BL.200 Default configurable Default Category/Training,Default Category/Men,Default Category/Women,Default Category/Men/Bottoms,Default Category/Men/Bottoms/Pants,Default Category/Women/Bottoms,Default Category/Women/Bottoms/Pants base Australian broek met 2 ritsen en zwarte bies 2.0 navy 1.000000 1 Taxable Goods Catalog, Search australian-broek-met-2-ritsen-en-zwarte-bies-2-0-navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy Australian broek met 2 ritsen en zwarte bies 2.0 navy /a/u/australian_broek_met_2_ritsen_en_zwarte_bies_2.0navy.jpg /a/u/australian_broek_met_2_ritsen_en_zwarte_bies_2.0navy.jpg /a/u/australian_broek_met_2_ritsen_en_zwarte_bies_2.0navy.jpg 4/11/24, 4:14 PM 4/11/24, 4:17 PM Block after Info Column Use config Product -- Full Width Use config 0.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0 /a/u/australian_broek_met_2_ritsen_en_zwarte_bies_2.0navy.jpg sku=16.OLUPA0001.BL.200-44 (XS),size=XS sku=16.OLUPA0001.BL.200-46 (S),size=S sku=16.OLUPA0001.BL.200-48 (M),size=M sku=16.OLUPA0001.BL.200-50 (L),size=L sku=16.OLUPA0001.BL.200-52 (XL),size=XL size=Size
AUSPAKNAVY Default bundle Default Category/Men,Default Category/Men/Tops,Default Category/Men/Bottoms,Default Category/Men/Tops/Jackets,Default Category/Men/Bottoms/Pants,Default Category/Women,Default Category/Women/Tops,Default Category/Women/Bottoms,Default Category/Women/Tops/Jackets,Default Category/Women/Bottoms/Pants,Default Category/Sale,Default Category/What's New base Australian trainingspak zwarte bies zwart - navy 1 Taxable Goods Catalog, Search 269.950000 australian-trainingspak-zwarte-bies-zwart-navy Australian trainingspak zwarte bies zwart - navy Australian trainingspak zwarte bies zwart - navy Australian trainingspak zwarte bies zwart - navy /a/u/auspaknavy_1.png /a/u/auspaknavy_1.png /a/u/auspaknavy_1.png 4/11/24, 4:31 PM 4/11/24, 4:52 PM Block after Info Column Use config Product -- Full Width Use config size=55 cm 0.0000 0.0000 1 0 0 1 1 1 10000 1 1 1.0000 1 1 1 1 1.0000 1 0 0 0 /a/u/auspaknavy_1.png fixed dynamic Price range dynamic name=Jasje,type=select,required=1,sku=16.OLUGC0002.BL.200-44 (XS),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Jasje,type=select,required=1,sku=16.OLUGC0002.BL.200-46 (S),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Jasje,type=select,required=1,sku=16.OLUGC0002.BL.200-48 (M),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Jasje,type=select,required=1,sku=16.OLUGC0002.BL.200-50 (L),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Jasje,type=select,required=1,sku=16.OLUGC0002.BL.200-52 (XL),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Broek,type=select,required=1,sku=16.OLUPA0001.BL.200-44 (XS),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Broek,type=select,required=1,sku=16.OLUPA0001.BL.200-46 (S),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Broek,type=select,required=1,sku=16.OLUPA0001.BL.200-48 (M),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Broek,type=select,required=1,sku=16.OLUPA0001.BL.200-50 (L),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 name=Broek,type=select,required=1,sku=16.OLUPA0001.BL.200-52 (XL),price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=0 together
Frank-Magmodules commented 2 months ago

Thanks for adding this, @gjportegies! With this new information, I'll look into the issue again and keep you updated.

Frank-Magmodules commented 1 month ago

Hi There @gjportegies ,

Thanks to your latest comment, we've successfully reproduced and resolved the issue in our last release! Your detailed information and patience have been really valuable in troubleshooting. I'll mark this issue as closed for now, but please don't hesitate to reopen or comment if necessary. Thanks again!