-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
500 error: Cannot assign null to property craft\\elements\\Address::$countryCode of type string #32
Comments
Thanks for sharing, let me see if I can recreate the problem, first. I'll come back to you if we need anything else. |
Hi @alexjcollins sorry to nag, did you have any luck with this? |
I haven't been able to replicate this on our local environment. I suspect that it's to do with your Countries & States settings ( Before you hit the |
Hi @alexjcollins , the site only ships to the UK and we actually set this in our address fields in the checkout as well with:
Here's a screenshot of the cart: We also have this in our Store Settings: |
I am experiencing the same issue while trying to integrate this plugin for the first time. I have arrived at an understanding of what is causing the (my) issue. After the payment is submitted to Stripe a request is submitted to the endpoint This includes an object "billing_details" which is utilised to set the order billing address if it's available initially:
As you can see from the screenshot the token from Stripe contains web-payments/src/services/StripeService.php Lines 284 to 285 in b7a8fbf
Perhaps the above line needs to be amended or added to with an additional validation check, because whilst all the properties of the |
Is there any update on this? We are experiencing the same issue only when Apple Pay gets used. |
Just to chip in that this seems to be the cause of an issue we are experiencing on completing web payments. Cole |
We weren't able to fix the issue using this plugin without editing the source code. Our solution is to use the commerce-stripe gateway directly and implement the express checkout element from Stripe (https://docs.stripe.com/elements/express-checkout-element). Unfortunately, commerce-stripe has no option for using the express checkout element, so it needs to be implemented on your own. But I think using the express checkout element is the future way of doing this. I also made a thread on the commerce-stripe github page: craftcms/commerce-stripe#286 |
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:
500 error in console:
If you need any more information please let me know! Thanks!
The text was updated successfully, but these errors were encountered: