Completed
Pull Request — 2 (#344)
by Jason
11:22
created
code/controllers/FoxyStripe_Controller.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -2,37 +2,37 @@  discard block
 block discarded – undo
2 2
 
3 3
 class FoxyStripe_Controller extends Page_Controller {
4 4
 	
5
-	const URLSegment = 'foxystripe';
5
+    const URLSegment = 'foxystripe';
6 6
 
7
-	public function getURLSegment() {
8
-		return self::URLSegment;
9
-	}
7
+    public function getURLSegment() {
8
+        return self::URLSegment;
9
+    }
10 10
 	
11
-	static $allowed_actions = array(
12
-		'index',
11
+    static $allowed_actions = array(
12
+        'index',
13 13
         'sso'
14
-	);
14
+    );
15 15
 	
16
-	public function index() {
17
-	    // handle POST from FoxyCart API transaction
18
-		if ((isset($_POST["FoxyData"]) OR isset($_POST['FoxySubscriptionData']))) {
19
-			$FoxyData_encrypted = (isset($_POST["FoxyData"])) ?
16
+    public function index() {
17
+        // handle POST from FoxyCart API transaction
18
+        if ((isset($_POST["FoxyData"]) OR isset($_POST['FoxySubscriptionData']))) {
19
+            $FoxyData_encrypted = (isset($_POST["FoxyData"])) ?
20 20
                 urldecode($_POST["FoxyData"]) :
21 21
                 urldecode($_POST["FoxySubscriptionData"]);
22
-			$FoxyData_decrypted = rc4crypt::decrypt(FoxyCart::getStoreKey(),$FoxyData_encrypted);
23
-			self::handleDataFeed($FoxyData_encrypted, $FoxyData_decrypted);
22
+            $FoxyData_decrypted = rc4crypt::decrypt(FoxyCart::getStoreKey(),$FoxyData_encrypted);
23
+            self::handleDataFeed($FoxyData_encrypted, $FoxyData_decrypted);
24 24
 			
25
-			// extend to allow for additional integrations with Datafeed
26
-			$this->extend('addIntegrations', $FoxyData_encrypted);
25
+            // extend to allow for additional integrations with Datafeed
26
+            $this->extend('addIntegrations', $FoxyData_encrypted);
27 27
 			
28
-			return 'foxy';
28
+            return 'foxy';
29 29
 			
30
-		} else {
30
+        } else {
31 31
 			
32
-			return "No FoxyData or FoxySubscriptionData received.";
32
+            return "No FoxyData or FoxySubscriptionData received.";
33 33
 			
34
-		}
35
-	}
34
+        }
35
+    }
36 36
 
37 37
     public function handleDataFeed($encrypted, $decrypted){
38 38
         //handle encrypted & decrypted data
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
 
218 218
 
219 219
 
220
-	// Single Sign on integration with FoxyCart
220
+    // Single Sign on integration with FoxyCart
221 221
     public function sso() {
222 222
 
223
-	    // GET variables from FoxyCart Request
223
+        // GET variables from FoxyCart Request
224 224
         $fcsid = $this->request->getVar('fcsid');
225 225
         $timestampNew = strtotime('+30 days');
226 226
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $redirect_complete = 'https://' . $link . '/checkout?fc_auth_token=' . $auth_token .
247 247
             '&fcsid=' . $fcsid . '&fc_customer_id=' . $Member->Customer_ID . '&timestamp=' . $timestampNew;
248 248
 	
249
-	    $this->redirect($redirect_complete);
249
+        $this->redirect($redirect_complete);
250 250
 
251 251
     }
252 252
 	
Please login to merge, or discard this patch.