taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

receipt-screen-titled-payment-required.md (3684B)


      1 <!--
      2   This file is part of GNU Taler
      3   (C) 2026 Taler Systems S.A.
      4 
      5   GNU Taler is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 
     13   You should have received a copy of the GNU General Public License along with
     14   GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 -->
     16 
     17 # "Paid in full", under a title bar that says "Payment required"
     18 
     19 A sale paid entirely outside Taler -- all cash, or all card -- still ends on
     20 the payment screen, because the customer can scan a receipt into a Taler
     21 wallet from it. The body says so plainly:
     22 
     23 ```
     24 Collect receipt
     25 Summary       Regular order
     26 Paid in full
     27 Scan with a Taler wallet to collect the receipt.
     28 Collect receipt on this device
     29 ```
     30 
     31 and the title bar above it says **Payment required**.
     32 
     33 The recorded hierarchy, in order, with the title last because it is the top
     34 bar's own node:
     35 
     36 ```
     37 ['Collect receipt', 'Payment possible until 11/8/26 10:33 PM', 'Order',
     38  '#pos-a58b70de-12d0-4447-9773-26f316b21eb0', 'Summary', 'Regular order',
     39  'Paid in full', 'Scan with a Taler wallet to collect the receipt.',
     40  'Merchant', 'Demo Sandbox merchant', 'Share', 'Copy',
     41  'Collect receipt on this device', 'Back to payment options',
     42  'Open navigation menu', 'Payment required']
     43 ```
     44 
     45 On a till that is not a cosmetic difference: "Payment required" is what a
     46 cashier glances at to decide whether to let the customer go.
     47 
     48 ## Why it happens
     49 
     50 `merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt`:
     51 
     52 ```kotlin
     53 PosDestination.ProcessPayment.route ->
     54 {
     55     stringResource(
     56         when
     57         {
     58             currentPayment?.statusLoading == true -> R.string.order_details_loading
     59             currentPayment?.claimed == true -> R.string.checkout_payment_claimed_title
     60             else -> R.string.payment_process_label      // "Payment required"
     61         },
     62     )
     63 }
     64 ```
     65 
     66 `Payment.selfCollect` is the flag for "the whole order was settled outside
     67 Taler" -- `PaymentManager` sets it to `checkout.open.isZero()`. Eight places
     68 in `ProcessPaymentFragment` branch on it to turn the screen into a receipt:
     69 line 415 titles the body "Collect receipt", 686, 704 and 830 drop the Taler
     70 branding, 875 turns the action into "collect on this device". The title in
     71 `MainActivity` is the one place that does not look at it.
     72 
     73 ## How it was found
     74 
     75 Walking a cash-settled checkout by hand on both layouts: enable Cash, charge
     76 an amount, record the whole amount in cash, press **Complete payment**. The
     77 scenario `checkout_cash_covers_it_all` goes through the same screen.
     78 
     79 ## Severity
     80 
     81 Low to medium. Nothing is lost and the sale is complete; what is wrong is that
     82 the screen contradicts itself about whether money is owed, at the moment a
     83 cashier is deciding exactly that.
     84 
     85 ## Suggested fix
     86 
     87 `receipt-screen-titled-payment-required.diff` -- one branch, using the string
     88 the body of the same screen already uses:
     89 
     90 ```kotlin
     91 currentPayment?.selfCollect == true ->
     92     R.string.checkout_collect_receipt_title
     93 ```
     94 
     95 Not in the patch, because it needs a new string and its translations rather
     96 than a code change: the same screen also shows **"Payment possible until
     97 &lt;time&gt;"**. For a receipt that is a deadline for *collecting* it, not for
     98 paying, and the wording says the opposite.
     99 
    100 Filed as [11974](https://bugs.gnunet.org/view?id=11974).