wp-update-server-plugin/wp-cli.yml
David Stone e8193bf3ea
feat(paypal): add comprehensive logging to PayPal Connect proxy (#29)
* chore: add wp-cli.yml and local dev environment docs

Point wp-cli at shared WordPress 7.0-RC2 multisite dev install at
../wordpress (wordpress.local:8080). Documents reset workflow and
WP-CLI usage in AGENTS.md.

* feat(paypal): add comprehensive logging to PayPal Connect proxy

Previously only the deauthorize endpoint logged anything. All other
endpoints (oauth/init, oauth/verify, partner-token) were silent, making
it impossible to debug failed PayPal API calls in production.

This commit adds:
- Protected log() helper with consistent '[PayPal Connect]' prefix and
  JSON-encoded context data
- get_debug_id() helper to extract the PayPal-Debug-Id response header
  from every PayPal API call (the key value PayPal support and the
  integration review team ask for by name)
- Request-received and outcome log entries on all handlers
- Error logging with PayPal-Debug-Id on all failed PayPal API calls:
  - /v1/oauth2/token (partner access token)
  - /v2/customer/partner-referrals
  - /v1/customer/partners/{partner_id}/merchant-integrations/{merchant_id}
- Success logging with debug ID and key response fields

Sensitive values (access tokens, client secrets) are never logged.

Context: the PayPal integration review requires debug IDs from test
API calls. Without server-side logging, the only way to get them was
to instrument the plugin side, which misses proxy-side failures entirely.
2026-04-08 14:50:54 -06:00

2 lines
52 B
YAML

path: ../wordpress
url: http://wordpress.local:8080