-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9599204
commit 456db2f
Showing
12 changed files
with
194 additions
and
97 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<xml> | ||
<releaseNumber>11.0.1</releaseNumber> | ||
<releaseNumber>11.0.2</releaseNumber> | ||
</xml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
test/Integration/Gateways/Terminals/PAX/PaxExceptionTests.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace GlobalPayments\Api\Tests\Integration\Gateways\Terminals\PAX; | ||
|
||
use GlobalPayments\Api\Services\DeviceService; | ||
use GlobalPayments\Api\Terminals\ConnectionConfig; | ||
use GlobalPayments\Api\Entities\Enums\PaymentMethodType; | ||
use GlobalPayments\Api\Terminals\Enums\{ConnectionModes, DeviceType}; | ||
use GlobalPayments\Api\Tests\Integration\Gateways\Terminals\RequestIdProvider; | ||
use GlobalPayments\Api\Tests\Integration\Gateways\Terminals\LogManagement; | ||
use GlobalPayments\Api\Terminals\Enums\CurrencyType; | ||
use PHPUnit\Framework\ExpectationFailedException; | ||
use PHPUnit\Framework\TestCase; | ||
use SebastianBergmann\RecursionContext\InvalidArgumentException; | ||
|
||
class PaxExceptionTests extends TestCase { | ||
private $device; | ||
|
||
public function setup(): void | ||
{ | ||
$this->device = DeviceService::create($this->getConfig()); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
sleep(3); | ||
} | ||
|
||
protected function getConfig() | ||
{ | ||
$config = new ConnectionConfig(); | ||
$config->ipAddress = '192.168.1.10'; | ||
$config->port = '10009'; | ||
$config->deviceType = DeviceType::PAX_S300; | ||
$config->connectionMode = ConnectionModes::TCP_IP; | ||
$config->timeout = 10; | ||
$config->requestIdProvider = new RequestIdProvider(); | ||
$config->logManagementProvider = new LogManagement(); | ||
|
||
return $config; | ||
} | ||
|
||
public function testCreditSaleExpiredCard() | ||
{ | ||
$response = $this->device->sale(10.32) | ||
->withAllowDuplicates(1) | ||
->execute(); | ||
|
||
$this->assertNotNull($response); | ||
$this->assertEquals('54', $response->responseCode); | ||
} | ||
|
||
public function testDebitSaleExpiredCard() | ||
{ | ||
$response = $this->device->sale(10.32) | ||
->withPaymentMethodType(PaymentMethodType::DEBIT) | ||
->withAllowDuplicates(1) | ||
->execute(); | ||
|
||
$this->assertNotNull($response); | ||
$this->assertEquals('54', $response->responseCode); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters