Closed simone-bianco closed 5 months ago
Is refundOrder still working?
`protected function prepareRefundsCollection(array $refunds): CreateRefundCollection { $collectionRefunds = new CreateRefundCollection();
foreach ($refunds as $refund) { $collectionRefund = new CreateRefund(); $collectionRefund->setOrderLineId($refund['order_line_id']); $collectionRefund->setQuantity($refund['quantity']); $collectionRefund->setAmount($refund['amount']); $collectionRefund->setShippingAmount($refund['shipping_amount']); $collectionRefund->setCurrencyIsoCode('EUR'); $collectionRefund->setReasonCode(self::REASON_CODE); $collectionRefunds->add($collectionRefund); } return $collectionRefunds; } /** * @param array $refunds * @return void * @throws ClientException * @throws ApiException */ public function execute(array $refunds): void { $collection = $this->prepareRefundsCollection($refunds); $request = new CreateRefundRequest($collection); $request->setRefunds($collection); /** @var ShopOrderCollection $result */ $this->request(function () use ($request) { return $this->shopApiClient->refundOrder($request); }); }`
Getting: Client error: PUT https://adeo-marketplace.mirakl.net/api/orders/refund?shop_id=xxxx resulted in a 404 Not Found response
PUT https://adeo-marketplace.mirakl.net/api/orders/refund?shop_id=xxxx
404 Not Found
Hi,
I see successful call since you opened the ticket, do you have found the issue?
If not, can you share the content of the collection var_dump($collection)?
var_dump($collection)
Best regards, Alexandre
Is refundOrder still working?
`protected function prepareRefundsCollection(array $refunds): CreateRefundCollection { $collectionRefunds = new CreateRefundCollection();
Getting: Client error:
PUT https://adeo-marketplace.mirakl.net/api/orders/refund?shop_id=xxxx
resulted in a404 Not Found
response