Skip to Content Skip to Menu

Different notification emails for gateway payment

  • jabba84
  • jabba84
  • OFFLINE
  • Posts: 91
  • Thanks: 5
  • Karma: 0
11 months 4 days ago - 11 months 4 days ago #336319 by jabba84
Hello, in "plan" -> "integration" -> "email" I can setup various emails for different events.
I use the "activation email" that triggers when a user pays with credit card or bank transfer and the payment is validated by a moderator. I also use the "pending first payment" that triggers when a user choose "bank transfer" and the payment is pending. This is ok.
I would like to have different "activation emails" based on the payment type because if the user choose "bank transfer" the mail is redundant as the moderator manually activates it, and if the user choose Credit Card the moderator that receive the email do not know if the mail is subsequent of an activated bank transfer or a Credit Card payment.
So the question is:

1) Is possibile to trigger the "activation email" only if the payment method is "stripe" and not "offline payment"?

if it's not possible:

2) Can i use some placeholder (like [USERNAME], [PLAN_NAME],...) that refers to the gateway used? Something like "payed by [PAYMENT_GATEWAY]" so the moderator that receives the email knows exactly the type of activation.

----

Bonus question: is there a placeholder that gives the year only of the subscription date? I have calendar year subscription so i would like the subject to be "Subscription active for year 2024" where "2024" is taken form the subscription date (like i subscribe on 10 january 2024 the the result is "2024").

EDIT: about the bonus question i've seen that i can use sobstitutions like [cb:date format="Y" date="[DATE_ORDERED]" /]. I have some issues though:

[cb:date format="Y" date="[DATE_PIAD]" /] in frontend returns "0 Failed to parse time string (13/12/2023) at position 0 (1): Unexpected character"
[cb:date format="Y" date="[DATE_ORDERED]" /] in frontend returns "2023" correctly
[cb:date format="Y" date="[DATE_ORDERED]" /] (so it's the same sobstitution) in backend -> baskets -> view invoice returns "An error has occurred. 0 Failed to parse time string (17/12/2023) at position 0 (1): Unexpected character "

Thanks

WebMaster & JoomlaLover @ www.pixed.it
Last edit: 11 months 4 days ago by jabba84.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 months 3 days ago - 11 months 3 days ago #336332 by krileon
Plans don't have access to payment details in their substitutions. A subscription for example doesn't require a payment so those substitutions wouldn't work in those cases. The only thing we could possibly add is get the last basket used for the subscription and substitute in those details, but that might not necessarily be accurate.

Regarding dates they're pre-formatted by CBSubs substitution behavior so the [cb:date] usage will fail to parse them. You can try using the following, but I don't recall if they're available to emails.

[SUBSCRIPTION_EXPIRY_DATE_UTC]
[SUBSCRIPTION_SIGNUP_DATE_UTC]
[SUBSCRIPTION_LAST_RENEWAL_DATE_UTC]

Will review adding last basket substitutions to the subscription substitutions and options for raw dates so you can use [cb:date]. I don't know when this will be available, but if simple enough I'll try to have it in a build release this week.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 months 3 days ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 months 3 days ago #336333 by krileon
Ok, the UTC usages above should work, but there's problems with getting latest basket for a subscription. The first and foremost problem is the massive performance hit of having to query for that information. The second is it may not be entirely reliable. We've a long standing feature request for this as follows, but we've yet to find a reliable way to implement it.

forge.joomlapolis.com/issues/3654

Will see if it can be implemented in locations where the payment basket is already known and that ideally should be available for some integrations or the presentation tab emails at least.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 months 3 days ago #336335 by krileon
Have implemented support for passing current basket data to the subscription to allow access to basket data during subscription state changes. This then allows for substitutions like [PAYMENT_GATEWAY_ID] to get the payment gateway id to condition against in your emails. This is currently pending review, but once reviewed, accepted, and merged will release a new CBSubs build.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jabba84
  • jabba84
  • OFFLINE
  • Posts: 91
  • Thanks: 5
  • Karma: 0
11 months 3 days ago #336340 by jabba84
Great! I have CB 2.8.2, do you think new CBSub will be compatible with that or i will need to update CB aswell?
Thanks

WebMaster & JoomlaLover @ www.pixed.it

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 months 2 days ago - 11 months 2 days ago #336341 by krileon
This is now implemented in the latest CBSubs build release. You'll now find the following in the "Substitutions in Thank You messages and workflow Emails" section. These work for various integrations as well at time of payment (e.g. CBSubs Fields).

 

These require a payment to be present so they will not work everywhere. So for example if you give someone a subscription in backend then these substitutions will be empty. For your usage you can use the Presentation tab emails and wrap the email body in an IF condition. Example as follows.

Code:
[cb:if PAYMENT_GATEWAY_ID="2"]This will only send for the payment gateway with an ID of 2[/cb:if]

Great! I have CB 2.8.2, do you think new CBSub will be compatible with that or i will need to update CB aswell?

No. Why are you on 2.8.2 and not updating CB? You'll need to update CB to update CBSubs to latest.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 months 2 days ago by krileon.
The following user(s) said Thank You: jabba84

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum