Thread: Store IP's for King Fox's Store

Results 1 to 8 of 8
  1. #1 Store IP's for King Fox's Store 
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    NB: I won't be publishing/releasing the full codebase. If you want it, go and buy it from King Fox.

    Link: https://foxtrot-studios.co/store/view/7-store-v2


    Why might this be helpful? Typically, a disgruntled player will charge back their payments to you by telling PayPal their account was hacked and all the payments are false/fraud. One of the ways you can help prove this is not the case, is by being able to give the players IP at the time of purchase. You can then give this to Paypal and ask them to check with their stored IPs relating to the player. This is in no way fool proof nor is it guaranteed to win a chargeback. There are plenty of ways to get around this. It's simply a start, and may help you win a couple more chargebacks. It's also super simple to do.

    Second NB: If you're storing a buttfuck ton of user IP's, please take some precautions and secure your database. Also GDPR laws likely apply but you're running an RSPS so you're probably not too bothered either way.


    Step 1 - Database Column

    First you need to store your IP in a database column. We're going to use a VARCHAR for this and we're going to give it a limit of 50 characters so we're capable of handling IPV6 and IPV4 addresses.

    I'm going to naively assume most of you are using PhpMyAdmin (Third NB: It's shit, don't). As such I'll explain how to do it using that.

    Go to your store database, then click the 'payments' table and then click 'SQL' once you're there. Below is an image in case you've failed the first and most basic part of the tutorial.
    Attached image

    Inside that SQL box, simply copy and paste the following:

    Code:
    ALTER TABLE global_data
    ADD COLUMN ip VARCHAR(15);
    Now I know what you're thinking - "holy shit harry brah, it needs to be nullable in case we don't manage to store an IP!!!!"

    Well chill, it's nullable by default. This has been your impromptu SQL lesson.

    Step 2 - Code

    This bit's quite complicated so I want you to read very carefully. Re-read it if you need to.



    1. Open up pp_ipn.php with an editor of your choice.
    2. Find the following line:
      Code:
          $quantity = $_POST['quantity'.$i];
      It should be around line 110.
    3. Right below it, add the following line:
      Code:
      $ip = $_SERVER['REMOTE_ADDR'];
    4. Then, in the array below, at the bottom of the array, add
      Code:
      	"ip" => $ip
      So it'll look like:
      Code:
      	"buyer" => $buyer,
      				"receiver" => $receiver,
      				"player_name" => $buyer_name,
      				"ip" => $ip
    5. Save the file.





    Congratulations, you're now storing IP's(most the time)(literally don't rely on this whatsoever, it is but a small defence)(proxies will literally destroy this, upgrade the php at your leisure to help account for them).
    Last edited by Jay Gatsby; 05-15-2019 at 12:58 AM.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Extreme Donator


    Join Date
    Nov 2011
    Posts
    311
    Thanks given
    15
    Thanks received
    94
    Rep Power
    361
    Just to add onto this you can use AntiKnox to block proxies, etc.

    https://www.rune-server.ee/runescape...s-proxies.html

    Attached image
    Reply With Quote  
     

  4. #3  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Updated, forgot to include the part about storing the IP in the array that gets sent to the database
    Reply With Quote  
     

  5. #4  
    Skotos Founder


    Join Date
    Jan 2017
    Age
    24
    Posts
    954
    Thanks given
    178
    Thanks received
    191
    Rep Power
    199
    Damn thanks i guess
    Attached image
    Reply With Quote  
     

  6. #5  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    33
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,062
    Rep Power
    750
    I didn't bother with storing IP addresses because it's absolutely unnecessary. PayPal has a way to detect information regardless if using a proxy or not. They don't just go by that alone, they also go by buying patterns as well to determine if it was unauthorized.

    Attached image
    Reply With Quote  
     

  7. #6  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Quote Originally Posted by OG KingFox View Post
    I didn't bother with storing IP addresses because it's absolutely unnecessary. PayPal has a way to detect information regardless if using a proxy or not. They don't just go by that alone, they also go by buying patterns as well to determine if it was unauthorized.

    Haven't got any sources other than personal experience but on the claims where people have said it's fraudulent, I've provided an IP and won maybe 60-70% of them. Did the IP make a difference? I wouldn't be able to tell you, but I won them regardless so it's still worth implementing just in case. Furthermore you could actually have an additional check to make sure the person claiming their donation is using the same IP that they used to buy it with(not sure why you'd want to do this though).
    Reply With Quote  
     

  8. #7  
    Unfortunately we’re all human. Except me


    Join Date
    Aug 2011
    Posts
    926
    Thanks given
    539
    Thanks received
    439
    Rep Power
    601
    Quote Originally Posted by OG KingFox View Post
    I didn't bother with storing IP addresses because it's absolutely unnecessary. PayPal has a way to detect information regardless if using a proxy or not. They don't just go by that alone, they also go by buying patterns as well to determine if it was unauthorized.
    Regardless, it's nice to have IP, if not for anything else you can set up a system to automatically ban the user from the website/game when he/she chargebacks.
    Reply With Quote  
     

  9. Thankful user:


  10. #8  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Quote Originally Posted by Mr. Robot View Post
    Regardless, it's nice to have IP, if not for anything else you can set up a system to automatically ban the user from the website/game when he/she chargebacks.
    This too, always good to be storing this sort of data for reasons like you've suggested.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. 317 pi client sided for king fox highscores?
    By OodlesOfNoodles in forum Help
    Replies: 1
    Last Post: 04-12-2015, 06:05 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •