mod_payment(_stripe)

20 views
Skip to first unread message

Seann Aswell

unread,
Apr 19, 2024, 12:17:49 AMApr 19
to Zotonic developers
Curious, is anyone using mod_payment with the 1.0-master branch?

Needing to implement basic payment functionality for sales of digital goods, already have a Stripe account, and would prefer to use something integrated with Zotonic if possible. However, not sure if it's been tested or used with the lastest Zotonic?

It looks like mod_paysub is under development, but is focused on subscriptions. Will it ultimately replace mod_payment?

Marc Worrell

unread,
Apr 19, 2024, 8:36:01 AMApr 19
to zotonic-d...@googlegroups.com
Hi!

Indeed paysub is in active development at the moment.
And it is geared for paid subscriptions.

The mod_payment (and friends) is more for one-off payments and simple recurring payments.
I think Driebit is using it - at least the 0.x version of the module(s).
As they are moving sites over to the 1.x they will definitely start using the new versions soon (if they don’t already).

Cheers, Marc




--

---
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/1d448a59-76a2-452e-a6a0-c0b797b106c0n%40googlegroups.com.

Message has been deleted

Marc Worrell

unread,
Apr 23, 2024, 6:22:36 AMApr 23
to 'Marc Worrell' via Zotonic developers
Hi,

Actually, that sounds like a kind of “eternal” membership :-)
Maybe Stripe has a type of one-time-payment subscriptions?

The paysub module can dynamically assign a user group depending on the subscriptions.
The user group could then allow access to the content groups of your paid content.

Cheers, Marc



On 20 Apr 2024, at 07:56, 'Seann Aswell' via Zotonic developers <zotonic-d...@googlegroups.com> wrote:

Greetings Marc,

Okay, understand. 

I am hoping to automatically add users to a group (ie: members) after a one-time payment is completed, allowing access to downloadable content and/or certain pages. Will do some testing and see if mod_payment will do the trick.

Will follow-up if further help is needed.

Thanks again,
Seann

Seann Aswell

unread,
Jun 16, 2024, 6:42:33 PMJun 16
to Zotonic developers
Hey Marc,

Apologies for the latency...I am now looking again at the best way to handle.

You may be right, perhaps finding a way to use the subscription functionality of Stripe is best. The product is a one time sale (digital or physical), but it does include an online component. So there could be an initial price that includes the one-time purchase, with a reduced yearly subscription renewal price for just the online portion.

Will look into this...

Thanks again,
Seann

Seann Aswell

unread,
Jun 23, 2024, 3:45:10 AMJun 23
to Zotonic developers
Just to confirm...

Testing mod_paysub. When making test payments product/subscription/payment info is populating in the admin properly, but redirect after payment fails.

According to zotonic_mod_paysubprivtemplatespaysub_psp_done.tpl the redirect landing page after payment is "/payment/done/<payment-nr>".

Can you confirm what "payment-nr" refers to? Elsewhere it appears "checkout-nr" may be needed instead.

Am currently using "/payment/done/{CHECKOUT_SESSION_ID}" in the Stripe admin for redirect after payment, but get an "unknown payment" error from Zotonic, so the user is not added.

Have manually attempted several different ID's, none have worked. Can you verify which ID mod_paysub is looking for?

Thanks,
Seann

Seann Aswell

unread,
Sep 26, 2024, 3:23:25 AMSep 26
to Zotonic developers
Currently finalizing the mod_paysub setup... There were two issues which were preventing proper operation, both operator error. However, there is still one problem.

Operator Error:
1) mod_paysub verifies a secure connection, otherwise it will not handle payment info. When using a proxy in front of Zotonic to handle SSL, forwarding traffic to Zotonic on the standard non-encrypted port 8000, communication with Stripe will fail. To resolve, I enabled mod_ssl_ca, configured Zotonic/FreeBSD VM to listen on port 443, and reconfigured proxy to use port 443.
2) I was attempting to use a payment link, rather than using "_paysub_checkout_link.tpl" to initiate a Checkout session. Once a Checkout session is properly initiated, everything works properly.

Remaining Issue:
When payment for a subscription is made, and a user is redirected to their profile page as expected, the user is NOT added to the user group associated with the subscription.

paysub-subscription.pngpaysub-subscription.png


As shown above, in the Admin the User has an active subscription, but the Contact field is not populated (not sure if it should be), and the user group has not been updated to Digital Member.

Looking at mod_paysub.erl at line 229, it appears that mod_acl_user_groups is supposed to initiate an update to the user group, but I am not certain what triggers it. To test I have updated User info in the Stripe portal, and Zotonic pulls it down, but nothing I do seems to trigger Zotonic to update the User Group that the subscriber should be added to.

I must be missing something, but am not certain how to overcome this last hurdle. Any suggestions?

Seann Aswell

unread,
Sep 26, 2024, 3:52:58 AMSep 26
to Zotonic developers
FYI- Debug mode does not appear to show any errors that would cause the above. Posted here: Debug Log
Reply all
Reply to author
Forward
0 new messages