Skip to content

PayPal delivered marking: documented request, visible errors, manual retry - #46

Merged
flocom merged 1 commit into
mainfrom
claude/eloquent-goldberg-j1m35m
Nov 8, 2026
Merged

flocom merged 1 commit into
mainfrom
claude/eloquent-goldberg-j1m35m

Conversation

@flocom

@flocom flocom commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Problem

A PayPal payment received on a production instance was not marked delivered on PayPal. Two causes are likely in our code, and the error was only visible in the server logs.

Changes

  • The tracker request now matches PayPal's documented "without tracking number" request exactly: transaction_id, status: DELIVERED, notify_buyer: false. It no longer sends a carrier or a tracking number.
  • The tracking call no longer sends a PayPal-Request-Id. With a fixed id, PayPal answered every retry with the cached first (failed) response, so retries could never succeed.
  • PayPal's error is now written in the invoice history and the payments log ("PayPal refused to mark it delivered (retried every 10 minutes)" with PayPal's message). It is logged once per new error, not on every retry.
  • On the invoice page, a PayPal payment not yet marked delivered shows a "Not marked delivered on PayPal" chip and a "Mark delivered now" button. The button retries immediately and shows PayPal's answer.

Tests

  • TestPayPalPayments now checks:
    • the exact tracker body (3 fields, no carrier) and the absence of a request id;
    • a batch error (HTTP 200 with errors) shown on the invoice;
    • the manual button showing PayPal's answer;
    • the retry succeeding and the chip disappearing.
  • go vet ./... and go test ./... pass.

Generated by Claude Code

…retry

- Send exactly PayPal's documented "without tracking number" tracker
  (transaction id, DELIVERED, notify_buyer false; no carrier)
- No PayPal-Request-Id on the tracking call: PayPal answered every retry
  with the first (failed) response
- PayPal's error is written in the invoice history (once per new error)
- On the invoice, a PayPal payment not yet marked delivered shows it,
  with a button to try again that shows PayPal's answer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YNKYNHd3eL2ATBFA32LLp
@flocom
flocom merged commit 0af855c into main Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants