Jump to content

Archived

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

onlyican

Talking with paypal

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

Share this post


Link to post
Share on other sites
its been awhile but I recall paypal having some scripts available for developers to use for this purpose, they also had a tutorial on the site.

are you already using them? if not take a look at paypal

Share this post


Link to post
Share on other sites
PayPal definitely has scripts for this, I've used them in the past.  Check their site.

Share this post


Link to post
Share on other sites
yea here's the link I just found it

[url=https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/directory_intro-outside]https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/directory_intro-outside[/url]

Share this post


Link to post
Share on other sites
cheers

I was working on building something simular to payloadz.

I am liking this. All I need now is sleep, lol

Share this post


Link to post
Share on other sites
so what exactly am I looking for on the paypal website for this?
"Automatic payment maker to email address you say and amount you say"
lol

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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="xyzzy@xyzzy.com">
<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]

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.