im really new to PHP, and have some questions...
I have been implemeting a PayPal payment form, the code goes like this:
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US"> <input type="hidden" name="rm" value="2">
<input type="hidden" name="shipping_1" value="<?php echo $shipping; ?>">
<input type="hidden" name="return" value="http://www.predragstevanovic.com/webprodavnica/index.php?view=thankyou"/>
<input type="hidden" name="cancel_return" value="predragstevanovic.com/webprodavnica/">
<input type="hidden" name="notify_url" value="predragstevanovic.com/webprodavnica/paypal.php"/>
<input type="submit" name="pay now" value="Plati" />
My root directory is webprodavnica
and inside this directory i have: index.php
, db_fns.php
, cart_fns.php
, paypal.php
and then I have another directory named views
with 2 more directories inside: layouts
with shop.php
and shop
with plati_kupovinu.php
, index.php
and thankyou.php
.
Im stucked when I press pay button, it goes to paypal, and when finish transaction does nothing, and i want to redirect me to my thankyou.php page on my server. I'm hosting this locally because I could not find a free hosting to test this application... if anybody can suggest one that would be cool. I don't have a domain either, predragstevanovic.com
is just an example.
So, what's happening is that the user clicks on the pay button and that takes the user to to paypal (they leave my page) and there they finish the transaction but does not return to my page, where you want to show thankyou.php
.
How to write the code if i want to display thankyou view from my server?
Thanks