Register for your free account! | Forgot your password?

You last visited: Today at 05:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Webmall with Paypal & IPN

Discussion on [PHP] Webmall with Paypal & IPN within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
[PHP] Webmall with Paypal & IPN

Buying Items using Paypal
this is my first time using PDO i decided to make something hopefully useful

if you're getting errors i recommend you to use ZendServer 8.5 PHP 5.6 with Z-Ray

Features:
PDO::ODBC Database Connection
easy to understand code
protect against ';select delete fuckbitchhimoron;--'
items stored in a table
logs stored in another table (Thank you Captain Obvious)

if you found any ';select delete fuckbitchhimoron;--' exploits that actually work let me know and i'll fix it



And the Admin Panel


NOTE: Coded in 1 hour if there's anything that doesn't work i'll fix it.

Download is in Attachmeeeents

Sorry forgot to add the Dollar Sign before the item Price you could go to Include\items.php and replace line : 43 with this one
PHP Code:
<td>$<? echo $row['itemPrice']; ?></td>

Attached Files
File Type: rar webmall.rar (501.2 KB, 592 views)
B1Q is offline  
Thanks
15 Users
Old 02/12/2016, 09:51   #2
 
elite*gold: 0
Join Date: Jan 2016
Posts: 81
Received Thanks: 15
useful man
Supportlar is offline  
Thanks
2 Users
Old 02/12/2016, 09:58   #3
 
elite*gold: 0
Join Date: Jul 2015
Posts: 100
Received Thanks: 28
good job .
Mody13337 is offline  
Thanks
1 User
Old 02/12/2016, 10:09   #4
 
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,371
Problem with your Paypal IPN is that it can be bypassed and abused Easily.
​Goofie​ is offline  
Thanks
1 User
Old 02/12/2016, 10:12   #5
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by ​Goofie​ View Post
Problem with your Paypal IPN is that it can be bypassed and abused Easily.
PHP Code:
$raw_post_data file_get_contents('php://input');
$raw_post_array explode('&'$raw_post_data);
$myPost = array();

foreach(
$raw_post_array as $keyval)
{
    
$keyval explode('='$keyval);
    if (
count($keyval) == 2$myPost[$keyval[0]] = urldecode($keyval[1]);
}

// read the IPN message sent from PayPal and prepend 'cmd=_notify-validate'

$req 'cmd=_notify-validate';

if (
function_exists('get_magic_quotes_gpc'))
{
    
$get_magic_quotes_exists true;
}

foreach(
$myPost as $key => $value)
{
    if (
$get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1)
    {
        
$value urlencode(stripslashes($value));
    }
    else
    {
        
$value urlencode($value);
    }
    
//echo"Key: $key Value: $value";
    
$req.= "&$key=$value";
}

// Step 2: POST IPN data back to PayPal to validate

$ch curl_init('https://www.paypal.com/cgi-bin/webscr');
curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_1);
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_POSTFIELDS$req);
curl_setopt($chCURLOPT_SSL_VERIFYPEER1);
curl_setopt($chCURLOPT_SSL_VERIFYHOST2);
curl_setopt($chCURLOPT_FORBID_REUSE1);
curl_setopt($chCURLOPT_CAINFOdirname(__FILE__) . '\cacert.pem');
curl_setopt($chCURLOPT_HTTPHEADER, array('Connection: Close''User-Agent: TryAgain'));


// In wamp-like environments that do not come bundled with root authority certificates,
// please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set
// the directory path of the certificate as shown below:
// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');

if (!($res curl_exec($ch)))
{

    
// error_log("Got " . curl_error($ch) . " when processing IPN data");

    
curl_close($ch);
    exit;
}
curl_close($ch);
if (
$res =="VERIFIED")

i guess this is how it works :S
B1Q is offline  
Old 02/12/2016, 11:37   #6
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 677
Received Thanks: 29
Code:
Connection failed: SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] 


Warning: include(__DIR__\include\items.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\index.php on line 34

Warning: include() [function.include]: Failed opening '__DIR__\include\items.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\index.php on line 34
© This Guy
ILowe is offline  
Old 02/12/2016, 11:41   #7
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by ILowe View Post
Code:
Connection failed: SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] 


Warning: include(__DIR__\include\items.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\index.php on line 34

Warning: include() [function.include]: Failed opening '__DIR__\include\items.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\index.php on line 34
© This Guy
replace line 34 with this one
PHP Code:
<? }  else {include 'include\items.php';} ?>
and make sure php_pdo_odbc.dll is enabled
B1Q is offline  
Old 02/12/2016, 12:03   #8
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 677
Received Thanks: 29
Quote:
Originally Posted by hazemooking View Post
replace line 34 with this one
PHP Code:
<? }  else {include 'include\items.php';} ?>
and make sure php_pdo_odbc.dll is enabled
now error

Fatal error: Call to a member function prepare() on a non-object in C:\AppServ\www\include\SQL.php on line 46
ILowe is offline  
Old 02/12/2016, 12:08   #9
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
go to your php.ini make sure php_pdo_odbc.dll is uncommented

and replace your SQL.php with this one "it's the same one in the attached rar"

if you're getting errors i recommend you to use ZendServer 8.5 PHP 5.6 with Z-Ray
B1Q is offline  
Old 02/12/2016, 16:33   #10
 
elmagico321's Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 663
Received Thanks: 209
looks nice
elmagico321 is offline  
Old 02/12/2016, 18:13   #11
 
elite*gold: 0
Join Date: Sep 2015
Posts: 60
Received Thanks: 19
WebsiteDB where is it?
Justin* is offline  
Old 02/12/2016, 21:14   #12
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by Justin* View Post
WebsiteDB where is it?
use the 2 tables in the sql folder and create your own database
B1Q is offline  
Old 02/13/2016, 06:06   #13


 
XxGhostSpiriTxX's Avatar
 
elite*gold: 53
Join Date: Jul 2012
Posts: 538
Received Thanks: 185
Seed Database Connection failed: SQLSTATE[IM002] SQLDriverConnect:
0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

HelP PLIS
XxGhostSpiriTxX is offline  
Old 02/13/2016, 06:23   #14
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by esteve458 View Post
Seed Database Connection failed: SQLSTATE[IM002] SQLDriverConnect:
0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

HelP PLIS
make sure your database names are correct in include/config.php

and dont forget to make the websitedb and add the 2 tables in sql folder
B1Q is offline  
Old 02/13/2016, 06:39   #15


 
XxGhostSpiriTxX's Avatar
 
elite*gold: 53
Join Date: Jul 2012
Posts: 538
Received Thanks: 185
XxGhostSpiriTxX is offline  
Reply


Similar Threads Similar Threads
WEBmall
01/08/2015 - Shaiya PServer Development - 0 Replies
can anyone me explain how i fixing the webmall...3 items per line not 1 and added packages dont work.please
webmall
07/26/2014 - Shaiya Private Server - 1 Replies
im searching fora webmall for mssql and hp, have anyone this?
Help with webmall.
02/19/2014 - Shaiya PServer Development - 2 Replies
Tell me the name of the program with which to create a sql query in web mall? I would be very grateful.
Webmall Mssql
10/09/2013 - Shaiya Private Server - 0 Replies
Hello all I was using search engine to find some thread on webmall working under ms sql... and i find the one of Treica But it says that its not working with new version of xampp / php apache because i am not using xamp or other... Just someone know please where i can get one working webmall under mssql ? (if the one of treica is working for some ppl who get experience with it, how to make it working with mssql because all the php are with mysql function thx):mofo: Thank you very...
WebMall Problem
09/14/2013 - Shaiya Private Server - 0 Replies
Hello , http://i.epvpimg.com/lpP7d.jpg I want to remove those commas which are put between item names when item is more than one (Item Pack). How can I remove those commas and make it only one name as it is in single item add. Like this : http://i.epvpimg.com/UGmBg.jpg



All times are GMT +2. The time now is 05:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.