Paypal email notifications
Moderator: mkoch227
Paypal email notifications
Version of script: 2.5.5
What terms did you try when SEARCHING for a solution: Paypal
I recently moved from Kayako eSupport to Hesk, the transition was really easy, thank you.
The one problem I have is when I receive an email notification of payment from paypal into Hesk.
The email username and email address are incorrect. I am not sure how eSupport handled it, but it worked flawlessly.
In Hesk, the following happens:
Name: J_E_F_F via PayPal
Email: member@paypal.com
Message:
Hello xxxxx,
This email confirms that you have received a donation of from (J_E_F_F@domain.net). You can view the transaction details online.
Before I can reply to the ticket, I have to go in and manually edit the ticket and copy/paste the correct email address from the message body into the email field on the ticket and remove the ...via PayPal from the Name field.
Is there a way to correct this within the Heck code?
Ideally, it should be entered and read as:
Name: J_E_F_F
Email: J_E_F_F@domain.net
What terms did you try when SEARCHING for a solution: Paypal
I recently moved from Kayako eSupport to Hesk, the transition was really easy, thank you.
The one problem I have is when I receive an email notification of payment from paypal into Hesk.
The email username and email address are incorrect. I am not sure how eSupport handled it, but it worked flawlessly.
In Hesk, the following happens:
Name: J_E_F_F via PayPal
Email: member@paypal.com
Message:
Hello xxxxx,
This email confirms that you have received a donation of from (J_E_F_F@domain.net). You can view the transaction details online.
Before I can reply to the ticket, I have to go in and manually edit the ticket and copy/paste the correct email address from the message body into the email field on the ticket and remove the ...via PayPal from the Name field.
Is there a way to correct this within the Heck code?
Ideally, it should be entered and read as:
Name: J_E_F_F
Email: J_E_F_F@domain.net
Re: Paypal email notifications
The correct address is probably in the "Reply-To" email header.
I have this modification ready for next HESK version, so you can try uploading this file to your HESK "inc" folder and see if it helps (on new tickets, not existing ones):
http://www.hesk.com/extras/pipe_functions_reply_to.zip
I have this modification ready for next HESK version, so you can try uploading this file to your HESK "inc" folder and see if it helps (on new tickets, not existing ones):
http://www.hesk.com/extras/pipe_functions_reply_to.zip
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Paypal email notifications
Worked perfectly, thank you.
Re: Paypal email notifications
the 2.6.1 upgrade reverted the code so it now displays "...via PayPal" again.
What do I need to change to correct that?
What do I need to change to correct that?
Re: Paypal email notifications
These changes are INCLUDED in 2.6.x, are you sure this is happening on new emails and that you have the correct 2.6.1 files?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Paypal email notifications
Yes, positive. happening on 2.6.1 on an email I received this morning.
I updated to 2.6.1 yesterday, and previously had your modified file in place for 5 months without issue.
I updated to 2.6.1 yesterday, and previously had your modified file in place for 5 months without issue.
Re: Paypal email notifications
Oh, wait - I think I misunderstood you.
The EMAIL address is the correct one, right? Just the "via PayPal" part needs fixing?
To do that:
- open inc/pipe_functions.inc.php in a plain text editor
- find line
- just below that line add
- save, upload & test
The EMAIL address is the correct one, right? Just the "via PayPal" part needs fixing?
To do that:
- open inc/pipe_functions.inc.php in a plain text editor
- find line
Code: Select all
$tmpvar['name'] = hesk_input($tmpvar['name'],'','',1,50) or $tmpvar['name'] = $hesklang['pde'];
Code: Select all
$tmpvar['name'] = str_replace(' via PayPal', '', $tmpvar['name']);
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Paypal email notifications
that's what I needed, thanks.
Re: Paypal email notifications
PayPal changed the way they send emails, so this won't work anymore.
It's more complicated now since customer name and email are not in headers anymore. Try this:
1. open inc/pipe_functions.inc.php
2. find line
3. just ABOVE this line add
It's more complicated now since customer name and email are not in headers anymore. Try this:
1. open inc/pipe_functions.inc.php
2. find line
Code: Select all
$tmpvar['message'] = hesk_input($tmpvar['message'],'','',1);
Code: Select all
if ($tmpvar['name'] == 'PayPal')
{
if ( ! preg_match('/from ([^)]*)\s*\(mailto\:(.+@.+)\?/U', $tmpvar['message'], $m))
{
preg_match('/from ([^)]*)\s\(\s*([^\s]+@[^\s]+)\s+/U', $tmpvar['message'], $m);
}
// Do we have name?
if (isset($m[1]))
{
$tmpvar['name'] = $m[1];
$tmpvar['name'] = hesk_input($tmpvar['name'],'','',1,50) or $tmpvar['name'] = $hesklang['pde'];
}
// Do we have email?
if (isset($m[2]))
{
$m[2] = trim($m[2]);
if ( ! preg_match('/[a-zA-Z0-9]/', substr($m[2], -1) ) )
{
$m[2] = substr($m[2], 0, -1);
}
if (hesk_isValidEmail($m[2]))
{
$tmpvar['email'] = $m[2];
}
// Email banned?
if ( hesk_isBannedEmail($tmpvar['email']) )
{
return hesk_cleanExit();
}
}
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Paypal email notifications
I gave it a try both with and without the earlier line of code, and the same problem remains. The ticket generated is from Name:PayPal and Email:service@paypal.com
I PM'd you a full email header.
I PM'd you a full email header.