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

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.2.0 Wrapup [ 142 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        jonathan Jonathan Reissmueller made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 8 minutes [ 480 ]
        Worklog Id 15250 [ 15250 ]
        abdy Abdy Franco made changes -
        Time Spent 8 minutes [ 480 ] 19 minutes [ 1140 ]
        Worklog Id 15254 [ 15254 ]
        abdy Abdy Franco made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          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