473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Paypal notify_url

Hi I tried the notify_url but it didnt work can you see if I am doing any error.
or do i need to change any any setting in paypal site to activate notify_url


Here is my html code for the form
================================================
Expand|Select|Wrap|Line Numbers
  1. <input type="Hidden" name="cmd" value="_xclick">
  2. <input type="Hidden" name="business" value="username@hotmail.com">
  3. <!-- Allow customer to enter desired quantity -->
  4. <input type="Hidden"  name="undefined_quantity" value="1">
  5. <input type="Hidden"  name="item_name" value="Registraion">
  6. <input type="Hidden" name="item_number" value="">
  7. <!-- No currency_code variable has been specified, so monetary amount is assumed to be USD -->
  8. <input type="Hidden" name="amount" value="10">
  9. <! Passthrough variables for order tracking or other purpose -->
  10. <input type="Hidden" name="custom" value="">
  11. <input type="Hidden" name="invoice" value="">
  12. <input type="Hidden" name="charset" value="">
  13. <input type="Hidden" name="no_shipping" value="1">
  14. <input type="Hidden" name="return" value="">
  15. <input type="Hidden" name="cancel_return" value="">
  16. <!-- Do not prompt customer to include a note with the purchase -->
  17. <input type="Hidden" name="no_note" value="1">
  18. <input type="Hidden" name="rm" value="2">
  19. <input  type="Hidden" name="notify_url" value="">
  20. <input id=UserName style="WIDTH: 165px" tabindex=1 maxlength=16 name="Name">
  21. <input id=PasswordVerify style="WIDTH: 165px" tabindex=3 type=text maxlength=15 name="Phone">
  22. <input id=EMail style="WIDTH: 165px" tabindex=4 name="Email">
  23. <input type=submit value=Submit Now name=Authorize onClick="updatevaluesonsubmit()">
  24.  
  25.  
  26. <script language="JavaScript" type="text/JavaScript">
  27. function updatevaluesonsubmit() 
  28.  
  29.       notify_url = "http://mysite.com/Payment-Complete.php?";
  30.     notify_url = notify_url + "Name=" + frm.Name.value;
  31.     notify_url = notify_url + "&Phone=" + frm.Phone.value;
  32.     notify_url = notify_url + "&Email=" + frm.Email.value;
  33.     notify_url = notify_url + "&Country=" + frm.Country.value;
  34.     notify_url = notify_url + "&Product=" + frm.Registraion.value;
  35.     notify_url = notify_url + "&Amount=" + frm.amount.value;
  36.     frm.notify_url.value = notify_url;
  37. </Script>
****

When user clicks on submit I am running updatevaluesonsubmit javascript to update notify_url field (I checked this and it works fine)
then it opens paypal site but when user makes payment it does not run Payment-Complete.php.

