/**
  * {@inheritDoc}
  */
 public function onPostExecute(Context $context)
 {
     if ($context->getPrevious()) {
         return;
     }
     /** @var Generic $request */
     $request = $context->getRequest();
     if (false === $request instanceof Generic) {
         return;
     }
     if (false === $request instanceof GetStatusInterface) {
         return;
     }
     /** @var PaymentInterface $payment */
     $payment = $request->getFirstModel();
     if (false === $payment instanceof PaymentInterface) {
         return;
     }
     $context->getGateway()->execute($status = new GetStatus($payment));
     if ($payment->getState() !== $status->getValue()) {
         $this->updatePaymentState($payment, $status->getValue());
     }
 }