yield SalesChannelException::LANGUAGE_NOT_FOUND =>
[ 'exception' => SalesChannelException::
languageNotFound('myCustomLanguage'
),
'statusCode' => Response::HTTP_PRECONDITION_FAILED,
'errorCode' => SalesChannelException::LANGUAGE_NOT_FOUND,
'message' => 'The language "myCustomLanguage" was not found.',
];
if (!Feature::
isActive('v6.6.0.0'
)) { yield 'payment method not found exception' =>
[ 'exception' => SalesChannelException::
unknownPaymentMethod('myCustomPaymentMethod'
),
'statusCode' => Response::HTTP_NOT_FOUND,
'errorCode' => 'CHECKOUT__UNKNOWN_PAYMENT_METHOD',
'message' => 'The payment method myCustomPaymentMethod could not be found.',
];
} else { yield 'payment method not found exception' =>
[ 'exception' => SalesChannelException::
unknownPaymentMethod('myCustomPaymentMethod'
),
'statusCode' => Response::HTTP_BAD_REQUEST,
'errorCode' => 'CHECKOUT__UNKNOWN_PAYMENT_METHOD',
'message' => 'The payment method myCustomPaymentMethod could not be found.',
];
}