Skip to content

Commit 0d7d32e

Browse files
authored
Merge pull request #220 from ashtru/master
Provided alternate credentials for tests failing with primary account
2 parents 2b97d53 + 330c789 commit 0d7d32e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ before_script:
1515
script:
1616
- vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover
1717
- cd sample-code-php
18-
- composer install --prefer-dist --ignore-platform-reqs
18+
- composer install --prefer-dist
1919
- vendor/phpunit/phpunit/phpunit test-runner.php .
2020

2121
after_script:

tests/AuthorizeNetAIM_Test.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
class AuthorizeNetAIM_Sandbox_Test extends PHPUnit_Framework_TestCase
44
{
5+
private $alternateApiLoginId = "22Pav9kBpn";
6+
private $alternateTransactionKey = "35vB2T6kkZZW582q";
57

68
public function testAuthCapture()
79
{
@@ -438,12 +440,12 @@ public function testAuthCaptureVoid()
438440

439441
public function testAdvancedAIM()
440442
{
441-
$auth = new AuthorizeNetAIM;
442-
$auth->amount = "45.00";
443+
$auth = new AuthorizeNetAIM($this->alternateApiLoginId, $this->alternateTransactionKey);
444+
$auth->amount = "50.00";
443445

444446
// Use eCheck:
445447
$auth->setECheck(
446-
'121042882',
448+
'125000024',
447449
'123456789123',
448450
'CHECKING',
449451
'Bank of Earth',
@@ -468,12 +470,12 @@ public function testAdvancedAIM()
468470
$auth_code = $response->transaction_id;
469471

470472
// Now capture:
471-
$capture = new AuthorizeNetAIM;
473+
$capture = new AuthorizeNetAIM($this->alternateApiLoginId, $this->alternateTransactionKey);
472474
$capture_response = $capture->priorAuthCapture($auth_code);
473475
$this->assertTrue($capture_response->approved);
474476

475477
// Now void:
476-
$void = new AuthorizeNetAIM;
478+
$void = new AuthorizeNetAIM($this->alternateApiLoginId, $this->alternateTransactionKey);
477479
$void_response = $void->void($capture_response->transaction_id);
478480
$this->assertTrue($void_response->approved);
479481
}

0 commit comments

Comments
 (0)