public function updateProviderData(Customweb_Payment_ExternalCheckout_IContext $context, array $data) { if (!$context instanceof Customweb_Payment_ExternalCheckout_AbstractContext) { throw new Customweb_Core_Exception_CastException('Customweb_Payment_ExternalCheckout_AbstractContext'); } if ($context->getState() != Customweb_Payment_ExternalCheckout_IContext::STATE_PENDING) { throw new Exception("The external checkout context cannot updated, while the context is already in state COMPLETED or FAILED."); } $context->setProviderData($data); $this->refreshContext($context); $this->entityManager->persist($context, false); }
public function updateProviderData(Customweb_Payment_ExternalCheckout_IContext $context, array $data) { if (!$context instanceof Customweb_SaferpayCw_Model_ExternalCheckoutContext) { throw new Customweb_Core_Exception_CastException('Customweb_SaferpayCw_Model_ExternalCheckoutContext'); } $context->setState(Customweb_Payment_ExternalCheckout_IContext::STATE_PENDING); $context->setProviderData($data); $this->refreshContext($context); $context->save(); }