@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | // handle POST from FoxyCart API transaction |
44 | 44 | if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) { |
45 | 45 | $FoxyData_encrypted = (isset($_POST['FoxyData'])) ? |
46 | - urldecode($_POST['FoxyData']) : |
|
47 | - urldecode($_POST['FoxySubscriptionData']); |
|
46 | + urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']); |
|
48 | 47 | $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted); |
49 | 48 | |
50 | 49 | // parse the response and save the order |
@@ -54,7 +53,7 @@ discard block |
||
54 | 53 | $this->extend('addIntegrations', $FoxyData_encrypted); |
55 | 54 | |
56 | 55 | return 'foxy'; |
57 | - } else { |
|
56 | + }else { |
|
58 | 57 | return 'No FoxyData or FoxySubscriptionData received.'; |
59 | 58 | } |
60 | 59 | } |
@@ -138,7 +137,7 @@ discard block |
||
138 | 137 | /* todo: make sure local password is updated if changed on FoxyCart |
139 | 138 | $this->updatePasswordFromData($customer, $order); |
140 | 139 | */ |
141 | - } else { |
|
140 | + }else { |
|
142 | 141 | // create new Member, set password info from FoxyCart |
143 | 142 | $customer = Member::create(); |
144 | 143 | $customer->Customer_ID = (int)$order->customer_id; |
@@ -236,7 +235,7 @@ discard block |
||
236 | 235 | } |
237 | 236 | |
238 | 237 | return ProductPage::get() |
239 | - ->filter('ID', (int) $productOptions->product_option_value) |
|
238 | + ->filter('ID', (int)$productOptions->product_option_value) |
|
240 | 239 | ->First(); |
241 | 240 | } |
242 | 241 | } |
@@ -286,18 +285,18 @@ discard block |
||
286 | 285 | // to do: consider a login/registration form here if not logged in |
287 | 286 | if ($Member = Security::getCurrentUser()) { |
288 | 287 | $Member = Security::getCurrentUser(); |
289 | - } else { |
|
288 | + }else { |
|
290 | 289 | $Member = new Member(); |
291 | 290 | $Member->Customer_ID = 0; |
292 | 291 | } |
293 | 292 | |
294 | - $auth_token = sha1($Member->Customer_ID . '|' . $timestampNew . '|' . FoxyCart::getStoreKey()); |
|
293 | + $auth_token = sha1($Member->Customer_ID.'|'.$timestampNew.'|'.FoxyCart::getStoreKey()); |
|
295 | 294 | |
296 | 295 | $config = FoxyStripeSetting::current_foxystripe_setting(); |
297 | 296 | if ($config->CustomSSL) { |
298 | 297 | $link = FoxyCart::getFoxyCartStoreName(); |
299 | - } else { |
|
300 | - $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com'; |
|
298 | + }else { |
|
299 | + $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com'; |
|
301 | 300 | } |
302 | 301 | |
303 | 302 | $redirect_complete = 'https://'.$link.'/checkout?fc_auth_token='.$auth_token.'&fcsid='.$fcsid. |