package httpapi import "net/http" // testPage serves a self-contained, same-origin manual test page at GET /_test. // Same origin as the API → no CORS, and pangolin-pay sets no restrictive CSP, // so its inline JS/CSS run freely. This is a throwaway harness for the // money-critical Phase E loop (create order → pay exact amount → watch paid), // NOT the production checkout (that lives on the storefront). It only creates // orders and polls status — no secrets, no keys. // // Styling mirrors the marketing site's warm sand/clay palette (design tokens in // design/prototype/tokens.css, light theme default, brand = clay-500 #B96A3D). // Values are inlined here because pangolin-pay is a separate origin and cannot // @import the site's stylesheet; keep them in sync if the brand palette changes. func (h *Handler) testPage(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Cache-Control", "no-store") _, _ = w.Write([]byte(testPageHTML)) } const testPageHTML = ` pangolin-pay · 收款测试

pangolin-pay · 收款测试

USDT-TRC20 · 单地址 + 唯一金额 · 手动测试页(非生产收银台)

测什么:收款订单闭环 —— POST /order 建单拿地址+唯一金额、GET /order/{id} 轮询到 paid。地址模型:所有订单收到同一地址,靠唯一金额(基准价 + 微尾数 ≤0.01U)区分。本页无私钥、无密钥。

`