Skip to content

Secure AppDeploy bridge to PAYNEX Worker and D1 - #7

Draft
PDFly-source wants to merge 14 commits into
mainfrom
feat/appdeploy-worker-bridge
Draft

PDFly-source wants to merge 14 commits into
mainfrom
feat/appdeploy-worker-bridge

Conversation

@PDFly-source

@PDFly-source PDFly-source commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Keep Cloudflare Worker + D1 as the single source of truth for merchants, payment links, transactions, refunds and entitlements.
  • Add an admin-only endpoint to issue a dedicated bridge API key for an active merchant without revoking existing merchant keys.
  • Add the AppDeploy bridge architecture, allowlisted route contract and security guidance.
  • The separately deployed AppDeploy portal proxies merchant payment-link CRUD, UPI profile updates and public checkout initiation through server-side Worker requests.
  • Admin status checks verify Worker admin-token acceptance; merchant suspend/reactivate is synchronized with Worker D1 before AppDeploy access is changed.

Safety

  • Existing GitHub Pages checkout URLs and Worker checkout initiation, transaction states, provider webhooks, idempotency and fulfilment logic are unchanged.
  • Public checkout still shows PENDING after UPI intent; only authenticated provider confirmation can verify a transaction.
  • Worker bridge key issuance preserves all existing API keys.
  • Admin token and encryption key are stored as AppDeploy backend secrets and are not exposed to browser code.
  • No D1 schema migration or production Worker deployment was performed.

Verification

  • Latest feature-branch CI run for head 91c1dc3789263aacba9ecfdaa4e59dba3c3adde6: Worker syntax check, dependency install and Node test suite all passed.
  • AppDeploy deployment is ready with no reported frontend, backend or network QA errors.
  • Added five focused AppDeploy integration scenarios for merchant provisioning, access isolation, payment links, public checkout and admin suspension sync; these are coverage definitions, not a substitute for live PSP tests.
  • No real-money payment or ₹1 subscription test was performed.

Required before production use

  • Confirm ADMIN_API_TOKEN on the Cloudflare Worker exactly matches AppDeploy PAYNEX_WORKER_ADMIN_TOKEN by checking the Admin → Overview bridge status; the token values are not readable by this assistant.
  • Sign in as admin and verify the Worker status panel reports admin authorization success.
  • Run end-to-end tests with a test merchant and approved provider credentials before enabling production collections.
  • Review and merge this draft PR only after the admin authorization and merchant test flows are confirmed.

This branch has not been deployed

No deployments
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.

1 participant