1. totoweb
  2. RO Payments
  3. Monday, 13 June 2022
  4.  Subscribe via email
Hi, We use ropayments in RSforms. The user mail is send twice. One time when they go to the Ideal payment and one time after payment.
In the user mail we notice thank the user for signing up and that they will receive a mail when the payment is confirmed.

So we use the additional mail that also sends a confirmation mail that payment is succeeded.

It seems that with that additional mail the welcome user mail from RSform is send again.

How can we prevent that the user mail will be send twice?

Regards,
Raoul
Accepted Answer Pending Moderation
Hello Raoul,

You have not specified how you have setup your mail settings and if you are using the RSForm Payment package. So I am going to guess that the user mail is not deferred but the additional mail is deferred. If you use the RSForm Payment package, the payment package is responsible for sending the mails.

Let me know your settings and we can see further what is going on.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO Payments
  3. # 1
Accepted Answer Pending Moderation
Hello Ronald,

These are the installed plugins > https://snipboard.io/kUnuzq.jpg

Additional mail setting https://snipboard.io/RHYZnE.jpg

Additional mail https://snipboard.io/8irO3Q.jpg

User mail setting https://snipboard.io/lGa3ih.jpg

Do you prefer a login?

Kind regards,
Raoul
  1. more than a month ago
  2. RO Payments
  3. # 2
Accepted Answer Pending Moderation
Hello Raoul,

There is no need for a login as I can see what is happening but not sure how to move forward by this. When the form is submitted RSForms triggers the emails to send, that is when the user email goes out because it is not deferred. Once the payment is completed, there is another trigger to send the emails and it goes out again because it is not deferred.

The problem here is, at this point it is unknown where we are in the process, are we sending the before mails or the after mails? This is why with payments generally mails are deferred.

As it stands now I don´t really have a solution for this other than using the deferred method. If you have any ideas, they are welcome :) Most likely RSForms would need to add the option to specify a kind of step or something to indicate where we are in the flow.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO Payments
  3. # 3
Accepted Answer Pending Moderation
Hi Roland,How can we set up the deferred method?Op 13 jun. 2022, om 14:24 heeft RolandD Cyber Produksi <support@rolandd.com> het volgende geschreven:
  1. more than a month ago
  2. RO Payments
  3. # 4
Accepted Answer Pending Moderation
Hello Raoul,

Have a look at your Additional mail setting screenshot. By setting these email options to Yes, they are deferred (uitgesteld). That is all that is needed.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO Payments
  3. # 5
Accepted Answer Pending Moderation
You mean yes by “uitstelen gebruiker e-mail” en “uitstellen beheerder e-mail"?Op 14 jun. 2022, om 14:22 heeft RolandD Cyber Produksi <support@rolandd.com> het volgende geschreven:
  1. more than a month ago
  2. RO Payments
  3. # 6
Accepted Answer Pending Moderation
Hello,

Correct, those emails will then only be send when the payment is confirmed unless you also set the option to send emails in case of failure, then they are always send regardless of the payment status.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO Payments
  3. # 7
Accepted Answer Pending Moderation
Hello Ronald,See answer RSform. Maybe this helps?Hello Team Totoweb.
You have a new message from Bogdan Tataru.Re: Form is send twiceMessage: Hello,What you are experiencing isn't something related or that can be controlled from RSForm!Pro. Your encountered issue is directly related to the "RO Payments" plugin. If you would have used one of our plugins you would have noticed that the email notifications are sent correctly. In our payment package plugin, we have the following trigger:
public function onRsformBeforeUserEmail($args) {where we treat all the cases:// defer sending if// - user email is deferred && the payment is not confirmed (send email only when payment is confirmed)if ($params->UserEmail == 1 && $status == 0){$args['userEmail']['to'] = '';}// - user email is not deferred && the payment is confirmed (don't send the email once again, it has already been sent)if ($params->UserEmail == 0 && $status == 1){$args['userEmail']['to'] = '';}Here "$params->UserEmail = 1" means that the defer option is enabled. Thus, there are two cases:- if the defer option is enabled and the status is not changed(is still 0) - the email is not being sent- if the defer option is disabled and the status is accepted(is equal to 1) then the email is not being sent as it has been already processedIn this way the email is sent properly. Taking a look at the "RO Payment" plugin's code I noticed the following code:$userEmail = (int) $settings->get('userEmail', 0);if ($userEmail === 0){return;}and below that is the code from our plugin:/*** Defer sending if* - user email is deferred && the payment is not confirmed (send email only when payment is confirmed)*/if ($userEmail === 1 && (int) $status->FieldValue === 0){$args['userEmail']['to'] = '';}/*** Defer sending if* - user email is not deferred && the payment is confirmed (don't send the email once again, it has already been sent)*/if ($userEmail === 0 && (int) $status->FieldValue === 1){$args['userEmail']['to'] = '';}
The problem here is that the second part of the code(the one from our plugin) it has no chance of being processed due to the fact that the return statement is called from the first if statement, without any other condition.Please note that RSForm!Pro source code isn't encrypted, they can always check the source code of our plugins and see how these are designed to work.Regards!
Op 14 jun. 2022, om 14:30 heeft RolandD Cyber Produksi <support@rolandd.com> het volgende geschreven:
  1. more than a month ago
  2. RO Payments
  3. # 8
Accepted Answer Pending Moderation
Hello,

So I read their response but I do disagree to a certain point. The line of code they marked as "bad" was taken out before but created side-effects so it was put back. You also have the following scenario. A user could go through a checkout where the final payment is 0. This means the user never goes to pay and as a result the payment status field is not updated as there is no payment. This means the mail will never be send because it is not deferred but the payment status is also not completed.

The scenario that RSJoomla paints works fine if you always go through the payment process.

What you could do in the meantime is remove the code

if ($userEmail === 0)
{
return;
}
from the file plugins/system/rsfpjdideal/rsfpjdideal.php on line 2841 and see if that works for you.

I am still going to see if and how this can be handled.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO Payments
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!