Controller/ApiController.php 1 location
|
@@ 91-100 (lines=10) @@
|
| 88 |
|
* |
| 89 |
|
* @return Payment |
| 90 |
|
*/ |
| 91 |
|
private function findPaymentByOrderIdOrAltapayId($id): Payment |
| 92 |
|
{ |
| 93 |
|
$paymentRepository = $this->get('loevgaard_dandomain_altapay.payment_repository'); |
| 94 |
|
$payment = $paymentRepository->findByOrderIdOrAltapayId($id); |
| 95 |
|
if (!$payment) { |
| 96 |
|
throw $this->createNotFoundException(); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
return $payment; |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
/** |
| 103 |
|
* @return PaymentHandler |
Controller/PaymentController.php 1 location
|
@@ 262-274 (lines=13) @@
|
| 259 |
|
* |
| 260 |
|
* @return Payment |
| 261 |
|
*/ |
| 262 |
|
private function getPaymentFromId(int $paymentId): Payment |
| 263 |
|
{ |
| 264 |
|
$paymentRepository = $this->get('loevgaard_dandomain_altapay.payment_repository'); |
| 265 |
|
|
| 266 |
|
/** @var Payment $payment */ |
| 267 |
|
$payment = $paymentRepository->find($paymentId); |
| 268 |
|
|
| 269 |
|
if (!$payment) { |
| 270 |
|
throw $this->createNotFoundException('Payment with id `'.$paymentId.'` not found'); |
| 271 |
|
} |
| 272 |
|
|
| 273 |
|
return $payment; |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
/** |
| 277 |
|
* @return PaymentHandler |