Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if use WMI_DESCRIPTION on Russian Language #5

Open
den11100 opened this issue Jul 19, 2019 · 1 comment · May be fixed by #6
Open

Error if use WMI_DESCRIPTION on Russian Language #5

den11100 opened this issue Jul 19, 2019 · 1 comment · May be fixed by #6

Comments

@den11100
Copy link

den11100 commented Jul 19, 2019

After payment walletone send notification about payment and i have Notice: iconv(): Detected an illegal character

Walletone send notification in encoding windows-1251, maybe not need convert $v = iconv("utf-8", "windows-1251", $v);

protected static function getSignature($secretKey, $data, $signatureMethod = 'sha1'){
  ....
     foreach ($data as $value) {
         if (is_array($value)) {
             foreach ($value as $v) {
                 $v = iconv("utf-8", "windows-1251", $v);
                 $fieldValues .= urldecode($v);
             }
         } else {
             $value = iconv("utf-8", "windows-1251", $value);
             $fieldValues .= urldecode($value);
         }
     }
    .....
 }

Wallet one присылает оповещения (после оплаты) в кодировке windows-1251. И при проверки подписи параметры проходят конвертацию iconv("utf-8", "windows-1251", $v); Хотя они уже в windows-1251.

При использовании описания заказа на Английском проблем не возникает, но если описание на Русском, то скрипт падает.

@den11100
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant