diff --git a/src/GoPay.php b/src/GoPay.php index 1f12e43..f37c366 100644 --- a/src/GoPay.php +++ b/src/GoPay.php @@ -67,7 +67,7 @@ private function encodeData($contentType, $data) if ($contentType === GoPay::FORM) { return http_build_query($data, "", '&'); } - return json_encode($data); + return json_encode($data, JSON_UNESCAPED_UNICODE); } return ''; } diff --git a/tests/integration/CreatePaymentTest.php b/tests/integration/CreatePaymentTest.php index affe178..3df23f9 100644 --- a/tests/integration/CreatePaymentTest.php +++ b/tests/integration/CreatePaymentTest.php @@ -64,7 +64,7 @@ public static function createBasePayment() array('name' => 'invoicenumber', 'value' => '2015001003') ], 'items' => [ - ['name' => 'item01', 'amount' => 2300, 'count' => 1], + ['name' => 'item01 (ěščřžýáíéóúůťďňĚŠČŘŽÝÁÍÉÓÚŮŤĎŇ)[]/\\"\'<>{}&', 'amount' => 2300, 'count' => 1], ], 'callback' => [ 'return_url' => 'https://eshop123.cz/return',