Skip to content

Commit

Permalink
updated status action
Browse files Browse the repository at this point in the history
  • Loading branch information
David Höck committed Jun 3, 2020
1 parent aa4bd2c commit 6fb00df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Action/StatusAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function execute($request)

/** @var MollieApiClient $mollie */
$mollie = $this->api->getMollieApi();
$status = null;

if ($details[MollieDetails::ORDER_ID]) {
$mollieOrder = $mollie->orders->get($details[MollieDetails::ORDER_ID]);
Expand All @@ -40,9 +41,8 @@ public function execute($request)
$details[MollieDetails::LINES] = $mollieOrder->lines;
}

$status = $details[MollieDetails::STATUS];

if ($status == OrderStatus::STATUS_SHIPPING) {
if (null == $status) {
$request->markNew();
return;
}

Expand All @@ -52,6 +52,7 @@ public function execute($request)
break;
case OrderStatus::STATUS_COMPLETED:
case OrderStatus::STATUS_PAID:
case OrderStatus::STATUS_SHIPPING:
$request->markCaptured();
break;
case OrderStatus::STATUS_AUTHORIZED:
Expand Down

0 comments on commit 6fb00df

Please sign in to comment.