Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function execute($request)
 {
     /* @var $request Capture */
     RequestNotSupportedException::assertSupports($this, $request);
     $details = ArrayObject::ensureArrayObject($request->getModel());
     if (null === $details['URL_RETURN'] && $request->getToken()) {
         $details['URL_RETURN'] = $request->getToken()->getAfterUrl();
     }
     $details['Shop_IDP'] = $this->api->getShopId();
     $details['Signature'] = $this->api->sing($details->toUnsafeArray());
     $details->validatedKeysSet(array('Shop_IDP', 'Order_IDP', 'Subtotal_P', 'Signature', 'Currency', 'Signature'));
     throw new HttpPostRedirect($this->api->getPaymentPageUrl(), $details->toUnsafeArray());
 }