File tree Expand file tree Collapse file tree
src/Application/Actions/Common/Catalog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66use App \Domain \Service \Catalog \Exception \OrderShippingLimitException ;
77use App \Domain \Service \Catalog \Exception \WrongEmailValueException ;
88use App \Domain \Service \Catalog \Exception \WrongPhoneValueException ;
9+ use App \Domain \Types \ReferenceTypeType ;
910use Doctrine \DBAL \ParameterType ;
1011
1112class CartAction extends CatalogAction
@@ -61,6 +62,9 @@ protected function action(): \Slim\Psr7\Response
6162 $ data ['delivery ' ]['address ' ] = implode (', ' , $ data ['delivery ' ]['address ' ]);
6263 }
6364
65+ // find payment method
66+ $ data ['payment ' ] = $ data ['payment ' ] ? $ this ->referenceService ->read (['uuid ' => $ data ['payment ' ], 'type ' => ReferenceTypeType::TYPE_PAYMENT ]) : null ;
67+
6468 if ($ this ->isRecaptchaChecked ()) {
6569 try {
6670 if (($ limit = $ this ->parameter ('catalog_order_limit ' , 0 )) > 0 ) {
Original file line number Diff line number Diff line change 77use App \Domain \Service \Catalog \OrderService as CatalogOrderService ;
88use App \Domain \Service \Catalog \ProductService as CatalogProductService ;
99use App \Domain \Service \Notification \NotificationService ;
10+ use App \Domain \Service \Reference \ReferenceService ;
1011use App \Domain \Service \User \UserService ;
1112use Psr \Container \ContainerInterface ;
1213
@@ -22,6 +23,8 @@ abstract class CatalogAction extends AbstractAction
2223
2324 protected NotificationService $ notificationService ;
2425
26+ protected ReferenceService $ referenceService ;
27+
2528 public function __construct (ContainerInterface $ container )
2629 {
2730 parent ::__construct ($ container );
@@ -31,5 +34,6 @@ public function __construct(ContainerInterface $container)
3134 $ this ->catalogProductService = $ container ->get (CatalogProductService::class);
3235 $ this ->catalogOrderService = $ container ->get (CatalogOrderService::class);
3336 $ this ->notificationService = $ container ->get (NotificationService::class);
37+ $ this ->referenceService = $ container ->get (ReferenceService::class);
3438 }
3539}
You can’t perform that action at this time.
0 commit comments