Skip to content

No email notifications, plugin ignores success/cancel URLs in form settings #413

@ttmwebdesign

Description

@ttmwebdesign

Hello, I am trying to set up a subscription based membership site using this plugin. I've encountered a problem I don't really understand why it is happening.

The orders are successful in both the back-end of Craft and being sent to my Stripe sandbox.

However, there are no notifications being sent. At first I didn't see the errors in the logs, but I tried different keywords and finally encountered this (url edited for privacy):

#27 {main} {"memory":7713048,"exception":"[object] (TypeError(code: 0): enupal\\stripe\\services\\Orders::getReturnUrl(): Argument #2 ($url) must be of type string, null given, called in /home/ploi/staging.thedomain.com/deploy/vendor/enupal/stripe/src/elements/PaymentForm.php on line 237 at /home/ploi/staging.thedomain.com/deploy/vendor/enupal/stripe/src/services/Orders.php:497)"} 

If I dig further, this is the URL that I think it is trying to use for the Success URL:

"success_url":"https:\/\/staging.thedomain.com\/enupal\/stripe-payments\/finish-order?session_id={CHECKOUT_SESSION_ID}"

...even though I have "/account" set in the payment form settings for this form, so it should be going there - but it is not. And of course the above URL does not truly exist for the site, so it ends up landing on the main homepage instead of where I am expecting it to be.

The rendering tag is very simple, no extra overrides:
{{ craft.enupalstripe.paymentForm('monthYear') }}

My assumption is that it is hitting this success URL issue, and not proceeding to the trigger for the mailer to send the notifications, since those never grace Mailgun's presence.

I've confirmed that Mailgun & the Craft mailer work by way of the test email function in the "Email" page of the Craft Control panel, and with a contact form on the front end that uses P&T's "Contact Form" plugin.

Please advise. I'm about at my wits end here trying to get this working.

The site is on Craft 4.15.3, and Enupal Stripe Payments is on 5.5.2 (trial version, for full disclosure).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions