You are a developer and looking for Shopware projects?
Apply Now!
PaymentMethodNotChangeableException example
/** * @throws PaymentMethodNotChangeableException */
private
function
validatePaymentState
(
OrderEntity
$order
)
: void
{
if
(
$this
->orderService->
isPaymentChangeableByTransactionState
(
$order
)
)
{
return
;
}
throw
new
PaymentMethodNotChangeableException
(
$order
->
getId
(
)
)
;
}
}