Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PayPal Module Undefined array key "intent"

Featured Replies

  • PayPal Checkout Pro  v0.0.1 - by thirty bees
  • Thirty Bees 1.7.0
  • PHP 8.3.35

The following warning is in the error log:

[20-Oct-2026 13:55:14 US/Eastern] PHP Warning:  Undefined array key "intent" in /...../shop/modules/tbpaypalcheckout/src/Model/PayPalOrder.php on line 125

This occurred at the same time a user was making a purchase.

Here is the source block - possibly change to use the Null Coalescing Operator as a fix?

    public static function createFromPayPalOrder(Logger $logger, int $cartId, array $paypalOrder): ?PayPalOrder
    {
        $order = new static();
        $order->id_cart = (int)$cartId;
        $order->paypal_order_id = (string)$paypalOrder['id'];
        $order->paypal_status = (string)$paypalOrder['status'];
        $order->intent = (string)$paypalOrder['intent'];
        
        // Extract amount and currency
        if (isset($paypalOrder['purchase_units'][0]['amount'])) {
            $order->amount = (float)$paypalOrder['purchase_units'][0]['amount']['value'];
            $order->currency = (string)$paypalOrder['purchase_units'][0]['amount']['currency_code'];
        }
        
        $order->date_add = date('Y-m-d H:i:s');
        $order->date_upd = date('Y-m-d H:i:s');
        
        if ($order->save()) {
            $logger->debug('PayPal order saved to database', [
                'id_tbpaypal_order' => $order->id,
                'paypal_order_id' => $order->paypal_order_id,
                'cart_id' => $cartId
            ]);
            return $order;
        }
        
        return null;
    }
 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.