diff --git a/src/services/Xml.php b/src/services/Xml.php index c794704..0cbe49a 100644 --- a/src/services/Xml.php +++ b/src/services/Xml.php @@ -59,7 +59,7 @@ public function generateXml(array $commerceOrders, int $pageCount): string $firstFailedOrder = $failed->first(); $firstErrrors = $firstFailedOrder->getFirstErrors(); $attribute = key($firstErrrors); - $value = reset($firstErrrors[$attribute]); + $value = reset($firstErrrors); throw new \RuntimeException("Invalid Order ID {$firstFailedOrder->getOrderId()}: {$attribute} - {$value}"); }