diff --git a/src/Json/JsonGenerator.php b/src/Json/JsonGenerator.php index 8ccfdcc..fc092bb 100644 --- a/src/Json/JsonGenerator.php +++ b/src/Json/JsonGenerator.php @@ -164,6 +164,7 @@ protected function createDebit($transaction, $language){ 'splits' => $this->createSplits($transaction->getTransactionSplits()), 'withRegister' => $transaction->isWithRegister(), 'transactionIndicator' => $transaction->getTransactionIndicator(), + 'industryPractice' => $transaction->getIndustryPractice(), 'customer' => $this->createCustomer($transaction->getCustomer()), 'schedule' => $this->createSchedule($transaction->getSchedule()), 'customerProfileData' => $this->createAddToCustomerProfile($transaction->getCustomerProfileData()), @@ -217,6 +218,7 @@ protected function createIncrementalAuthorization($transaction, $language) { 'description' => $transaction->getDescription(), 'items' => $this->createItems($transaction->getItems()), 'transactionIndicator' => $transaction->getTransactionIndicator(), + 'industryPractice' => $transaction->getIndustryPractice(), 'language' => $language, ]; @@ -292,6 +294,7 @@ protected function createRegister($transaction, $language){ 'transactionToken' => $transaction->getTransactionToken(), 'description' => $transaction->getDescription(), 'transactionIndicator' => $transaction->getTransactionIndicator(), + 'industryPractice' => $transaction->getIndustryPractice(), 'customer' => $this->createCustomer($transaction->getCustomer()), 'schedule' => $this->createSchedule($transaction->getSchedule()), 'customerProfileData' => $this->createAddToCustomerProfile($transaction->getCustomerProfileData()), @@ -378,6 +381,7 @@ protected function createPayout($transaction, $language){ 'customer' => $this->createCustomer($transaction->getCustomer()), 'language' => $language, 'transactionIndicator' => $transaction->getTransactionIndicator(), + 'industryPractice' => $transaction->getIndustryPractice(), ]; if ($transaction->getL2L3Data()) { diff --git a/src/Transaction/Base/IndicatorInterface.php b/src/Transaction/Base/IndicatorInterface.php index 5a36cf4..86887a8 100644 --- a/src/Transaction/Base/IndicatorInterface.php +++ b/src/Transaction/Base/IndicatorInterface.php @@ -15,4 +15,5 @@ public function getTransactionIndicator(); * @return $this */ public function setTransactionIndicator($transactionIndicator); + } diff --git a/src/Transaction/Base/IndicatorTrait.php b/src/Transaction/Base/IndicatorTrait.php index 12cfb4c..51f69f4 100644 --- a/src/Transaction/Base/IndicatorTrait.php +++ b/src/Transaction/Base/IndicatorTrait.php @@ -26,4 +26,5 @@ public function setTransactionIndicator($transactionIndicator) return $this; } + } diff --git a/src/Transaction/Base/IndustryPracticeInterface.php b/src/Transaction/Base/IndustryPracticeInterface.php new file mode 100644 index 0000000..b4c0f06 --- /dev/null +++ b/src/Transaction/Base/IndustryPracticeInterface.php @@ -0,0 +1,21 @@ +industryPractice; + } + + /** + * Set the industry practice indicator. + * + * @param string|null $industryPractice + * @return void + */ + public function setIndustryPractice($industryPractice) + { + $this->industryPractice = $industryPractice; + } +} diff --git a/src/Transaction/Debit.php b/src/Transaction/Debit.php index d3fea84..6662fb9 100644 --- a/src/Transaction/Debit.php +++ b/src/Transaction/Debit.php @@ -11,6 +11,8 @@ use Ixopay\Client\Transaction\Base\CustomerTrait; use Ixopay\Client\Transaction\Base\IndicatorInterface; use Ixopay\Client\Transaction\Base\IndicatorTrait; +use Ixopay\Client\Transaction\Base\IndustryPracticeInterface; +use Ixopay\Client\Transaction\Base\IndustryPracticeTrait; use Ixopay\Client\Transaction\Base\ItemsInterface; use Ixopay\Client\Transaction\Base\ItemsTrait; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataInterface; @@ -39,20 +41,21 @@ * @package Ixopay\Client\Transaction */ class Debit extends AbstractTransactionWithReference - implements AddToCustomerProfileInterface, - AmountableInterface, - CustomerInterface, - ItemsInterface, - TransactionSplitsInterface, - OffsiteInterface, - ScheduleInterface, - ThreeDSecureInterface, - IndicatorInterface, - DccDataInterface, - SurchargeInterface, - ReferenceSchemeTransactionIdentifierInterface, - RecipientAccountPanInterface, - LevelTwoAndThreeDataInterface + implements AddToCustomerProfileInterface, + AmountableInterface, + CustomerInterface, + ItemsInterface, + TransactionSplitsInterface, + OffsiteInterface, + ScheduleInterface, + ThreeDSecureInterface, + IndicatorInterface, + DccDataInterface, + SurchargeInterface, + ReferenceSchemeTransactionIdentifierInterface, + RecipientAccountPanInterface, + LevelTwoAndThreeDataInterface, + IndustryPracticeInterface { use AddToCustomerProfileTrait; use AmountableTrait; @@ -69,6 +72,7 @@ class Debit extends AbstractTransactionWithReference use ReferenceSchemeTransactionIdentifierTrait; use RecipientAccountPanTrait; use LevelTwoAndThreeDataTrait; + use IndustryPracticeTrait; const TRANSACTION_INDICATOR_SINGLE = 'SINGLE'; const TRANSACTION_INDICATOR_INITIAL = 'INITIAL'; @@ -105,7 +109,8 @@ public function setTransactionToken($transactionToken) /** * @return boolean */ - public function isWithRegister() { + public function isWithRegister() + { return $this->withRegister; } @@ -116,7 +121,8 @@ public function isWithRegister() { * * @return $this */ - public function setWithRegister($withRegister) { + public function setWithRegister($withRegister) + { $this->withRegister = $withRegister; return $this; } diff --git a/src/Transaction/IncrementalAuthorization.php b/src/Transaction/IncrementalAuthorization.php index f950b5d..66f295e 100644 --- a/src/Transaction/IncrementalAuthorization.php +++ b/src/Transaction/IncrementalAuthorization.php @@ -7,6 +7,8 @@ use Ixopay\Client\Transaction\Base\AmountableTrait; use Ixopay\Client\Transaction\Base\IndicatorInterface; use Ixopay\Client\Transaction\Base\IndicatorTrait; +use Ixopay\Client\Transaction\Base\industryPracticeInterface; +use Ixopay\Client\Transaction\Base\industryPracticeTrait; use Ixopay\Client\Transaction\Base\ItemsInterface; use Ixopay\Client\Transaction\Base\ItemsTrait; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataInterface; @@ -19,22 +21,25 @@ * @package IxopayV2\Transaction */ class IncrementalAuthorization extends AbstractTransactionWithReference - implements AmountableInterface, - OffsiteInterface, - ItemsInterface, - IndicatorInterface, - LevelTwoAndThreeDataInterface + implements AmountableInterface, + OffsiteInterface, + ItemsInterface, + IndicatorInterface, + LevelTwoAndThreeDataInterface, + industryPracticeInterface { use OffsiteTrait; use AmountableTrait; use ItemsTrait; use IndicatorTrait; use LevelTwoAndThreeDataTrait; + use industryPracticeTrait; /** * @return string */ - public function getTransactionMethod() { + public function getTransactionMethod() + { return self::TRANSACTION_METHOD_INCREMENTAL_AUTHORIZATION; } } diff --git a/src/Transaction/Payout.php b/src/Transaction/Payout.php index 46be38d..95fb36d 100644 --- a/src/Transaction/Payout.php +++ b/src/Transaction/Payout.php @@ -8,6 +8,8 @@ use Ixopay\Client\Transaction\Base\CustomerInterface; use Ixopay\Client\Transaction\Base\CustomerTrait; use Ixopay\Client\Transaction\Base\IndicatorInterface; +use Ixopay\Client\Transaction\Base\IndustryPracticeInterface; +use Ixopay\Client\Transaction\Base\IndustryPracticeTrait; use Ixopay\Client\Transaction\Base\ItemsInterface; use Ixopay\Client\Transaction\Base\ItemsTrait; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataInterface; @@ -25,13 +27,14 @@ * @package Ixopay\Client\Transaction */ class Payout extends AbstractTransactionWithReference - implements AmountableInterface, - CustomerInterface, - ItemsInterface, - OffsiteInterface, - TransactionSplitsInterface, - IndicatorInterface, - LevelTwoAndThreeDataInterface + implements AmountableInterface, + CustomerInterface, + ItemsInterface, + OffsiteInterface, + TransactionSplitsInterface, + IndicatorInterface, + LevelTwoAndThreeDataInterface, + IndustryPracticeInterface { use AmountableTrait; @@ -42,6 +45,7 @@ class Payout extends AbstractTransactionWithReference use PayByLinkTrait; use IndicatorTrait; use LevelTwoAndThreeDataTrait; + use IndustryPracticeTrait; /** @var string */ protected $transactionToken; diff --git a/src/Transaction/Preauthorize.php b/src/Transaction/Preauthorize.php index 78c09ce..cd3dc5b 100644 --- a/src/Transaction/Preauthorize.php +++ b/src/Transaction/Preauthorize.php @@ -11,6 +11,8 @@ use Ixopay\Client\Transaction\Base\CustomerTrait; use Ixopay\Client\Transaction\Base\IndicatorInterface; use Ixopay\Client\Transaction\Base\IndicatorTrait; +use Ixopay\Client\Transaction\Base\industryPracticeInterface; +use Ixopay\Client\Transaction\Base\industryPracticeTrait; use Ixopay\Client\Transaction\Base\ItemsInterface; use Ixopay\Client\Transaction\Base\ItemsTrait; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataInterface; @@ -39,20 +41,21 @@ * @package Ixopay\Client\Transaction */ class Preauthorize extends AbstractTransactionWithReference - implements AddToCustomerProfileInterface, - AmountableInterface, - CustomerInterface, - ItemsInterface, - TransactionSplitsInterface, - OffsiteInterface, - ScheduleInterface, - ThreeDSecureInterface, - IndicatorInterface, - DccDataInterface, - SurchargeInterface, - ReferenceSchemeTransactionIdentifierInterface, - RecipientAccountPanInterface, - LevelTwoAndThreeDataInterface + implements AddToCustomerProfileInterface, + AmountableInterface, + CustomerInterface, + ItemsInterface, + TransactionSplitsInterface, + OffsiteInterface, + ScheduleInterface, + ThreeDSecureInterface, + IndicatorInterface, + DccDataInterface, + SurchargeInterface, + ReferenceSchemeTransactionIdentifierInterface, + RecipientAccountPanInterface, + LevelTwoAndThreeDataInterface, + industryPracticeInterface { use AddToCustomerProfileTrait; @@ -70,6 +73,7 @@ class Preauthorize extends AbstractTransactionWithReference use ReferenceSchemeTransactionIdentifierTrait; use RecipientAccountPanTrait; use LevelTwoAndThreeDataTrait; + use industryPracticeTrait; const TRANSACTION_INDICATOR_SINGLE = 'SINGLE'; const TRANSACTION_INDICATOR_INITIAL = 'INITIAL'; @@ -108,7 +112,8 @@ public function setTransactionToken($transactionToken) /** * @return boolean */ - public function isWithRegister() { + public function isWithRegister() + { return $this->withRegister; } @@ -119,7 +124,8 @@ public function isWithRegister() { * * @return $this */ - public function setWithRegister($withRegister) { + public function setWithRegister($withRegister) + { $this->withRegister = $withRegister; return $this; } @@ -160,7 +166,7 @@ public function getCaptureInMinutes() * A value greater zero, requests the gateway to schedule a capture * automatically after n minutes. * - * @param int $captureInMinutes + * @param int $captureInMinutes * @return Preauthorize */ public function setCaptureInMinutes($captureInMinutes) diff --git a/src/Transaction/Register.php b/src/Transaction/Register.php index 0790dbe..6db507d 100644 --- a/src/Transaction/Register.php +++ b/src/Transaction/Register.php @@ -9,6 +9,8 @@ use Ixopay\Client\Transaction\Base\CustomerTrait; use Ixopay\Client\Transaction\Base\IndicatorInterface; use Ixopay\Client\Transaction\Base\IndicatorTrait; +use Ixopay\Client\Transaction\Base\IndustryPracticeInterface; +use Ixopay\Client\Transaction\Base\IndustryPracticeTrait; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataInterface; use Ixopay\Client\Transaction\Base\LevelTwoAndThreeDataTrait; use Ixopay\Client\Transaction\Base\OffsiteInterface; @@ -27,13 +29,14 @@ * @package Ixopay\Client\Transaction */ class Register extends AbstractTransaction - implements AddToCustomerProfileInterface, - CustomerInterface, - OffsiteInterface, - ScheduleInterface, - ThreeDSecureInterface, - IndicatorInterface, - LevelTwoAndThreeDataInterface + implements AddToCustomerProfileInterface, + CustomerInterface, + OffsiteInterface, + ScheduleInterface, + ThreeDSecureInterface, + IndicatorInterface, + LevelTwoAndThreeDataInterface, + IndustryPracticeInterface { use AddToCustomerProfileTrait; @@ -44,6 +47,7 @@ class Register extends AbstractTransaction use PayByLinkTrait; use IndicatorTrait; use LevelTwoAndThreeDataTrait; + use IndustryPracticeTrait; /** @var string */ protected $language; @@ -87,4 +91,5 @@ public function setLanguage($language) { $this->language = $language; } + }