Commit 2d8fb05
AppPurchase: log underlying error when status is canceled
The in_app_purchase plugin maps several silent Google Play rejections
to PurchaseStatus.canceled — offer ineligibility, missing payment
method, region mismatch, billing-service hiccups all surface the same
way as a real user-initiated cancel. Without the underlying error
fields we can't tell those apart, which has been blocking root-cause
on a cluster of "I bought Pro but it didn't activate" tickets from
v9.1.x Android users in China (e.g. engineering#3463 follow-up
investigation of FD #174173, where a renewing Pro user sees 7+
consecutive `canceled` responses across 30 minutes).
Capture productID, error.code, error.message, and error.details on
the canceled branch. On Android `error.details` typically contains
a Map with the raw BillingClient response_code and debug_message,
which is the signal we need to differentiate real cancels from silent
Play rejections.
No behavior change — the user-visible "Purchase canceled" snackbar
fires exactly as before. Single info-level log line added.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 41ae88c commit 2d8fb05
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
327 | 341 | | |
328 | 342 | | |
329 | 343 | | |
| |||
0 commit comments