We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Hpp.php 1.87 KB
Newer Older
1 2
<?php
/**
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *                       ######
 *                       ######
 * ############    ####( ######  #####. ######  ############   ############
 * #############  #####( ######  #####. ######  #############  #############
 *        ######  #####( ######  #####. ######  #####  ######  #####  ######
 * ###### ######  #####( ######  #####. ######  #####  #####   #####  ######
 * ###### ######  #####( ######  #####. ######  #####          #####  ######
 * #############  #############  #############  #############  #####  ######
 *  ############   ############  #############   ############  #####  ######
 *                                      ######
 *                               #############
 *                               ############
 *
 * Adyen Payment module (https://www.adyen.com/)
 *
 * Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
 * See LICENSE.txt for license details.
 *
 * Author: Adyen <magento@adyen.com>
22
 */
23

24 25
namespace Adyen\Payment\Block\Info;

26
class Hpp extends AbstractInfo
27 28 29 30 31 32
{
    /**
     * @var string
     */
    protected $_template = 'Adyen_Payment::info/adyen_hpp.phtml';

33 34 35 36 37
    /**
     * Check if Payment method selection is configured on Adyen or Magento
     *
     * @return mixed
     */
38 39 40 41
    public function isPaymentSelectionOnAdyen()
    {
        return $this->_adyenHelper->getAdyenHppConfigDataFlag('payment_selection_on_adyen');
    }
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

    /**
     * @return null
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function getSplitPayments()
    {
        // retrieve split payments of the order
        $orderPaymentCollection = $this->_adyenOrderPaymentCollectionFactory
            ->create()
            ->addPaymentFilterAscending($this->getInfo()->getId());

        if ($orderPaymentCollection->getSize() > 0) {
            return $orderPaymentCollection;
        } else {
            return null;
        }
    }
60
}