Skip to content

Attempt to read property "grand_total" on null #15

Closed
@ghena

Description

@ghena

Stripe Payment Version

1.5.1

Laravel Version

10:48

PHP Version

8.3

Database Driver & Version

No response

Description

navigate at /admin/sales/transactions with an order shipped.
We meet:
Attempt to read property "grand_total" on null {"userId":1,"exception":"[object] (ErrorException(code: 0): Attempt to read property "grand_total" on null at /vendor/codenteq/stripe-payment-gateway/src/Payment/Stripe.php:30)

We fix using:

public function isAvailable(): bool
{

   return core()->getConfigData('sales.payment_methods.stripe.active');


}

Steps To Reproduce

navigate at /admin/sales/transactions with an order shipped.

We meet:
Attempt to read property "grand_total" on null {"userId":1,"exception":"[object] (ErrorException(code: 0): Attempt to read property "grand_total" on null at /vendor/codenteq/stripe-payment-gateway/src/Payment/Stripe.php:30)

We fix using:

public function isAvailable(): bool
{

   return core()->getConfigData('sales.payment_methods.stripe.active');


}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions