Coverage for src/integrify/kapital/schemas/enums.py: 100%

46 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-02-10 00:57 +0000

1from enum import Enum 

2 

3 

4class TransactionStatus(str, Enum): 

5 BEING_PREPARED = 'Preparing' 

6 """Order is being prepared, no transactions have been executed on it yet.""" 

7 

8 CANCELLED = 'Cancelled' 

9 """Order has been cancelled by the consumer (before payment). (Order is cancelled by the merchant.)""" # noqa: E501 

10 

11 REJECTED = 'Rejected' 

12 """Order has been rejected by the PSP (before payment). (Order is rejected by the PSP.)""" 

13 

14 REFUSED = 'Refused' 

15 """Consumer has refused to pay for the order (before payment or after unsuccessful payment attempt). (Order is refused by the consumer.)""" # noqa: E501 

16 

17 EXPIRED = 'Expired' 

18 """Order has expired (before payment). (Timeout occurs when executing the order scenario.)""" 

19 

20 AUTHORIZED = 'Authorized' 

21 """Order has been authorized.(Authorization transaction is executed.)""" 

22 

23 PARTIALLY_PAID = 'PartiallyPaid' 

24 """Order has been partially paid. (Clearing transaction is executed for the part of the order amount.)""" # noqa: E501 

25 

26 FULLY_PAID = 'FullyPaid' 

27 """Order has been fully paid. (Clearing transaction is executed for the full order amount (or several clearing transactions).)""" # noqa: E501 

28 

29 FUNDED = 'Funded' 

30 """Order has been funded (debit transaction has been executed). The status can be assigned only to the order of the DualStep Transfer Order class.""" # noqa: E501 

31 

32 DECLINED = 'Declined' 

33 """* AReq and RReq (3DS 2) could not be executed due to rejection by the issuer / error during authentication. 

34 * Operation was declined by PMO""" # noqa: E501 

35 

36 VOIDED = 'Voided' 

37 """Authorized payment amount under the order is zero.""" 

38 

39 REFUNDED = 'Refunded' 

40 """Accounted payment amount and the accounted refund amount under the order are equal.""" 

41 

42 CLOSED = 'Closed' 

43 """Order has been closed (after payment)""" 

44 

45 

46class ErrorCode(str, Enum): 

47 INVALID_AMOUNT = 'InvalidAmt' 

48 """Invalid amount""" 

49 

50 INVALID_REQUEST = 'InvalidRequest' 

51 """Invalid request""" 

52 

53 INVALID_TRANSACTION = 'InvalidTran' 

54 """Invalid transaction""" 

55 

56 INVALID_TRANSACTION_LINKAGE = 'InvalidTranLink' 

57 """Invalid transaction linkage""" 

58 

59 TRANSACTION_PROHIBITED = 'TranProhibited' 

60 """Transaction prohibited""" 

61 

62 ACTION_APP_EXCEPTION = 'ActionAppException' 

63 

64 CANT_CHOOSE_SETTLEMENT_ACCOUNT = 'CantChooseSettleAcct' 

65 """Can't choose settlement account""" 

66 

67 PMO_INTERFACE_NOT_FOUND = 'PmoIfaceNotFound' 

68 """Pmo interface not found""" 

69 

70 PMO_DECLINE = 'PmoDecline' 

71 """Transaction declined by PMO: {reason}""" 

72 

73 PMO_UNREACHABLE = 'PmoUnreachable' 

74 """Can't reach PMO""" 

75 

76 INVALID_CERTIFICATE = 'InvalidCert' 

77 """Invalid certificate""" 

78 

79 INVALID_LOGIN = 'InvalidLogin' 

80 """Invalid login or password""" 

81 

82 INVALID_ORDER_STATE = 'InvalidOrderState' 

83 """Invalid order state""" 

84 

85 INVALID_USER_SESSION = 'InvalidUserSession' 

86 """Invalid user session""" 

87 

88 NEED_CHANGE_PASSWORD = 'NeedChangePwd' 

89 """Need change password""" 

90 

91 OPERATION_PROHIBITED = 'OperationProhibited' 

92 """Operation prohibited""" 

93 

94 PASSWORD_TRY_LIMIT_EXCEEDED = 'PwdTryLimitExceeded' 

95 """Password try limit exceeded""" 

96 

97 USER_SESSION_EXPIRED = 'UserSessionExpired' 

98 """User session expired""" 

99 

100 COF_PROVIDER_DECLINE = 'CofpDecline' 

101 """Declined by CoF Provider: {Reason}""" 

102 

103 COF_PROVIDER_UNREACHABLE = 'CofpUnreachable' 

104 """Can't reach CoF Provider""" 

105 

106 INVALID_TOKEN = 'InvalidToken' 

107 """Invalid token""" 

108 

109 INVALID_AUTH_STATUS = 'InvalidAutStatus' 

110 """Invalid authentication status""" 

111 

112 CONSUMER_NOT_FOUND = 'ConsumerNotFound' 

113 """Consumer not found""" 

114 

115 INVALID_CONSUMER = 'InvalidConsumer' 

116 """Invalid consumer""" 

117 

118 INVALID_SECRET = 'InvalidSecret' 

119 """Invalid secret code""" 

120 

121 SECRET_TRY_LIMIT_EXCEEDED = 'SecretTryLimit' 

122 """Secret try limit has been exceeded""" 

123 

124 SERVICE_ERROR = 'ServiceError' 

125 """Service error""" 

126 

127 

128PMO_RESULT_CODES = { 

129 '0': '-', 

130 '1': 'Approved', 

131 '2': 'Approved Partial', 

132 '3': 'Approved Purchase Only', 

133 '4': 'Postponed', 

134 '5': 'Strong customer authentication required', 

135 '6': "Need Checker's confirmation", 

136 '7': 'Telebank customer already exists', 

137 '8': 'Should select virtual card product', 

138 '9': 'Should select account number', 

139 '10': 'Should change PVV', 

140 '11': 'Confirm payment precheck', 

141 '12': 'Select bill', 

142 '13': 'Customer confirmation requested', 

143 '14': 'Original transaction not found', 

144 '15': 'Slip already received', 

145 '16': 'Personal information input error', 

146 '17': 'SMS/EMail dynamic password requested', 

147 '18': 'DPA/CAP dynamic password requested', 

148 '19': 'Prepaid code not found', 

149 '20': 'Prepaid code not found', 

150 '21': 'Corresponding account exhausted', 

151 '22': 'Acquirer limit exceeded', 

152 '23': 'Cutover in process', 

153 '24': 'Dynamic PVV Expired', 

154 '25': 'Weak PIN', 

155 '26': 'External authentication required', 

156 '27': 'Additional data required', 

157 '29': 'Closed account', 

158 '30': 'Blocked', 

159 '40': 'Lost card', 

160 '41': 'Stolen card', 

161 '49': 'Ineligible vendor account', 

162 '50': 'Unauthorized usage', 

163 '51': 'Expired card', 

164 '52': 'Invalid card', 

165 '53': 'Invalid PIN', 

166 '54': 'System error', 

167 '55': 'Ineligible transaction', 

168 '56': 'Ineligible account', 

169 '57': 'Transaction not supported', 

170 '58': 'Restricted card', 

171 '59': 'Insufficient funds', 

172 '60': 'Uses limit exceeded', 

173 '61': 'Withdrawal limit would be exceeded', 

174 '62': 'PIN tries limit was reached', 

175 '63': 'Withdrawal limit already reached', 

176 '64': 'Credit amount limit', 

177 '65': 'No statement information', 

178 '66': 'Statement not available', 

179 '67': 'Invalid amount', 

180 '68': 'External decline', 

181 '69': 'No sharing', 

182 '71': 'Contact card issuer', 

183 '72': 'Destination not available', 

184 '73': 'Routing error', 

185 '74': 'Format error', 

186 '75': 'External decline special condition', 

187 '80': 'Bad CW', 

188 '81': 'Bad CVV2', 

189 '82': 'Invalid transaction', 

190 '83': 'PIN tries limit was exceeded', 

191 '84': 'Bad CAVV', 

192 '85': 'Bad ARQC', 

193 '90': 'Approve administrative card operation inside window', 

194 '91': 'Approve administrative card operation outside of window', 

195 '92': 'Approve administrative card operation', 

196 '93': 'Should select card', 

197 '94': 'Confirm Issuer Fee', 

198 '95': 'Insufficient cash', 

199 '96': 'Approved frictionless', 

200 '98': 'Invalid merchant', 

201}