@@ -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 | } |
@@ -74,8 +73,7 @@ discard block |
||
| 74 | 73 | // if FoxyCart order id, then parse order |
| 75 | 74 | if (isset($transaction->id)) { |
| 76 | 75 | ($order = Order::get()->filter('Order_ID', (int)$transaction->id)->First()) ? |
| 77 | - $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : |
|
| 78 | - $order = Order::create(); |
|
| 76 | + $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : $order = Order::create(); |
|
| 79 | 77 | |
| 80 | 78 | // save base order info |
| 81 | 79 | $order->Order_ID = (int)$transaction->id; |
@@ -134,7 +132,7 @@ discard block |
||
| 134 | 132 | /* todo: make sure local password is updated if changed on FoxyCart |
| 135 | 133 | $this->updatePasswordFromData($customer, $order); |
| 136 | 134 | */ |
| 137 | - } else { |
|
| 135 | + }else { |
|
| 138 | 136 | // create new Member, set password info from FoxyCart |
| 139 | 137 | $customer = Member::create(); |
| 140 | 138 | $customer->Customer_ID = (int)$order->customer_id; |
@@ -269,18 +267,18 @@ discard block |
||
| 269 | 267 | // to do: consider a login/registration form here if not logged in |
| 270 | 268 | if ($Member = Security::getCurrentUser()) { |
| 271 | 269 | $Member = Security::getCurrentUser(); |
| 272 | - } else { |
|
| 270 | + }else { |
|
| 273 | 271 | $Member = new Member(); |
| 274 | 272 | $Member->Customer_ID = 0; |
| 275 | 273 | } |
| 276 | 274 | |
| 277 | - $auth_token = sha1($Member->Customer_ID . '|' . $timestampNew . '|' . FoxyCart::getStoreKey()); |
|
| 275 | + $auth_token = sha1($Member->Customer_ID.'|'.$timestampNew.'|'.FoxyCart::getStoreKey()); |
|
| 278 | 276 | |
| 279 | 277 | $config = FoxyStripeSetting::current_foxystripe_setting(); |
| 280 | 278 | if ($config->CustomSSL) { |
| 281 | 279 | $link = FoxyCart::getFoxyCartStoreName(); |
| 282 | - } else { |
|
| 283 | - $link = FoxyCart::getFoxyCartStoreName() . '.foxycart.com'; |
|
| 280 | + }else { |
|
| 281 | + $link = FoxyCart::getFoxyCartStoreName().'.foxycart.com'; |
|
| 284 | 282 | } |
| 285 | 283 | |
| 286 | 284 | $redirect_complete = 'https://'.$link.'.foxycart.com/checkout?fc_auth_token='. |