Open hubertprein opened 7 years ago
Can you submit a PR for this?
@delatbabel Euhm, I'm not sure we're on the same page here. I don't have a fix available, so what pull request could I make?
@delatbabel Why doesn't RestPurchaseRequest just simply use the same logic as PurchaseRequest? I was quite surprised that this isn't implemented since it is a core omnipay feature (the ItemBag).
if ($items = $this->getItems()) {
$itemsHtml = '<ul>';
foreach ($items as $item) {
$itemsHtml .= "<li>{$item['quantity']} x {$item['name']}</li>";
}
$itemsHtml .= '</ul>';
$transaction->addChild('items', htmlspecialchars($itemsHtml));
}
I'm actually not familiar enough with multisafepay to be able to answer that question. If you think that that code would resolve the issue then commit that, test it, and make a PR.
I just created a PR for this. :)
The array with items are transformed into an instance of ItemBag, with a collection of items. When you fire the redirect RestPurchaseRequest, it is executed through Guzzle. Guzzle then falls over the ItemBag, since it's not an array which can't be added to the GET request. So it tries to add the object to the request and pops up with this error: rawurlencode() expects parameter 1 to be string, object given