aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-08-15 14:38:07 +0700
committerShulhan <ms@kilabit.info>2023-08-15 14:38:20 +0700
commite6d488096c580a0532e0c06719588a972130de55 (patch)
tree5004c2913b37692bb8452ebffa9193fc673c19eb
parente38426b6eea0bf190a58c49953c4b22fad98f692 (diff)
downloadduitku-e6d488096c580a0532e0c06719588a972130de55.tar.xz
all: add list of known error codes
The list is taken from https://docs.duitku.com/disbursement/id/?json#error-code
-rw-r--r--response.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/response.go b/response.go
index 7b34695..3522554 100644
--- a/response.go
+++ b/response.go
@@ -34,6 +34,35 @@ const (
StatusCodeErrTimestampExpired = `-960` // Timestamp is expired (5 minutes).
)
+// List of known [error codes].
+//
+// [error codes]: https://docs.duitku.com/disbursement/en/?json#error-code
+const (
+ ErrorCodeSuccess = `00`
+ ErrorCodeCardIssuer = `01`
+ ErrorCodeInvalidMerchant = `03`
+ ErrorCodeCaptureCard = `04`
+ ErrorCodeDonothonor = `05`
+ ErrorCodeInvalidTransaction = `12`
+ ErrorCodeInvalidAmount = `13`
+ ErrorCodeInvalidCardNumber = `14`
+ ErrorCodeInvalidIssuer = `15`
+ ErrorCodeInvalidResponse = `20`
+ ErrorCodeFormat = `30`
+ ErrorCodeUnsupportedBank = `31`
+ ErrorCodeExpiredCard = `33`
+ ErrorCodeRestrictedCard = `36`
+ ErrorCodePinTriesExceeded = `38`
+ ErrorCodeNoCreditAccount = `39`
+ ErrorCodeUnsupportedFunction = `40`
+ ErrorCodeLostCard = `41`
+ ErrorCodeStolenCard = `43`
+ ErrorCodeInsufficientFund = `51`
+ ErrorCodeNoChequingAccount = `52`
+ ErrorCodeTimeout = `68`
+ ErrorCodeIssueNotOperative = `91`
+)
+
// Response contains commons fields for each HTTP response.
type Response struct {
Code string `json:"responseCode"`