Jump to content

[SOLVED] How to pass values to PAYPAL using PHP?


erra

Recommended Posts

Hello there...I hope someone out there could help me...

does anyone knows how to pass values to Paypal in PHP...

 

Here is my codes..

 

The codes for passing values to paypal is in javascript...i wanted to be in PHP...

 

 

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

 

<head>

  <title></title>

 

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Pay Now Text Options</title>

 

<!-- Start of Script -->

<script language="JavaScript">

<!--

function joinFields( ){

 

fmBuy.os0.value = "Contest title: " + fmBuy.con_title.value+ "<br/>" + "Contest Type: " + fmBuy.con_type.value + "<br/> " + " Contest Description: " + fmBuy.con_desc.value  + " <br/>" + " Start date: " + fmBuy.sdate.value  + " <br/> " + " End date: " + fmBuy.edate.value  + " <br/> " + "Prize amount: " +fmBuy.prize_amt.value  + " <br/> " + " Prize quantity: " + fmBuy.prize_qty.value;

 

  }

 

 

// -->

</script>

 

 

<!-- End of Script -->

 

<style type="text/css">

<!--

.style4 {font-size: 14px}

-->

</style>

</head>

 

 

<body>

 

<!-- Start of Form -->

 

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="get" name="fmBuy" id="fmBuy" onSubmit="joinFields()">

  <p>

  <input type="hidden" name="cmd" value="_xclick">

  <input type="hidden" name="return"value ="http://www.paypercontest.com/testing/pdt.php?status=T"><br>

<input type="hidden" name="cancel_return"

value = "http://www.paypercontest.com/testing/pdt.php?status=F"><br>

 

 

  <input type="hidden" name="business" value="[email protected] ">

 

  <input type="hidden" name="item_name" value="contest">

 

  <input type="hidden" name="amount" value="50.00">

  <input type="hidden" name="no_note" value="1">

  <input type="hidden" name="on0" value="1">

  <input type="hidden" name="os0" value="1">

  <input type="hidden" name="os1" value="1">

 

  <input type="hidden" name="currency_code" value="USD">

  <input type="hidden" name="lc" value="SG">

  <input type="hidden" name="bn" value="PP-BuyNowBF">

 

 

 

he can use the custom field in the form and pass whatever values he wants, and if theres multiple values he can separate them by a comma and use explode when he gets them back after the paypal payment(IPN) has happened.

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.