Skip to content

Commit

Permalink
Merge pull request #38 from ixopay/feature/sender-account-pan
Browse files Browse the repository at this point in the history
SenderAccountPan for AFT
  • Loading branch information
adamjanovic authored Oct 20, 2023
2 parents e565224 + a1c991d commit 86c7eda
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Json/JsonGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ protected function createDebit($transaction, $language){
'language' => $language,
'referenceSchemeTransactionIdentifier' => $transaction->getReferenceSchemeTransactionIdentifier(),
'surchargeAmount' => $transaction->getSurchargeAmount(),
'senderAccountReferenceUuid' => $transaction->getSenderAccountReferenceUuid()
];

if ($transaction->getL2L3Data()) {
Expand Down Expand Up @@ -296,6 +297,7 @@ protected function createRegister($transaction, $language){
'customerProfileData' => $this->createAddToCustomerProfile($transaction->getCustomerProfileData()),
'threeDSecureData' => $this->createThreeDSecureData($transaction->getThreeDSecureData()),
'language' => $language,
'isAft' => $transaction->isAft(),
];

if ($transaction->getL2L3Data()) {
Expand Down
9 changes: 9 additions & 0 deletions src/Transaction/Base/SenderAccountPanInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Ixopay\Client\Transaction\Base;

interface SenderAccountPanInterface
{
public function getSenderAccountReferenceUuid();
public function setSenderAccountReferenceUuid(string $senderAccountReferenceUuid);
}
22 changes: 22 additions & 0 deletions src/Transaction/Base/SenderAccountPanTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Ixopay\Client\Transaction\Base;

trait SenderAccountPanTrait
{
/** @var null|string */
protected $senderAccountReferenceUuid = null;

/** @return null|string */
public function getSenderAccountReferenceUuid()
{
return $this->senderAccountReferenceUuid;
}

/** @param string $senderAccountReferenceUuid */
public function setSenderAccountReferenceUuid($senderAccountReferenceUuid)
{
$this->senderAccountReferenceUuid = $senderAccountReferenceUuid;
}

}
4 changes: 4 additions & 0 deletions src/Transaction/Debit.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
use Ixopay\Client\Transaction\Base\ReferenceSchemeTransactionIdentifierTrait;
use Ixopay\Client\Transaction\Base\ScheduleInterface;
use Ixopay\Client\Transaction\Base\ScheduleTrait;
use Ixopay\Client\Transaction\Base\SenderAccountPanInterface;
use Ixopay\Client\Transaction\Base\SenderAccountPanTrait;
use Ixopay\Client\Transaction\Base\SurchargeInterface;
use Ixopay\Client\Transaction\Base\SurchargeTrait;
use Ixopay\Client\Transaction\Base\TransactionSplitsInterface;
Expand All @@ -49,6 +51,7 @@ class Debit extends AbstractTransactionWithReference
DccDataInterface,
SurchargeInterface,
ReferenceSchemeTransactionIdentifierInterface,
SenderAccountPanInterface,
LevelTwoAndThreeDataInterface
{
use AddToCustomerProfileTrait;
Expand All @@ -64,6 +67,7 @@ class Debit extends AbstractTransactionWithReference
use DccDataTrait;
use SurchargeTrait;
use ReferenceSchemeTransactionIdentifierTrait;
use SenderAccountPanTrait;
use LevelTwoAndThreeDataTrait;

const TRANSACTION_INDICATOR_SINGLE = 'SINGLE';
Expand Down
4 changes: 4 additions & 0 deletions src/Transaction/Preauthorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
use Ixopay\Client\Transaction\Base\ReferenceSchemeTransactionIdentifierTrait;
use Ixopay\Client\Transaction\Base\ScheduleInterface;
use Ixopay\Client\Transaction\Base\ScheduleTrait;
use Ixopay\Client\Transaction\Base\SenderAccountPanInterface;
use Ixopay\Client\Transaction\Base\SenderAccountPanTrait;
use Ixopay\Client\Transaction\Base\SurchargeInterface;
use Ixopay\Client\Transaction\Base\SurchargeTrait;
use Ixopay\Client\Transaction\Base\TransactionSplitsInterface;
Expand All @@ -49,6 +51,7 @@ class Preauthorize extends AbstractTransactionWithReference
DccDataInterface,
SurchargeInterface,
ReferenceSchemeTransactionIdentifierInterface,
SenderAccountPanInterface,
LevelTwoAndThreeDataInterface
{

Expand All @@ -65,6 +68,7 @@ class Preauthorize extends AbstractTransactionWithReference
use DccDataTrait;
use SurchargeTrait;
use ReferenceSchemeTransactionIdentifierTrait;
use SenderAccountPanTrait;
use LevelTwoAndThreeDataTrait;

const TRANSACTION_INDICATOR_SINGLE = 'SINGLE';
Expand Down
19 changes: 19 additions & 0 deletions src/Transaction/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,25 @@ class Register extends AbstractTransaction
*/
protected $transactionIndicator;

/** @var bool */
protected $isAft=false;

/**
* @return bool
*/
public function isAft()
{
return $this->isAft;
}

/**
* @param bool $isAft
*/
public function setIsAft($isAft)
{
$this->isAft = $isAft;
}

/**
* @return string
*/
Expand Down

0 comments on commit 86c7eda

Please sign in to comment.