Completed
Push — master ( 55c29c...549295 )
by Jason
11:25 queued 08:42
created
src/ORM/FoxyStripePageExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
         if ($config->EnableSidecart) {
20 20
             Requirements::javascript(
21
-                "https://cdn.foxycart.com/" . FoxyCart::getFoxyCartStoreName() . "/loader.js",
21
+                "https://cdn.foxycart.com/".FoxyCart::getFoxyCartStoreName()."/loader.js",
22 22
                 [
23 23
                     "async" => true,
24 24
                     "defer" => true,
Please login to merge, or discard this patch.
src/Page/ProductPage.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,14 +187,13 @@  discard block
 block discarded – undo
187 187
 
188 188
         // allow extensions of ProductPage to override the PreviewImage field description
189 189
         $previewDescription = ($this->config()->get('customPreviewDescription')) ?
190
-            $this->config()->get('customPreviewDescription') :
191
-            _t(
190
+            $this->config()->get('customPreviewDescription') : _t(
192 191
                 'ProductPage.PreviewImageDescription',
193 192
                 'Image used throughout site to represent this product'
194 193
             );
195 194
 
196 195
         // Cateogry Dropdown field w/ add new
197
-        $source = function () {
196
+        $source = function() {
198 197
             return ProductCategory::get()->map()->toArray();
199 198
         };
200 199
         $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source())
@@ -328,7 +327,7 @@  discard block
 block discarded – undo
328 327
             $product = self::get()->byID($this->ID);
329 328
             if (isset($product->ParentID)) {
330 329
                 $origParent = $product->ParentID;
331
-            } else {
330
+            }else {
332 331
                 $origParent = null;
333 332
             }
334 333
             $currentParent = $this->ParentID;
@@ -415,8 +414,7 @@  discard block
 block discarded – undo
415 414
         $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName;
416 415
 
417 416
         return (FoxyStripeSetting::current_foxystripe_setting()->CartValidation)
418
-            ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) :
419
-            $optionValue;
417
+            ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue;
420 418
     }
421 419
 
422 420
     /**
Please login to merge, or discard this patch.
src/Controller/FoxyStripeController.php 1 patch
Spacing   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@  discard block
 block discarded – undo
41 41
         // handle POST from FoxyCart API transaction
42 42
         if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) {
43 43
             $FoxyData_encrypted = (isset($_POST['FoxyData'])) ?
44
-                urldecode($_POST['FoxyData']) :
45
-                urldecode($_POST['FoxySubscriptionData']);
44
+                urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']);
46 45
             $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted);
47 46
 
48 47
             // parse the response and save the order
@@ -52,7 +51,7 @@  discard block
 block discarded – undo
52 51
             $this->extend('addIntegrations', $FoxyData_encrypted);
53 52
 
54 53
             return 'foxy';
55
-        } else {
54
+        }else {
56 55
             return 'No FoxyData or FoxySubscriptionData received.';
57 56
         }
58 57
     }
@@ -71,12 +70,11 @@  discard block
 block discarded – undo
71 70
         foreach ($orders->transactions->transaction as $transaction) {
72 71
             // if FoxyCart order id, then parse order
73 72
             if (isset($transaction->id)) {
74
-                ($order = Order::get()->filter('Order_ID', (int) $transaction->id)->First()) ?
75
-                    $order = Order::get()->filter('Order_ID', (int) $transaction->id)->First() :
76
-                    $order = Order::create();
73
+                ($order = Order::get()->filter('Order_ID', (int)$transaction->id)->First()) ?
74
+                    $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : $order = Order::create();
77 75
 
78 76
                 // save base order info
79
-                $order->Order_ID = (int) $transaction->id;
77
+                $order->Order_ID = (int)$transaction->id;
80 78
                 $order->Response = urlencode($encrypted);
81 79
                 $order->write();
82 80
             }
@@ -98,7 +96,7 @@  discard block
 block discarded – undo
98 96
         // to do: consider a login/registration form here if not logged in
99 97
         if ($Member = Security::getCurrentUser()) {
100 98
             $Member = Security::getCurrentUser();
101
-        } else {
99
+        }else {
102 100
             $Member = new Member();
103 101
             $Member->Customer_ID = 0;
104 102
         }
@@ -108,8 +106,8 @@  discard block
 block discarded – undo
108 106
         $config = FoxyStripeSetting::current_foxystripe_setting();
109 107
         if ($config->CustomSSL) {
110 108
             $link = FoxyCart::getFoxyCartStoreName();
111
-        } else {
112
-            $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com';
109
+        }else {
110
+            $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com';
113 111
         }
114 112
 
115 113
         $redirect_complete = 'https://'.$link.'.foxycart.com/checkout?fc_auth_token='.
Please login to merge, or discard this patch.