<?php namespace Hypercharge; require_once dirname(__DIR__) . '/test_helper.php'; if (getenv('DEBUG') == '1') { Config::setLogger(new StdoutLogger()); } class TransactionIntegrationTest extends HyperchargeTestCase { function setUp() { $this->credentials(); Config::setIdSeparator('---'); $this->channelToken = $this->credentials->channelTokens->USD; } function fixture($file) { $data = self::schemaRequest($file); $trx = $data['payment_transaction']; $this->injectRedirectUrls($trx, 'transaction'); // move credit card expiration year into the future if (isset($trx['expiration_year'])) { $trx['expiration_year'] = (string) (date('Y') + 2); } // move recurring schedule into the future. otherwise it would be invalid if (isset($trx['recurring_schedule'])) { $start = new \DateTime('now', new \DateTimeZone('UTC')); $start->add(new \DateInterval('P1M')); $trx['recurring_schedule']['start_date'] = $start->format('Y-m-d'); if (!empty($trx['recurring_schedule']['end_date'])) {