View Issue Details

IDProjectCategoryView StatusLast Update
0010480Talermerchant backendpublic2025-10-26 13:53
Reporteravalos Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0 
Target Version1.2Fixed in Version1.2 
Summary0010480: 502 error when paying order with TESTKUDOS:0 tax receipt
DescriptionWhen creating an order in backend.test.taler.net with a TESTKUDOS:0 tax receipt:

ORDER_ID="$(curl "${BACKEND_URL}/private/orders" \
     --header "Authorization: Bearer ${BACKEND_TOKEN}" \
     --data "{
  \"order\": {
    \"version\": 1,
    \"summary\": \"Test donation order\",
    \"choices\": [{
      \"amount\": \"TESTKUDOS:0\",
      \"inputs\": [],
      \"outputs\": [{
        \"type\": \"tax-receipt\",
        \"amount\": \"TESTKUDOS:0\",
        \"donau_urls\": [
          \"https://donau.test.taler.net/\"
        ]
      }]
    }]
  }
}" | jq -r .order_id)"

And then paying it with the wallet, the exchange returns 502 with an empty error response:

{
  "code": 7002,
  "hint": "Error response did not even contain JSON. The request URL might be wrong or the service might be unavailable.",
  "message": null,
  "when": {
    "t_ms": 1760010931804
  },
  "requestUrl": "https://backend.test.taler.net/instances/sandbox/orders/2025.282-03G6X9REDYVN6/pay",
  "requestMethod": "POST",
  "httpStatusCode": 502,
  "response": "",
  "contentType": "<null>"
}

This is what the wallet sends to the merchant:

2025-10-09T12:07:32.561Z pay-merchant.ts INFO sending donau data: {
  "url": "https://donau.test.taler.net/",
  "year": 2025,
  "budikeypairs": []
}

This is what appears in the logs:

Oct 09 12:01:21 cceb10198446 taler-merchant-httpd[39649]: (25K7J8R34P1HFWFB60SWEXC9EG) WARNING External protocol violation detected at taler-merchant-httpd_post-orders-ID-pay.c:4376.
Oct 09 12:01:21 cceb10198446 taler-merchant-httpd[39649]: (25K7J8R34P1HFWFB60SWEXC9EG) ERROR Assertion failed at taler-merchant-httpd_post-orders-ID-pay.c:820. Aborting.
TagsNo tags attached.

Activities

Bohdan

2025-10-14 11:02

developer   ~0026166

I think we have forbidden the 0 payments for Donau; at least one BKP must be present at payment time.

I still don't really get why you get such an error...
```
"code": 7002,
  "hint": "Error response did not even contain JSON. The request URL might be wrong or the service might be unavailable.",
  "message": null,
```
image.png (23,458 bytes)   
image.png (23,458 bytes)   

Christian Grothoff

2025-10-26 13:53

manager   ~0026248

resume_pay_with_error is wrong in this place, as we're not actually suspended, so pay_end() must be used instead.
I've fixed 2 other related places like this. Furthermore, I've modified the code to accept an empty budikeypair array.

Christian Grothoff

2025-10-26 13:53

manager   ~0026249

Fix committed to master branch.

Related Changesets

merchant: master 18fcc8b1

2025-10-26 14:53

Christian Grothoff


Details Diff
fix 0010480 Affected Issues
0010480
mod - src/backend/taler-merchant-httpd_post-orders-ID-pay.c Diff File
mod - src/merchant-tools/taler-merchant-passwd.c Diff File

Issue History

Date Modified Username Field Change
2025-10-09 14:19 avalos New Issue
2025-10-09 14:19 avalos Status new => assigned
2025-10-09 14:19 avalos Assigned To => Florian Dold
2025-10-09 14:19 Florian Dold Target Version => 1.2
2025-10-14 11:02 Bohdan Note Added: 0026166
2025-10-14 11:02 Bohdan File Added: image.png
2025-10-24 00:55 Christian Grothoff Assigned To Florian Dold => Christian Grothoff
2025-10-26 13:53 Christian Grothoff Note Added: 0026248
2025-10-26 13:53 Christian Grothoff Changeset attached => merchant master 18fcc8b1
2025-10-26 13:53 Christian Grothoff Note Added: 0026249
2025-10-26 13:53 Christian Grothoff Status assigned => resolved
2025-10-26 13:53 Christian Grothoff Resolution open => fixed
2025-10-26 13:53 Christian Grothoff Product Version => 1.0
2025-10-26 13:53 Christian Grothoff Fixed in Version => 1.2