Hi there,
I am working on paypal payment gateway using php.
How can I set return url with some arguments
Thanks,
Yogesh
14 14452 kovik 1,044
Recognized Expert Top Contributor
Hi there,
I am working on paypal payment gateway using php.
How can I set return url with some arguments
Thanks,
Yogesh
What?
You mean how to make a query string?
"?var1=value1&v ar2=value2"
Be more specific.
What?
You mean how to make a query string?
"?var1=value1&v ar2=value2"
Be more specific.
Hi,
I am sorry, May be I was not clear.
Yes I want a query string.
Thanks,
Yogesh
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...
ak1dnar 1,584
Recognized Expert Top Contributor
Hi there,
I am working on paypal payment gateway using php.
How can I set return url with some arguments
Thanks,
Yogesh
Hi Yogesh,
You can Send a hidden form field named return with theOther form elements
[PHP]
$paypal_site_ur l='http://www.thescripts. com/thanks.php';
<input type="hidden" name="return" value="<?=$payp al_site_url?>">
[/PHP]
If you need further details about Paypal IPG integration, you are welcome here.
Thanks,
-Ajaxrand
Hi Yogesh,
You can Send a hidden form field named return with theOther form elements
[PHP]
$paypal_site_ur l='http://www.thescripts. com/thanks.php';
<input type="hidden" name="return" value="<?=$payp al_site_url?>">
[/PHP]
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.
I am new to payment gateway. so please help.
Thanks,
Yogesh
ak1dnar 1,584
Recognized Expert Top Contributor rm is stands for Return Method -
$paypal_return_method="2"; //1=GET 2=POST
-
<input type="hidden" name="rm" value="<?=$paypal_return_method?>">
-
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.
To the page that I mentioned in my ealier post. - <input type="hidden" name="return" value="Complete_URL_to_the Success_page.php">
-
-
Here at success.php (IF rm is POST), You can print back the completed transaction details to the customer. -
-
<?=$_POST['txn_id']?>
-
// This is only the transaction ID
-
// There are Lots like this refer to Paypal web site for more
-
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 - <input type="hidden" name="notify_url" value="complete_URL_to_IPN.php">
-
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. - <input type="hidden" name="notify_url" value=" http://www.site.com/ipn.php?userid=1001">
-
Thanks
-Ajaxrand
rm is stands for Return Method -
$paypal_return_method="2"; //1=GET 2=POST
-
<input type="hidden" name="rm" value="<?=$paypal_return_method?>">
-
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.
To the page that I mentioned in my ealier post. - <input type="hidden" name="return" value="Complete_URL_to_the Success_page.php">
-
-
Here at success.php (IF rm is POST), You can print back the completed transaction details to the customer. -
-
<?=$_POST['txn_id']?>
-
// This is only the transaction ID
-
// There are Lots like this refer to Paypal web site for more
-
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 - <input type="hidden" name="notify_url" value="complete_URL_to_IPN.php">
-
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. - <input type="hidden" name="notify_url" value=" http://www.site.com/ipn.php?userid=1001">
-
Thanks
-Ajaxrand
Thank you so much Ajaxrand. Nice information
ak1dnar 1,584
Recognized Expert Top Contributor
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 don't
know why can guys please help me up
<%
if SIGNUP_PRICE > 0 then
|
by: Mark |
last post by:
Hi all, I have an ASP.NET application which I use to call paypal.
I pass in the success URL as
http://www.somedomain.com/success.aspx
I go right through the paypal process and I finally get the "Return to
merchant" button on the PayPal screen.
If I look at the source code of the Paypal page the form action looks like
|
by: Tommy |
last post by:
I have written some code to use paypal for users to make purchases from my
site. I am using the paypal instant payment notification.
When i get the notification from paypal I send the user an email with
registration key. I can pass data to that page with the custom field with no
problem.
The problem is after I redirect from my page to paypal. When I click the
return button on paypal at the end of the purchase process all of my session...
|
by: Alan Silver |
last post by:
Hello,
I've just been looking at the free PayPal component from ComponentOne
and am somewhat amazed how insecure it is. They include all the
transaction details in plain text in the querystring, meaning that any
rank novice can click the Buy button on your site, then when the PayPal
page loads, change the amount for the transaction and press Enter. This
reloads the page with the new amount. This is so obvious that anyone
could do it.
|
by: Jason James |
last post by:
Guys,
it seems that several people have enquired about how to communicate
with Paypal as securely as possible. It is obvious that placing the
shopping cart details in the URL is about as insecure as could be.
Therefore why not use a POST and hide them in hidden variables? Well I
would if I could figure it out. The contents of the cart are created
dynamically and since I already have a button on my form that needs to
be captured by...
| |
by: tolkienarda |
last post by:
hi all
most of you have seen this form, mostly it has hidden attributes some of which can be changed to select boxes. the part that seems to be a security flaw is that people can edit live html with the web developer toolbar on firefox. i've gone into one of my clients orderforms and bought an expensive item for only five dollars and paypal never caught on.
below is the code that now anyone with any knowldge of html can edit live and...
|
by: Nicodemus |
last post by:
Do You Belive?
\
cheapbbc@sina.com wrote in news:aecf26b6-4c75-4d87-b09c-a7380875e0f3
@w34g2000prm.googlegroups.com:
|
by: HawkMan24 |
last post by:
I submitted this on another PHP/Ajax forum and no one was able to figure it out. I am trying to return to a form from Ajax after clicking on a PayNow button and I want to return true or false depending on if it was able to write a record to my database from a php script. Everything works fine if the record gets written (it continues to PayPal) or if somemone leaves out a required field (it displays a message and stays on the page). But my...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |