commit 301a9de384f639176d6933009a834a44bd08c36f
parent 85c9d29dc7589e1d4475553f00ae5e92f1d57579
Author: Sebastian <sebasjm@taler-systems.com>
Date: Wed, 4 Feb 2026 16:29:51 -0300
fix #10993: show payto on kyc for devs
Diffstat:
2 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/modal/index.tsx b/packages/merchant-backoffice-ui/src/components/modal/index.tsx
@@ -36,6 +36,7 @@ import { DEFAULT_REQUEST_TIMEOUT } from "../../utils/constants.js";
import { Spinner } from "../exception/loading.js";
import { QR } from "../exception/QR.js";
import { doAutoFocus } from "../form/Input.js";
+import { usePreference } from "../../hooks/preference.js";
const TALER_SCREEN_ID = 18;
@@ -430,7 +431,9 @@ export function ValidBankAccount({
? `${origin.address.substring(0, 8)}...`
: origin.displayName;
- const qrs = getQrCodesForPayto(Paytos.toFullString(payto));
+ const qrs = getQrCodesForPayto(Paytos.toFullString(payto));
+ const strPayto = Paytos.toFullString(payto);
+ const [{ developer }] = usePreference();
return (
<ConfirmModal
label={i18n.str`OK`}
@@ -439,6 +442,9 @@ export function ValidBankAccount({
onCancel={onCancel}
// onConfirm={onConfirm}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto, payto }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
In order to prove that you are the beneficial owner of the bank
@@ -513,7 +519,10 @@ export function ValidBankAccount({
{!qrs.length ? undefined : (
<div style={{ overflowY: "auto", height: "95%", padding: 5 }}>
<p>
- <i18n.Translate>If your bank application allows you make a wire transfer using standard QR codes then try scanning the following:</i18n.Translate>
+ <i18n.Translate>
+ If your bank application allows you make a wire transfer
+ using standard QR codes then try scanning the following:
+ </i18n.Translate>
</p>
<table style={{ width: "100%" }}>
{qrs.map((q, idx) => {
@@ -527,7 +536,7 @@ export function ValidBankAccount({
border: "1px solid black",
}}
>
- <Accordion name={q.type} >
+ <Accordion name={q.type}>
<QR text={q.qrContent} />
</Accordion>
</td>
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
@@ -24,7 +24,7 @@ import {
Paytos,
TalerError,
TalerMerchantApi,
- assertUnreachable
+ assertUnreachable,
} from "@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
@@ -37,6 +37,7 @@ import {
} from "../../../../components/modal/index.js";
import { ListPage } from "./ListPage.js";
import { useInstanceKYCDetails } from "../../../../hooks/instance.js";
+import { usePreference } from "../../../../hooks/preference.js";
const TALER_SCREEN_ID = 40;
@@ -112,6 +113,7 @@ function ShowInstructionForKycRedirect({
onCancel: () => void;
}): VNode {
const { i18n } = useTranslationContext();
+ const [{ developer }] = usePreference();
switch (e.status) {
case TalerMerchantApi.MerchantAccountKycStatus.KYC_WIRE_REQUIRED:
const uri = Paytos.fromString(e.payto_uri);
@@ -123,6 +125,11 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>
+ {JSON.stringify({ strPayto: e.payto_uri, uri }, undefined, 2)}
+ </pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The backend service responded with "{e.payto_uri}" which is
@@ -153,6 +160,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The backend service is still synchronizing with the payment
@@ -170,11 +180,15 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The core banking system cannot perform wire transfers between the
payment service provider's accounts and your bank accounts. Thus
- you cannot use this payment service provider. Sincerely, the Taler Exchange.
+ you cannot use this payment service provider. Sincerely, the Taler
+ Exchange.
</i18n.Translate>
</p>
</ConfirmModal>
@@ -189,6 +203,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The payment service provider requires more information.
@@ -224,6 +241,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
This account cannot be used. The payment service provider must
@@ -241,9 +261,13 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
- This account has been successfully configured for use with the payment service provider.
+ This account has been successfully configured for use with the
+ payment service provider.
</i18n.Translate>
</p>
</ConfirmModal>
@@ -257,6 +281,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The backend service detected an internal error, contact the system
@@ -274,6 +301,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The payment service provider detected an internal error, contact
@@ -291,6 +321,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The merchant service provider detected an internal error, contact
@@ -308,6 +341,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The backend service could not contact the payment service provider
@@ -326,6 +362,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
Unable to reach the payment service provider, contact the system
@@ -343,6 +382,9 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>{JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}</pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
This exchange does not support the given account.
@@ -360,6 +402,11 @@ function ShowInstructionForKycRedirect({
active
onCancel={onCancel}
>
+ {!developer ? undefined : (
+ <pre>
+ {JSON.stringify({ strPayto: e.payto_uri }, undefined, 2)}
+ </pre>
+ )}
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
The payment service provider replied with an invalid status,