-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'task/6.0-dev/RATEPLUG-176_bidirectionality' into 6.0
* task/6.0-dev/RATEPLUG-176_bidirectionality: RATEPLUG-176: bidirectionality: fix order-fetch issues
- Loading branch information
Showing
6 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
|
||
namespace RpayRatePay\Exception; | ||
|
||
|
||
use Throwable; | ||
|
||
class RatepayException extends \Exception | ||
{ | ||
|
||
private $context; | ||
|
||
public function __construct($message = "", $code = 0, Throwable $previous = null, $context = []) | ||
{ | ||
parent::__construct($message, $code, $previous); | ||
$this->context = $context; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getContext() | ||
{ | ||
return $this->context; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
|
||
namespace RpayRatePay\Exception; | ||
|
||
|
||
use Shopware\Models\Order\Detail; | ||
use Shopware\Models\Order\Order; | ||
|
||
class RatepayPositionNotFoundException extends RatepayException | ||
{ | ||
|
||
/** | ||
* @param Order $order | ||
* @param Detail $detail | ||
* @param string $expectedClass | ||
*/ | ||
public function __construct(Order $order, Detail $detail, $expectedClass) | ||
{ | ||
parent::__construct('Ratepay position for order detail has not been found.', null, null, [ | ||
'order_id' => $order->getId(), | ||
'order_number' => $order->getNumber(), | ||
'order_detail_id' => $detail->getId(), | ||
'expected_model' => $expectedClass | ||
]); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters