Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 01:48

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

Advertisement



payment-wall [ Pingback & API ]

Discussion on payment-wall [ Pingback & API ] within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old 02/01/2014, 08:31   #16
 
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,046
UPDATE `table` SET `row` = '{$final}' WHERE `userid` = '{$userId}'

update SK_Silk set silk_own = silk_own + $credits (guess this should be the variable for silks, haven't read the whole code) where JID = $userjid

also in pay_ment_wall it's okay to use (for example) for pingback script, since cloudflare might make it not to work. (127... = yourIP)

Lost my scripts, they were working like charm with all the options if I find them I will upload
Anonymous-6723 is offline  
Thanks
1 User
Old 02/01/2014, 14:22   #17
 
elite*gold: 0
Join Date: Jul 2011
Posts: 137
Received Thanks: 34
I have an example of a working one, check it:

PHP Code:
<?php
/*  
 *  Pingback Listener Script
 *  For Virtual Currency API
 *  Copyright (c) 2010-2013 *********** Team
 */
/*  
 *  Define your application-specific options
 */

//SQL
$cfg['sql_host'] = "SQLIP";
$cfg['sql_db'] = "SRO_VT_ACCOUNT";
$cfg['sql_user'] = "USER";
$cfg['sql_pass'] = "PASSWORD";


$sqlLink mssql_connect($cfg["sql_host"],$cfg["sql_user"],$cfg["sql_pass"]);
    if(!
$sqlLink) die("Conection closed.");
        else
        {
            
mssql_select_db($cfg["sql_db"],$sqlLink);
        }


define('SECRET''Your Secret here');
define('IP_WHITELIST_CHECK_ACTIVE'true);
define('CREDIT_TYPE_CHARGEBACK'2);
/**  
 *  The IP addresses below are ***********'s
 *  servers. Make sure your pingback script
 *  accepts requests from these addresses ONLY.
 *
 */
$ipsWhitelist = array(
        
'174.36.92.186',
        
'174.36.96.66',
        
'174.36.92.187',
        
'174.36.92.192',
        
'174.37.14.28'
);
/**  
 *  Collect the GET parameters from the request URL
 */
$userId = isset($_GET['uid']) ? $_GET['uid'] : null;
$credits = isset($_GET['currency']) ? $_GET['currency'] : null;
$type = isset($_GET['type']) ? $_GET['type'] : null;
$refId = isset($_GET['ref']) ? $_GET['ref'] : null;
$signature = isset($_GET['sig']) ? $_GET['sig'] : null;
$result false;
/**  
 *  If there are any errors encountered, the script will list them
 *  in an array.
 */
if (!empty($userId) && !empty($credits) && isset($type) && !empty($refId) && !empty($signature)) {
        
$signatureParams = array(
                
'uid' => $userId,
                
'currency' => $credits,
                
'type' => $type,
                
'ref' => $refId
        
);
        
$signatureCalculated generateSignature($signatureParamsSECRET);
/** 
  *  check if IP is in whitelist and if signature matches    
  */
        
if (in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist) && ($signature == $signatureCalculated)) {
                
$result true;
                if(
$type == CREDIT_TYPE_CHARGEBACK)
                {
 
/** 
  *  Deduct credits from user. Note that currency amount
  *  sent for chargeback is negative, e.g. -5, so be
  *  careful about the sign Don't deduct negative
  *  number, otherwise user will gain credits instead
  *  of losing them
  *
  */ 
                
$query mssql_query("
                UPDATE SK_Silk
                SET silk_own = silk_own + 
$credits
                WHERE JID = '
$userId'
                "
);
                
                }
                else
                {
                    
                
                
//If account dont exist in SK_Silk
                     
$is_exist mssql_query("
                     SELECT * FROM SK_Silk
                     WHERE JID = '
$userId'
                     "
);
                     
                     
$num mssql_num_rows($is_exist);
                     if(!
$num)
                     {
                     
                     
$query mssql_query("
                     INSERT INTO SK_Silk (JID,silk_own,silk_gift,silk_point) VALUES (
$userId,$credits,0,0)
                     "
);
                     
                
                     }
                     
//If account exist in SK_Silk
                     
else
                     {
                     
                     
$query mssql_query("
                     UPDATE SK_Silk SET silk_own = silk_own + 
$credits WHERE JID = '$userId'
                     "
);

                
                     }
                     
                }
        }
}
if (
$result) {
        echo 
'OK';
}
function 
generateSignature($params$secret) {
        
$str '';
        foreach (
$params as $k=>$v) {
                
$str .= "$k=$v";
        }
        
$str .= $secret;
        return 
md5($str);
}
Also as Zed said, you should use the clean IP for pingback. If you dont, then you should change:

define('IP_WHITELIST_CHECK_ACTIVE', true);
TO
define('IP_WHITELIST_CHECK_ACTIVE', false);
retontoxD is offline  
Thanks
1 User
Old 02/02/2014, 03:38   #18
 
Twistin**'s Avatar
 
elite*gold: 0
Join Date: Jun 2013
Posts: 551
Received Thanks: 108
Quote:
Originally Posted by Zed* View Post
UPDATE `table` SET `row` = '{$final}' WHERE `userid` = '{$userId}'

update SK_Silk set silk_own = silk_own + $credits (guess this should be the variable for silks, haven't read the whole code) where JID = $userjid

also in pay_ment_wall it's okay to use (for example) for pingback script, since cloudflare might make it not to work. (127... = yourIP)

Lost my scripts, they were working like charm with all the options if I find them I will upload
I hope you give us more hints
Quote:
Originally Posted by retontoxD View Post
I have an example of a working one, check it:

PHP Code:
<?php
/*  
 *  Pingback Listener Script
 *  For Virtual Currency API
 *  Copyright (c) 2010-2013 *********** Team
 */
/*  
 *  Define your application-specific options
 */

//SQL
$cfg['sql_host'] = "SQLIP";
$cfg['sql_db'] = "SRO_VT_ACCOUNT";
$cfg['sql_user'] = "USER";
$cfg['sql_pass'] = "PASSWORD";


$sqlLink mssql_connect($cfg["sql_host"],$cfg["sql_user"],$cfg["sql_pass"]);
    if(!
$sqlLink) die("Conection closed.");
        else
        {
            
mssql_select_db($cfg["sql_db"],$sqlLink);
        }


define('SECRET''Your Secret here');
define('IP_WHITELIST_CHECK_ACTIVE'true);
define('CREDIT_TYPE_CHARGEBACK'2);
/**  
 *  The IP addresses below are ***********'s
 *  servers. Make sure your pingback script
 *  accepts requests from these addresses ONLY.
 *
 */
$ipsWhitelist = array(
        
'174.36.92.186',
        
'174.36.96.66',
        
'174.36.92.187',
        
'174.36.92.192',
        
'174.37.14.28'
);
/**  
 *  Collect the GET parameters from the request URL
 */
$userId = isset($_GET['uid']) ? $_GET['uid'] : null;
$credits = isset($_GET['currency']) ? $_GET['currency'] : null;
$type = isset($_GET['type']) ? $_GET['type'] : null;
$refId = isset($_GET['ref']) ? $_GET['ref'] : null;
$signature = isset($_GET['sig']) ? $_GET['sig'] : null;
$result false;
/**  
 *  If there are any errors encountered, the script will list them
 *  in an array.
 */
if (!empty($userId) && !empty($credits) && isset($type) && !empty($refId) && !empty($signature)) {
        
$signatureParams = array(
                
'uid' => $userId,
                
'currency' => $credits,
                
'type' => $type,
                
'ref' => $refId
        
);
        
$signatureCalculated generateSignature($signatureParamsSECRET);
/** 
  *  check if IP is in whitelist and if signature matches    
  */
        
if (in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist) && ($signature == $signatureCalculated)) {
                
$result true;
                if(
$type == CREDIT_TYPE_CHARGEBACK)
                {
 
/** 
  *  Deduct credits from user. Note that currency amount
  *  sent for chargeback is negative, e.g. -5, so be
  *  careful about the sign Don't deduct negative
  *  number, otherwise user will gain credits instead
  *  of losing them
  *
  */ 
                
$query mssql_query("
                UPDATE SK_Silk
                SET silk_own = silk_own + 
$credits
                WHERE JID = '
$userId'
                "
);
                
                }
                else
                {
                    
                
                
//If account dont exist in SK_Silk
                     
$is_exist mssql_query("
                     SELECT * FROM SK_Silk
                     WHERE JID = '
$userId'
                     "
);
                     
                     
$num mssql_num_rows($is_exist);
                     if(!
$num)
                     {
                     
                     
$query mssql_query("
                     INSERT INTO SK_Silk (JID,silk_own,silk_gift,silk_point) VALUES (
$userId,$credits,0,0)
                     "
);
                     
                
                     }
                     
//If account exist in SK_Silk
                     
else
                     {
                     
                     
$query mssql_query("
                     UPDATE SK_Silk SET silk_own = silk_own + 
$credits WHERE JID = '$userId'
                     "
);

                
                     }
                     
                }
        }
}
if (
$result) {
        echo 
'OK';
}
function 
generateSignature($params$secret) {
        
$str '';
        foreach (
$params as $k=>$v) {
                
$str .= "$k=$v";
        }
        
$str .= $secret;
        return 
md5($str);
}
Also as Zed said, you should use the clean IP for pingback. If you dont, then you should change:

define('IP_WHITELIST_CHECK_ACTIVE', true);
TO
define('IP_WHITELIST_CHECK_ACTIVE', false);
I just tried your script .. while cloudflare system is paused ..

Request
Code:
GET http://xxxx-online.com:80/mod/***********.api.php?uid=&currency=&type=0******&sig=633b508e85025a207a3e155c968368d0 HTTP/1.1
Host: xxxx-online.com
Connection: close
Accept-encoding: gzip, deflate
User-Agent: *********** API
Response
Code:
HTTP/1.0 200 OK
Content-type: text/html
Content-encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-powered-by: ASP.NET
X-powered-by-plesk: PleskWin
Date: Sun, 02 Feb 2014 02:35:44 GMT
Content-length: 119
Connection: close
tried both .. true and false .. btw add me in skype mahmoud.lembo
maybe i missing something !!

thank you ..

#requesttoclose .
paid to someone to make it for me
Twistin** is offline  
Old 01/14/2016, 13:19   #19
 
elite*gold: 0
Join Date: Feb 2013
Posts: 16
Received Thanks: 2
Twistin** give me this script i wanna use on metin2 server
imbamt3 is offline  
Reply

Tags
api, payment-wall, pingback, silkroad


Similar Threads Similar Threads
[HELP]I want use payment-wall on my server?
03/07/2015 - SRO Private Server - 9 Replies
Hello ; I have a private server and my panel on my server machine. I'm trying embed widget on my panel page and payment-wall said In HTML code please replace placeholder with id of end-user who is viewing the widget <iframe src="https://wallapi.com/api/subscription/?ke y=******************&uid=&widget=p4_1" ; width="371" height="450" frameborder="0"></iframe> how i can use this ? any help for USER_ID for ? And im using aspnet for panel. How i can create new .ascx for widget any code...
Payment wall
06/18/2013 - SRO Private Server - 31 Replies
well anyone know others solutions for payments ? like payment wall service ?
Payment Wall?!
11/05/2012 - Flyff Private Server - 3 Replies
Es gab doch hier ein Tutorial wie man Payment Wall einrichtet. Ich kann es nicht mehr finden. Kann jemand mir helfen beim Einrichten?
PAY FOR SOMEONE ACTIVE PAYMENT WALL
06/30/2012 - SRO Private Server - 1 Replies
WANTED TO PAY SOMEONE TO ACTIVE Paymentwall - The All-in-One Monetization Suite contact my [email protected] skype service-sro



All times are GMT +1. The time now is 01:49.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.