Skip to content

500 error: Cannot assign null to property craft\\elements\\Address::$countryCode of type string #32

Open
@robzor

Description

@robzor

Hi there, I'm getting a 500 error when trying to use the plugin, the pay popup will show but when I click 'Pay' I get the error.

I'm running Craft Pro 4.4.12 and Commerce 4.2.8, and this is on OSX Desktop in Chrome:

Template code:

            {{ craft.webPayments.button({
                cart: craft.commerce.carts.cart,
                onComplete: {
                    redirect: '/checkout/order={number}&success=true',
                },
            }) }}

500 error in console:

{
"name":"Exception",
"message":"Cannot assign null to property craft\\elements\\Address::$countryCode of type string",
"code":0,
"error":"Cannot assign null to property craft\\elements\\Address::$countryCode of type string",
"exception":"TypeError",
"file":"/website/vendor/ether/web-payments/src/services/StripeService.php",
"line":297,

"trace":[
{"file":"/website/vendor/ether/web-payments/src/controllers/StripeController.php",
"line":213,
"function":"setBillingAddress",
"class":"ether\\webpayments\\services\\StripeService",
"type":"->"},{
"function":"actionPay",
"class":"ether\\webpayments\\controllers\\StripeController",
"type":"->"}

If you need any more information please let me know! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions