PHP - Paypal: Create A Custom Payment Link (pass Price In Url)
I was wondering if there was any way in which I could create a link which would direct to a paypal payment page and the amount to be paid could be specifed in the URL (GET method) as I have multiple products at differnt prices and would like to redirect the user to a page with a price I specify to be paid.
Anyone have ideas? Hope someone can respond soon - thanks in advance for any help! Jake Similar Tutorials Hello and looking for some help please.. I have already read this : http://www.phpfreaks.com/forums/index.php?topic=120619.0 What I am after to do, is to after a successful Paypal payment from paypal, generate a link in a wordpress site (or external even) that will expire after 3 days to a video. I hope that makes sense please? Thanks in advance, Jim Hi, I've integrated paypal payment pro over my website. I don't know how can i test it. can any one help me out? my site address is : http://pacific-labs.com/paymybill.php Please help I know paypal has some sort of php api, but I know nothing about it and where to find it. I want to create an app that will instantly pay users from my account after a certain action is deployed on my site. I know this is possible, a few years ago I was going to hire a programmer to do it, but he wanted to much... But how would I go about doing this? Idk where to begin. It seems like it would be pretty simple, but since Id be wokring with third party code, or even paypal in general I can see it being a little more difficult. Im sure itd be working with cURL? from the customer so that I can record the transaction into my database seeing as the pay button is on paypal and not on my any of my site. Hey Everyone, I'm currently implementing a very simple advert posting site (like a classifieds but its more like a forum atm). I've got advert posting working okay and the next step I'm thinking about is interacting with paypal to handle payments. My know of the Paypal IPN is VERY limited so I'm looking for some pointers really. - Once an item has been paid for how would I go out about removing the post from my website (Payment = true, advert = delete kinda thing..) The way I was thinking was something to do with the advert ID perhaps? I'm really not sure though so ideas would be very helpful! - How exactly would I go about implementing the PayPal IPN, very broad question I know but I'm not overly sure.. Sorry for sounding like a bit of a noob (I guess I am really!) The website is located here (http://is.gd/04qcz5) and the database setup is like so (Just in case that's helpful at all?) Database stores Advert ID, Category ID and User ID in a table along with the advert details. Any help is greatly appreciated, I look forward to hearing from you all! Cheers Hello,
I am trying to figure out why paypal recurring payment always shows as Pending when I use my following code?
this is a very basic HTML form which i use for recurring payment in paypal. but when the users sign up using the following code, the payment status shows as "PENDING"!
could someone please help me to solve this issue?
Thanks in advance.
here is my html form:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="mysandboxemail@gmail.com"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="cbt" value="Return to The Store"> <input type="hidden" name="cancel_return" value=" <?php echo $actual_link ?>"> <input type="hidden" name="custom" value="This is a custom field!!!"> <input type="hidden" name="item_name" value="ACCOUNT UPGRADE"> <input type="hidden" name="a3" value="5.00"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> Hi there. This forum has been great so far. I got couple of questions answered here. Now I am working on a PHP web form where Suppliers list their products for customers to buy. A customer can buy Product 1 from Supplier A and Product 2 from Supplier B and when the customer checks out through Paypal, the payment for Product 1 should go to Suppplier A and similarly the payment for Product 2 should go the Supplier B's email ID. I thinks its straight forward and How can we do that? Can you please guide me in the right direction. Thank you! I have a payment button for PayPal which securely stores the amount, but when the payment is made how do i know if it was paid or not so i can get the page to store this in the mysql database? so I have a custom store built off of PHP, JS and CSS and it sells virtual coins for a game and the coins are sent automatically by the script however I want to start offering discounts to customers via discounts codes and I currently came across this script that I have put together:
Javascript
<!-- var discnt = 0; // no default percent discount var coupons = new Array ( // place to put coupon codes "MavrkHD", "TheFUTBucks", "TOTW", "Mega", "LL" ); var coupdc = new Array ( // place to put discounts for coupon vals "10", "15", "7", "10", "20" ); var coupval = "(blanket)"; // what user entered as coupon code function ChkCoup () { // check user coupon entry var i; discnt = 0; // assume the worst for (i=0; i<coupons.length; i++) { if (coupval == coupons[i]) { discnt = coupdc[i]; // remember the discount amt alert ("This is a valid promo code! \n\n" + discnt + "%" + " discount now in effect."); return; } } alert ("'" + coupval + "' is not a valid promo code!"); } function Sterling (val) { // force to valid dollar amount var str,pos,rnd=0; if (val < .995) rnd = 1; // for old Netscape browsers str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape pos = str.indexOf ("."); if (pos > 0) str = str.substring (rnd, pos + 3); return str; } function ReadForm (obj1) { // apply the discount var amt,des; amt = obj1.amount.value*1.0; // base amount des = obj1.basedes.value; // base description if (discnt > 0) { // only if discount is active amt = Sterling (amt - (amt * discnt/100.0)); des = des + " - " + discnt + "% off - COUP = " + coupval; } obj1.baseamt.value = Sterling (amt); obj1.item_name.value = des; } //--></script> PayPal Form Details <form action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="this.target = 'paypal'; return ReadForm (this);"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="add" value="1" /> <input type="hidden" name="business" value="<?=$functions->getPayPal();?>" /> <input type="hidden" name="item_name" value="Online Coin Currency" /> <input type="hidden" name="amount" id="amount" value="0.00" /> <input type="hidden" name="currency_code" value="GBP" /> <input type="hidden" name="baseamt" id="amount" value="0.00" /> <input type="hidden" name="basedes" value="Online Coin Currency (FUT)" /> <input type="hidden" name="custom" id="custom" value=""> <input type="hidden" name="return" value="RETURN LINK HERE";?> <input type="hidden" name="notify_url" value="<?=HOST.'files/payments/paypal.php';?>"> <input type="hidden" name="cancel_return" value="<?=HOST.'cancelled';?>"> Enter Coupon code <input type = "text" size = "10" name = "coupcode"; /> <input type="button" value="Apply code" onclick="coupval =this.form.coupcode.value; ChkCoup();" /><br/><br/> <input type="image" id="xx" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" onclick="CalculateOrder(this.form)" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/scr/pixel.gif" width="1" height="1"> </form>So, it all works like sending information to PayPal I have one issue about PayPal displaying the calculated prices. For example: if I take out the id of amount and baseamt and just leave value and put a value of 12.99 and then go on my store and go through the process of buying the virtual coins and then get to the discount code area and proceed to paypal I will get a discount price to pay at paypal but when I use the id="amount" which is a variable for depending on how many coins the customer to buy it'll send that price to paypal, it doesn't discount the price and I have been trying endlessly to fix this! help? Thanks. I have a form, details getting from customer and calculate the grand total, here how can i pass my grand total value to ccavenue payment gateway page and getting payment form customer? code : https://www.pastiebin.com/5cdbae859bb64 Hey guys, I got a tough one. I've been researching for days, weeks even, to try and solve this. And I'm sure I'm going to kick myself if/when I get a solution. I've set up an ecommerce website from scratch (no prestashop, oscommerce, none of that), and I need to figure out how to decrease price on quantity. Ex; Umbrellas are $12.00 a piece. If you order 2 dozen (24) Umbrellas, they are only $10.00 a piece. I can't seem to figure out a way to make it work.. I have set up in my database the following columns. p - base price ($12) p1 - price after first increment ($10) q1 - quantity of first break (24) p2 q2 p3 q3 Hit me with your best shot. Hi all, I'm new here (first post) so hopefully you'll all go easy on me I'm created a price comparison website for cameras and lenses. I will have around fifteen retailers on the site. Now I need to scrape each of their websites for the prices - this I can do. However, need a little help and advice on the best way to go about tackling this...is it best to create one big script or have various ones for each retailer, etc? Any help would be appreciated greatly Hi all
This part is integral to my site and im panicking as i cant seem to find an answer...
When someone clicks a link on my page with the below code it only does it as services... how can i create a paypal link to charge as friends and family PLEASE PLEASE PLEASE HELP <form id="payid" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo $row1['EMAIL']; ?>"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="item_name" value="BALL"> <input type="hidden" name="amount" value="<?php echo preg_replace( '/[^0-9,"."]/', '', $row['PRICE'] ); ?>"> <!--<input type="hidden" name="return" value="http://www.theeasypc.co.uk/lottery/heandal.php">--> <input type="hidden" name="return" value="http://www.theeasypc.co.uk/lottery/heandal.php?success=1"> <input type="hidden" name="cancel_return" value="http://www.theeasypc.co.uk/lottery/heandal.php?error=1"> <!-- Where to send the PayPal IPN to. --> <input type="hidden" name="notify_url" value="http://www.theeasypc.co.uk/lottery/heandal.php" /> <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> I can see the its set to business in one flag but ive tried to change thie to f&f, personal, friends, family, nothing works also tried "_donations"
Hi I've got this database I created with fields ProductId ProductName Image I've managed to get it to list the ID,productname, and Image urls in a list. My next step is to have the image field actually display an image and make it clickable: heres what I've done so far: Code: [Select] <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("productfeed", $con); $result = mysql_query("SELECT * FROM productfeeds"); echo "<table border='0'> <tr> <th>Firstname</th> <th>Lastname</th> <th>Image</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; echo "<td>" . $row['ImageURL'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Heres what I want to do: Code: [Select] while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; // my changes beneath echo "<td>" . <a href="<?php echo $row['ImageURL'];?>"> <img src="<?php echo $row['LinkURL']; ?>"> </a>. "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Can you guys point me in the right direction? Many thanks Hello everyone, I am working on a form that is similar to a shopping cart system and I am thinking of creating a button that submits the checked value and saves them to a $_SESSION variable. And also a link that links to a cart.html that takes the values of a $_SESSION variable. I am have trouble figuring what tag/attribute should I use in order to achieve that.
Right now my code attached below submits the checked values to cart.html directly. However I want my submit button to save the checked box to a $_SESSION variable and STAY on the same page. And then I will implement a <a> to link to the cart.php.
I researched a little bit about this subject and I know it's somewhat related to ajax/jquery. I just wanted to know more about it from you guys. I appreciate your attention for reading the post and Thanks!
Below is the form that I currently have:
<form name= "finalForm" method="POST" action="cart.php"> <input type="Submit" name="finalSelected"/> <?php foreach($FinalName as $key => $item) {?> <tr> <td><input type="checkbox" name="fSelected[]" value="<?php echo htmlspecialchars($FinalID[$key])?>" /> <?php echo "$FinalID[$key] & $item";?> </td> </tr> <?php } ;?>Below is the code for cart.php <?php require ('connect_db.php'); if(isset($_POST['finalSelected'])) { if(!empty($_POST['fSelected'])) { $chosen = $_POST['fSelected']; foreach ($chosen as $item) echo "aID selected: $item </br>"; $delimit = implode(", ", $chosen); print_r($delimit); } } if(isset($delimit)) { $cartSQL = "SELECT * from article where aID in ($delimit)"; $cartQuery = mysqli_query($dbc, $cartSQL) or die (mysqli_error($dbc)); while($row = mysqli_fetch_array($cartQuery, MYSQLI_BOTH)) { $aTitle[] = $row[ 'name' ]; } } ?> <table> <?php if(isset($delimit)) { $c=0; foreach($aTitle as $item) {?> <tr> <td> <?php echo $aTitle[$c]; $c++;?> </td> </tr> <?php }}?> </table> hi everyone. i'm wondering what the best way is to create a session variable and pass it to an iframe. i need to do something along these lines, but it doesn't seem to pass the ID. Any hints on how i should accomplish this? Code: [Select] session_start(); $_SESSION['ID']=$_GET['ID']; // id from previous page $ID=session_id(); <iframe src="iframepage.php?ID=<?php echo $ID; ?>" style="width:680px; height:200px;" noresize="noresize" frameborder="0" border="0" scrolling="Yes" allowtransparency="true" /> </iframe> Hi all I haven't used PHP for a while so I'm stuck on something that seems simple. I have a list of nav links created in a while loop, I want to add an id="selected" to the <a> link that is selected. I can check that it's selected with Code: [Select] if( $row[1] == $pageName['words']){ id=''selected" } How can I use this to set the id [code] <ul> <?php while($row = mysql_fetch_array($result1)){ //if($row[1] != $pageName['words']){// this will take out the gallery that is showing form the list ?> <li><a href="gallery.php?photo_id=<?php echo $row[0]?>" id=""><?php echo $row[1];?></a></li> <?php //} } ?> </ul> [/code] Hi, Just looking how to create a link to download a file located on the server, it will be files like .doc etc. Cant seem to find anything on the net so i think i need php but may be html. Can anyone point me in the right direction? Thanks p.s. it will be used for more than one file so im looking for a small ish amount of code. Hey guys, Currently Im using the code: while($row=mysql_fetch_array($nt)){ echo" $row[user_login],$row[user_email],$row[CallHistoryTimes],$row[CallHistoryInfo],$row[CallHistoryLastOp]$row[CallHistoryLastDate],<br>"; } To list a mysql array; what I am trying to do is to use the mysql row ID and turn the entire string above into a list. So for example, the database would get the ID information & create a link of edit.php/?id=3 If someone could help me on this it would be mega appreciated. Thanks |