PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 59 forks source link

Article list faulty or incomplete - Magento API #213

Closed athopen closed 4 years ago

athopen commented 6 years ago

Hello,

i encounter an error in Magento v2.2.6 and your Module v2.2.0.

Reproduce the Problem:

POST https://example.com/rest/V1/order/1/invoice
Accept: application/json
Cache-Control: no-cache
Content-Type: application/json
Authorization: Bearer xyz

{  "capture": true,  "items": [    {      "order_item_id": 1,      "qty": 1      },    {      "order_item_id": 2,      "qty": 2    }  ],  "notify": true }

The response from the Payone-API is "Article list faulty or incomplete".

Shouldn't it be possible to capture only some of the items?

fjbender commented 6 years ago

Do you have the Payone TXID for that transaction? I'll check the logs.

athopen commented 6 years ago

The TXID is 299524879

fjbender commented 6 years ago

For the capture request, all items are sent, but the amount is correct.

Maybe there's a bug in \Payone\Core\Model\Api\Request\Capture::getInvoiceList. I'll see if I can test this further.

athopen commented 6 years ago

@fjbender any news on this issue?

fjbender commented 6 years ago

I couldn't try anything out yet. However, I have the feeling that the problem is here:

https://github.com/PAYONE-GmbH/magento-2/blob/a43fd28a0f7aad62574dcd8871d8cd2c39126b72/Model/Api/Request/Capture.php#L73-L101

This method relies on the Base Helper to pass the invoice parameter from the request:

https://github.com/PAYONE-GmbH/magento-2/blob/a43fd28a0f7aad62574dcd8871d8cd2c39126b72/Helper/Base.php#L107-L116

Is the request and/or parameter available in an API context?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mw-prakash commented 1 year ago

when some extra fee to charge is added it fails. Article list faulty or incomplete