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

Order: Error in payment authorization

    Details

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

      Description

      To reproduce

      1. Enable error reporting
      2. Create a CC account on a client
      3. Start an order and move to checkout
      4. Try to pay with the cc account
      5. View the error log file
      6. See the following error

        [2022-05-27T17:09:30.609300+00:00] general.ERROR: UnknownException: Trying to get property 'status' of non-object in F:\wamp\www\blesta-5.0\public_html\plugins\order\controllers\checkout.php:892 Stack trace: #0 F:\wamp\www\blesta-5.0\public_html\vendors\monolog\monolog\src\Monolog\ErrorHandler.php(200): UnknownException::setErrorHandler(8, 'Trying to get p...', 'F:\\wamp\\www
        ble...', 892, Array) #1 F:\wamp\www\blesta-5.0\public_html\plugins\order\controllers\checkout.php(892): Monolog\ErrorHandler->handleError(8, 'Trying to get p...', 'F:\\wamp\\www
        ble...', 892, Array) #2 F:\wamp\www\blesta-5.0\public_html\plugins\order\controllers\checkout.php(789): Checkout->authorizePayment(Array, Array, '2.0300') #3 F:\wamp\www\blesta-5.0\public_html\vendors\minphp\bridge\src\Lib\Dispatcher.php(142): Checkout->getPaymentConfirmation() #4 F:\wamp\www\blesta-5.0\public_html\index.php(21): Dispatcher::dispatch('/blesta-5.0/pub...') #5 {main}

      To resolve change plugins/order/controller/checkout.php around line 889:

                  if ($gateway_obj instanceof MerchantAchVerification && !empty($account_id)) {
                      $account = $this->Accounts->getAch($account_id);
      
                      if ($account->status == 'unverified') {
                          $response['redirect'] = $this->client_uri . 'accounts/verifyach/' . $account_id . '/';
      
                          return $response;
                      }
                  }
      

      To

                  if ($type == 'ach'
                      && $gateway_obj instanceof MerchantAchVerification
                      && !empty($account_id)
                      && ($account = $this->Accounts->getAch($account_id))
                      && $account->status == 'unverified'
                  ) {
                      $response['redirect'] = $this->client_uri . 'accounts/verifyach/' . $account_id . '/';
      
                      return $response;
                  }
      

        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:
              29/Jun/22

              Time Tracking

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

                Agile