iban country code should be always uppercased
This commit is contained in:
parent
552155c826
commit
779ddae8b8
@ -89,12 +89,13 @@ export function buildPayto(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case "iban": {
|
case "iban": {
|
||||||
|
const uppercased = first.toUpperCase()
|
||||||
const result: PaytoUriIBAN = {
|
const result: PaytoUriIBAN = {
|
||||||
isKnown: true,
|
isKnown: true,
|
||||||
targetType: "iban",
|
targetType: "iban",
|
||||||
iban: first,
|
iban: uppercased,
|
||||||
params: {},
|
params: {},
|
||||||
targetPath: !second ? first : `${second}/${first}`,
|
targetPath: !second ? uppercased : `${second}/${uppercased}`,
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -200,13 +201,13 @@ export function parsePaytoUri(s: string): PaytoUri | undefined {
|
|||||||
let iban: string | undefined = undefined;
|
let iban: string | undefined = undefined;
|
||||||
let bic: string | undefined = undefined;
|
let bic: string | undefined = undefined;
|
||||||
if (parts.length === 1) {
|
if (parts.length === 1) {
|
||||||
iban = parts[0];
|
iban = parts[0].toUpperCase();
|
||||||
}
|
}
|
||||||
if (parts.length === 2) {
|
if (parts.length === 2) {
|
||||||
bic = parts[0];
|
bic = parts[0];
|
||||||
iban = parts[1];
|
iban = parts[1].toUpperCase();
|
||||||
} else {
|
} else {
|
||||||
iban = targetPath;
|
iban = targetPath.toUpperCase();
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
isKnown: true,
|
isKnown: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user