src/Controller/Checkout/ShowAvailablePaymentMethodsAction.php 1 location
|
@@ 63-75 (lines=13) @@
|
| 60 |
|
* |
| 61 |
|
* @return Response |
| 62 |
|
*/ |
| 63 |
|
public function __invoke(Request $request) |
| 64 |
|
{ |
| 65 |
|
/** @var OrderInterface $cart */ |
| 66 |
|
$cart = $this->cartRepository->findOneBy(['tokenValue' => $request->attributes->get('token')]); |
| 67 |
|
|
| 68 |
|
$payments = []; |
| 69 |
|
|
| 70 |
|
foreach ($cart->getPayments() as $payment) { |
| 71 |
|
$payments['payments'][] = $this->getPaymentMethods($payment, $cart->getLocaleCode()); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
return $this->viewHandler->handle(View::create($payments)); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
/** |
| 78 |
|
* @param PaymentInterface $payment |
src/Controller/Checkout/ShowAvailableShippingMethodsAction.php 1 location
|
@@ 63-75 (lines=13) @@
|
| 60 |
|
* |
| 61 |
|
* @return Response |
| 62 |
|
*/ |
| 63 |
|
public function __invoke(Request $request) |
| 64 |
|
{ |
| 65 |
|
/** @var OrderInterface $cart */ |
| 66 |
|
$cart = $this->cartRepository->findOneBy(['tokenValue' => $request->attributes->get('token')]); |
| 67 |
|
|
| 68 |
|
$shipments = []; |
| 69 |
|
|
| 70 |
|
foreach ($cart->getShipments() as $shipment) { |
| 71 |
|
$shipments['shipments'][] = $this->getCalculatedShippingMethods($shipment, $cart->getLocaleCode()); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
return $this->viewHandler->handle(View::create($shipments)); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
/** |
| 78 |
|
* @param ShipmentInterface $shipment |