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

PayPal Checkout: Exception when saving incomplete details

    Details

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

      Description

      1. Install the PayPal Checkout gateway
      2. Submit the "Update Settings" button without entering any details
      3. A white page is encountered. The following error is written to logs:

      ==> general-warning-2023-08-07.log <==
      [2023-08-07T18:43:55.227988+00:00] general.WARNING: E_WARNING: Undefined array key "sandbox"

      {"code":2,"message":"Undefined array key \"sandbox\"","file":"/home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/paypal_checkout.php","line":80}

      [2023-08-07T18:43:55.577790+00:00] general.WARNING: E_WARNING: Undefined property: stdClass::$name

      {"code":2,"message":"Undefined property: stdClass::$name","file":"/home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/lib/paypal_checkout_response.php","line":40}

      ==> general-error-2023-08-07.log <==
      [2023-08-07T18:43:55.579230+00:00] general.ERROR: Exception: It was not possible to authenticate to the API. Verify that the credentials are correct. in /home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/lib/paypal_checkout_api.php:90 Stack trace: #0 /home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/lib/paypal_checkout_api.php(65): PaypalCheckoutApi->authenticate() #1 /home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/paypal_checkout.php(560): PaypalCheckoutApi->__construct() #2 /home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/paypal_checkout.php(574): PaypalCheckout->getApi() #3 [internal function]: PaypalCheckout->validateConnection() #4 /home/blestau/public_html/580b1/vendors/minphp/input/src/Input.php(546): call_user_func_array() #5 /home/blestau/public_html/580b1/vendors/minphp/input/src/Input.php(367): Minphp\Input\Input->validateRule() #6 /home/blestau/public_html/580b1/components/gateways/nonmerchant/paypal_checkout/paypal_checkout.php(103): Minphp\Input\Input->validates() #7 /home/blestau/public_html/580b1/app/models/gateway_manager.php(437): PaypalCheckout->editSettings() #8 /home/blestau/public_html/580b1/app/controllers/admin_company_gateways.php(119): GatewayManager->edit() #9 /home/blestau/public_html/580b1/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminCompanyGateways->manage() #10 /home/blestau/public_html/580b1/index.php(21): Dispatcher::dispatch() #11

      {main}

      We shouldn't encounter an exception. Are we not validating fields well enough before submitting them? A visible error should be shown if the details are clearly incorrect, rather than an exception.

        Activity

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Aug/23

              Time Tracking

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

                Agile