ULX

Author Topic: PUDS v0.2.7 - PayPal-ULX Donation System  (Read 337916 times)

0 Members and 5 Guests are viewing this topic.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #120 on: January 14, 2014, 10:52:33 PM »
Btw where did you even use this piece of code.

    function __construct($host)
    {
        $this->trustRoot = (strpos($host, '://') ? $host : 'http://' . $host);
        if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
            || (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
            && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
        ) {
            $this->trustRoot = (strpos($host, '://') ? $host : 'https://' . $host);
        }

        if(($host_end = strpos($this->trustRoot, '/', 8 )) !== false) {
            $this->trustRoot = substr($this->trustRoot, 0, $host_end);
        }

        $uri = rtrim(preg_replace('#((?<=\?)|&)openid\.[^&]+#', '', $_SERVER['REQUEST_URI']), '?');
        $this->returnUrl = $this->trustRoot . $uri;

        $this->data = ($_SERVER['REQUEST_METHOD'] === 'POST') ? $_POST : $_GET;

        if(!function_exists('curl_init') && !in_array('https', stream_get_wrappers())) {
            throw new ErrorException('You must have either https wrappers or curl enabled.');
        }
    }
I'm pretty sure that's just one part of the whole "OpenID addon" that Wully seems to have used from a Third Party (as there are commented lines saying that it's released under MIT license, correct me if I'm wrong).

Just a few suggestions:

Pointshop integration, so that it can add points.

Add a space between price and currency, I haven't been able to do that by editing code.

That's it for now. Maybe a simple webpage that can grab details from the MySQL database and display them in a list?
This idea would be good for more support, but are most pointshops used based around the same code/database setup?
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline TheSabreSlicer

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #121 on: January 15, 2014, 06:30:51 AM »
This idea would be good for more support, but are most pointshops used based around the same code/database setup?

What do you mean? The pointshop I use (by _Undefined) is completely contained in-game. Also, I am now hosting with NFO for my website, and they have been great so far.  :)

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #122 on: January 15, 2014, 06:51:50 AM »
I'm pretty sure that's just one part of the whole "OpenID addon" that Wully seems to have used from a Third Party (as there are commented lines saying that it's released under MIT license, correct me if I'm wrong).
This idea would be good for more support, but are most pointshops used based around the same code/database setup?

Yes I use a few third party scripts, OpenID, RCon script, paypals IPN, other than that i'm just trying to get them to all work together to provide PUDS - as I originally made it for myself for my own server. I have stated my coding isn't brilliant, I'm not a programmer by profession or education, I do computer networking :P

What do you mean? The pointshop I use (by _Undefined) is completely contained in-game. Also, I am now hosting with NFO for my website, and they have been great so far.  :)

There is a console command for point shop to give points, I very much want to implement this, I would need to change how the IPN script works to do this just because each console command has different syntax and to be honest it was only built for ulx adduserid. But this can be changed easy enough.
Well yes I have one coder I got for free so he is not the best he can on repair some and stuff so yeah

Certainly he can contribute as well. I'm open to help.
[/url]

Offline benjanmin112

  • Newbie
  • *
  • Posts: 16
  • Karma: -4
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #123 on: January 15, 2014, 08:17:39 AM »
After I logon with steam (I have added the steam api) it go to this link http://dtrp.tk/donate/login.php?login&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fsteamcommunity.com%2Fopenid%2Flogin&openid.claimed_id=http%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561198043837993&openid.identity=http%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561198043837993&openid.return_to=http%3A%2F%2Fdtrp.tk%2Fdonate%2Flogin.php%3Flogin&openid.response_nonce=2014-01-15T16%3A14%3A45ZwUzYgTzPyyxyorJYAi0PC0%2BXlIY%3D&openid.assoc_handle=1234567890&openid.signed=signed%2Cop_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=H9SOuevN0r8ILPllqTW4kdId63g%3D     And then on the page I get this error

Forbidden

You don't have permission to access /donate/login.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Can anyone may help me???

Edit:

I used this link   mydomain/donate/logon.php

And I am not able to use   mydoamin/donate/install.php

because it say then it cant connect to the server if you don't belive me then try it out yourself here is a link   http://dtrp.tk/donate/install.php
« Last Edit: January 15, 2014, 08:22:27 AM by benjanmin112 »

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #124 on: January 15, 2014, 08:36:15 AM »
First of all, do you even have all the files properly installed? I recommend deleting the whole /donate folder of your website and reuploading it.
404 errors means that the document/file by that name, filetype & directory doesn't exist.

EDIT: Actually. When I logged in through Steam on the index page, it redirected me to "donate/?login...", not even a domain/hostname.
Go into config.php and change:
Code: [Select]
$donationDir = 'donate';
To this:
Code: [Select]
$donationDir = 'http://dtrp.tk/donate';
« Last Edit: January 15, 2014, 08:40:10 AM by Decicus »
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline benjanmin112

  • Newbie
  • *
  • Posts: 16
  • Karma: -4
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #125 on: January 15, 2014, 09:02:36 AM »
First of all, do you even have all the files properly installed? I recommend deleting the whole /donate folder of your website and reuploading it.
404 errors means that the document/file by that name, filetype & directory doesn't exist.

