Login to TechLifeForum X
Board Index Go to Reboot.Pro
  • Account Login
  • Register
TechLifeForum
  • Home
  • Members
  • Awards
  • Rules
  • Help
  • Donate
  • Live IRC
TechLifeForum / Programming and Development / Web Development & Web Graphics v
« Previous 1 2 3 4 5 6 ... 10 Next »
/ autobuy api ?[Advanced Search]
1 2 Next »
Reply to thread
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

autobuy api ?

08-05-2012, 03:44 AM (This post was last modified: 08-05-2012 04:24 AM by Gemster.)
Post: #1
Gemster Offline
Junior Member
**
Posts: 41
Joined: Jul 2012
Reputation: 4
autobuy api ?
Hi, i need an autobuy api for my project but i have no idea where to start or where to find one :/

I have an auth system for .net projects, i need an auto buy to make a serial key and email it to the customers email or something like that.

Any ideas how this is done or where i can find one ?

Thanks for any help
Find
Reply
08-05-2012, 10:59 AM
Post: #2
KoBE Offline
¯\_(ツ)_/¯
*******
Administrators
Posts: 4,138
Joined: Jun 2011
Reputation: 47
RE: autobuy api ?
By autobuy, you mean they can buy a key from you application, then be mailed a key?

I know Paypal has some things you can do to authorize payments, then once they are they can redirect them to a custom url.. You could then use a simple PHP script to generate/grab a key and email it.

-> TechLifeForum on Facebook<- 
-> TechLifeForum on YouTube<-
-> TechLifeForum on Twitter<-

Tech.Reboot.Pro
WWW Find
Reply
08-05-2012, 11:37 AM
Post: #3
Gemster Offline
Junior Member
**
Posts: 41
Joined: Jul 2012
Reputation: 4
RE: autobuy api ?
i have a php that generates the license keys for either lifetime or x days.

I can create a simple php to send an email but its the autobuy with paypal part that i have no idea about and i meen no idea. I don't even know where to start with it but need it asap.

Thanks
Find
Reply
08-05-2012, 01:26 PM
Post: #4
BreShiE Offline
Knowledge Is Power
*****
Posts: 1,122
Joined: Sep 2011
Reputation: 12
Donation AwardCoding Award
RE: autobuy api ?
The PayPal feature you're wanting is called "IPN" which stands for Instant Payment Notification. I'm currently working to get my own.



"It was pretty impressive to watch a missile fly down an air vent, but couldn't we feasibly use that same technology to shoot food at hungry people?"
WWW Find
Reply
08-05-2012, 02:45 PM
Post: #5
Gemster Offline
Junior Member
**
Posts: 41
Joined: Jul 2012
Reputation: 4
RE: autobuy api ?
(08-05-2012 01:26 PM)BreShiE Wrote:  The PayPal feature you're wanting is called "IPN" which stands for Instant Payment Notification. I'm currently working to get my own.
Yes i know that and have seen the php script from paypal but i have no idea on how to make a script to work with it.

Thanks
Find
Reply
08-06-2012, 12:20 PM
Post: #6
KoBE Offline
¯\_(ツ)_/¯
*******
Administrators
Posts: 4,138
Joined: Jun 2011
Reputation: 47
RE: autobuy api ?
How are your PHP skills?

The example they have seems pretty straight forward... Once it comes back verified, run your code to generate the key and send the email.

-> TechLifeForum on Facebook<- 
-> TechLifeForum on YouTube<-
-> TechLifeForum on Twitter<-

Tech.Reboot.Pro
WWW Find
Reply
08-06-2012, 12:25 PM
Post: #7
Gemster Offline
Junior Member
**
Posts: 41
Joined: Jul 2012
Reputation: 4
RE: autobuy api ?
my php skills are good, well, not beginner and to expert.

I just have no idea on how in implement the autobuy api :/

Thanks
Find
Reply
08-06-2012, 12:27 PM
Post: #8
KoBE Offline
¯\_(ツ)_/¯
*******
Administrators
Posts: 4,138
Joined: Jun 2011
Reputation: 47
RE: autobuy api ?
I keep getting confused on what you mean by autobuy... Is that another service? Or by autobuy do you mean you want them to be able to buy directly from your application?

-> TechLifeForum on Facebook<- 
-> TechLifeForum on YouTube<-
-> TechLifeForum on Twitter<-

Tech.Reboot.Pro
WWW Find
Reply
08-06-2012, 01:35 PM (This post was last modified: 08-06-2012 01:55 PM by Gemster.)
Post: #9
Gemster Offline
Junior Member
**
Posts: 41
Joined: Jul 2012
Reputation: 4
RE: autobuy api ?
(08-06-2012 12:27 PM)KoBE Wrote:  I keep getting confused on what you mean by autobuy... Is that another service? Or by autobuy do you mean you want them to be able to buy directly from your application?
I want people to buy my application. like when they buy it, they pay through paypal and once the payment has been made, they get a serial key emailed to them.

I have a site that generates the serial key too. it need 2 options, lifetime or 31 days(1 month)

Thanks
Find
Reply
08-06-2012, 02:26 PM
Post: #10
KoBE Offline
¯\_(ツ)_/¯
*******
Administrators
Posts: 4,138
Joined: Jun 2011
Reputation: 47
RE: autobuy api ?
PHP Code: (SELECT ALL CODE)
<?php
// read the post from PayPal system and add 'cmd'
$req = 'cmd=' . urlencode('_notify-validate');
 
foreach (
$_POST as $key => $value) {
    
$value = urlencode(stripslashes($value));
    
$req .= "&$key=$value";
}
 
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.paypal.com/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: www.paypal.com'));
$res = curl_exec($ch);
curl_close($ch);
 
 
// assign posted variables to local variables
$item_name = $_POST['item_name'];
$item_number = $_POST['item_number'];
$payment_status = $_POST['payment_status'];
$payment_amount = $_POST['mc_gross'];
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
 
 
if (
strcmp ($res, "VERIFIED") == 0) {
    
// check the payment_status is Completed
    // check that txn_id has not been previously processed
    // check that receiver_email is your Primary PayPal email
    // check that payment_amount/payment_currency are correct
    // process payment
    
    // HERE IS WHERE YOUR SERIAL GENERATION/EMAIL CODE GOES

}
else if (
strcmp ($res, "INVALID") == 0) {
    
// log for manual investigation
}
?>

-> TechLifeForum on Facebook<- 
-> TechLifeForum on YouTube<-
-> TechLifeForum on Twitter<-

Tech.Reboot.Pro
WWW Find
Reply
1 2 Next »
Reply to thread


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Users browsing this thread
1 Guest(s)
Youtube Facebook Twitter Digg
Return to Top
All content © copyright TechLifeForum
Powered By MyBB, © 2002-2013 MyBB Group
Designed by ThemeFreak
Mobile Version