PreparePaymentResponseModel::$Status must not be accessed before initialization

Created on 30 August 2024, 4 months ago
Updated 9 September 2024, 4 months ago

Problem/Motivation

When I use Prod mode and click on "Pay and complete purchase" button I got white screen and I can't get to the Barion side.

The error log message:
Got error 'PHP message: Uncaught PHP Exception Error: "Typed property Barion\\Models\\Payment\\PreparePaymentResponseModel::$Status must not be accessed before initialization" at /var/www/html/mal/web/modules/contrib/commerce_barion_payment/src/PluginForm/BarionRedirectForm.php line 29'

Core: 10.3.1
PHP: 8.2
Commerce Barion Payment: 2.0.0

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇭🇺Hungary fox mulder

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @fox mulder
  • Status changed to Closed: works as designed 4 months ago
  • 🇭🇺Hungary fox mulder

    Sorry, it was my mistake. I tried to connect to the test.barion.com server in Prod mode.

  • 🇭🇺Hungary fox mulder

    The PreparePaymentResponseModel result if I try to connect to non-existent acceptance place doesn't have Status property. The exception comes from this situation.

    The attached patch allows more elegant debugging

Production build 0.71.5 2024