Completed
Push — master ( 2f361f...005dad )
by Harish
02:47
created
src/Mojo.php 1 patch
Braces   +7 added lines, -20 removed lines patch added patch discarded remove patch
@@ -85,29 +85,17 @@  discard block
 block discarded – undo
85 85
 	{
86 86
 		if (!config('laravelmojo.key')) {
87 87
 			throw new Exception('Please set the Instamojo API key in your env file');
88
-		}
89
-
90
-		elseif(!config('laravelmojo.token')) {
88
+		} elseif(!config('laravelmojo.token')) {
91 89
 			throw new Exception('Please set the Instamojo token in your env file');
92
-		}
93
-
94
-		elseif(!config('laravelmojo.redirect_url_after_payment')) {
90
+		} elseif(!config('laravelmojo.redirect_url_after_payment')) {
95 91
 			throw new Exception('Please set the redirect url in your env file');
96
-		}
97
-
98
-		elseif(!config('laravelmojo.subdomain_for_endpoints')) {
92
+		} elseif(!config('laravelmojo.subdomain_for_endpoints')) {
99 93
 			throw new Exception('Please set the subdomain for Instamojo api endpoint in your env file');
100
-		}
101
-
102
-		elseif(!config('laravelmojo.webhook_url')) {
94
+		} elseif(!config('laravelmojo.webhook_url')) {
103 95
 			throw new Exception('Please set the webhook url in your env file');
104
-		}
105
-
106
-		elseif(!config('laravelmojo.salt')) {
96
+		} elseif(!config('laravelmojo.salt')) {
107 97
 			throw new Exception('Please set the instamojo salt in your env file');
108
-		}
109
-
110
-		else {
98
+		} else {
111 99
 			return true;
112 100
 		}
113 101
 	}
@@ -128,8 +116,7 @@  discard block
 block discarded – undo
128 116
 			                                     "X-Auth-Token:{$api_token}"]);
129 117
 			return $ch;
130 118
 
131
-		}
132
-		else {
119
+		} else {
133 120
 			throw new Exception('CURL extension is not loaded');
134 121
 		}
135 122
 	}
Please login to merge, or discard this patch.
src/controllers/WebhookController.php 1 patch
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
 		$minor = (int) $ver[1];
19 19
 		if($major >= 5 && $minor >= 4){
20 20
 		     ksort($data, SORT_STRING | SORT_FLAG_CASE);
21
-		}
22
-		else{
21
+		} else{
23 22
 		     uksort($data, 'strcasecmp');
24 23
 		}
25 24
 		
@@ -27,13 +26,10 @@  discard block
 block discarded – undo
27 26
 		if($mac_provided == $mac_calculated){
28 27
 		    if($data['status'] == "Credit") {
29 28
 		    	$this->updateDB($data);
30
-		    }
31
-
32
-		    else {		        		    	
29
+		    } else {		        		    	
33 30
 		    	$this->updateDB($data);
34 31
 		    }
35
-		}
36
-		else{
32
+		} else{
37 33
 		    echo "MAC mismatch";
38 34
 		}
39 35
 	}
Please login to merge, or discard this patch.