Issues (164)

main/java/com/github/theresasogunle/Endpoints.java (46 issues)

1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package com.github.theresasogunle;
7
8
import com.github.theresasogunle.RaveConstant;
9
10
11
/**
12
 *
13
 * @author Theresa
14
 */
15
public class Endpoints {
16
       RaveConstant key= new RaveConstant();
17
      String staging_url="https://ravesandboxapi.flutterwave.com/";
18
      String live_url="https://api.ravepay.co/";
19
      String  url;
20
      public  String BANK_ENDPOINT;
21
      public static String CHARGE_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making CHARGE_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
22
      public static String CARD_VALIDATE_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making CARD_VALIDATE_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
23
      public static String ACCOUNT_VALIDATE_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making ACCOUNT_VALIDATE_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
24
      public static String TIMEOUT_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making TIMEOUT_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
25
      public static String POLL_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making POLL_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
26
      public static String FEES_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making FEES_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
27
      public static String REFUND_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making REFUND_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
28
      public static String FOREX_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making FOREX_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
29
      public static String VERIFY_TRANSACTION_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making VERIFY_TRANSACTION_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
30
      public static String VERIFY_XREQUERY_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making VERIFY_XREQUERY_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
31
      public static String CAPTURE_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making CAPTURE_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
32
      public static String REFUNDVOID_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making REFUNDVOID_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
33
      public static String CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making CHARGE_TIMEOUT_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
34
      public static String VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
35
      public static String VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
public static fields should always be marked final to prevent them being overwritten in unexpected ways. Consider making VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT final.

See this CWE advisory on why this is a security issue.

Loading history...
36
    
37
      
38
     
39
      void init(){
40
      
41
42
          if(RaveConstant.ENVIRONMENT.toString().equalsIgnoreCase("live")){
0 ignored issues
show
String comparisions are null-safe when you put the literal (i.e. live) on the left side.
Loading history...
43
           
44
            url=live_url;
45
          
46
          }
47
          else {
48
          url=staging_url;
49
          }
50
         
51
       BANK_ENDPOINT= url+"flwv3-pug/getpaidx/api/flwpbf-banks.js?json=1";
52
       CHARGE_ENDPOINT =url+"flwv3-pug/getpaidx/api/charge";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like CHARGE_ENDPOINT should be synchronized.
Loading history...
53
       CARD_VALIDATE_ENDPOINT = url+"flwv3-pug/getpaidx/api/validatecharge";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like CARD_VALIDATE_ENDPOINT should be synchronized.
Loading history...
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
54
       ACCOUNT_VALIDATE_ENDPOINT=url+"flwv3-pug/getpaidx/api/validate";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like ACCOUNT_VALIDATE_ENDPOINT should be synchronized.
Loading history...
55
       TIMEOUT_ENDPOINT=url+"flwv3-pug/getpaidx/api/charge?use_polling=1";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like TIMEOUT_ENDPOINT should be synchronized.
Loading history...
56
       POLL_ENDPOINT=url+"flwv3-pug/getpaidx/api/requests/RCORE_CHREQ_3FC28781846AD8E1C598";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like POLL_ENDPOINT should be synchronized.
Loading history...
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
57
        FEES_ENDPOINT=url+"flwv3-pug/getpaidx/api/fee";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like FEES_ENDPOINT should be synchronized.
Loading history...
58
       REFUND_ENDPOINT=url+"gpx/merchant/transactions/refund";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like REFUND_ENDPOINT should be synchronized.
Loading history...
59
       FOREX_ENDPOINT=url+"flwv3-pug/getpaidx/api/forex";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like FOREX_ENDPOINT should be synchronized.
Loading history...
60
       VERIFY_TRANSACTION_ENDPOINT=url+"flwv3-pug/getpaidx/api/verify";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like VERIFY_TRANSACTION_ENDPOINT should be synchronized.
Loading history...
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
61
       VERIFY_XREQUERY_ENDPOINT=url+"flwv3-pug/getpaidx/api/xrequery";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like VERIFY_XREQUERY_ENDPOINT should be synchronized.
Loading history...
62
        CAPTURE_ENDPOINT=url+"flwv3-pug/getpaidx/api/capture";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like CAPTURE_ENDPOINT should be synchronized.
Loading history...
63
        REFUNDVOID_ENDPOINT=url+"flwv3-pug/getpaidx/api/refundorvoid";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like REFUNDVOID_ENDPOINT should be synchronized.
Loading history...
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
64
        CHARGE_TIMEOUT_ENDPOINT=url+"flwv3-pug/getpaidx/api/charge?use_polling=1";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like CHARGE_TIMEOUT_ENDPOINT should be synchronized.
Loading history...
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
65
        VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT=url+"flwv3-pug/getpaidx/api/validatecharge?use_polling=1";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT should be synchronized.
Loading history...
66
        VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT= url+"flwv3-pug/getpaidx/api/validate?use_polling=1";
0 ignored issues
show
Bug Multi Threading introduced by
Instance methods writing to static fields may lead to concurrency problems. Consider making the enclosing method static or removing this assignment to a static field.

If you really need to set this static field, consider writing a thread-safe setter and atomic getter.

Loading history...
Bug Multi Threading introduced by
Lazy initializations of static fields like VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT should be synchronized.
Loading history...
67
       
68
      }
69
      
70
     public String getBankEndPoint(){
71
         init();
72
         return BANK_ENDPOINT;
73
     
74
     }
75
     
76
     public String getChargeEndPoint(){
77
         init();
78
         return CHARGE_ENDPOINT;
79
     
80
     }
81
     public String getValidateCardChargeEndPoint(){
82
         init();
83
         return CARD_VALIDATE_ENDPOINT;
84
     
85
     }
86
       public String getValidateAccountChargeEndPoint(){
87
         init();
88
         return ACCOUNT_VALIDATE_ENDPOINT;
89
     
90
     }
91
     public String getFeesEndPoint(){
92
         init();
93
         return FEES_ENDPOINT;
94
     
95
     }
96
     public String getRefundEndPoint(){
97
         init();
98
         return REFUND_ENDPOINT;
99
     
100
     }
101
     public String getForexEndPoint(){
102
         init();
103
         return FOREX_ENDPOINT;
104
     
105
     }
106
     public String getVerifyEndPoint(){
107
         init();
108
         return VERIFY_TRANSACTION_ENDPOINT;
109
     
110
     }
111
     public String getVerifyXrequeryEndPoint(){
112
         init();
113
         return VERIFY_XREQUERY_ENDPOINT;
114
     
115
     }
116
     public String getCaptureEndPoint(){
117
         init();
118
         return CAPTURE_ENDPOINT;
119
     
120
     }
121
     public String getRefundOrVoidEndPoint(){
122
         init();
123
         return  REFUNDVOID_ENDPOINT;
124
     
125
     }
126
      public String getChargeTimeoutEndpoint(){
127
         init();
128
         return CHARGE_TIMEOUT_ENDPOINT;
129
     
130
     }
131
        public String getValidateCardChargeTimeoutEndpoint(){
132
         init();
133
         return VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT;
134
     
135
     }
136
       public String getValidateAccountChargeTimeoutEndpoint(){
137
         init();
138
         return VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT;
139
     
140
     }
141
       
142
    
143
      
144
      
145
      
146
}
147