Eurobellen API bug??

Gestart doorDylan11 reacties18 weergaven

12 berichten · pagina 1 van 1

Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Ik heb deze code:

[COLOR= #0000BB]<?php

$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ebcheck[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.eurobellen.nl/bel/check.php?userid=XXXXX&ip="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&ebpin="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"OK"[/COLOR] [COLOR= #007700]) {[/COLOR]
  [COLOR= #FF8000]// Hier echo en mysql query, het betalen is gelukt. [/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]Het betalen is gelukt ;D , je benttnu goldmember [/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET vip = 1  WHERE username = $username"[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #DD0000]"ERR1"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]je hebt niet betaald[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


als er toch niet betaald is staat er als nog dat je betaald hebt en de query werkt ook, maar als ik naar
http://www.eurobellen.nl/bel/check.php?userid=XX&ip=XXX&ebpin=1234

staat er ERR1
Toch staat er in de code
if($ebcheck!="ERR1") {
echo (je hebt niet betaald);
}

waarom werkt dit niet?

toevoeging op 14 februari 2012, 151839:
en wat is de oplosing xd
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dus als er ERR1 staat, is er NIET betaald?
Dan moet je ipv

if($ebcheck!="ERR1") {
echo (je hebt niet betaald);
}


dit doen:

if($ebcheck=="ERR1") {
echo (je hebt niet betaald);
}


Nu zeg je als $ebcheck is niet ERR1 dan is er niet betaald..
Dus als je betaald hebt, heb je niet betaald..
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Bedankt <3

toevoeging op 14 februari 2012, 15:22:17:
Weet je ook hoe je een pin kan blokeren?
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
if($ebcheck!= "OK" ) {

Hij zegt nu, als er NIET betaald is, dit stukje oproepen, je moet dit doen:

if($ebcheck== "OK" ) {
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Ik had dat al door Milan, maar bedankt voor je hulp
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php

$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ebcheck[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.eurobellen.nl/bel/check.php?userid=XXXXX&ip="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&ebpin="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]1234[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Deze pincode is niet geldig.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"OK"[/COLOR] [COLOR= #007700]) {[/COLOR]
  [COLOR= #FF8000]// Hier echo en mysql query, het betalen is gelukt. [/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]Het betalen is gelukt ;D , je benttnu goldmember [/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET vip = 1  WHERE username = $username"[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #DD0000]"ERR1"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]je hebt niet betaald[/COLOR][COLOR= #007700]);
}
}[/COLOR]
?>


Zoiets bedoel je?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Als ik jouw was zou ik ook een fatsoenlijke controle inbouwen op het resultaat van de query, of deze wel/niet gelukt is.
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Ik zou gewoon Mollie gebruiken. het systeem van eurobellen is al wel verouderd...
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Mollie snap ik niks van

@jesse bedankt

toevoeging op 15 februari 2012, 13:26:22:
Aarclay schreef:
Als ik jouw was zou ik ook een fatsoenlijke controle inbouwen op het resultaat van de query, of deze wel/niet gelukt is.
Doe ik.
0
Berichten
5.274
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien

Eindhoven, Nederland

[COLOR= #0000BB]<?php

$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ebcheck[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.eurobellen.nl/bel/check.php?userid=XXXXX&ip="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&ebpin="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"OK"[/COLOR] [COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je betaling was ontgeldig, sla de code "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] goed op![/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]Het betalen is gelukt ;D , je benttnu goldmember [/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET vip = 1  WHERE username = $username"[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


Op eurobellen staat het goed.
Als ebcheck niet "OK" is dan de jij de query uitvoeren van dat het gelukt is.
En als ebcheck dus wel "OK" is dan was de betaling fout.
Die van XjesseX is dus nog steeds fout.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Wouterr schreef:
[COLOR= #0000BB]<?php

$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$ebcheck[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.eurobellen.nl/bel/check.php?userid=XXXXX&ip="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&ebpin="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"OK"[/COLOR] [COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je betaling was ontgeldig, sla de code "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] goed op![/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]Het betalen is gelukt ;D , je benttnu goldmember [/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET vip = 1  WHERE username = $username"[/COLOR][COLOR= #007700]);
}[/COLOR]
?>
Op eurobellen staat het goed.
Als ebcheck niet "OK" is dan de jij de query uitvoeren van dat het gelukt is.
En als ebcheck dus wel "OK" is dan was de betaling fout.
Die van XjesseX is dus nog steeds fout.
Xjessex schreef:
Dus als er ERR1 staat, is er NIET betaald?
Dan moet je ipv

if($ebcheck!="ERR1") {
echo (je hebt niet betaald);
}
dit doen:

if($ebcheck=="ERR1") {
echo (je hebt niet betaald);
}


Nu zeg je als $ebcheck is niet ERR1 dan is er niet betaald..
Dus als je betaald hebt, heb je niet betaald..

Had ik al gezegd?
0
Berichten
5.274
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien

Eindhoven, Nederland

Waarom moeilijk doen met ERR1?
Gewoon de API documentatie even goed doorlezen...
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren