PAYONE-GmbH / shopware-6

PAYONE Payment Plugin for Shopware 6
MIT License
16 stars 19 forks source link

PayOne Secure Invoice does not take shipping costs into account when building article list #119

Closed patchee500 closed 3 years ago

patchee500 commented 3 years ago

When sending an authorization or preauthorization request for the secure invoice payment method the article list is not properly assembled. The payone api returns a 1610 - Article list faulty or incomplete. To me this appears to be caused by the shipping costs never being added to the article list. Should be somewhere along \PayonePayment\Payone\Request\SecureInvoice\AbstractSecureInvoiceAuthorizeRequestFactory::getRequestParameters I guess, but I don't see anything the likes of it.

jvarelmann commented 3 years ago

Hello,

we would like to have a deeper look inside this issue can you please contact our tech support with your MID and some examples. tech.support@payone.com

regards Juergen

patchee500 commented 3 years ago

Hello @jvarelmann,

I initially opened a ticket with the techsupport regarding this. They helped me to identify this issue in the first place. You can check out the ticket ref:_00D2pUQoH._500683mqyW:ref. It includes some sample payloads and also error messages that are being thrown. I'm currently short on time to explain the problem in detail and we already fixed it through some custom adjustments, but it basically boils down to the following root cause:

The PayOne Secure Invoice payment method expects that the items of the cart (also vouchers and shipping costs) are being sent over with the authorize/preauthorize requests. It is my understanding that this information can later be used to create an invoice through PayOne (We are not using that btw, so I can't give feedback on if this works). Now the error we encountered was that the individual amounts of the items in the cart didn't match with the order total, which led to a 1610 - Article list faulty or incomplete error from the API. After checking the contents in the cart that were supplied to the API I happened to notice that the shipping costs were missing entirely. After adding them through some custom adjustments it's now working for us.