Completed
Push — master ( 8bb85e...49a3ee )
by Harish
04:35
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
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
 		$minor = (int) $ver[1];
21 21
 		if($major >= 5 and $minor >= 4){
22 22
 		     ksort($data, SORT_STRING | SORT_FLAG_CASE);
23
-		}
24
-		else{
23
+		} else{
25 24
 		     uksort($data, 'strcasecmp');
26 25
 		}
27 26
 		
@@ -46,9 +45,7 @@  discard block
 block discarded – undo
46 45
 									   'request_status' => 'completed',
47 46
 									   'payment_status' => $data['status'],
48 47
 									 ]);
49
-		    }
50
-
51
-		    else{
48
+		    } else{
52 49
 		        
53 50
 		    	$user = User::where('email',$data['buyer'])->first();
54 51
 				$user_id = $user->id;
@@ -69,8 +66,7 @@  discard block
 block discarded – undo
69 66
 										 ]);
70 67
 
71 68
 		    }
72
-		}
73
-		else{
69
+		} else{
74 70
 		    echo "MAC mismatch";
75 71
 		}
76 72
 	}
Please login to merge, or discard this patch.