Skip to content

Commit

Permalink
Make SetBrandID protected
Browse files Browse the repository at this point in the history
  • Loading branch information
daanrijpkemacb committed Nov 10, 2024
1 parent e631766 commit de07a47
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/Requests/PaymentStatusBluemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Bluem\BluemPHP\Requests;

use Bluem\BluemPHP\Contexts\PaymentsContext;
use Bluem\BluemPHP\Helpers\BluemConfiguration;

class PaymentStatusBluemRequest extends BluemRequest
{
Expand All @@ -25,12 +26,17 @@ public function __construct(
) {
parent::__construct($config, $entranceCode, $expected_return);

if (isset($config->paymentBrandID)
&& $config->paymentBrandID !== ""
) {
$config->setBrandID($config->paymentBrandID);
} else {
$config->setBrandID($config->brandID);
if ($config instanceof BluemConfiguration) {
if (isset($config->paymentBrandID)
&& $config->paymentBrandID !== ""
) {
$config->setBrandID($config->paymentBrandID);
} else {
$config->setBrandID($config->brandID);
}
} elseif ($config instanceof \stdClass && isset($config->paymentBrandID)
&& $config->paymentBrandID !== "") {
$config->brandID = $config->paymentBrandID;
}

$this->transactionID = $transactionID;
Expand Down

0 comments on commit de07a47

Please sign in to comment.