Forums

Paypal Redirect and IPN not configurable with variable as business email and receiver email

sh-si 08 Jul, 2019
Hi,

i'm sucessfully using paypal payments with chronoforms. Great so far.

Now i would like to use the solution on different sites for different customers with different paypal accounts ("Business email" in Paypal Redirect and "Receiver email" in IPN).
So i set up a variable holding this particular information (email as string).

Unfortunately it seems that this is not possible at the moment?
It only works if i put an email inside these fields, especially IPN

If i put the created variable holding the business email in Paypal Redirect i'm transfered to the correct sandbox account. But if i receive the corresponding IPN i only get the following error in the debugger:
paypal_ipn._error = "INVALID email"
It would be great if this bug will be fixed in the near future. For me it seems that this is a bug because the redirect works with the variable.

Thanks for your great work, i appreciate it!

Best regards,
Stefan
sh-si 08 Jul, 2019
The topic needs to be changed: 🙄[h1]Paypal Redirect and IPN not configurable with variable as business email and receiver email[/h1]
Max_admin 19 Jul, 2019
Sorry, what do you mean by a variable ? you are supposed to provide the PayPal account email address in that setting!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sh-si 21 Jul, 2019
I want to use {data:my_paypal_email_variable} instead of my paypal email address.
The variable my_paypal_email_variable holds the paypal email address.
healyhatman 22 Jul, 2019
Why would you want to do that?

Also it will only be available on form submit if you're using a data call, and will not be available in the IPN event. You can't store it in session because the session is tied to the user machine and PayPal will have a different identifier.

MAYBE you can use different IPN events, one for each?
sh-si 22 Jul, 2019

Why would you want to do that?


Please see above:

Now i would like to use the solution on different sites for different customers with different paypal accounts ("Business email" in Paypal Redirect and "Receiver email" in IPN).


---

Also it will only be available on form submit if you're using a data call, and will not be available in the IPN event. You can't store it in session because the session is tied to the user machine and PayPal will have a different identifier.


This may be correct but IMHO this is not my use case:
I'm using a code block "getConfiguration". Inside i set all related values to the needed variables in IPN. In this custom php code block i assign "my_paypal_email_variable" with the merchant paypal e-mail address.

As i mentioned before this works in paypal redirect but not in ipn.

Thanks for investigation!
healyhatman 22 Jul, 2019
In libraries\cegcore2\admin\extensions\chronofc\functions\paypal_ipn\paypal_ipn_output.php you need to change line 96 from
if(empty($function['receiver_email']) OR ($function['receiver_email'] == $this->data('receiver_email'))){
to
if(empty($this->Parser->parse($function['receiver_email'])) OR ($this->Parser->parse($function['receiver_email']) == $this->data('receiver_email'))){

This change will need to be redone every time Chronoforms or ChronoConnectivity is updated.
sh-si 22 Jul, 2019
Hi, thanks for this proposal but changing core libraries after every update is not "professional".
Maybe this change can be made within a future release of CF?

Would be great!
sh-si 26 May, 2020
Hi, any news on this?
Is it possible to integrate this into the core?

Best regards
This topic is locked and no more replies can be posted.