<commit_before><?php
/**
 * Created by PhpStorm.
 * User: rikt
 * Date: 11/6/15
 * Time: 2:53 PM
 */

namespace Adyen;


use Adyen\Util\Util;

class DirectoryLookupTest extends TestCase
{
    public function testDirectoryLookup()
    {

        // initialize client
        $client = $this->createClient();
//        $logger = $client->getLogger();

//        $logger->log(
//            'info',
//            'OAuth2 access token refresh with Signed JWT assertion grants.'
//        );

        // intialize service
        $service = new Service\DirectoryLookup($client);


        date_default_timezone_set('UTC');

        $sessionValidity = date(
            DATE_ATOM,
            mktime(date("H") + 10, date("i"), date("s"), date("m"), date("j"), date("Y"))
        );

        // [sessionValidity] => 2015-11-06T15:13:11+00:00

        //CNY retrieves Ideal as well should not be

        $json = '{
              "paymentAmount": "1000",
              "currencyCode": "EUR",
              "merchantReference": "Get Payment methods",
              "skinCode":  "' . $this->_skinCode .'",
              "merchantAccount": "' . $this->_merchantAccount .'",
              "sessionValidity": "'.$sessionValidity.'",
              "countryCode": "NL",
              "shopperLocale": "nl_NL"
            }';


        // calculate string
        $params = json_decode($json, true);

        // calculate the signature
        $hmacKey = $this->_hmacSignature;

        // add signature in request
        $params["merchantSig"] = Util::calculateSha256Signature($hmacKey, $params);
<commit_msg>timezone needs to be set in php.ini so not in the test itself and removed some unused code<commit_after><?php
/**
 * Created by PhpStorm.
 * User: rikt
 * Date: 11/6/15
 * Time: 2:53 PM
 */

namespace Adyen;


use Adyen\Util\Util;

class DirectoryLookupTest extends TestCase
{
    public function testDirectoryLookup()
    {

        // initialize client
        $client = $this->createClient();

        // intialize service
        $service = new Service\DirectoryLookup($client);
        $sessionValidity = date(
            DATE_ATOM,
            mktime(date("H") + 10, date("i"), date("s"), date("m"), date("j"), date("Y"))
        );

        $json = '{
              "paymentAmount": "1000",
              "currencyCode": "EUR",
              "merchantReference": "Get Payment methods",
              "skinCode":  "' . $this->_skinCode .'",
              "merchantAccount": "' . $this->_merchantAccount .'",
              "sessionValidity": "'.$sessionValidity.'",
              "countryCode": "NL",
              "shopperLocale": "nl_NL"
            }';


        // calculate string
        $params = json_decode($json, true);

        // calculate the signature
        $hmacKey = $this->_hmacSignature;

        // add signature in request
        $params["merchantSig"] = Util::calculateSha256Signature($hmacKey, $params);

{'fraction_non_alphanumeric': 0.14812286689419796, 'fraction_numerical': 0.01808873720136519, 'mean_word_length': 2.027892561983471, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 14, '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': '1757911', 'n_tokens_mistral': 887, 'n_tokens_neox': 834, 'n_words': 195}