Register for your free account! | Forgot your password?

You last visited: Today at 09:12

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

Advertisement



Paypal-paymentwall

Discussion on Paypal-paymentwall within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2008
Posts: 57
Received Thanks: 2
Paypal-paymentwall

Hello everyone, can someone please explain me how to creat automatic silks charge?
rosoares is offline  
Old 02/17/2015, 21:01   #2


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Google Paypal/Payment wall WebShop Scripts
​Exo is offline  
Old 02/17/2015, 23:57   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 961
Received Thanks: 648
1) Create a paymentwall account.
2) Create an application there and name it as you like
3) in the application, set up the rates and currency etc
4) Find a pingback script and put it on your host (pingback's function is to add silks based on the request from paymentwall servers) and put your Secret there
5) Test the pingback on paymentwall itself, if succeeded proceed to the next step
6) Put the widget in your donation page (You'll be given a widget URL to paste inside the webpage code).
7)Profit $$$
magicanoo is offline  
Thanks
1 User
Old 02/18/2015, 01:17   #4

 
elite*gold: 77
Join Date: Jan 2015
Posts: 1,314
Received Thanks: 856
here is the ping back from theta website.

Quote:
<?php
define('SECRET', '676af79b11889ae7614c67b2a2ae54da');
define('CREDIT_TYPE_CHARGEBACK', 2);
$ipsWhitelist = array(
'174.36.92.186',
'174.36.96.66',
'174.36.92.187',
'174.36.92.192',
'174.37.14.28'
);
$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 (!empty($userId) && !empty($credits) && isset($type) && !empty($refId) && !empty($signature)) {
$signatureParams = array(
'uid' => $userId,
'currency' => $credits,
'type' => $type,
'ref' => $refId
);
$signatureCalculated = generateSignature($signatureParams, SECRET);
if (in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist) && ($signature == $signatureCalculated)) {
$result = true;
include('../_incl/config.php');
if ($type == CREDIT_TYPE_CHARGEBACK) {
$query = $sql->Query("UPDATE SK_Silk SET silk_own = silk_own + $credits WHERE JID = '$userId'");
$username = $sql->fetcharray($sql->Query("SELECT StrUserID FROM TB_User WHERE JID ='$userId'"));
$username = $username[0];
$query1 = $sql->Query("INSERT INTO _Silk_Log VALUES('$username','$credits',GETDATE())");
} else {
$is_exist = $sql->Query("SELECT * FROM SK_Silk WHERE JID = '$userId'");
$num = $sql->rowcount($is_exist);
if (!$num) {
$query = $sql->Query("INSERT INTO SK_Silk (JID,silk_own,silk_gift,silk_point) VALUES ($userId,$credits,0,0)");
$username = $sql->fetcharray($sql->Query("SELECT StrUserID FROM TB_User WHERE JID ='$userId'"));
$username = $username[0];
$query1 = $sql->Query("INSERT INTO _Silk_Log VALUES('$username','$credits',GETDATE())");
} else {
$query = $sql->Query("UPDATE SK_Silk SET silk_own = silk_own + $credits WHERE JID = '$userId'");
$username = $sql->fetcharray($sql->Query("SELECT StrUserID FROM TB_User WHERE JID ='$userId'"));
$username = $username[0];
$query1 = $sql->Query("INSERT INTO _Silk_Log VALUES('$username','$credits',GETDATE())");
}
}
}
}
if ($result) {
echo 'OK';
}
function generateSignature($params, $secret)
{
$str = '';
foreach ($params as $k => $v) {
$str .= "$k=$v";
}
$str .= $secret;
return md5($str);
}
?>
Aaron* is offline  
Old 02/18/2015, 21:44   #5
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,429
Better ask someone with PHP knowledge to do it for you. There is a lot of people offering PHP service in here.
Snow* is offline  
Old 02/18/2015, 21:53   #6

 
elite*gold: 77
Join Date: Jan 2015
Posts: 1,314
Received Thanks: 856
Quote:
Originally Posted by SnowStorm1 View Post
Better ask someone with PHP knowledge to do it for you. There is a lot of people offering PHP service in here.
some ppl are too poor to pay for a php code
Aaron* is offline  
Old 02/18/2015, 22:40   #7
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,429
Quote:
Originally Posted by Aeron* View Post
some ppl are too poor to pay for a php code
Better than **** everything and add a wrong value. Then you will regret that later. I asked a friend of mine to do the pingback and the query in there as well.
Snow* is offline  
Reply


Similar Threads Similar Threads
[HELP]Paymentwall API
07/18/2012 - SRO Private Server - 16 Replies
mhh hab jetzt ne api aba wie kann ich das teil jetzt inne hp eibauen? XD



All times are GMT +2. The time now is 09:12.


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.