Skip to content

Commit

Permalink
20201008 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster authored Oct 8, 2020
1 parent c23d83c commit f15c764
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/Integration/Gateways/PorticoConnector/CreditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use GlobalPayments\Api\ServicesContainer;
use PHPUnit\Framework\TestCase;
use GlobalPayments\Api\Entities\Enums\StoredCredentialInitiator;
use GlobalPayments\Api\Entities\Transaction;

class CreditTest extends TestCase
{
Expand Down Expand Up @@ -339,4 +340,25 @@ public function testCreditAuthorizationWithCOF()
$this->assertNotNull($captureResponse);
$this->assertEquals('00', $captureResponse->responseCode);
}

public function testCreditReverseViaClientTxnId()
{
$clientTxnId = time();

$authorization = $this->card->charge(420.69)
->withClientTransactionId($clientTxnId)
->withCurrency('USD')
->withAllowDuplicates(true)
->execute();

$this->assertNotNull($authorization);
$this->assertEquals('00', $authorization->responseCode);

$reverse = Transaction::fromClientTransactionId($clientTxnId)
->reverse(420.69)
->execute();

$this->assertNotNull($reverse);
$this->assertEquals('00', $reverse->responseCode);
}
}

0 comments on commit f15c764

Please sign in to comment.