From 9c3e20e7e9ce52d33ae9f1d885ad9294d280ea32 Mon Sep 17 00:00:00 2001 From: Ivan Stasiuk Date: Mon, 2 Sep 2024 16:13:03 +0100 Subject: [PATCH] fix: entity and transfer code --- src/Client.php | 4 ++-- src/Interfaces/ConfigInterface.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index bd0a651..af94e87 100644 --- a/src/Client.php +++ b/src/Client.php @@ -105,9 +105,9 @@ public function transfer(TransactionInterface $transaction): TransferResponse 'TerminalId' => $this->config->getTerminalId(), ], \GuzzleHttp\RequestOptions::JSON => [ - 'transferCode' => $transaction->getReference(), + 'transferCode' => $this->config->getTransferCodePrefix() . $transaction->getReference(), 'mac' => Mac::generate($transaction), - 'initiatingEntityCode' => 'PBL', + 'initiatingEntityCode' => $this->config->getEntityCode(), 'initiation' => [ 'amount' => (string) $transaction->getCents(), 'currencyCode' => (string) $transaction->getCurrency(), diff --git a/src/Interfaces/ConfigInterface.php b/src/Interfaces/ConfigInterface.php index f939d7c..023d6b2 100644 --- a/src/Interfaces/ConfigInterface.php +++ b/src/Interfaces/ConfigInterface.php @@ -15,5 +15,7 @@ public function getAuthUrl(): string; public function getUrl(): string; public function getUsername(): string; public function getPassword(): string; + public function getEntityCode(): string; + public function getTransferCodePrefix(): string; public function getTerminalId(): string; }