Author Topic: Interaction of PayPal and a Game  (Read 3082 times)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Interaction of PayPal and a Game
« on: June 28, 2007, 02:51:06 AM »
So I'm still working on my game (not as furious as I used to, tho) and I started thinking about some way of payment.
Now, what I don't know is how well the following idea would work:

I have the user order a certain amount of turns (say 2c each turn) via a PayPal form (as seen on a lot of game pages). Now as soon as the money is payed into the account, the user recieves a serial-key which he has to enter in a form to recieve his turns.

Now my question: does this even work automatically? Do I have to do it manually? Can anyone point me to a site which details how to do this or can somebody explain it to me here?

Any help will be appreciated.

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #1 on: June 28, 2007, 04:21:53 AM »
You don't even need a serial key :)
You can add their username (or ID) as a hidden element of the paypal form, and then once they pay you can automatically update their account. This is done with the IPN feature, instant payment notification or something like that. You can download a sample code from the paypal website. Basically, it accepts incoming requests from paypal so you can do whatever you want with the payment information.

Although, a serial key would be cool because then players can buy turns for other players by giving them the serial key :)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #2 on: June 28, 2007, 06:31:03 AM »
Oh? nice :)

I'll take a look at it as soon as I have the time.

And Zeggy: To give other players some turns, I'd just put in an additional field with the user-ID that will recieve the turns.

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #3 on: June 28, 2007, 12:51:23 PM »
If your game is small you can just put the basic form and include user ID in the item name.Then you can manually distribute things when you get email from paypal. Not the most convinient but easy to integrate.

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #4 on: June 28, 2007, 12:53:45 PM »
Most probably I will still do some manual work. I will also offer a way to send money by mail, so players don't have to be bothered to use paypal. Or they can just pay me when they see me :)

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #5 on: June 28, 2007, 01:03:57 PM »
Well, for some reason dealing with payments manually do not make me tired nor annoyed at all. No matter how many I receive I never got the feeling "oh no, another payment, how I hate it", strange, isn't it?  --)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #6 on: June 28, 2007, 01:11:50 PM »
Heh, yeah I guess that much is true for me aswell.

But what I'm more concerned is the time passed between sending a payment and recieving its benefits. As hard as it sounds, soon my easy life will be over and I won't have much time (university/military/job/traveling) so I'm looking for an automated way to do it.

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #7 on: June 28, 2007, 01:17:14 PM »
I remember a mod for LotGD to deal with it. Check dragonprime.net

Offline codestryke

  • Administrator
  • Level 33
  • *****
  • Posts: 589
  • Reputation: +22/-0
    • View Profile
    • eXtremeCast Games
Re: Interaction of PayPal and a Game
« Reply #8 on: July 04, 2007, 02:09:11 PM »
Signup for pay-pal

Turn on and register a IPN URL via PayPal.
This will be the URL on your site that PayPal posts to when a order comes in

PayPal has a sample PHP script you can download and modify for when it posts the information to you.

The process is fairly simple once you work though it the first time.

PayPal has a testing enviroment but I always found it difficult so if you need to test you IPN script I suggest
http://www.eliteweaver.co.uk/testing/ipntest.php

Think they to have a sample PHP IPN script you can modify



Creating online addictions, one game at a time:

Offline toto

  • Level 12
  • *
  • Posts: 82
  • Reputation: +1/-0
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #9 on: September 09, 2007, 04:47:51 AM »
I used to have manual activation for e-checks (there was a bug in my script), but I got tired of having to manually activate each and every payment. Believe me, once you get enough payments daily, you can get very tired of activating them.
I remember using the eliteweaver script codestryke mentioned - it's great, and very easy to implement.

Offline Josh1billion

  • Level 6
  • *
  • Posts: 21
  • Reputation: +0/-0
    • View Profile
    • Seeds of Time Online
Re: Interaction of PayPal and a Game
« Reply #10 on: January 16, 2008, 06:26:25 PM »
Signup for pay-pal

Turn on and register a IPN URL via PayPal.
This will be the URL on your site that PayPal posts to when a order comes in

PayPal has a sample PHP script you can download and modify for when it posts the information to you.

The process is fairly simple once you work though it the first time.

PayPal has a testing enviroment but I always found it difficult so if you need to test you IPN script I suggest
http://www.eliteweaver.co.uk/testing/ipntest.php

Think they to have a sample PHP IPN script you can modify

Interesting, I didn't know PayPal did this IPN stuff.  I've seen it done on other sites (ApexWebGaming, for example, with voting).  Theoretically though, it would be quite insecure: if someone happens to guess your page's filename/URL,they could post to that page.  Even a strong / difficult to guess filename like "sdfj289023zp1-sadf13.php" could theoretically be guessed.  Hmmmmm...

