Passed
Push — master ( fe77d5...879265 )
by Sogunle
02:02
created

com.rave.Endpoints.getValidateCardChargeEndPoint()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
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.rave;
7
8
9
/**
10
 *
11
 * @author Theresa
12
 */
13
public class Endpoints {
14
       RaveConstant key= new RaveConstant();
15
      String staging_url="https://ravesandboxapi.flutterwave.com/";
16
      String live_url="https://api.ravepay.co/";
17
      String  url;
18
      public  String BANK_ENDPOINT;
19
      public static String CHARGE_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
20
      public static String CARD_VALIDATE_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
21
      public static String ACCOUNT_VALIDATE_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
22
      public static String TIMEOUT_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
23
      public static String POLL_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
24
      public static String FEES_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
25
      public static String REFUND_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
26
      public static String FOREX_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
27
      public static String VERIFY_TRANSACTION_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
28
      public static String VERIFY_XREQUERY_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
29
      public static String CAPTURE_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
30
      public static String REFUNDVOID_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
31
      public static String CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
32
      public static String VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
33
      public static String VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT;
0 ignored issues
show
Security introduced by
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...
34
    
35
      
36
     
37
      void init(){
38
      
39
40
          if(RaveConstant.ENVIRONMENT.toString().equalsIgnoreCase("live")){
0 ignored issues
show
Best Practice introduced by
String comparisions are null-safe when you put the literal (i.e. live) on the left side.
Loading history...
41
           
42
            url=live_url;
43
          
44
          }
45
          else {
46
          url=staging_url;
47
          }
48
         
49
       BANK_ENDPOINT= url+"flwv3-pug/getpaidx/api/flwpbf-banks.js?json=1";
50
       CHARGE_ENDPOINT =url+"flwv3-pug/getpaidx/api/charge";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like CHARGE_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...
51
       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...
52
       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...
53
       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 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...
54
       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...
55
        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...
56
       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...
57
       FOREX_ENDPOINT=url+"flwv3-pug/getpaidx/api/forex";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like FOREX_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...
58
       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...
59
       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...
60
        CAPTURE_ENDPOINT=url+"flwv3-pug/getpaidx/api/capture";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like CAPTURE_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
        REFUNDVOID_ENDPOINT=url+"flwv3-pug/getpaidx/api/refundorvoid";
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 REFUNDVOID_ENDPOINT should be synchronized.
Loading history...
62
        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...
63
        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...
64
        VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT= url+"flwv3-pug/getpaidx/api/validate?use_polling=1";
0 ignored issues
show
Bug Multi Threading introduced by
Lazy initializations of static fields like VALIDATE_ACCOUNT_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
       
66
      }
67
      
68
     public String getBankEndPoint(){
69
         init();
70
         return BANK_ENDPOINT;
71
     
72
     }
73
     
74
     public String getChargeEndPoint(){
75
         init();
76
         return CHARGE_ENDPOINT;
77
     
78
     }
79
     public String getValidateCardChargeEndPoint(){
80
         init();
81
         return CARD_VALIDATE_ENDPOINT;
82
     
83
     }
84
       public String getValidateAccountChargeEndPoint(){
85
         init();
86
         return ACCOUNT_VALIDATE_ENDPOINT;
87
     
88
     }
89
     public String getFeesEndPoint(){
90
         init();
91
         return FEES_ENDPOINT;
92
     
93
     }
94
     public String getRefundEndPoint(){
95
         init();
96
         return REFUND_ENDPOINT;
97
     
98
     }
99
     public String getForexEndPoint(){
100
         init();
101
         return FOREX_ENDPOINT;
102
     
103
     }
104
     public String getVerifyEndPoint(){
105
         init();
106
         return VERIFY_TRANSACTION_ENDPOINT;
107
     
108
     }
109
     public String getVerifyXrequeryEndPoint(){
110
         init();
111
         return VERIFY_XREQUERY_ENDPOINT;
112
     
113
     }
114
     public String getCaptureEndPoint(){
115
         init();
116
         return CAPTURE_ENDPOINT;
117
     
118
     }
119
     public String getRefundOrVoidEndPoint(){
120
         init();
121
         return  REFUNDVOID_ENDPOINT;
122
     
123
     }
124
      public String getChargeTimeoutEndpoint(){
125
         init();
126
         return CHARGE_TIMEOUT_ENDPOINT;
127
     
128
     }
129
        public String getValidateCardChargeTimeoutEndpoint(){
130
         init();
131
         return VALIDATE_CARD_CHARGE_TIMEOUT_ENDPOINT;
132
     
133
     }
134
       public String getValidateAccountChargeTimeoutEndpoint(){
135
         init();
136
         return VALIDATE_ACCOUNT_CHARGE_TIMEOUT_ENDPOINT;
137
     
138
     }
139
       
140
    
141
      
142
      
143
      
144
}
145