Opened 5 years ago

Last modified 5 years ago

#1928 closed Bug/Fehler

error im Klarna-Modul, Kodierung — at Version 1

Reported by: info@… Owned by:
Priority: hoch Milestone: modified-shop-2.0.6.0
Component: Module Version: trunk
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Torsten Riemer)

Hi,

Shopversion: v2.0.4.2 rev 11374
Spracheinstellung im Shop iso-8859-15

Klarna-Fehler: BAD_VALUE: Request body is empty

Ursache: Umlaute im Namen der Artikel

Mögliche Korrektur:
includes\external\klarna\classes\KlarnaPayment.php Zeile 349ff

$products_array[$i] = array(
        'type' => (($type == 'virtual') ? 'digital' : 'physical'),
        'reference' => $products['id'],
        'name' => encode_utf8($products['name'], $_SESSION['language_charset'], true),
        'quantity' => $products['qty'],
        'unit_price' => $this->format_amount($amount),
        'tax_rate' => $this->format_amount($products['tax']),
        'total_amount' => $this->format_amount($amount * $products['qty']),
        'total_tax_amount' => $this->format_amount($xtPrice->xtcGetTax(($amount * $products['qty']), $products['tax'])),
      );

Change History (1)

comment:1 by Torsten Riemer, 5 years ago

Description: modified (diff)
Milestone: modified-shop-2.0.6.0
Version: 2.0.4.2trunk

Vorsichtshalber vielleicht auch gleich auf "reference" anwenden, da auch die Artikelnummer ggf. Umlaute enthalten kann, also:

      $products_array[$i] = array(
        'type' => (($type == 'virtual') ? 'digital' : 'physical'),
        'reference' => encode_utf8((($products['model'] != '' && mb_strlen($products['model'], $_SESSION['language_charset']) <= 64) ? $products['model'] : (int)$products['id']), $_SESSIONlanguage_charset, true),
        'name' => encode_utf8(strip_tags($products['name']), $_SESSIONlanguage_charset, true),
        'quantity' => $products['qty'],
        'unit_price' => $this->format_amount($amount),
        'tax_rate' => $this->format_amount($products['tax']),
        'total_amount' => $this->format_amount($amount * $products['qty']),
        'total_tax_amount' => $this->format_amount($xtPrice->xtcGetTax(($amount * $products['qty']), $products['tax'])),
      );
Note: See TracTickets for help on using tickets.