Revision fe8d8d4f
Von Jan Büren vor fast 3 Jahren hinzugefügt
SL/ShopConnector/Shopware6.pm | ||
---|---|---|
701 | 701 |
sub set_orderstatus { |
702 | 702 |
my ($self, $order_id, $transition) = @_; |
703 | 703 |
|
704 |
croak "No order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/; |
|
705 |
croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/; |
|
704 |
croak "No shop order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/;
|
|
705 |
croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/;
|
|
706 | 706 |
my $ret; |
707 | 707 |
$ret = $self->connector->POST("/api/_action/order/$order_id/state/$transition"); |
708 | 708 |
my $response_code = $ret->responseCode(); |
Auch abrufbar als: Unified diff
Shopware6: Bessere Fehlermeldung, falls es im Frontend aufschlägt