Offline Forgotten

  • Level 6
  • *
  • Posts: 21
  • Reputation: +0/-0
    • View Profile
    • ThunderWars Gaming
Re: Interaction of PayPal and a Game
« Reply #11 on: January 16, 2008, 09:25:26 PM »
Signup for pay-pal

Turn on and register a IPN URL via PayPal.
This will be the URL on your site that PayPal posts to when a order comes in

PayPal has a sample PHP script you can download and modify for when it posts the information to you.

The process is fairly simple once you work though it the first time.

PayPal has a testing enviroment but I always found it difficult so if you need to test you IPN script I suggest
http://www.eliteweaver.co.uk/testing/ipntest.php

Think they to have a sample PHP IPN script you can modify

Interesting, I didn't know PayPal did this IPN stuff.  I've seen it done on other sites (ApexWebGaming, for example, with voting).  Theoretically though, it would be quite insecure: if someone happens to guess your page's filename/URL,they could post to that page.  Even a strong / difficult to guess filename like "sdfj289023zp1-sadf13.php" could theoretically be guessed.  Hmmmmm...

Not exactly....how it works is your site posts certain "details" to the paypal server, and then paypal sends your site "details". It wouldn't matter if a person just typed in your filename, because without the details from paypal the script wouldn't award the account with anything. I used the php sample script from the paypal site, with a little editing, and if a user types the filename into the url bar, it doesn't do anything. Because without the paypal info, it comes back as false and gives a error.

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #12 on: January 17, 2008, 09:37:11 AM »
Yep, with IPN, your site can first verify with paypal that you received a payment, so unless they can fake a payment to you on paypal, I think IPN is pretty secure.

There are several IPN scripts available I think, which have all the necessary code, and you just need to fill in what to do if you receive a payment.

Offline MobsterBoss

  • Level 1
  • *
  • Posts: 1
  • Reputation: +0/-0
    • View Profile
    • Mobster Boss - Free Online Mafia Game
Re: Interaction of PayPal and a Game
« Reply #13 on: February 14, 2008, 12:44:14 PM »
Yup, if you are going to deal with Paypal at all, IPN is the only way to go in my book. 


Offline Boozerbear

  • Level 3
  • *
  • Posts: 7
  • Reputation: +0/-0
  • Why should Kirk get all the hot green alien chicks
    • View Profile
    • Secret Society Wars
Re: Interaction of PayPal and a Game
« Reply #15 on: July 31, 2008, 04:00:38 PM »
Interesting, I didn't know PayPal did this IPN stuff.  I've seen it done on other sites (ApexWebGaming, for example, with voting).  Theoretically though, it would be quite insecure: if someone happens to guess your page's filename/URL,they could post to that page.  Even a strong / difficult to guess filename like "sdfj289023zp1-sadf13.php" could theoretically be guessed.  Hmmmmm...

The security for IPN is very very good. With IPN, Paypal contacts your script to confirm the payment, and your script then (via CURL) hits Paypal back with a token to get confirmation. As long as you're verifying everything (correct package/payment/currency/receiver account email, etc.) and properly validating the response Paypal sends back, then you can operate a completely hands-off donation/payment system.

Mine automatically sends the donation rewards when paypal confirms payment complete (and the paypal server will try multiple times to send this confirmation, if your script happens to be down for some reason, until your script confirms that it's recieved the confirmation), and emails me if a payment gets reversed or otherwise charged back, so I can deal with that manually (either take back the rewards, or if they've spent them or are otherwise an abusive player, freeze the account).

Basically, in 2 years and over 1000 donation transactions I haven't had to do any manual payment processing except for mailed-in donations. I've only had to deal with a chargeback once, and that turned out to be an accident and the player immediately re-donated when I contacted them. As far as the name of the file making any difference, it doesn't. Mine's named "process_donation.php", and trying to manipulate it with false transactions will get you exactly nowhere. (:

Overall, I'd say IPN, if set up correctly (I just modified the scripts that came with the SDK), will make your donation system a completely hands-off affair, leaving you to spend your time actually working on your game. (:
« Last Edit: July 31, 2008, 04:04:49 PM by Boozerbear »

Offline Go_on

  • Game Owner
  • Level 10
  • *
  • Posts: 58
  • Reputation: +0/-0
    • View Profile
Re: Interaction of PayPal and a Game
« Reply #16 on: August 18, 2008, 05:22:05 AM »
Here are the 4 options you have:
http://www.pdncommunity.com/pdn/board/message?board.id=basicpayments&message.id=368

The last 2 are the safest.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal