Repository navigation
Conversation
Failed Parampos results now resolve the bank's ISO 8583 code in Banka_Sonuc_Kod first, then Param's negative Sonuc codes (PARAMPOS_ERROR_CODES, exported). Unmapped codes stay UNKNOWN with the raw Sonuc in errorCode. Closes #82.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
ParamPOS yasal dava süreci sebebiyle dev dökümanlarına erişilemiyor, bu sebeple teyit edilemediğinden PR bekletilecektir. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Closes #82
Before: every Parampos decline (Param's
Sonucand the bank's code) resolved tocode: UNKNOWN, solocalizedErrorsshowed a generic message.After: a declined Parampos payment returns a specific
code. The bank's ISO 8583 code inBanka_Sonuc_Kodwins (51→INSUFFICIENT_FUNDS,05→CARD_DECLINED,54→EXPIRED_CARD,82→INVALID_CVC); otherwise Param's negativeSonuccodes are mapped (-105→INVALID_CVC,-119→INVALID_CARD,-2xxrefund/cancel errors →INVALID_REQUEST, configuration errors →PROVIDER_ERROR). Unmapped codes stayUNKNOWN, anderrorCodestill carries the rawSonuc.How: new
src/providers/parampos/error-codes.ts(PARAMPOS_ERROR_CODES, exported fromsrc/index.ts), returned fromerrorCodeTable().ParamposoverridesresolveErrorCode()like Akbank, readingBanka_Sonuc_Kodfrom the SOAP result (or frompaymentafter 3D completion) and padding one-digit codes. Sources for the codes: Param's TurkPOS result code list (as published in the TurkPOS integration guide, e.g. mirrored in BARISUZN/parampos); the field nameBanka_Sonuc_Kodmatches parampos.go. The code list is documented without a sign; the table uses negative keys because Param returns failures as negativeSonuc(a positiveSonucmeans success, and the existing tests use-100for "Hesap bulunamadı").The changeset carries the
<!-- docs -->entry from #145 (check-changesets.mjspasses).Checklist
pnpm lint,pnpm typecheckandpnpm testpasspnpm changeset)node apps/web/scripts/check-translations.mjs), or no docs change is needed<Since version="x.y.z" />badge in their docs, or no badge is needed