here is the code of Payment-Complete.php to send email. but it does not send email
================================================== ====
Payment-Complete.php:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // multiple recipients
  3. $to  = '__MUNGED__'; //
  4. $companyname = 'My comany';
  5.  
  6. //Put name of cc. put " $cc = '' " if not required
  7. $cc = '__MUNGED__';
  8.  
  9. //Put name of bcc. put " $bcc = '' " if not required
  10. $bcc = '';
  11.  
  12. // subject
  13. $subject = 'Payment Complete';
  14.  
  15. // message
  16. $mailBody = '';
  17. $mailBody = $mailBody . '
  18. <table border="0" bordercolor="#000000" rowheight="30" width="400" cellspacing="1" celpadding="1">
  19. <tr>
  20. <td align="center" bgcolor="#CCCCCC" colspan="2" height="30"><b>
  21. <font face="Arial" size="2">Personal Details</font></b></td></tr>';
  22.  
  23. $mailBody = $mailBody . '<tr>
  24. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Name : </td>
  25. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  26. $mailBody = $mailBody . $_REQUEST['Name']."</td></tr>";
  27. $mailBody = $mailBody . '<tr>
  28. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Email : </td>
  29. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  30. $mailBody = $mailBody . $_REQUEST['Email']."</td></tr>";
  31.  
  32. $mailBody = $mailBody . '<tr>
  33. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Phone : </td>
  34. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  35. $mailBody = $mailBody . $_REQUEST['Phone']."</td></tr>";
  36.  
  37. $mailBody = $mailBody . '<tr>
  38. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Product : </td>
  39. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  40. $mailBody = $mailBody . $_REQUEST['Product']."</td></tr>";
  41.  
  42. $mailBody = $mailBody . '<tr>
  43. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Amount : </td>
  44. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  45. $mailBody = $mailBody . $_REQUEST['Amount']."</td></tr>";
  46.  
  47. $mailBody = $mailBody . '<tr> 
  48. <td align="right" bgcolor="#CCCCCC" height="30"><font face="Arial" size="2">Country : </td>
  49. <td bgcolor="#EAEAEA"><font face="Arial" size="2">';
  50. $mailBody = $mailBody . $_REQUEST['Country'].'</td></tr></table><BR><BR>';
  51.  
  52. $mailBody = $mailBody .'<font face="Arial" size="2">Thank you, <br><br>';
  53. $mailBody = $mailBody .'from<b> ' . 'ABC.com' . '</b><br><br><br></font>';
  54.  
  55.  
  56. $headers = '';
  57. // To send HTML mail, the Content-type header must be set
  58. //$headers  = 'MIME-Version: 1.0' . "\r\n";
  59. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  60.  
  61. // Additional headers
  62. $headers .= 'To: ' . $companyname . '<' . $to . '>' . "\r\n";
  63. $headers .= 'From: '.$_REQUEST['Name'].' <'.$_REQUEST['Email'].'>' . "\r\n";
  64.  
  65. if ($cc!='')
  66. {
  67.     $headers .= 'Cc:' . trim($cc) ."\r\n";
  68. }
  69.  
  70. if ($bcc!='')
  71. {
  72.     $headers .= 'Bcc: ' . trim($bcc) . "\r\n";
  73. }
  74.  
  75. // Mail it
  76. mail($to, $subject, $mailBody, $headers);
  77.  
  78. //Open thank you page
  79. //include("thank-you.htm");
  80. ?>
===================


Please help!!

Thanks,
Yogesh
Jul 8 '07 #1
3 20215
pbmods
5,821 Expert 4TB
Heya, Yogesh.

What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Jul 8 '07 #2
Heya, Yogesh.

What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.

I want to achieve following
1. User submits his/her details(Name, Email, Phone) in HTML form.
2. Site is redirected to Paypal
3. As soon as user makes payment I want send an email to my self with the details submitted by the user.

My site does not run third step. Means it properly gets redirected to Paypal. And after payment it does not run the script(php file) specified by me in the notify_url variable.

Please help,
Thanks
Jul 9 '07 #3
pbmods
5,821 Expert 4TB
Heya, Yogesh.

Check out the PayPal IPN Class.
Jul 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Vinod | last post by:
Hi I am having a payment website which needs to be integrated, i am having the following code which is not working fine. I am having the following script and my notifyurl is not working i...
0
by: PayPal Security Measures! | last post by:
<P><A href="http://www.paypal.com/cgi-bin/webscr?cmd=_home" target=_blank><IMG src="https://www.paypal.com/en_US/i/logo/paypal_logo.gif" border=0></A</P> <TABLE cellSpacing=0 cellPadding=0...
1
by: mrityunjay11 | last post by:
i want to know exaxt lacation where notify_url variable is there in paypal can u tell me how to access it this is relaated to insataant payment notification when we buy aany new button
0
by: Nicodemus | last post by:
Do You Belive? \ cheapbbc@sina.com wrote in news:aecf26b6-4c75-4d87-b09c-a7380875e0f3 @w34g2000prm.googlegroups.com:
1
by: karleyb | last post by:
Could someone please tell my why this won't work. THe value purchase.value seems to be blank. Is there any way to get the value of a radio box? <table width="57%" border="0" align="center"...
1
by: vjayis | last post by:
Hi i m a working with paypal to integrate it with my website., users can book the hall regarding time basis. so i m sending the amount to paypal by paynow button created through my paypal...
2
by: cylivepay | last post by:
Our client is using the below code for completing an online payment with paypal. <form action='https://www.paypal.com/cgi-bin/webscr' target='_blank' method='post'> <input type='hidden'...
0
by: Milan Radosavlj | last post by:
when makning a requst to paypal with a script or a button and using notiry_url variable (notory_url=https://mysite.com/myscript.php) does pay pal return any values?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.