@param \Generated\Shared\Transfer\PayoneCancelRedirectTransfer $cancelRedirectTransfer

@return \Generated\Shared\Transfer\PayoneCancelRedirectTransfer
541320
public function cancelRedirectAction(PayoneCancelRedirectTransfer $cancelRedirectTransfer)
    {
        $urlHmacGenerator = $this->getFactory()->createUrlHmacGenerator();
        $hash = $urlHmacGenerator->hash(
            $cancelRedirectTransfer->getOrderReference(),
            $this->getFactory()->getConfig()->getRequestStandardParameter()->getKey()
        );

        if ($cancelRedirectTransfer->getUrlHmac() === $hash) {
            $orderItems = SpySalesOrderItemQuery::create()
                ->useOrderQuery()
                ->filterByOrderReference($cancelRedirectTransfer->getOrderReference())
                ->endUse()
                ->find();

            $this->getFactory()->getOmsFacade()->triggerEvent('cancel redirect', $orderItems, []);
        }

        return $cancelRedirectTransfer;
    }
47225
public function queryTransfers($partner_trade_no)
    {
        $pay = new Transfers($this->config->get());
        return $pay->query($partner_trade_no);
    }
394840
public function setMustReturnTransfer(bool $must_return_transfer = true)
    {
        $this->must_return_transfer = $must_return_transfer;
        curl_setopt($this->connection, CURLOPT_RETURNTRANSFER, $must_return_transfer);

        return $this;
    }
913376
public function cancelation(Request $request)
    {
        $em = $this->container->get('doctrine')->getManager();
        if( $request->get('token') != '' ){
            //Search on transaction paymentDetails the $paymentId
            $token = $request->get('token');
            $transaction = $em->getRepository('EcommerceBundle:Transaction')->findOnPaymentDetails($token);
            //UPDATE TRANSACTION
            if($transaction instanceof Transaction){
                $transaction->setStatus(Transaction::STATUS_CANCELLED);
                $em->flush();
            }

            $this->container->get('session')->getFlashBag()->add(
                'danger',
                'transaction.cancel'
            );
            
            return $this->redirect($this->generateUrl('core_profile_index', array('transactions' => true)));
            
        }
    }
159531
public function sendAddressCheckRequest(QuoteTransfer $quoteTransfer): AddressCheckResponseTransfer
    {
        $requestContainer = $this->riskCheckMapper->mapAddressCheck($quoteTransfer);
        $response = $this->executionAdapter->sendRequest($requestContainer);

        $responseContainer = $this->riskCheckFactory->createAddressCheckResponseContainer();
        $responseContainer->init($response);

        $addressCheckResponseTransfer = new AddressCheckResponseTransfer();
        $addressCheckResponseTransfer->setStatus($responseContainer->getStatus());
        $addressCheckResponseTransfer->setStreetName($responseContainer->getStreetName());
        $addressCheckResponseTransfer->setStreetNumber($responseContainer->getStreetNumber());
        $addressCheckResponseTransfer->setZip($responseContainer->getZip());
        $addressCheckResponseTransfer->setCity($responseContainer->getCity());
        $addressCheckResponseTransfer->setSecStatus($responseContainer->getSecstatus());
        $addressCheckResponseTransfer->setPersonStatus($responseContainer->getPersonstatus());

        if ($responseContainer->getCustomermessage() !== null) {
            $addressCheckResponseTransfer->setCustomerMessage($responseContainer->getCustomermessage());
        }

        return $addressCheckResponseTransfer;
    }
251955
protected function setPaymentSuccessIncludePath(QuoteTransfer $quoteTransfer)
    {
        $quoteTransfer->requirePayment()->getPayment()->setSummaryIncludePath(self::CHECKOUT_INCLUDE_SUMMARY_PATH);
        $quoteTransfer->requirePayment()->getPayment()->setSuccessIncludePath(self::CHECKOUT_INCLUDE_SUCCESS_PATH);
    }
115857
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requirePaymentMethodsRequest();

        $adyenApiRequestTransfer
            ->getPaymentMethodsRequest()
            ->requireMerchantAccount()
            ->requireChannel()
            ->requireAmount();

        $adyenApiRequestTransfer
            ->getPaymentMethodsRequest()
            ->getAmount()
            ->requireCurrency()
            ->requireValue();
    }
829244
public function setStockTransfer(\Flowcode\ShopBundle\Entity\StockTransfer $stockTransfer = null)
    {
        $this->stockTransfer = $stockTransfer;

        return $this;
    }
73810
public function getData(AbstractTransfer $quoteTransfer): QuoteTransfer
    {
        if ($quoteTransfer->getPayment() === null) {
            $paymentTransfer = new PaymentTransfer();
            $paymentTransfer->setPayone(new PayonePaymentTransfer());
            $quoteTransfer->setPayment($paymentTransfer);
        }

        return $quoteTransfer;
    }
847686
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requirePaymentDetailsRequest();

        $adyenApiRequestTransfer
            ->getPaymentDetailsRequest()
            ->requirePaymentData()
            ->requireDetails();
    }
1133647
protected function getPayment(OrderTransfer $orderTransfer)
    {
        $payment = $this->queryContainer->createPaymentByOrderId($orderTransfer->getIdSalesOrder())->findOne();
        $paymentDetail = $payment->getSpyPaymentPayoneDetail();

        $paymentDetailTransfer = new PaymentDetailTransfer();
        $paymentDetailTransfer->fromArray($paymentDetail->toArray(), true);

        $paymentTransfer = new PayonePaymentTransfer();
        $paymentTransfer->fromArray($payment->toArray(), true);
        $paymentTransfer->setPaymentDetail($paymentDetailTransfer);

        return $paymentTransfer;
    }
1349166
public function request(AdyenApiRequestTransfer $requestTransfer): AdyenApiResponseTransfer
    {
        $requestData = $this->mapper->buildRequestArray($requestTransfer);
        $isSuccess = true;

        try {
            $response = $this->adapter->sendRequest($requestData);
        } catch (RequestException $requestException) {
            $response = $requestException->getResponse();
            $isSuccess = false;
        }

        return $this->converter->convertToResponseTransfer($response, $isSuccess);
    }
1129105
public function isAuthorizationError(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_AUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_ERROR
        );
    }
190014
public function queryTransFresBank($partner_trade_no)
    {
        $pay = new TransfersBank($this->config->get());
        return $pay->query($partner_trade_no);
    }
651765
public function mapCreditCardCheck(PayoneCreditCardTransfer $payoneCreditCardTransfer)
    {
        $creditCardCheckContainer = new CreditCardCheckContainer();

        $creditCardCheckContainer->setAid($this->getStandardParameter()->getAid());
        $creditCardCheckContainer->setCardPan($payoneCreditCardTransfer->getCardPan());
        $creditCardCheckContainer->setCardType($payoneCreditCardTransfer->getCardType());
        $creditCardCheckContainer->setCardExpireDate($payoneCreditCardTransfer->getCardExpireDate());
        $creditCardCheckContainer->setCardCvc2($payoneCreditCardTransfer->getCardCvc2());
        $creditCardCheckContainer->setCardIssueNumber($payoneCreditCardTransfer->getCardIssueNumber());
        $creditCardCheckContainer->setStoreCardData($payoneCreditCardTransfer->getStoreCardData());
        $creditCardCheckContainer->setLanguage($this->getStandardParameter()->getLanguage());

        return $creditCardCheckContainer;
    }
296496
public function execute($returnTransfer = TRUE) {
        //Need transfer return
        if($returnTransfer === TRUE) {
            $this->setOption(CURLOPT_RETURNTRANSFER, 1);
        }

        $result = curl_exec($this->handler);

        //Error handling
        if(curl_errno($this->handler)) {
            $format = [curl_errno($this->handler), curl_error($this->handler)];
            $this->close();
            throw RuntimeException::createByFormat('Error executing request, error code: %s, Message: %s', $format);
        }

        return $result;
    }
675237
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requireCaptureRequest();

        $adyenApiRequestTransfer
            ->getCaptureRequest()
            ->requireModificationAmount()
            ->requireMerchantAccount()
            ->requireOriginalReference();

        $adyenApiRequestTransfer
            ->getCaptureRequest()
            ->getModificationAmount()
            ->requireCurrency()
            ->requireValue();
    }