Jump to content

[SOLVED] Is it possible??


Wildhalf

Recommended Posts

Hi,

 

I was wondering if it is possible to hide some html code in a php script. What i have is a paypal button on my site but i want to hide the form code for paypal.

 

What i want is  for my visitor to  click this button which calls a php script, which then redirects the user to the paypal payment screen.

 

The reason i am doing this is because i can not encrypt my subscription button as i am trying to pay my affiliates directly into there paypal account

 

regards,

 

Kieron

Link to comment
https://forums.phpfreaks.com/topic/42733-solved-is-it-possible/
Share on other sites

File1.php

<html>
<a href="process.php">Pay Now!</a>
</html>

 

 

process.php

<?php

// process the pay pal data here


//redirect user to paypal site for payment
  header("Location: http://www.paypalste.com/page?parameters=ok

?>

 

 

If that is not it, you need to be alot more clearer on what you want.

 

--FrosT

Link to comment
https://forums.phpfreaks.com/topic/42733-solved-is-it-possible/#findComment-207340
Share on other sites

I've looked into it a bit further and Frost is right.... I could use

 

<? 
header("Location:
http://www.paypal.com/xclick/[email protected]&amount=1.00&item_name=Testing+123");
?>

 

or i could use javascript like the example below

 

<html>
<head> 
<script language="JavaScript" type="text/javascript"> 
<!-- function submitForm() { document.myForm.submit(); setTimeout('self.close();',10000); } //--> </script> 
</head> 
<body onLoad="javascript:submitForm()"> 
You are being redirected to PayPal. This window will close itself in 10 seconds. 
<form name="myForm" method="post" action="https://www.paypal.com/cgi-bin/webscr" target="_blank"> <input type="hidden" name="business" value="[email protected]"> 
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="item_name" value="test"> 
<input type="hidden" name="amount" value="12.00"> 
</form> 
</body> 
</html>

Link to comment
https://forums.phpfreaks.com/topic/42733-solved-is-it-possible/#findComment-207394
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.