Jump to content

Talking with paypal


onlyican

Recommended Posts

Hello, I have a question. Been posting help all day, so now it is my time to ask for help.
Excuse dumb mistakes, its 5.23am here in Spain, pulling another all nighter

Is there a way I can code for PHP to talk to Paypal
What I want to do is the admin clicks a button, and money is instantly paid from his account to another users account (for an affiliation thing)

I was just thinking of extra ways to make things easier, instead of

I need to pay this guy, copy his email, paste, the amount is copy, paste...
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/
Share on other sites

if you go to the link I provided above, I would think that any of the first four would work. It's just a matter of what would work best.

for example if this is similiar to a donation thing then use the donations or if the admin will be making recurring payments then use that
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/#findComment-69572
Share on other sites

what i ideally want is on my php script
It will show admin the Username, and amount owed. then he clicked a button next to it
This will send something to paypal, which will send the money to the email address and the amount which I will parse over
THEN a message will be sent back to say if it was done.

I do not want some basic things that paypal do.
All I need is a name or possible fields I can add to make the payments
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/#findComment-69579
Share on other sites

Hope this helps i am currently studying the pypal system and this is as basic as i can get your method in place ok.

[code]
<?php
$dbconn = @mysql_connect('localhost', 'root', '');
if (!$dbconn)
{
die('Error connecting to DB!');
}
//if (! @mysql_select_db('letschip_lcinewdb') )
if (! @mysql_select_db('onlinestore') )
{
die( '<p>Unable to locate the main ' .
      'database at this time.</p>' );
}
if(isset($_GET['id']))
$ID = $_GET['id'];
else
die('<p> Invalid Product');

// Shipping is 3.50 per unit weight
$ship_factor = 3.5 
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Purchase Product</title>
</head>

<body bgcolor="#669900" link="#FFFF00" vlink="#FFFFFF">
<?
$sql = "SELECT * FROM PRODUCTS where ID=" . $ID;
$result = @mysql_query($sql);
while ($row=mysql_fetch_array($result))
{
?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value='<?php echo($row['description']) ?>'>
<input type="hidden" name="item_number" value='<?php echo($row['id']) ?>'>
<?
$Cost = $row['price'];
$SandH = $row['weight'] * $ship_factor;
$Price = $Cost + $SandH;
?>
<input type="hidden" name="amount" value='<?php echo($Price) ?>'>
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<?
}
?>
</body>

</html>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/#findComment-69586
Share on other sites

That is more a shopping cart script isn't it

Here is what I want

Log into paypal (or sandbox, its the same thing)
Then click "Send Money" tab at the top

I want my script to complete this form, so the admin does not have to manually complete this form

But also imagine I could have like 40 people who need payments
So I want it as easy as possible.
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/#findComment-69588
Share on other sites

like i say i am only learning paypal and i thort the example might come handy with your needs.

sorry but i know what you want but i dont know how.

but i now for a fact on the paypal forum you can get real fast help so i say go there and try as the paypal developers are also always in the forum and there glad to help

sorry.

good luck.
Link to comment
https://forums.phpfreaks.com/topic/16407-talking-with-paypal/#findComment-69591
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.