Skip to content

Commit 40ae694

Browse files
Fixed Sending signature value with special symbols in user params
1 parent 93cdbd1 commit 40ae694

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Added
11+
- Allow outSum to be a number or a formatted string.
12+
13+
### Fixed
14+
- Fixed calculating signature value with special symbols in userParams (@ in emails).
15+
1016
## 1.0.1 - 2023-05-13
1117
### Changed
1218
- Translated README.md to Russian language.

src/internal/calculateSendingSignatureValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const buildSendingSignatureString = ({
1212
}) => {
1313
const signatureUserParams =
1414
Object.entries(order.userParameters ?? {}).map(
15-
([key, value]) => `${key}=${encodeURIComponent(value?.toString() ?? '')}`,
15+
([key, value]) => `${key}=${value?.toString() ?? ''}`,
1616
) ?? [];
1717
// Порядок параметров важен, сортируем по алфавиту
1818
signatureUserParams.sort((a, b) => a.localeCompare(b));

0 commit comments

Comments
 (0)