<commit_before><?php
/*
 * This file is part of the Marlon Ogone package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Ogone;

use InvalidArgumentException;
use RuntimeException;
use BadMethodCallException;

abstract class AbstractRequest implements Request {

    protected $brandsmap = array(
        'Acceptgiro' => 'Acceptgiro',
        'AIRPLUS' => 'CreditCard',
        'American Express' => 'CreditCard',
        'Aurora' => 'CreditCard',
        'Aurore' => 'CreditCard',
        'Bank transfer' => 'Bank transfer',
        'BCMC' => 'CreditCard',
        'Belfius Direct Net' => 'Belfius Direct Net',
        'Billy' => 'CreditCard',
        'cashU' => 'cashU',
        'CB' => 'CreditCard',
        'CBC Online' => 'CBC Online',
        'CENTEA Online' => 'CENTEA Online',
        'Cofinoga' => 'CreditCard',
        'Dankort' => 'CreditCard',
        'Dexia Direct Net' => 'Dexia Direct Net',
        'Diners Club' => 'CreditCard',
        'Direct Debits AT' => 'Direct Debits AT',
        'Direct Debits DE' => 'Direct Debits DE',
        'Direct Debits NL' => 'Direct Debits NL',
        'eDankort' => 'eDankort',
        'EPS' => 'EPS',
        'Fortis Pay Button' => 'Fortis Pay Button',
        'giropay' => 'giropay',
        'iDEAL' => 'iDEAL',
        'ING HomePay' => 'ING HomePay',
        'InterSolve' => 'InterSolve',
        'JCB' => 'CreditCard',
        'KBC Online' => 'KBC Online',
        'Maestro' => 'CreditCard',
        'MaestroUK' => 'CreditCard',
        'MasterCard' => 'CreditCard',
        'MiniTix' => 'MiniTix',
        'MPASS' => 'MPASS',
        'NetReserve' => 'CreditCard',
        'Payment on Delivery' => 'Payment on Delivery',
        'PAYPAL' => 'PAYPAL',
        'paysafecard' => 'paysafecard',
        'PingPing' => 'PingPing',
        'PostFinance + card' => 'PostFinance Card',
        'PostFinance e-finance' => 'PostFinance e-finance',
        'PRIVILEGE' => 'CreditCard',
        'Sofort Uberweisung' => 'DirectEbanking',
        'Solo' => 'CreditCard',
        'TUNZ' => 'TUNZ',
        'UATP' => 'CreditCard',
        'UNEUROCOM' => 'UNEUROCOM',
        'VISA' => 'CreditCard',
        'Wallie' => 'Wallie',
    );

    /** @var ShaComposer */
    protected $shaComposer;

    protected $ogoneUri;

    protected $parameters = array();

    /** Note this is public to allow easy modification, if need be. */
    public $allowedlanguages = array(
        'en_US' => 'English', 'cs_CZ' => 'Czech', 'de_DE' => 'German',
        'dk_DK' => 'Danish', 'el_GR' => 'Greek', 'es_ES' => 'Spanish',
        'fr_FR' => 'French', 'it_IT' => 'Italian', 'ja_JP' => 'Japanese',
        'nl_BE' => 'Flemish', 'nl_NL' => 'Dutch', 'no_NO' => 'Norwegian',
        'pl_PL' => 'Polish', 'pt_PT' => 'Portugese', 'ru_RU' => 'Russian',
        'se_SE' => 'Swedish', 'sk_SK' => 'Slovak', 'tr_TR' => 'Turkish'
    );

    protected $ogoneFields = array(
        'pspid', 'orderid', 'com', 'amount', 'currency', 'language', 'cn', 'email',
        'ownerzip', 'owneraddress', 'ownercty', 'ownertown', 'ownertelno', 'accepturl',
        'declineurl', 'exceptionurl', 'cancelurl', 'backurl', 'complus', 'paramplus', 'pm',
        'brand', 'title', 'bgcolor', 'txtcolor', 'tblbgcolor', 'tbltxtcolor', 'buttonbgcolor',
        'buttontxtcolor', 'logo', 'fonttype', 'tp', 'paramvar'
    );

    /** @return string */
    public function getShaSign()
    {
        return $this->shaComposer->compose($this->toArray());
    }

    /** @return string */
    public function getOgoneUri()
    {
        return $this->ogoneUri;
    }

    /** Ogone uri to send the customer to. Usually PaymentRequest::TEST or PaymentRequest::PRODUCTION */
    public function setOgoneUri($ogoneUri)
    {
        $this->validateOgoneUri($ogoneUri);<commit_msg>Added mising fields for directLink without alias<commit_after><?php
/*
 * This file is part of the Marlon Ogone package.
 *
 * (c) Marlon BVBA <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Ogone;

use InvalidArgumentException;
use RuntimeException;
use BadMethodCallException;

abstract class AbstractRequest implements Request {

    protected $brandsmap = array(
        'Acceptgiro' => 'Acceptgiro',
        'AIRPLUS' => 'CreditCard',
        'American Express' => 'CreditCard',
        'Aurora' => 'CreditCard',
        'Aurore' => 'CreditCard',
        'Bank transfer' => 'Bank transfer',
        'BCMC' => 'CreditCard',
        'Belfius Direct Net' => 'Belfius Direct Net',
        'Billy' => 'CreditCard',
        'cashU' => 'cashU',
        'CB' => 'CreditCard',
        'CBC Online' => 'CBC Online',
        'CENTEA Online' => 'CENTEA Online',
        'Cofinoga' => 'CreditCard',
        'Dankort' => 'CreditCard',
        'Dexia Direct Net' => 'Dexia Direct Net',
        'Diners Club' => 'CreditCard',
        'Direct Debits AT' => 'Direct Debits AT',
        'Direct Debits DE' => 'Direct Debits DE',
        'Direct Debits NL' => 'Direct Debits NL',
        'eDankort' => 'eDankort',
        'EPS' => 'EPS',
        'Fortis Pay Button' => 'Fortis Pay Button',
        'giropay' => 'giropay',
        'iDEAL' => 'iDEAL',
        'ING HomePay' => 'ING HomePay',
        'InterSolve' => 'InterSolve',
        'JCB' => 'CreditCard',
        'KBC Online' => 'KBC Online',
        'Maestro' => 'CreditCard',
        'MaestroUK' => 'CreditCard',
        'MasterCard' => 'CreditCard',
        'MiniTix' => 'MiniTix',
        'MPASS' => 'MPASS',
        'NetReserve' => 'CreditCard',
        'Payment on Delivery' => 'Payment on Delivery',
        'PAYPAL' => 'PAYPAL',
        'paysafecard' => 'paysafecard',
        'PingPing' => 'PingPing',
        'PostFinance + card' => 'PostFinance Card',
        'PostFinance e-finance' => 'PostFinance e-finance',
        'PRIVILEGE' => 'CreditCard',
        'Sofort Uberweisung' => 'DirectEbanking',
        'Solo' => 'CreditCard',
        'TUNZ' => 'TUNZ',
        'UATP' => 'CreditCard',
        'UNEUROCOM' => 'UNEUROCOM',
        'VISA' => 'CreditCard',
        'Wallie' => 'Wallie',
    );

    /** @var ShaComposer */
    protected $shaComposer;

    protected $ogoneUri;

    protected $parameters = array();

    /** Note this is public to allow easy modification, if need be. */
    public $allowedlanguages = array(
        'en_US' => 'English', 'cs_CZ' => 'Czech', 'de_DE' => 'German',
        'dk_DK' => 'Danish', 'el_GR' => 'Greek', 'es_ES' => 'Spanish',
        'fr_FR' => 'French', 'it_IT' => 'Italian', 'ja_JP' => 'Japanese',
        'nl_BE' => 'Flemish', 'nl_NL' => 'Dutch', 'no_NO' => 'Norwegian',
        'pl_PL' => 'Polish', 'pt_PT' => 'Portugese', 'ru_RU' => 'Russian',
        'se_SE' => 'Swedish', 'sk_SK' => 'Slovak', 'tr_TR' => 'Turkish'
    );

    protected $ogoneFields = array(
        'pspid', 'orderid', 'com', 'amount', 'currency', 'language', 'cn', 'email',
        'cardno', 'cvc', 'ed', 'ownerzip', 'owneraddress', 'ownercty', 'ownertown',
        'ownertelno', 'accepturl', 'declineurl', 'exceptionurl', 'cancelurl', 'backurl',
        'complus', 'paramplus', 'pm', 'brand', 'title', 'bgcolor', 'txtcolor', 'tblbgcolor',
        'tbltxtcolor', 'buttonbgcolor', 'buttontxtcolor', 'logo', 'fonttype', 'tp', 'paramvar'
    );

    /** @return string */
    public function getShaSign()
    {
        return $this->shaComposer->compose($this->toArray());
    }

    /** @return string */
    public function getOgoneUri()
    {
        return $this->ogoneUri;
    }

    /** Ogone uri to send the customer to. Usually PaymentRequest::TEST or PaymentRequest::PRODUCTION */
    public function setOgoneUri($ogoneUri)
    {
        $this->validateOgoneUri($ogoneUri);
{'fraction_non_alphanumeric': 0.17816605024869278, 'fraction_numerical': 0.0, 'mean_word_length': 2.72541567695962, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 152, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3076465', 'n_tokens_mistral': 2726, 'n_tokens_neox': 2598, 'n_words': 639}