File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -241,9 +241,11 @@ public function confirmation(
241
241
//We use the paymentOrder that was stored in the token, as it is the only way to get the paymentOrder
242
242
$ paymentOrder = $ token ->getPaymentOrder ();
243
243
244
+ //Disable confirmation form if already confirmed
245
+ $ formDisabled = $ paymentOrder ->isConfirmed () || $ this ->confirmationHelper ->hasAlreadyConfirmed ($ token ->getConfirmer (), $ paymentOrder );
246
+
244
247
$ form = $ this ->createForm (PaymentOrderConfirmationType::class, null , [
245
- //Disable confirmation form if already confirmed
246
- 'disabled ' => $ paymentOrder ->isConfirmed () || $ this ->confirmationHelper ->hasAlreadyConfirmed ($ token ->getConfirmer (), $ paymentOrder ),
248
+ 'disabled ' => $ formDisabled ,
247
249
]);
248
250
249
251
//Check if the payment order can still be deleted
@@ -282,7 +284,7 @@ public function confirmation(
282
284
283
285
//Handle confirmation form
284
286
$ form ->handleRequest ($ request );
285
- if ($ form ->isSubmitted () && $ form ->isValid ()) {
287
+ if (! $ formDisabled && $ form ->isSubmitted () && $ form ->isValid ()) {
286
288
//Do confirmation
287
289
$ this ->confirmationHelper ->confirm ($ paymentOrder , $ token , $ form ->get ('remark ' )->getData ());
288
290
You can’t perform that action at this time.
0 commit comments