Skip to content

Commit de07a47

Browse files
Make SetBrandID protected
1 parent e631766 commit de07a47

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/Requests/PaymentStatusBluemRequest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace Bluem\BluemPHP\Requests;
1010

1111
use Bluem\BluemPHP\Contexts\PaymentsContext;
12+
use Bluem\BluemPHP\Helpers\BluemConfiguration;
1213

1314
class PaymentStatusBluemRequest extends BluemRequest
1415
{
@@ -25,12 +26,17 @@ public function __construct(
2526
) {
2627
parent::__construct($config, $entranceCode, $expected_return);
2728

28-
if (isset($config->paymentBrandID)
29-
&& $config->paymentBrandID !== ""
30-
) {
31-
$config->setBrandID($config->paymentBrandID);
32-
} else {
33-
$config->setBrandID($config->brandID);
29+
if ($config instanceof BluemConfiguration) {
30+
if (isset($config->paymentBrandID)
31+
&& $config->paymentBrandID !== ""
32+
) {
33+
$config->setBrandID($config->paymentBrandID);
34+
} else {
35+
$config->setBrandID($config->brandID);
36+
}
37+
} elseif ($config instanceof \stdClass && isset($config->paymentBrandID)
38+
&& $config->paymentBrandID !== "") {
39+
$config->brandID = $config->paymentBrandID;
3440
}
3541

3642
$this->transactionID = $transactionID;

0 commit comments

Comments
 (0)