Duplicate callback parameters: quarantine ambiguous keys and credit one trusted object
Taking the first or last duplicate value can make signature verification and accounting see different requests. Resolve structural ambiguity under the formal contract before crediting. This question concerns duplicate keys rather than character encoding.
Continue by topic
Confirm commercial terms and the notification contract
WeChat Pay, Alipay and UnionPay depend on approved configuration. Confirm eligibility, onboarding documents, fee basis and per-order/cumulative limits. Merchant USDT settlement of CNY collections currently uses TRON/TRC20 only; confirm conditions, fees and timing separately. A parser fix does not open an automated payout API.
Obtain gateways, merchant parameters and secrets privately. Confirm method, content type, single-value fields, permitted repeats and query-string usage with the team. Keep payment success, business credit or entitlement delivery, and merchant settlement separate; successful parsing proves none of these on its own.
Detect ambiguity before building a plain dictionary
Map what the proxy, framework, middleware and business code read. Preserve form key/value pairs until repeated critical keys have been detected. A plain dictionary may already have discarded evidence. Use a JSON parser policy that detects duplicate members rather than assuming every parser rejects them.
In your isolated receiver, fictional item_ref=DEMO-A&item_ref=DEMO-B reveals local parser behavior; item_ref is not a platform field. Also test query/body collisions. Quarantine a repeated critical field when the formal contract requires one value. Preserve documented ordering and representation for genuinely permitted multivalue fields.
Share one validated object between verification and accounting
Perform required structural checks, then build the signature input under the formal algorithm. Never try alternative combinations until a signature passes, or merge query, form and JSON sources automatically. Freeze the verified object; business code must not reread an order or amount from another parameter collection.
Match merchant, environment, original order, amount, currency and success status. Use a transaction and unique claim for one-time credit. Do not acknowledge business completion for an ambiguous notification. Agree error responses and retries instead of inventing status codes. Retain redacted counts and reasons, excluding secrets and sensitive full bodies.
Test permutations through the actual proxy chain
Use your own test receiver for equal repeats, conflicting repeats, reversed order, empty/repeated values, query/body conflicts and duplicate JSON members. Compare edge, verification and business interpretations. Final HTTP status alone can hide disagreement.
A valid single-value sample credits once. Ambiguous samples add zero business balance; replays of completed orders add zero again. Record quarantines, investigation results and original-order status. Confirm compatibility fixes with the team, then reconcile payment evidence, business entries and USDT settlement references.
Frequently asked questions
Can identical duplicate values be ignored?
Only under an explicitly confirmed contract and consistent parsing. Equality alone does not authorize repeated fields.
May I select whichever value passes verification?
No. Use one deterministic, confirmed interpretation rather than searching for a passing combination.