PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / Payment / OrderManager.php

OrderManager.php in The Innovative Form Builder – IvyForms 1.5.1, at backend/src/Services/Payment/OrderManager.php

32 lines 809 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Services\Payment;
4
5 use IvyForms\Entity\Payment\Order;
6 use IvyForms\Repository\Payment\OrderRepositoryInterface;
7
8 class OrderManager
9 {
10 private OrderRepositoryInterface $orderRepository;
11
12 public function __construct(OrderRepositoryInterface $orderRepository)
13 {
14 $this->orderRepository = $orderRepository;
15 }
16
17 public function createOrder(Order $order): int
18 {
19 return $this->orderRepository->add($order);
20 }
21
22 public function getOrderBySquareOrderId(string $squareOrderId): ?Order
23 {
24 return $this->orderRepository->getBySquareOrderId($squareOrderId);
25 }
26
27 public function updateOrderStatus(string $squareOrderId, string $status): bool
28 {
29 return $this->orderRepository->updateStatus($squareOrderId, $status);
30 }
31 }
32