Skip to content

Commit

Permalink
Fix: direkt api user basket
Browse files Browse the repository at this point in the history
  • Loading branch information
GizemSever committed Aug 8, 2023
1 parent e89862e commit 79d2bae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Direkt/DPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ public function getBody()
'user_name' => $this->getUserName(),
'user_address' => $this->getUserAddress(),
'user_phone' => $this->getUserPhone(),
'user_basket' => $this->getBasket()->formatted(),
'user_basket' => $this->getBasket()->toString(),
'debug_on' => $this->getDebugOn(),
'sync_mode' => $this->getSyncMode(),
'store_card' => $this->getStoreCard(),
Expand Down
5 changes: 5 additions & 0 deletions src/Payment/Basket.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ public function formatted(): string
{
return base64_encode(json_encode($this->products));
}

public function toString(): string
{
return htmlentities(json_encode($this->products));
}
}

0 comments on commit 79d2bae

Please sign in to comment.