Maybe when he wanted more infos he meant to specify in which part of the code you need to put that and things like that...It would be great for us to help you with your code if you could post a pseudo code.
However as he said this is the sintax for GET
www.somesite.co m?var1=2 and so on...
If you need further details about Paypal IPG integration, you are welcome here.
Thanks,
-Ajaxrand
Thanks for your input Ajaxrand,
Let me explain the scenario.
I a working on a site where user updates details in a form and data gets updated in the database.
1. User Updates form with his unique UserID
|
2. Data goes in database
|
3. Column Payment_status from database is marked as "Not Done"
|
4. User is redirected to Paypal site
|
5. User makes the payment
|
6. Paypal redirects to my site on payment completion
|
7. Payment_Status column is marked as "Done" for that particular UserID
Now what I want to do is when I redirect(step 3) the site to paypal I also want to set Return parameter with parameter UserID.
So when user comes back to my site I can use the UserID to change value in database.
I read somewhere about rm parameter. But not sure how to use that.
You can set either GET or POST method. Then once user press the complete button from Paypal side you can retrieve the Completed transaction info back to your site.
[/CODE]
Here at success.php (IF rm is POST), You can print back the completed transaction details to the customer.
[CODE=php]
<?=$_POST['txn_id']?>
// This is only the transaction ID
// There are Lots like this refer to Paypal web site for more
[/CODE]
But issue is here,some times user might NOT press the button to merchant web site.
In that case you can use IPN functionality.
This is set by
[CODE=php]<input type="hidden" name="notify_ur l" value="complete _URL_to_IPN.php ">
[/CODE]
Sending this form field to paypal. Then once payment made this url will fire without pressing return back to your site.
When you send this notify_url you can send the User ID to Paypal and get it back by GET request.
[CODE=php]<input type="hidden" name="notify_ur l" value=" http://www.site.com/ipn.php?userid= 1001">
[/CODE]
You can set either GET or POST method. Then once user press the complete button from Paypal side you can retrieve the Completed transaction info back to your site.
[/CODE]
Here at success.php (IF rm is POST), You can print back the completed transaction details to the customer.
[CODE=php]
<?=$_POST['txn_id']?>
// This is only the transaction ID
// There are Lots like this refer to Paypal web site for more
[/CODE]
But issue is here,some times user might NOT press the button to merchant web site.
In that case you can use IPN functionality.
This is set by
[CODE=php]<input type="hidden" name="notify_ur l" value="complete _URL_to_IPN.php ">
[/CODE]
Sending this form field to paypal. Then once payment made this url will fire without pressing return back to your site.
When you send this notify_url you can send the User ID to Paypal and get it back by GET request.
[CODE=php]<input type="hidden" name="notify_ur l" value=" http://www.site.com/ipn.php?userid= 1001">
[/CODE]
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
=============== =============== =============== ===
[code=html]
<input type="Hidden" name="cmd" value="_xclick" >
<input type="Hidden" name="business" value="username @hotmail.com">
<!-- Allow customer to enter desired quantity -->
<input type="Hidden" name="undefined _quantity" value="1">
<input type="Hidden" name="item_name " value="Registra ion">
<input type="Hidden" name="item_numb er" value="">
<!-- No currency_code variable has been specified, so monetary amount is assumed to be USD -->
<input type="Hidden" name="amount" value="10">
<! Passthrough variables for order tracking or other purpose -->
<input type="Hidden" name="custom" value="">
<input type="Hidden" name="invoice" value="">
<input type="Hidden" name="charset" value="">
<input type="Hidden" name="no_shippi ng" value="1">
<input type="Hidden" name="return" value="">
<input type="Hidden" name="cancel_re turn" value="">
<!-- Do not prompt customer to include a note with the purchase -->
<input type="Hidden" name="no_note" value="1">
<input type="Hidden" name="rm" value="2">
<input type="Hidden" name="notify_ur l" value="">
<input id=UserName style="WIDTH: 165px" tabindex=1 maxlength=16 name="Name">
<input id=PasswordVeri fy style="WIDTH: 165px" tabindex=3 type=text maxlength=15 name="Phone">
<input id=EMail style="WIDTH: 165px" tabindex=4 name="Email">
<input type=submit value=Submit Now name=Authorize onClick="update valuesonsubmit( )">
[/code]
[code=javascript]
<script language="JavaS cript" type="text/JavaScript">
function updatevaluesons ubmit()
When user clicks on submit I am running updatevaluesons ubmit 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:
[code=php]
<?php
// multiple recipients
$to = 'ykhamitkar@gma il.com'; //
$companyname = 'My comany';
//Put name of cc. put " $cc = '' " if not required
$cc = 'yogesh@teamags .com';
//Put name of bcc. put " $bcc = '' " if not required
$bcc = '';
$headers = '';
// To send HTML mail, the Content-type header must be set
//$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
when user makes payment it does not run Payment-Complete.php.
If you not getting a mail the problem is with your mail script. but note that you cant see the page(s) anyway (payment_comple te page, Thankyou page ).Its Completly hapening on the server side.
Server-Server Comunication
when Calling from client to server only you can see the page.
Read my previuos post to find out the diferences between
return
notify_url
Read it here Link 1 Link 2
Thanks Thread is still open for you.come back any time.
If you not getting a mail the problem is with your mail script. but note that you cant see the page(s) anyway (payment_comple te page, Thankyou page ).Its Completly hapening on the server side.
Server-Server Comunication
when Calling from client to server only you can see the page.
Read my previuos post to find out the diferences between
return
notify_url
Read it here Link 1 Link 2
Thanks Thread is still open for you.come back any time.
Comment