Skip to content

Commit

Permalink
20201015 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MSmedal authored and MSmedal committed Oct 15, 2020
1 parent f15c764 commit 56e09b4
Show file tree
Hide file tree
Showing 132 changed files with 10,873 additions and 5,437 deletions.
98 changes: 98 additions & 0 deletions src/AcceptorConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php

namespace GlobalPayments\Api;

use GlobalPayments\Api\Entities\Enums\CardHolderAuthenticationEntity;
use GlobalPayments\Api\Entities\Enums\CardDataInputCapability;
use GlobalPayments\Api\Entities\Enums\CardDataOutputCapability;
use GlobalPayments\Api\Entities\Enums\CardHolderAuthenticationCapability;
use GlobalPayments\Api\Entities\Enums\OperatingEnvironment;
use GlobalPayments\Api\Entities\Enums\PinCaptureCapability;
use GlobalPayments\Api\Entities\Enums\TerminalOutputCapability;

class AcceptorConfig
{

/**
* Used w/TransIT
*
* @var bool
*/
public $cardCaptureCapability;

/**
* Used w/TransIT
*
* @var CardDataInputCapability
*/
public $cardDataInputCapability;

/**
* Used w/TransIT
*
* @var CardDataOutputCapability
*/
public $cardDataOutputCapability;

/**
* Used w/TransIT; corresponding tag will default to eComm or Manual if this isn't used
*
* @var CardDataSource
*/
public $cardDataSource;

/**
* Used w/TransIT
*
* @var CardHolderAuthenticationCapability
*/
public $cardHolderAuthenticationCapability;

/**
* Used w/TransIT
*
* @var CardHolderAuthenticationEntity
*/
public $cardHolderAuthenticationEntity;

/**
* Used w/TransIT
*
* @var OperatingEnvironment
*/
public $operatingEnvironment;

/**
* Used w/TransIT
*
* @var PinCaptureCapability
*/
public $pinCaptureCapability;

/**
* Used w/TransIT
*
* @var TerminalOutputCapability
*/
public $terminalOutputCapability;

public function __construct(
$cardCaptureCapability = false,
$cardDataInputCapability = CardDataInputCapability::KEYED_ENTRY_ONLY,
$cardDataOutputCapability = CardDataOutputCapability::NONE,
$cardHolderAuthenticationCapability = CardHolderAuthenticationCapability::NO_CAPABILITY,
$cardHolderAuthenticationEntity = CardHolderAuthenticationEntity::NOT_AUTHENTICATED,
$operatingEnvironment = OperatingEnvironment::OFF_MERCHANT_PREMISES_UNATTENDED,
$pinCaptureCapability = PinCaptureCapability::NONE,
$terminalOutputCapability = TerminalOutputCapability::DISPLAY_ONLY
) {
$this->cardCaptureCapability = $cardCaptureCapability;
$this->cardDataInputCapability = $cardDataInputCapability;
$this->cardDataOutputCapability = $cardDataOutputCapability;
$this->cardHolderAuthenticationCapability = $cardHolderAuthenticationCapability;
$this->cardHolderAuthenticationEntity = $cardHolderAuthenticationEntity;
$this->operatingEnvironment = $operatingEnvironment;
$this->pinCaptureCapability = $pinCaptureCapability;
$this->terminalOutputCapability = $terminalOutputCapability;
}
}
67 changes: 66 additions & 1 deletion src/Builders/AuthorizationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ class AuthorizationBuilder extends TransactionBuilder
*/
public $billingAddress;

/**
* Indicates Card On File transaction
*
* @internal
* @var bool
*/
public $cardOnFile;

/**
* Request cashback amount
*
Expand All @@ -114,6 +122,14 @@ class AuthorizationBuilder extends TransactionBuilder
*/
public $clientTransactionId;

/**
* Request commercial data
*
* @internal
* @var CommercialData
*/
public $commercialData;

/**
* Request currency
*
Expand Down Expand Up @@ -316,6 +332,15 @@ class AuthorizationBuilder extends TransactionBuilder
*/
public $requestMultiUseToken;

/**
* To attach registration most recent change date value
* For use w/Discover cards on TransIT gateway
*
* @internal
* @var Date
*/
public $lastRegisteredDate;

/**
* Request replacement gift card
*
Expand Down Expand Up @@ -421,7 +446,7 @@ class AuthorizationBuilder extends TransactionBuilder
/*
* Card on File field
* @var string
*
*
*/
public $cardBrandTransactionId;

