Example #1
0
 /**
  * @param DelayedOrRepeatTransaction $txn
  * @return Response
  */
 public function delayedTransactionSuccess(DelayedOrRepeatTransaction $txn)
 {
     $this->state->complete = true;
     $txn->time = time();
     try {
         $txn->validate();
     } catch (\Exception $e) {
         $txn->validationError = $e->getMessage();
     }
     $this->state->successMessage = $this->state->delayedTransactionSuccessCallback->__invoke($txn, $this)->content;
     // Render full component, including parent of basket, if any.
     $root = $this->getRootComponent();
     $root->updateState();
     return $root->render();
 }