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

SplitPaymentRefundStrategy.php 1.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<?php
/**
 *                       ######
 *                       ######
 * ############    ####( ######  #####. ######  ############   ############
 * #############  #####( ######  #####. ######  #############  #############
 *        ######  #####( ######  #####. ######  #####  ######  #####  ######
 * ###### ######  #####( ######  #####. ######  #####  #####   #####  ######
 * ###### ######  #####( ######  #####. ######  #####          #####  ######
 * #############  #############  #############  #############  #####  ######
 *  ############   ############  #############   ############  #####  ######
 *                                      ######
 *                               #############
 *                               ############
 *
 * 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>
 */

namespace Adyen\Payment\Model\Config\Source;

class SplitPaymentRefundStrategy implements \Magento\Framework\Option\ArrayInterface
{
    const REFUND_FIRST_PAYEMENT_FIRST = 1;
    const REFUND_LAST_PAYEMENT_FIRST = 2;
    const REFUND_ON_RATIO = 3;

    /**
     * @return array
     */
    public function toOptionArray()
    {
        return $this->getSplitPaymentRefundStrategies();
    }
39

40 41 42 43 44 45 46 47 48 49 50 51
    /**
     * @return array
     */
    public function getSplitPaymentRefundStrategies()
    {
        return [
            self::REFUND_FIRST_PAYEMENT_FIRST => __('Refund from first payment first'),
            self::REFUND_LAST_PAYEMENT_FIRST => 'Refund from last payment first',
            self::REFUND_ON_RATIO => __('refund based on ratio')
        ];
    }
}