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
Share on other sites


if (isset($_POST['btnSubmit'])) {
  // user clicked paypal button.

  // do processing here
  header("Location: http://www.paypalste.com/page?parameters=ok
}

 

If thats not what you are looking for post some code.

 

--FrosT

Link to comment
Share on other sites

THanks frost,

 

I didn't describe what i want properly...

 

All i wanted on my html page is a button with a link to some php code that holds the information about the payment. Basically i don't want the user to be able to look at the paypal payment source code.

Link to comment
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
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/business=test@user.com&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="pay@site.com"> 
<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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.