Welcome to the KING-WALL documentation. An account is required to use any of our tools.
To be able to integrate our offerwall,
first you have to add your website.
Once you have added your website you will have
an
API KEY and a SECRET KEY,
that you will need to integrate our
offerwall.
To register your website into our service, please follow these steps:
Our Offerwall enables users to benefit from visiting our website .
Before being able to integrate our offerwall,
you must register your website first.
Once you have registered your website you will have an
API KEY and a SECRET KEY,
that you will need in the following steps.
<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;"scrolling="yes" frameborder="0" src="https://king-wall.com/index.php/wall/Public_key/USER_ID"></iframe>
Parameter | Description | Value |
---|---|---|
[Public_key] | Unique API Code provided when you registered your website | varchar(32) |
[USER_ID] | Unique identifier code of the user of your site | varchar(32) |
Whenever a user complete an offer,
we will make a call to the Postback URL
that you indicated in
your
app attaching all the information that you will need to credit your users.
Parameter | Description | Example |
---|---|---|
subId | This is the unique identifier code of the user who completed action on your platform. | user123 |
transId | Unique identification code of the transaction made by your user. | 12345678 |
type | It will the type of offer wall that site had completed. | surf | promo |
rewards | The amount of your virtual currency to be credited to your user
we will send you the total of rewards and you then cut your fee . |
1.25 |
signature | MD5 hash that can be used to verify that the call has been made from our servers. | 17b4e2a70d6efe9796dd4c5507a9f9ab |
You should verify the signature received in the postback
to ensure that the call comes from our servers.
Signature parameter should match MD5 of
subId
transactionId
rewards
secret
key
.
You can find your Secret Key of your website in Publisher > Sites
section.
The formula to be checked is as follows:
<?php
$secret = ""; // Get your secret key from BitsWall
$subId = isset($_REQUEST['subId']) ? $_REQUEST['subId'] : null;
$transId = isset($_REQUEST['transId']) ? $_REQUEST['transId'] : null;
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
$rewards = isset($_REQUEST['reward']) ? $_REQUEST['rewards'] : null;
$signature = isset($_REQUEST['signature']) ? $_REQUEST['signature'] : null;
// Validate Signature
if(md5($subId.$transId.$reward.$secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
?>
Our servers will expect your website to respond with "ok".
If your postback doesn't return "ok"
as
response, postback will be marked as failed (even if postback was successfully called)
and you
would
be able to resend it manually from our website.
The following example is not a working one but should be enough to
understand how you should
implement your postback in your website.
<?php
$secret = ""; // Get your secret key from BitsWall
$userId = isset($_REQUEST['subId']) ? $_REQUEST['subId'] : null;
$transId = isset($_REQUEST['transId']) ? $_REQUEST['transId'] : null;
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
$rewards = isset($_REQUEST['rewards']) ? $_REQUEST['reward'] : null;
$signature = isset($_REQUEST['signature']) ? $_REQUEST['signature'] : null;
// validate signature
if(md5($userId.$transId.$reward.$secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
// Check if the transaction is new, use $transId to valiate it
if(isNewTransaction($transId))
{
// Transaction is new, reward your user
processTransaction($userId, $reward, $transId);
}
echo "ok"; // Important!
?>
© Copyright 2022 - 2023 KING-WALL ®. All Rights Reserved
Developed By: Hansal Scripts