Closed patchee500 closed 6 months ago
Hello @patchee500 ,
Thank you for the message.
In order to be able to take a closer look at the case, our colleagues from technical support need more detailed information about this transaction (e.g. the mid and the exact date). I would therefore ask you to send the case by e-mail to tech.support@payone.com.
Thank you very much.
I'll not contact the Payone support. This will lead nowhere like it did with https://github.com/PAYONE-GmbH/shopware-6/issues/119 (Which we then patched ourselves until it was fixed in 3.2.0)
The described problem is most certainly an issue with the plugin and not with Payone. It should be reproducible easily, following the described steps above.
Luckily it is rather an edge case for us, so we'll simply live with it and ignore it for now.
This behavior has been observed with the
payone_secure_invoice_payment_handler
payment method. Shopware Version is 6.5.8.5, Plugin Version is 3.0.0.Steps to reproduce:
Configure
payone_secure_invoice_payment_handler
payment method to work in preauthorization mode. Configure shop to use shipping costs, e.g. 6€ for each order. Configure a discount rule that grants a (fixed) discount on the shipping costs, e.g. -4€.Carry out some order (make sure the discount is applied) and wait for webhook response, marking order ready for capture. Try to capture the order, e.g. via the Shopware Admin interface.
Expected behavior:
Order should be captured fine and capture should be visible in Payone Merchant Interface.
Actual behavior:
Order is not captured. Capture Request ist sent to Payone but returns with Error 1610 "Article list faulty or incomplete".
I guess the problem here is that the logic to assemble the cart contents that are sent over to Payone do not add up properly due to the discount being a 0.00 (€) value item. For discounts on shipping costs the discount value (so the -4€ from the example above) is not held as a negative amount in a line item (there is a line item, but it's value is 0.00) but rather in an additional delivery (There will then be two deliveries for one order).
Here is an example of an order that I tested:
Line Items (values include vat):
1: Some Product: 73,52 2: Discount on Cart: -11,03 3: Discount on Shipping: -4,00
Shipping Costs: 10,98 Order Total: 69,47
The payload that is being sent over to Payone for this order looks like this:
As can be seen from the above payload, there is no mention of the shipping discount (It should be -400 somewhere). 7352 - 1103 + 1098 equal 7347 and not the 6947 that are being sent over as
amount
. A deduction of -400 is missing and thus the complaint from Payone seems valid. If I place the same order without the shipping discount, the order can be captured without issues.