Expand Down Expand Up @@ -661,6 +686,19 @@ public function withAutoSubstantiation($autoSubstantiation)
return $this;
}

/**
* Sets the commercial data values for use w/ lvl2 & lvl3 transactions
*
* @param CommercialData
*
* @return AuthorizationBuilder
*/
public function withCommercialData($commercialData)
{
$this->commercialData = $commercialData;
return $this;
}

/**
* Set the request's balance inquiry type
*
Expand All @@ -674,6 +712,19 @@ public function withBalanceInquiryType($balanceInquiryType)
return $this;
}

/**
* Set Card On File Indicator
*
* @param bool $cardOnFile
*
* @return AuthorizationBuilder
*/
public function withCardOnFile($cardOnFile)
{
$this->cardOnFile = $cardOnFile;
return $this;
}

/**
* Set the request cashback amount
*
Expand Down Expand Up @@ -1204,4 +1255,18 @@ public function withCardBrandStorage($transactionInitiator, $value = '')
$this->cardBrandTransactionId = $value;
return $this;
}

/**
* Set lastRegisteredDate - DD/MM/YYYY
* Used w/TransIT gateway
*
* @param bool $isRegistered
*
* @return AuthorizationBuilder
*/
public function withLastRegisteredDate($date)
{
$this->lastRegisteredDate = $date;
return $this;
}
}
60 changes: 60 additions & 0 deletions src/Builders/ManagementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ class ManagementBuilder extends TransactionBuilder
*/
public $currency;

/**
* Request customer ID
*
* @internal
* @var string|float
*/
public $customerId;

/**
* @internal
* @var string
Expand All @@ -61,6 +69,14 @@ class ManagementBuilder extends TransactionBuilder
*/
public $gratuity;

/**
* Request invoice number
*
* @internal
* @var string|float
*/
public $invoiceNumber;

/**
* Request purchase order number
*
Expand Down Expand Up @@ -255,6 +271,19 @@ public function withCurrency($currency)
return $this;
}

/**
* Set the request customer ID
*
* @param string|float $customerId Request customer ID
*
* @return AuthorizationBuilder
*/
public function withCustomerId($customerId)
{
$this->customerId = $customerId;
return $this;
}

/**
* Sets the transaction's description.
*
Expand Down Expand Up @@ -287,6 +316,19 @@ public function withGratuity($gratuity)
return $this;
}

/**
* Set the request invoice number
*
* @param string|float $invoiceNumber Request invoice number
*
* @return ManagementBuilder
*/
public function withInvoiceNumber($invoiceNumber)
{
$this->invoiceNumber = $invoiceNumber;
return $this;
}

/**
* @return ManagementBuilder
*/
Expand Down Expand Up @@ -354,6 +396,24 @@ public function withTaxAmount($taxAmount)
return $this;
}

/**
* Sets Multi-Capture values
* used w/TransIT gateway
*
* @param int $sequence
* @param int $paymentCount
*
* @return ManagementBuilder
*/
public function withMultiCapture($sequence = 1, $paymentCount = 1)
{
$this->multiCapture = true;
$this->multiCaptureSequence = $sequence;
$this->multiCapturePaymentCount = $paymentCount;

return $this;
}

/**
* Sets the tax type.
*
Expand Down
21 changes: 21 additions & 0 deletions src/Builders/TransactionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ abstract class TransactionBuilder extends BaseBuilder
*/
public $paymentMethod;

/**
* used w/TransIT gateway
*
* @var bool
*/
public $multiCapture;

/**
* used w/TransIT gateway
*
* @var int
*/
public $multiCaptureSequence;

/**
* used w/TransIT gateway
*
* @var int
*/
public $multiCapturePaymentCount;

/**
* Request transaction modifier
*
Expand Down
41 changes: 41 additions & 0 deletions src/Entities/AdditionalTaxDetails.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace GlobalPayments\Api\Entities;

class AdditionalTaxDetails
{

/**
* Tax amount
*
* @var string|float
*/
public $taxAmount;

/**
* The type of tax.
*
* @var TaxCategory
*/
public $taxCategory;

/**
* @var float
*/
public $taxRate;

/**
* The type of tax. For example, VAT, NATIONAL, SALESTAX
*
* @var TaxType|string
*/
public $taxType;

public function __construct($taxAmount = null, $taxCategory = null, $taxRate = null, $taxType = null)
{
$this->taxAmount = $taxAmount;
$this->taxCategory = $taxCategory;
$this->taxRate = $taxRate;
$this->taxType = $taxType;
}
}
Loading

0 comments on commit 56e09b4

Please sign in to comment.