X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/17ede850d9f16aebb63bc52493c07be4c201b3ea..53593baa211863fbf66540cf1bcc36c8fb37257f:/SL/ShopConnector/Shopware6.pm diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index 27c569aa6..6d04a1b33 100644 --- a/SL/ShopConnector/Shopware6.pm +++ b/SL/ShopConnector/Shopware6.pm @@ -701,8 +701,11 @@ sub get_version { sub set_orderstatus { my ($self, $order_id, $transition) = @_; - croak "No order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/; - croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/; + # one state differs + $transition = 'complete' if $transition eq 'completed'; + + croak "No shop order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/; + croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/; my $ret; $ret = $self->connector->POST("/api/_action/order/$order_id/state/$transition"); my $response_code = $ret->responseCode();