@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | // handle POST from FoxyCart API transaction |
40 | 40 | if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) { |
41 | 41 | $FoxyData_encrypted = (isset($_POST['FoxyData'])) ? |
42 | - urldecode($_POST['FoxyData']) : |
|
43 | - urldecode($_POST['FoxySubscriptionData']); |
|
42 | + urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']); |
|
44 | 43 | $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted); |
45 | 44 | |
46 | 45 | // parse the response and save the order |
@@ -50,7 +49,7 @@ discard block |
||
50 | 49 | $this->extend('addIntegrations', $FoxyData_encrypted); |
51 | 50 | |
52 | 51 | return 'foxy'; |
53 | - } else { |
|
52 | + }else { |
|
54 | 53 | return 'No FoxyData or FoxySubscriptionData received.'; |
55 | 54 | } |
56 | 55 | } |
@@ -69,12 +68,11 @@ discard block |
||
69 | 68 | foreach ($orders->transactions->transaction as $transaction) { |
70 | 69 | // if FoxyCart order id, then parse order |
71 | 70 | if (isset($transaction->id)) { |
72 | - ($order = Order::get()->filter('Order_ID', (int) $transaction->id)->First()) ? |
|
73 | - $order = Order::get()->filter('Order_ID', (int) $transaction->id)->First() : |
|
74 | - $order = Order::create(); |
|
71 | + ($order = Order::get()->filter('Order_ID', (int)$transaction->id)->First()) ? |
|
72 | + $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : $order = Order::create(); |
|
75 | 73 | |
76 | 74 | // save base order info |
77 | - $order->Order_ID = (int) $transaction->id; |
|
75 | + $order->Order_ID = (int)$transaction->id; |
|
78 | 76 | $order->Response = urlencode($encrypted); |
79 | 77 | $order->write(); |
80 | 78 | } |
@@ -96,7 +94,7 @@ discard block |
||
96 | 94 | // to do: consider a login/registration form here if not logged in |
97 | 95 | if ($Member = Member::currentUser()) { |
98 | 96 | $Member = Member::currentUser(); |
99 | - } else { |
|
97 | + }else { |
|
100 | 98 | $Member = new Member(); |
101 | 99 | $Member->Customer_ID = 0; |
102 | 100 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ); |
169 | 169 | |
170 | 170 | // Cateogry Dropdown field w/ add new |
171 | - $source = function () { |
|
171 | + $source = function() { |
|
172 | 172 | return ProductCategory::get()->map()->toArray(); |
173 | 173 | }; |
174 | 174 | $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source()) |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $product = self::get()->byID($this->ID); |
300 | 300 | if (isset($product->ParentID)) { |
301 | 301 | $origParent = $product->ParentID; |
302 | - } else { |
|
302 | + }else { |
|
303 | 303 | $origParent = null; |
304 | 304 | } |
305 | 305 | $currentParent = $this->ParentID; |
@@ -376,8 +376,7 @@ discard block |
||
376 | 376 | $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName; |
377 | 377 | |
378 | 378 | return (SiteConfig::current_site_config()->CartValidation) |
379 | - ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : |
|
380 | - $optionValue; |
|
379 | + ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue; |
|
381 | 380 | } |
382 | 381 | |
383 | 382 | // get FoxyCart Store Name for JS call |