mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Symfony style error message
This commit is contained in:
parent
fe5ad08276
commit
de668e900a
1 changed files with 2 additions and 2 deletions
|
|
@ -51,14 +51,14 @@ final class AddPaymentRequestHandler implements MessageHandlerInterface
|
|||
'code' => $addPaymentRequest->getPaymentMethodCode(),
|
||||
]);
|
||||
Assert::notNull($paymentMethod, sprintf(
|
||||
'Payment method code "%s", can not be found!',
|
||||
'Payment method (code "%s") not found.',
|
||||
$addPaymentRequest->getPaymentMethodCode(),
|
||||
));
|
||||
/** @var PaymentInterface|null $payment */
|
||||
$payment = $this->paymentRepository->find($addPaymentRequest->getPaymentId());
|
||||
Assert::notNull(
|
||||
$payment,
|
||||
sprintf('Payment ID "%s" can not be found!', $addPaymentRequest->getPaymentId()),
|
||||
sprintf('Payment (id "%s") not found.', $addPaymentRequest->getPaymentId()),
|
||||
);
|
||||
|
||||
$paymentRequest = $this->paymentRequestFactory->createWithPaymentAndPaymentMethod($payment, $paymentMethod);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue