| Total Complexity | 3 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class Confirm extends Base |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Deliver confirmation operation. |
||
| 19 | */ |
||
| 20 | public const OPERATION = Constants::REQUEST_MODEL_DELIVER_CONFIRM; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var \SprykerEco\Zed\Ratepay\Business\Api\Builder\ShoppingBasketInterface |
||
| 24 | */ |
||
| 25 | protected $basket; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param \SprykerEco\Zed\Ratepay\Business\Api\Builder\HeadInterface $head |
||
| 29 | * @param \SprykerEco\Zed\Ratepay\Business\Api\Builder\ShoppingBasketInterface $shoppingBasket |
||
| 30 | */ |
||
| 31 | public function __construct(HeadInterface $head, ShoppingBasketInterface $shoppingBasket) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | protected function buildData() |
||
| 41 | { |
||
| 42 | $this->getHead()->setOperation(static::OPERATION); |
||
| 43 | $paymentRequestData = parent::buildData(); |
||
| 44 | $paymentRequestData['content'] = [ |
||
| 45 | $this->getShoppingBasket()->getRootTag() => $this->getShoppingBasket(), |
||
| 46 | ]; |
||
| 47 | |||
| 48 | return $paymentRequestData; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return \SprykerEco\Zed\Ratepay\Business\Api\Builder\ShoppingBasketInterface |
||
| 53 | */ |
||
| 54 | public function getShoppingBasket() |
||
| 57 | } |
||
| 58 | } |
||
| 59 |