| @@ -20,7 +20,7 @@ | ||
| 20 | 20 |      { | 
| 21 | 21 |          if (Security::getCurrentUser()) { | 
| 22 | 22 | return true; | 
| 23 | -        } else { | |
| 23 | +        }else { | |
| 24 | 24 | return Security::permissionFailure($this, _t( | 
| 25 | 25 | 'AccountPage.CANNOTCONFIRMLOGGEDIN', | 
| 26 | 26 | 'Please login to view this page.' | 
| @@ -262,7 +262,7 @@ | ||
| 262 | 262 |          if ($client) { | 
| 263 | 263 |              if ($category = $this->getCategory($data['code'])) { | 
| 264 | 264 | $result = $client->patch($category, $data); | 
| 265 | -            } else { | |
| 265 | +            }else { | |
| 266 | 266 | $result = $client->post($this->getItemCategoriesURL(), $data); | 
| 267 | 267 | } | 
| 268 | 268 | $errors = array_merge($errors, $client->getErrors($result)); | 
| @@ -146,7 +146,7 @@ | ||
| 146 | 146 | |
| 147 | 147 |          if ($config->MultiGroup) { | 
| 148 | 148 |              $entries = $this->Products()->sort('SortOrder'); | 
| 149 | -        } else { | |
| 149 | +        }else { | |
| 150 | 150 | $filter = '"ParentID" = '.$this->ID; | 
| 151 | 151 | |
| 152 | 152 | // Build a list of all IDs for ProductGroups that are children | 
| @@ -329,10 +329,10 @@ discard block | ||
| 329 | 329 | .'$1', $input); | 
| 330 | 330 | } | 
| 331 | 331 | self::$log[] = '<strong>INPUT:</strong> Code: <strong>'.htmlspecialchars($prefix.$code). | 
| 332 | - '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$name[2]). | |
| 333 | - '</strong> :: Value: <strong>'.htmlspecialchars($value[2]). | |
| 334 | - '</strong><br />Initial input: '.htmlspecialchars($input). | |
| 335 | - '<br />Signed: <span style="color:#060;">'.htmlspecialchars($input_signed).'</span>'; | |
| 332 | + '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$name[2]). | |
| 333 | + '</strong> :: Value: <strong>'.htmlspecialchars($value[2]). | |
| 334 | + '</strong><br />Initial input: '.htmlspecialchars($input). | |
| 335 | + '<br />Signed: <span style="color:#060;">'.htmlspecialchars($input_signed).'</span>'; | |
| 336 | 336 | $form = str_replace($input, $input_signed, $form); | 
| 337 | 337 | } | 
| 338 | 338 | } | 
| @@ -373,10 +373,10 @@ discard block | ||
| 373 | 373 | ); | 
| 374 | 374 | $form_part_signed = str_replace($option[0], $option_signed, $form_part_signed); | 
| 375 | 375 | self::$log[] = '<strong>OPTION:</strong> Code: <strong>'.htmlspecialchars($prefix.$code). | 
| 376 | - '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$list[2]). | |
| 377 | - '</strong> :: Value: <strong>'.htmlspecialchars($option[2]). | |
| 378 | - '</strong><br />Initial option: '.htmlspecialchars($option[0]). | |
| 379 | - '<br />Signed: <span style="color:#060;">'.htmlspecialchars($option_signed).'</span>'; | |
| 376 | + '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$list[2]). | |
| 377 | + '</strong> :: Value: <strong>'.htmlspecialchars($option[2]). | |
| 378 | + '</strong><br />Initial option: '.htmlspecialchars($option[0]). | |
| 379 | + '<br />Signed: <span style="color:#060;">'.htmlspecialchars($option_signed).'</span>'; | |
| 380 | 380 | } | 
| 381 | 381 | $form = str_replace($list[0], $form_part_signed, $form); | 
| 382 | 382 | } | 
| @@ -407,10 +407,10 @@ discard block | ||
| 407 | 407 | ); | 
| 408 | 408 | $form = str_replace($textarea[0], $textarea_signed, $form); | 
| 409 | 409 | self::$log[] = '<strong>TEXTAREA:</strong> Code: <strong>'.htmlspecialchars($prefix.$code). | 
| 410 | - '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$textarea[2]). | |
| 411 | - '</strong> :: Value: <strong>'.htmlspecialchars($textarea[3]). | |
| 412 | - '</strong><br />Initial textarea: '.htmlspecialchars($textarea[0]). | |
| 413 | - '<br />Signed: <span style="color:#060;">'.htmlspecialchars($textarea_signed).'</span>'; | |
| 410 | + '</strong> :: Name: <strong>'.htmlspecialchars($prefix.$textarea[2]). | |
| 411 | + '</strong> :: Value: <strong>'.htmlspecialchars($textarea[3]). | |
| 412 | + '</strong><br />Initial textarea: '.htmlspecialchars($textarea[0]). | |
| 413 | + '<br />Signed: <span style="color:#060;">'.htmlspecialchars($textarea_signed).'</span>'; | |
| 414 | 414 | } | 
| 415 | 415 | self::$log[] = '<strong>FORM after TEXTAREAS:</strong> <pre>'.htmlspecialchars($form).'</pre>'; | 
| 416 | 416 | |
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | |
| 160 | 160 |          if ($output) { | 
| 161 | 161 | echo self::$cart_url.'?'.$qs; | 
| 162 | -        } else { | |
| 162 | +        }else { | |
| 163 | 163 | return self::$cart_url.'?'.$qs; | 
| 164 | 164 | } | 
| 165 | 165 | } | 
| @@ -183,18 +183,18 @@ discard block | ||
| 183 | 183 |          if ($option_value == '--OPEN--') { | 
| 184 | 184 |              $hash = hash_hmac('sha256', $product_code.$option_name.$option_value, self::getSecret()); | 
| 185 | 185 | $value = ($urlencode) ? urlencode($option_name).'||'.$hash.'||open' : $option_name.'||'.$hash.'||open'; | 
| 186 | -        } else { | |
| 186 | +        }else { | |
| 187 | 187 |              $hash = hash_hmac('sha256', $product_code.$option_name.$option_value, self::getSecret()); | 
| 188 | 188 |              if ($method == 'name') { | 
| 189 | 189 | $value = ($urlencode) ? urlencode($option_name).'||'.$hash : $option_name.'||'.$hash; | 
| 190 | -            } else { | |
| 190 | +            }else { | |
| 191 | 191 | $value = ($urlencode) ? urlencode($option_value).'||'.$hash : $option_value.'||'.$hash; | 
| 192 | 192 | } | 
| 193 | 193 | } | 
| 194 | 194 | |
| 195 | 195 |          if ($output) { | 
| 196 | 196 | echo $value; | 
| 197 | -        } else { | |
| 197 | +        }else { | |
| 198 | 198 | return $value; | 
| 199 | 199 | } | 
| 200 | 200 | } | 
| @@ -322,7 +322,7 @@ discard block | ||
| 322 | 322 |                                  .preg_quote($value[2]).'\1%', '${1}' | 
| 323 | 323 | .self::fc_hash_value($code, $name[2], $value[2], 'value', false) | 
| 324 | 324 | .'$1', $input); | 
| 325 | -                        } else { | |
| 325 | +                        }else { | |
| 326 | 326 |                              $input_signed = preg_replace('%([\'"])'.$prefix.preg_quote($name[2]) | 
| 327 | 327 |                                  .'\1%', '${1}'.$prefix | 
| 328 | 328 | .self::fc_hash_value($code, $name[2], $value[2], 'name', false) | 
| @@ -215,7 +215,7 @@ discard block | ||
| 215 | 215 | |
| 216 | 216 | public function testProductDraftOptionDeletion() | 
| 217 | 217 |      { | 
| 218 | - self::$use_draft_site = false;//make sure we can publish | |
| 218 | + self::$use_draft_site = false; //make sure we can publish | |
| 219 | 219 | |
| 220 | 220 |          $this->logInWithPermission('ADMIN'); | 
| 221 | 221 | |
| @@ -223,7 +223,7 @@ discard block | ||
| 223 | 223 | //build holder page, ProductPage can't be on root level | 
| 224 | 224 | $holder->doPublish(); | 
| 225 | 225 | |
| 226 | - $product = $this->objFromFixture(ProductPage::class, 'product1');//build product page | |
| 226 | + $product = $this->objFromFixture(ProductPage::class, 'product1'); //build product page | |
| 227 | 227 | $product->doPublish(); | 
| 228 | 228 | |
| 229 | 229 | $productID = $product->ID; | 
| @@ -231,29 +231,29 @@ discard block | ||
| 231 | 231 | $optionGroup = $this->objFromFixture(OptionGroup::class, 'size'); | 
| 232 | 232 | //build the group for the options | 
| 233 | 233 | $optionGroup->write(); | 
| 234 | - $option = $this->objFromFixture(OptionItem::class, 'small');//build first option | |
| 234 | + $option = $this->objFromFixture(OptionItem::class, 'small'); //build first option | |
| 235 | 235 | $option->write(); | 
| 236 | - $option2 = $this->objFromFixture(OptionItem::class, 'large');//build second option | |
| 236 | + $option2 = $this->objFromFixture(OptionItem::class, 'large'); //build second option | |
| 237 | 237 | $option2->write(); | 
| 238 | 238 | |
| 239 | - $this->assertTrue($product->isPublished());//check that product is published | |
| 239 | + $this->assertTrue($product->isPublished()); //check that product is published | |
| 240 | 240 | |
| 241 | -        $product->deleteFromStage('Stage');//remove product from draft site | |
| 241 | +        $product->deleteFromStage('Stage'); //remove product from draft site | |
| 242 | 242 | |
| 243 | - $this->assertTrue($product->isPublished());//check product is still published | |
| 243 | + $this->assertTrue($product->isPublished()); //check product is still published | |
| 244 | 244 | |
| 245 | 245 | $testOption = $this->objFromFixture(OptionItem::class, 'large'); | 
| 246 | 246 | |
| 247 | 247 | $this->assertThat($testOption->ID, $this->logicalNot($this->equalTo(0))); | 
| 248 | 248 | //make sure the first option still exists | 
| 249 | 249 | |
| 250 | - $product->doRestoreToStage();//restore page to draft site | |
| 251 | - $product->doUnpublish();//unpublish page | |
| 252 | -        $product->deleteFromStage('Stage');//remove product from draft site | |
| 250 | + $product->doRestoreToStage(); //restore page to draft site | |
| 251 | + $product->doUnpublish(); //unpublish page | |
| 252 | +        $product->deleteFromStage('Stage'); //remove product from draft site | |
| 253 | 253 | |
| 254 | 254 |          $checkDeleted = OptionItem::get()->filter(array('Title' => 'Large', 'ProductID' => $productID))->first(); | 
| 255 | 255 | //query same option as above | 
| 256 | 256 | |
| 257 | - $this->assertEquals($checkDeleted->ID, 0);//check that the ID is 0 (empty object/non-existent) | |
| 257 | + $this->assertEquals($checkDeleted->ID, 0); //check that the ID is 0 (empty object/non-existent) | |
| 258 | 258 | } | 
| 259 | 259 | } | 
| @@ -88,7 +88,7 @@ discard block | ||
| 88 | 88 | // Retrieve validator, if one has been setup (e.g. via data extensions). | 
| 89 | 89 |          if ($config->hasMethod('getCMSValidator')) { | 
| 90 | 90 | $validator = $config->getCMSValidator(); | 
| 91 | -        } else { | |
| 91 | +        }else { | |
| 92 | 92 | $validator = null; | 
| 93 | 93 | } | 
| 94 | 94 | |
| @@ -101,13 +101,13 @@ discard block | ||
| 101 | 101 | $actions, | 
| 102 | 102 | $validator | 
| 103 | 103 |          )->setHTMLID('Form_EditForm'); | 
| 104 | -        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($negotiator, $form) { | |
| 104 | +        $form->setValidationResponseCallback(function(ValidationResult $errors) use ($negotiator, $form) { | |
| 105 | 105 | $request = $this->getRequest(); | 
| 106 | 106 |              if ($request->isAjax() && $negotiator) { | 
| 107 | 107 | $result = $form->forTemplate(); | 
| 108 | 108 | |
| 109 | 109 | return $negotiator->respond($request, array( | 
| 110 | -                    'CurrentForm' => function () use ($result) { | |
| 110 | +                    'CurrentForm' => function() use ($result) { | |
| 111 | 111 | return $result; | 
| 112 | 112 | }, | 
| 113 | 113 | )); | 
| @@ -211,7 +211,7 @@ discard block | ||
| 211 | 211 | $this->parseOrderDetails($response); | 
| 212 | 212 | |
| 213 | 213 | return true; | 
| 214 | -        } else { | |
| 214 | +        }else { | |
| 215 | 215 | return false; | 
| 216 | 216 | } | 
| 217 | 217 | } | 
| @@ -223,14 +223,14 @@ discard block | ||
| 223 | 223 |      { | 
| 224 | 224 |          foreach ($response->transactions->transaction as $transaction) { | 
| 225 | 225 | // Record transaction data from FoxyCart Datafeed: | 
| 226 | - $this->Store_ID = (int) $transaction->store_id; | |
| 227 | - $this->TransactionDate = (string) $transaction->transaction_date; | |
| 228 | - $this->ProductTotal = (float) $transaction->product_total; | |
| 229 | - $this->TaxTotal = (float) $transaction->tax_total; | |
| 230 | - $this->ShippingTotal = (float) $transaction->shipping_total; | |
| 231 | - $this->OrderTotal = (float) $transaction->order_total; | |
| 232 | - $this->ReceiptURL = (string) $transaction->receipt_url; | |
| 233 | - $this->OrderStatus = (string) $transaction->status; | |
| 226 | + $this->Store_ID = (int)$transaction->store_id; | |
| 227 | + $this->TransactionDate = (string)$transaction->transaction_date; | |
| 228 | + $this->ProductTotal = (float)$transaction->product_total; | |
| 229 | + $this->TaxTotal = (float)$transaction->tax_total; | |
| 230 | + $this->ShippingTotal = (float)$transaction->shipping_total; | |
| 231 | + $this->OrderTotal = (float)$transaction->order_total; | |
| 232 | + $this->ReceiptURL = (string)$transaction->receipt_url; | |
| 233 | + $this->OrderStatus = (string)$transaction->status; | |
| 234 | 234 | |
| 235 | 235 |              $this->extend('handleOrderInfo', $order, $response); | 
| 236 | 236 | } | 
| @@ -249,18 +249,18 @@ discard block | ||
| 249 | 249 |                  if (Member::get()->filter('Email', $transaction->customer_email)->First()) { | 
| 250 | 250 |                      $customer = Member::get()->filter('Email', $transaction->customer_email)->First(); | 
| 251 | 251 | // if new customer, create account with data from FoxyCart | 
| 252 | -                } else { | |
| 252 | +                }else { | |
| 253 | 253 | // set PasswordEncryption to 'none' so imported, encrypted password is not encrypted again | 
| 254 | 254 | Config::modify()->set(Security::class, 'password_encryption_algorithm', 'none'); | 
| 255 | 255 | |
| 256 | 256 | // create new Member, set password info from FoxyCart | 
| 257 | 257 | $customer = Member::create(); | 
| 258 | - $customer->Customer_ID = (int) $transaction->customer_id; | |
| 259 | - $customer->FirstName = (string) $transaction->customer_first_name; | |
| 260 | - $customer->Surname = (string) $transaction->customer_last_name; | |
| 261 | - $customer->Email = (string) $transaction->customer_email; | |
| 262 | - $customer->Password = (string) $transaction->customer_password; | |
| 263 | - $customer->Salt = (string) $transaction->customer_password_salt; | |
| 258 | + $customer->Customer_ID = (int)$transaction->customer_id; | |
| 259 | + $customer->FirstName = (string)$transaction->customer_first_name; | |
| 260 | + $customer->Surname = (string)$transaction->customer_last_name; | |
| 261 | + $customer->Email = (string)$transaction->customer_email; | |
| 262 | + $customer->Password = (string)$transaction->customer_password; | |
| 263 | + $customer->Salt = (string)$transaction->customer_password_salt; | |
| 264 | 264 | $customer->PasswordEncryption = 'none'; | 
| 265 | 265 | |
| 266 | 266 | // record member record | 
| @@ -297,11 +297,11 @@ discard block | ||
| 297 | 297 |              foreach ($transaction->transaction_details->transaction_detail as $detail) { | 
| 298 | 298 | $OrderDetail = OrderDetail::create(); | 
| 299 | 299 | |
| 300 | - $OrderDetail->Quantity = (int) $detail->product_quantity; | |
| 301 | - $OrderDetail->ProductName = (string) $detail->product_name; | |
| 302 | - $OrderDetail->ProductCode = (string) $detail->product_code; | |
| 303 | - $OrderDetail->ProductImage = (string) $detail->image; | |
| 304 | - $OrderDetail->ProductCategory = (string) $detail->category_code; | |
| 300 | + $OrderDetail->Quantity = (int)$detail->product_quantity; | |
| 301 | + $OrderDetail->ProductName = (string)$detail->product_name; | |
| 302 | + $OrderDetail->ProductCode = (string)$detail->product_code; | |
| 303 | + $OrderDetail->ProductImage = (string)$detail->image; | |
| 304 | + $OrderDetail->ProductCategory = (string)$detail->category_code; | |
| 305 | 305 | $priceModifier = 0; | 
| 306 | 306 | |
| 307 | 307 | // parse OrderOptions | 
| @@ -309,14 +309,14 @@ discard block | ||
| 309 | 309 | // Find product via product_id custom variable | 
| 310 | 310 |                      if ($option->product_option_name == 'product_id') { | 
| 311 | 311 | // if product is found, set relation to OrderDetail | 
| 312 | - $OrderProduct = ProductPage::get()->byID((int) $option->product_option_value); | |
| 312 | + $OrderProduct = ProductPage::get()->byID((int)$option->product_option_value); | |
| 313 | 313 |                          if ($OrderProduct) { | 
| 314 | 314 | $OrderDetail->ProductID = $OrderProduct->ID; | 
| 315 | 315 | } | 
| 316 | -                    } else { | |
| 316 | +                    }else { | |
| 317 | 317 | $OrderOption = OrderOption::create(); | 
| 318 | - $OrderOption->Name = (string) $option->product_option_name; | |
| 319 | - $OrderOption->Value = (string) $option->product_option_value; | |
| 318 | + $OrderOption->Name = (string)$option->product_option_name; | |
| 319 | + $OrderOption->Value = (string)$option->product_option_value; | |
| 320 | 320 | $OrderOption->write(); | 
| 321 | 321 | $OrderDetail->OrderOptions()->add($OrderOption); | 
| 322 | 322 | |
| @@ -324,7 +324,7 @@ discard block | ||
| 324 | 324 | } | 
| 325 | 325 | } | 
| 326 | 326 | |
| 327 | - $OrderDetail->Price = (float) $detail->product_price + (float) $priceModifier; | |
| 327 | + $OrderDetail->Price = (float)$detail->product_price + (float)$priceModifier; | |
| 328 | 328 | |
| 329 | 329 | // extend OrderDetail parsing, allowing for recording custom fields from FoxyCart | 
| 330 | 330 |                  $this->extend('handleOrderItem', $order, $response, $OrderDetail); | 
| @@ -113,12 +113,10 @@ discard block | ||
| 113 | 113 | $this->setSiteConfig($siteConfig); | 
| 114 | 114 | |
| 115 | 115 | $fields = ($fields != null && $fields->exists()) ? | 
| 116 | - $this->getProductFields($fields) : | |
| 117 | - $this->getProductFields(FieldList::create()); | |
| 116 | + $this->getProductFields($fields) : $this->getProductFields(FieldList::create()); | |
| 118 | 117 | |
| 119 | 118 | $actions = ($actions != null && $actions->exists()) ? | 
| 120 | - $this->getProductActions($actions) : | |
| 121 | - $this->getProductActions(FieldList::create()); | |
| 119 | + $this->getProductActions($actions) : $this->getProductActions(FieldList::create()); | |
| 122 | 120 | $validator = (!empty($validator) || $validator != null) ? $validator : RequiredFields::create(); | 
| 123 | 121 | |
| 124 | 122 | parent::__construct($controller, $name, $fields, $actions, $validator); | 
| @@ -136,8 +134,7 @@ discard block | ||
| 136 | 134 | protected function getProductFields(FieldList $fields) | 
| 137 | 135 |      { | 
| 138 | 136 | $hiddenTitle = ($this->product->ReceiptTitle) ? | 
| 139 | - htmlspecialchars($this->product->ReceiptTitle) : | |
| 140 | - htmlspecialchars($this->product->Title); | |
| 137 | + htmlspecialchars($this->product->ReceiptTitle) : htmlspecialchars($this->product->Title); | |
| 141 | 138 | $code = $this->product->Code; | 
| 142 | 139 | |
| 143 | 140 |          if ($this->product->Available) { | 
| @@ -165,7 +162,7 @@ discard block | ||
| 165 | 162 | $code, | 
| 166 | 163 | 'price', | 
| 167 | 164 | $this->product->Price | 
| 168 | - ))->setValue($this->product->Price));//can't override id | |
| 165 | + ))->setValue($this->product->Price)); //can't override id | |
| 169 | 166 | $fields->push(HiddenField::create(ProductPage::getGeneratedValue( | 
| 170 | 167 | $code, | 
| 171 | 168 | 'weight', | 
| @@ -208,7 +205,7 @@ discard block | ||
| 208 | 205 |                  ->addExtraClass('hidden unavailable-text')); | 
| 209 | 206 | |
| 210 | 207 |              $this->extend('updatePurchaseFormFields', $fields); | 
| 211 | -        } else { | |
| 208 | +        }else { | |
| 212 | 209 |              $fields->push(HeaderField::create('submitPrice', 'Currently Out of Stock', 4)); | 
| 213 | 210 | } | 
| 214 | 211 | |
| @@ -254,7 +251,7 @@ discard block | ||
| 254 | 251 | */ | 
| 255 | 252 | protected function getProductOptionSet() | 
| 256 | 253 |      { | 
| 257 | -        $assignAvailable = function ($self) { | |
| 254 | +        $assignAvailable = function($self) { | |
| 258 | 255 | /** @var OptionItem $self */ | 
| 259 | 256 |              $this->extend('updateFoxyStripePurchaseForm', $form); | 
| 260 | 257 | $self->Available = ($self->getAvailability()) ? true : false; | 
| @@ -40,8 +40,7 @@ discard block | ||
| 40 | 40 | // handle POST from FoxyCart API transaction | 
| 41 | 41 |          if ((isset($_POST['FoxyData']) or isset($_POST['FoxySubscriptionData']))) { | 
| 42 | 42 | $FoxyData_encrypted = (isset($_POST['FoxyData'])) ? | 
| 43 | - urldecode($_POST['FoxyData']) : | |
| 44 | - urldecode($_POST['FoxySubscriptionData']); | |
| 43 | + urldecode($_POST['FoxyData']) : urldecode($_POST['FoxySubscriptionData']); | |
| 45 | 44 | $FoxyData_decrypted = \rc4crypt::decrypt(FoxyCart::getStoreKey(), $FoxyData_encrypted); | 
| 46 | 45 | |
| 47 | 46 | // parse the response and save the order | 
| @@ -51,7 +50,7 @@ discard block | ||
| 51 | 50 |              $this->extend('addIntegrations', $FoxyData_encrypted); | 
| 52 | 51 | |
| 53 | 52 | return 'foxy'; | 
| 54 | -        } else { | |
| 53 | +        }else { | |
| 55 | 54 | return 'No FoxyData or FoxySubscriptionData received.'; | 
| 56 | 55 | } | 
| 57 | 56 | } | 
| @@ -70,12 +69,11 @@ discard block | ||
| 70 | 69 |          foreach ($orders->transactions->transaction as $transaction) { | 
| 71 | 70 | // if FoxyCart order id, then parse order | 
| 72 | 71 |              if (isset($transaction->id)) { | 
| 73 | -                ($order = Order::get()->filter('Order_ID', (int) $transaction->id)->First()) ? | |
| 74 | -                    $order = Order::get()->filter('Order_ID', (int) $transaction->id)->First() : | |
| 75 | - $order = Order::create(); | |
| 72 | +                ($order = Order::get()->filter('Order_ID', (int)$transaction->id)->First()) ? | |
| 73 | +                    $order = Order::get()->filter('Order_ID', (int)$transaction->id)->First() : $order = Order::create(); | |
| 76 | 74 | |
| 77 | 75 | // save base order info | 
| 78 | - $order->Order_ID = (int) $transaction->id; | |
| 76 | + $order->Order_ID = (int)$transaction->id; | |
| 79 | 77 | $order->Response = urlencode($encrypted); | 
| 80 | 78 | $order->write(); | 
| 81 | 79 | } | 
| @@ -97,7 +95,7 @@ discard block | ||
| 97 | 95 | // to do: consider a login/registration form here if not logged in | 
| 98 | 96 |          if ($Member = Security::getCurrentUser()) { | 
| 99 | 97 | $Member = Security::getCurrentUser(); | 
| 100 | -        } else { | |
| 98 | +        }else { | |
| 101 | 99 | $Member = new Member(); | 
| 102 | 100 | $Member->Customer_ID = 0; | 
| 103 | 101 | } |