EDIT: Actually. When I logged in through Steam on the index page, it redirected me to "donate/?login...", not even a domain/hostname.
Go into config.php and change:
Code: [Select]
$donationDir = 'donate';
To this:
Code: [Select]
$donationDir = 'http://dtrp.tk/donate';

I can't in the new update the config.php is emety

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #126 on: January 15, 2014, 09:12:05 AM »
Go to http://dtrp.tk/donate/login.php and go through the installation.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline benjanmin112

  • Newbie
  • *
  • Posts: 16
  • Karma: -4
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #127 on: January 15, 2014, 09:31:33 AM »
Go to http://dtrp.tk/donate/login.php and go through the installation.

Again I can't do that that is the problem after I login it says:

Forbidden

You don't have permission to access /donate/login.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Edit:

Just find out my error logs shows those errors:

[15-Jan-2014 16:14:11 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:14:11 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:14:16 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:15:40 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:21:31 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:35:08 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:35:08 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:35:11 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:35:11 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:35:30 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:37:43 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:37:43 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:37:45 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:37:45 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 17:11:08 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 17:11:08 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 17:11:12 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 17:11:15 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1

« Last Edit: January 15, 2014, 09:39:22 AM by benjanmin112 »

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #128 on: January 15, 2014, 09:41:49 AM »
Hmm.. I don't know then. Maybe Wully can help with that.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline benjanmin112

  • Newbie
  • *
  • Posts: 16
  • Karma: -4
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #129 on: January 15, 2014, 09:47:30 AM »
I hope so but thanks for trying

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #130 on: January 15, 2014, 11:35:53 AM »
Again I can't do that that is the problem after I login it says:

Forbidden

You don't have permission to access /donate/login.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Edit:

Just find out my error logs shows those errors:

[15-Jan-2014 16:14:11 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:14:11 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:14:16 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:15:40 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:21:31 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:35:08 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:35:08 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:35:11 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:35:11 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:35:30 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 16:37:43 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:37:43 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 16:37:45 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 16:37:45 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 17:11:08 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/dtrptk/public_html/donate/index.php on line 57
[15-Jan-2014 17:11:08 UTC] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos[/url]]: Offset not contained in string in /home/dtrptk/public_html/donate/openid.php on line 84
[15-Jan-2014 17:11:12 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1
[15-Jan-2014 17:11:15 UTC] PHP Parse error:  syntax error, unexpected T_STRING in /home/dtrptk/public_html/donate/install.php on line 1

Benjamin, I've fixed this now and commited a new version, even though it works for some people and myself, when redirecting to the install.php/login.php/logout.php pages its giving you errors because its using relative directories. I've changed this so its absolute references.

The other errors in your error log are from viewing the yourdomain/donate page without having a valid config. I will make the donation page more robust so it gives meaningful error messages. :)

I've commited a new version fixing the issues your having.

I am also updating the installation tutorial:

https://github.com/Wully616/PUDS/wiki/Installation-Tutorial
« Last Edit: January 15, 2014, 12:03:04 PM by Wully616 »
[/url]

Offline pants

  • Newbie
  • *
  • Posts: 33
  • Karma: 4
Re: PUDS v0.2.6 - PayPal-ULX Donation System
« Reply #131 on: January 15, 2014, 12:06:11 PM »
There is a console command for point shop to give points, I very much want to implement this, I would need to change how the IPN script works to do this just because each console command has different syntax and to be honest it was only built for ulx adduserid. But this can be changed easy enough.

If you go back a few pages I posted a workaround that works for now, when a player gets added into a certain group, the first time they are seen on the server as that rank it pops up and says "congrats you are a Donator_____ and you have recieved xxxxxx points!"

So it performs pretty much the same action

Offline TheSabreSlicer

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: PUDS v0.2.7 - PayPal-ULX Donation System
« Reply #132 on: January 15, 2014, 12:45:41 PM »
Thanks pants, this will work for now.

Offline 3PlayingGames

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: PUDS v0.2.7 - PayPal-ULX Donation System
« Reply #133 on: January 15, 2014, 09:24:46 PM »
Not to keep throwing the same bugs at you but I was finally able to log and I still get this heart breaking error:
Parse error: syntax error, unexpected 'GetSteamNorm' (T_STRING) in /home/tttmadne/public_html/donate/install.php on line 1

Please fix Wully, so I can yell at people that keep complaining they have no way to donate D:

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS v0.2.7 - PayPal-ULX Donation System
« Reply #134 on: January 16, 2014, 02:43:31 PM »
Not to keep throwing the same bugs at you but I was finally able to log and I still get this heart breaking error:
Parse error: syntax error, unexpected 'GetSteamNorm' (T_STRING) in /home/tttmadne/public_html/donate/install.php on line 1

Please fix Wully, so I can yell at people that keep complaining they have no way to donate D:

Fixed, there was a redundant function from before I moved over to the new login system.
[/url]