imroved the logic of intentpaymentapi
This commit is contained in:
@@ -141,7 +141,43 @@ public class BBPSConstant {
|
||||
public static final String RESPONSE_GENERAL_RESP = "generalResp";
|
||||
public static final String SUCCESS_RESPONSE = "SUCCESS";
|
||||
|
||||
// Newly added constants used by ComplainServiceImpl
|
||||
// Newly added constants for Payment integration (avoid magic strings in service code)
|
||||
public static final String UAT_PAYMENT_URL_WEB = "https://uat.godemo.in/api/UATIntegration/uat/payin/paymentrequest";
|
||||
public static final String UAT_PAYMENT_URL_INTENT = "https://uat.godemo.in/api/UATIntegration/paymentrequest/seamless";
|
||||
public static final String RESP_CODE_KEY = "respCode"; // key used by HttpService responses
|
||||
|
||||
public static final String RESPONSE_TYPE_HTML = "HTML";
|
||||
public static final String RESPONSE_TYPE_QR = "QR";
|
||||
public static final String RESPONSE_TYPE_JSON = "JSON";
|
||||
|
||||
public static final String API_START_PAYMENT = "StartPayment";
|
||||
public static final String WARNING_STATUS = "WARNING";
|
||||
public static final String SIGNATURE_MISMATCH = "SIGNATURE_MISMATCH";
|
||||
|
||||
// Additional constants to remove magic values from service implementation
|
||||
public static final String ORDER_PREFIX = "ORD";
|
||||
public static final String DEFAULT_DATE_OF_REG = "2025-12-31";
|
||||
public static final String TXN_REQ_TYPE = "S";
|
||||
|
||||
// Common numeric status codes used by payment provider
|
||||
public static final int STATUS_CODE_205 = 205;
|
||||
public static final int STATUS_CODE_206 = 206;
|
||||
public static final int STATUS_CODE_207 = 207;
|
||||
public static final int STATUS_CODE_1003 = 1003;
|
||||
|
||||
// Callback status labels (preserve existing uppercase values expected in DB)
|
||||
public static final String CALLBACK_STATUS_SUCCESS = "SUCCESS";
|
||||
public static final String CALLBACK_STATUS_FAILED = "FAILED";
|
||||
public static final String CALLBACK_STATUS_RECEIVED = "RECEIVED";
|
||||
|
||||
// Merchant acknowledgement codes returned to PG/callback
|
||||
public static final String MERCHANT_ACK_OK = "206";
|
||||
public static final String MERCHANT_ACK_NO_MATCH = "205";
|
||||
public static final String MERCHANT_ACK_REJECT = "207";
|
||||
|
||||
public static final String HTML_RESPONSE_MESSAGE = "HTML Response Received";
|
||||
|
||||
// Restore constants used by TxnHistoryServiceImpl and ComplainServiceImpl
|
||||
public static final String DB_OPTIONS = "/db/options"; // used as a logical URL/identifier for master options
|
||||
public static final String NULL_DATA_FROM_DB = "NULL_DATA_FROM_DB";
|
||||
public static final String NO_MASTER_FIELDS_FOUND = "No master fields found";
|
||||
@@ -150,6 +186,20 @@ public class BBPSConstant {
|
||||
public static final String SOMETHING_WENT_WRONG = "Something went wrong";
|
||||
public static final String USER_ID_IS_EMPTY = "User id is empty";
|
||||
|
||||
// Common user-facing and internal message constants used by payment flow
|
||||
public static final String MSG_UPSTREAM_HTTP_ERROR = "Upstream HTTP error";
|
||||
public static final String MSG_EMPTY_RESPONSE_PROVIDER = "Empty response from payment provider";
|
||||
public static final String MSG_EMPTY_RESPONSE_PG = "Empty response from PG";
|
||||
public static final String MSG_INVALID_JSON_FROM_API = "Invalid JSON received from payment API";
|
||||
public static final String MSG_TXN_PROCESSING = "Transaction processing";
|
||||
public static final String MSG_WARNING_FROM_MERCHANT = "Warning from merchant";
|
||||
public static final String MSG_FRAUD_REJECTED = "Fraud Rejected";
|
||||
public static final String MSG_DECRYPTION_FAILED = "Decryption failed";
|
||||
public static final String MSG_INVALID_DECRYPTED_JSON = "Invalid decrypted JSON";
|
||||
public static final String MSG_NO_MATCHING_RECORD = "No matching record";
|
||||
public static final String MSG_SIGNATURE_MISMATCH = "Signature mismatch";
|
||||
public static final String MSG_CALLBACK_PROCESSED = "Callback processed";
|
||||
|
||||
// Timing/delay constants (milliseconds)
|
||||
public static final long BILL_FETCH_DELAY_MS = 5000L; // used after initiate bill fetch
|
||||
public static final long BILL_VALIDATE_DELAY_MS = 12000L; // used after initiate bill validate
|
||||
|
||||
Reference in New Issue
Block a user