Skip to content

Commit 4414f0c

Browse files
Make SetBrandID protected
1 parent e631766 commit 4414f0c

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

src/Requests/BluemRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ protected function _sanitizeDescription(string $description): string
449449
</DebtorAdditionalData>
450450
*/
451451

452-
public function setBrandId(string $brandID): void
452+
protected function setBrandId(string $brandID): void
453453
{
454454
$this->brandID = $brandID;
455455
}

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)