public function getDecorated(): AbstractPaymentMethodRoute
{ return $this->decorated;
} #[Route(path: '/store-api/payment-method', name: 'store-api.payment.method', methods: ['GET', 'POST'], defaults: ['_entity' => 'payment_method'])]
public function load(Request
$request, SalesChannelContext
$context, Criteria
$criteria): PaymentMethodRouteResponse
{ $response =
$this->
getDecorated()->
load($request,
$context,
$criteria);
$response->
getPaymentMethods()->
sortPaymentMethodsByPreference($context);
$this->scriptExecutor->
execute(new PaymentMethodRouteHook( $response->
getPaymentMethods(),
$request->query->
getBoolean('onlyAvailable'
) ||
$request->request->
getBoolean('onlyAvailable'
),
$context ));
return $response;
}}