Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4451

Order: Payment account creation errors are not displayed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce:

      • Create a wizard list order form
      • Place and order through the form
      • Enter invalid payment credentials and check the box to save them
      • Submit and receive an error "The payment account could not be found for that client."
        In controllers/checkout.php change around line 704 from:
        
                            if ($type == 'ach') {
                                $account_id = $this->Accounts->addAch($this->post);
                            } elseif ($type == 'cc') {
                                if (isset($this->post['expiration_year']) || isset($this->post['expiration_month'])) {
                                    // Concatenate the expiration date to the form 'yyyymm'
                                    $this->post['expiration'] = (
                                            isset($this->post['expiration_year']) ? $this->post['expiration_year'] : ''
                                        ) . (isset($this->post['expiration_month']) ? $this->post['expiration_month'] : '');
                                }
        
                                // Remove type, it will be automatically determined
                                unset($this->post['type']);
                                $account_id = $this->Accounts->addCc($this->post);
                            }
        

        To

        
                            if ($type == 'ach') {
                                $account_id = $this->Accounts->addAch($this->post);
                            } elseif ($type == 'cc') {
                                if (isset($this->post['expiration_year']) || isset($this->post['expiration_month'])) {
                                    // Concatenate the expiration date to the form 'yyyymm'
                                    $this->post['expiration'] = (
                                            isset($this->post['expiration_year']) ? $this->post['expiration_year'] : ''
                                        ) . (isset($this->post['expiration_month']) ? $this->post['expiration_month'] : '');
                                }
        
                                // Remove type, it will be automatically determined
                                unset($this->post['type']);
                                $account_id = $this->Accounts->addCc($this->post);
                            }
        
                            if (($errors = $this->Accounts->errors())) {
                                $this->Input->setErrors($errors);
                                return;
                            }
        

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/Sep/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 19 minutes
              19m

                Agile