PDA

View Full Version : Create Demo Account



gld1881
08-15-2013, 08:02 AM
I used webservice (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1961) to create a demo account, but I am getting only null value.

I already replace "74.54.46.178/vertexweb10" with my one and passing below information-

fname
tel
userid
email
Address
deposit
country
IPAddress

b_morar
08-15-2013, 09:14 AM
Dear Sir,


Create demo account feature using WCF has been disabled by your dealing room.

Please contact with your dealing room to enable it .

gld1881
08-19-2013, 11:59 AM
now its working but now account is created on vertex system.

I already replace 74.54.46.178/vertexweb10 with main, but still account is created on vertex system. why it is so please clarify.

b_morar
08-21-2013, 09:51 AM
Dear Sir,


The following sample describe how create account:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>CreateDemoAccount</title>

<script src="http://code.jquery.com/jquery-latest.js"></script>

</head>

<script type="text/javascript" >

$(document).ready(function () {



var urlStr = "http://5.153.9.98/webtrader/WebService.svc";

jQuery.support.cors = true;

$("#progress").ajaxStart(function () { $(this).css("display", "block"); });

$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });

function onSuccessResult(response) {

response = eval('(' + response + ')')

if (response.UserId == -1 || response.UserId == -207) {

$("#resultData").html("Invalid username or password");

}

else if (response.UserId == -231) {

$("#resultData").html("You must have at least one account");

}

else if (response == null || response == "" || response.UserId < 0) {

$("#resultData").html("Error while login.Please try later");

}

else {

$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);

}

}

$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });

function onErrorResult(result) {

alert('Service call faild : ' + result.status + ' ' + result.statusText);

}

$("#btnAction").click(function () {

$.getJSON(urlStr + "/CreateDemoAccount?fname=" + $("#txtfname").val() + "&tel=" + $("#txttel").val() + "&email=" + $("#txtemail").val() + "&address=" + $("#txtaddress").val() + "&deposit=" + $("#txtdeposit").val() + "&country=" + $("#txtcountry").val() + "&IPAddress=" + $("#txtIPAddress").val() + "&callback=?" , onSuccessResultOrder);

function onSuccessResultOrder(dataResult) {

var rst = "";

var result = eval('(' + dataResult + ')');

if (result.UserName == "WAITDEMO") {

rst = "Could not create Demo account at this time, Please try again later"

}

else if (result.UserName == "ERRDEMO") {

rst = "Could not create Demo account at this time, Please Check your data or try again later";

}

else {

rst = "UserName is : " + result.UserName + "<br/>"

rst += "Password was sent to your email: " + result.Email;

}

$("#resultAction").html(rst);

}

});

});

</script>

<body>

<table border="1px">

<tbody>

<tr>

<td>fname:<input type="text" id="txtfname" value="websample"/>

tel: <input type="text" id="txttel" value="079864232"/>

</td>

</tr>

<tr>

<td>email:<input type="text" id="txtemail" value="support@hyrid-solutions.com"/>

address: <input type="text" id="txtaddress" value="Jordan-Amman"/>

</td>

</tr>

<tr>

<td>deposit:<input type="text" id="txtdeposit" value="50000"/>

country: <input type="text" id="txtcountry" value="Jordan"/>

IPAddress:<input type="text" id="txtIPAddress" value="hybrid-solutions"/>

</td>

</tr>

<tr>

<td><button id="btnAction"> CreateDemoAccount </button></td>

</tr>

</tbody>

</table>

<div id="resultData"> </div>

<div id="resultAction"> </div>

<div style="display:none" id="progress">Loading ... </div>

</body>

</html>

The problem was you used invalid WCF link, The correct is:
http://5.153.9.98/webtrader/WebService.svc

gld1881
08-21-2013, 10:36 AM
when i use above program to create demo account it create account on vertex server and deliver below email message on my email which i used in this form -

Dear Sir/Madam, Welcome To VertexFX Web Trader version 10.
Thank you websample for creating a demo account with .
Below are your login information:
Username: USER2522
Password: 0R2N
Note: All transactions that will be made using this account (Demo Account) are fake transactions and not real transactions. Fake transactions are originated automatically from the price feed and are not originated or placed or executed in any exchange.


This is same as i am getting previously, but i want to create account on my server not on vertex. So please if you understand my problem, provide solution for it. If you need any further clarifications please do not hesitate to call me at +971 4 4270833

thanks

Salah-HS
08-21-2013, 11:26 AM
Dear sir,

This email is sent according to your Web Service settings. If you want to update the email body, kindly open a ticket with our technical support team and they will assist you further. But the demo account is opened correctly at your server since we used the Web Service of your system in the code.

Let me know if anything else needed :cool:

gld1881
08-21-2013, 12:39 PM
I am very sorry not to explain you, what i want. Ok let me try once again.

Currently we are using http://www.gld1881.com/investment.php?p=28 which contain http://5.10.73.87/GLDDemo/ in iframe to create a online demo account for client. Once client submit this form, demo account created on webtrader which is also reflected on our backoffice application.

Now i have created a form with similar fields and use webservice to create similar online demo account. Which must reflect on our backoffice application. But it is not reflecting on our backoffice application.

For this purpose i need a webservice. I hope this explanation will give you some more clarity. If you have any other query feel free to call us on phone.

Salah-HS
08-21-2013, 01:06 PM
You are welcome Sir :o
kindly let me check the case, I will update you soon.

Salah-HS
08-21-2013, 01:41 PM
Dear Sir,


Kindly try the "Refresh account" button in your backoffice if the new demo account doesn't appear.
please check it now and update me.

gld1881
09-05-2013, 10:54 AM
Account is created at backoffice application but it is under GLD1881 Demo in account tree, but if I create account using http://5.10.73.87/GLDDemo/ it is created under Web Form Accounts within STD Bullion GRP in account tree. Email format is also not similar is both these cases.

Now please tell me how can i create an account, using my program, under particular section of account tree.

Hassan-HS
09-05-2013, 11:59 AM
Dear Sir,

To add the new demo account under demo accounts tree, You should provide your developer with:
1- A dealer that is have a privilege on demo accounts tree.
2-The username of the group.


As for the email format you can change it by opening a ticket to our support department.

Please dont hesitate to contact me if you have any further questions :D

gld1881
09-05-2013, 12:20 PM
If i have these information which part of coding should i use it. please refer to my earlier posting for code, which i am using.

Hassan-HS
09-05-2013, 01:10 PM
Dear Sir,


This issue belongs to your developers, So you should contact your ISV to help you.

gld1881
09-05-2013, 02:04 PM
what this ISV stand for?

b_morar
09-05-2013, 02:37 PM
Dear Sir,

Independent Software Vendor (ISV) Partnership Program is a dedicated program for Software and IT companies that have the interest in developing Software applications, Plugins, Trading Scripts using VertexFX API's and development Toolkit.
You can find a detailed description for this ISV in the following link:
http://www.hybrid-solutions.com/sales/partnership/isv-program.html (http://www.hybrid-solutions.com/sales/partnership/isv-program.html)

What I meant, is that you have to contact your developer who made this form to you in order to know where to put these information.

Let me know if anything else needed.:cool:

gld1881
09-07-2013, 08:02 AM
i make this form. I go through your knowledgebase articles but didn't find anything related. If you have any ready reference please share with me.

Hassan-HS
09-07-2013, 10:55 AM
Dear Sir,

I hope every thing will be clear after reading this post.

already (This developer called ISV), You have developed a form that create demo accounts, after this you have linked it using i frame to your website.

Your problem is happening when registering a new demo account using the form, the demo account added under wrong tree, that's true ?

This problem happen because your devloper that develop your form using a dealer that not have privilege on demo accounts group.

So please contact your developer to solve your issue and provide him with

1. Dealer have privilege.
2. The username of the demo account group.

gld1881
09-08-2013, 12:51 PM
I get your point, but I think you are not getting my point.

ISV develop the form, but now i do not want to use that. I have develop similar form in PHP hosted on our website server. From this form I try to create a demo account using webservice (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1961) (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1961). Account created on our backoffice application, but on wrong tree. Presently I am not using any dealer privilege or username. How can i use these information in above said program.

For that reason, I need a right webservice or PHP program which i can use in my PHP program to create a demo as well as live account from my website on our backoffice application using dealer privilege and username.

b_morar
09-08-2013, 01:04 PM
Dear Sir,

I am studying the case, I will update you soon, Please standby

Hassan-HS
09-08-2013, 02:13 PM
Dear sir,



I have created many demo accounts using CreateDemoAccount (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1961)function, and its work like charm.

you can check the following sample:




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>CreateDemoAccount</title>

<script src="http://code.jquery.com/jquery-latest.js"></script>

</head>

<script type="text/javascript" >

$(document).ready(function () {

var urlStr = "http://5.153.9.98/webtrader/WebService.svc";

jQuery.support.cors = true;

$("#progress").ajaxStart(function () { $(this).css("display", "block"); });

$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });

function onSuccessResult(response) {

response = eval('(' + response + ')')

if (response.UserId == -1 || response.UserId == -207) {

$("#resultData").html("Invalid username or password");

}

else if (response.UserId == -231) {

$("#resultData").html("You must have at least one account");

}

else if (response == null || response == "" || response.UserId < 0) {

$("#resultData").html("Error while login.Please try later");

}

else {

$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);

}

}

$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });

function onErrorResult(result) {

alert('Service call faild : ' + result.status + ' ' + result.statusText);

}

$("#btnAction").click(function () {

$.getJSON(urlStr + "/CreateDemoAccount?fname=" + $("#txtfname").val() + "&tel=" + $("#txttel").val() + "&email=" + $("#txtemail").val() + "&address=" + $("#txtaddress").val() + "&deposit=" + $("#txtdeposit").val() + "&country=" + $("#txtcountry").val() + "&IPAddress=" + $("#txtIPAddress").val() + "&callback=?" , onSuccessResultOrder);

function onSuccessResultOrder(dataResult) {

var rst = "";

var result = eval('(' + dataResult + ')');

if (result.UserName == "WAITDEMO") {

rst = "Could not create Demo account at this time, Please try again later"

}

else if (result.UserName == "ERRDEMO") {

rst = "Could not create Demo account at this time, Please Check your data or try again later";

}

else {

rst = "UserName is : " + result.UserName + "<br/>"

rst += "Password was sent to your email: " + result.Email;

}

$("#resultAction").html(rst);

}

});

});

</script>

<body>

<table border="1px">

<tbody>

<tr>

<td>fname:<input type="text" id="txtfname" value="Test"/>

tel: <input type="text" id="txttel" value="123456789"/>

</td>

</tr>

<tr>

<td>email:<input type="text" id="txtemail" value="Test@hyrid-solutions.com"/>

address: <input type="text" id="txtaddress" value="Jordan"/>

</td>

</tr>

<tr>

<td>deposit:<input type="text" id="txtdeposit" value="5000"/>

country: <input type="text" id="txtcountry" value="Jordan"/>

IPAddress:<input type="text" id="txtIPAddress" value="IPAddress"/>

</td>

</tr>

<tr>

<td><button id="btnAction"> CreateDemoAccount </button></td>

</tr>

</tbody>

</table>

<div id="resultData"> </div>

<div id="resultAction"> </div>

<div style="display:none" id="progress">Loading ... </div>

</body>

</html>





So please send me your code and I will check it, Thank you :cool:

b_morar
09-12-2013, 07:57 AM
Dear GLD1881,

Kindly update us, if every thing going well with you.

b_morar
11-12-2013, 11:45 AM
Dear Sir,

Based on your request we are working to change it to https.
Because we have changed the webservice to used https , so the previous sample used http . we are working on this sample to use https and we will update you soon .

b_morar
11-12-2013, 01:17 PM
Dear Sir,

You can use the below sample which works over https :




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>CreateDemoAccount</title>

<script src="http://code.jquery.com/jquery-latest.js"></script>

</head>

<script type="text/javascript" >

$(document).ready(function () {

var urlStr = "https://platform.gld1881.com/webtrader/WebService.svc";

jQuery.support.cors = true;

$("#progress").ajaxStart(function () { $(this).css("display", "block"); });

$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });

function onSuccessResult(response) {

response = eval('(' + response + ')')

if (response.UserId == -1 || response.UserId == -207) {

$("#resultData").html("Invalid username or password");

}

else if (response.UserId == -231) {

$("#resultData").html("You must have at least one account");

}

else if (response == null || response == "" || response.UserId < 0) {

$("#resultData").html("Error while login.Please try later");

}

else {

$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);

}

}

$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });

function onErrorResult(result) {

alert('Service call faild : ' + result.status + ' ' + result.statusText);

}

$("#btnAction").click(function () {

$.getJSON(urlStr + "/CreateDemoAccount?fname=" + $("#txtfname").val() + "&tel=" + $("#txttel").val() + "&email=" + $("#txtemail").val() + "&address=" + $("#txtaddress").val() + "&deposit=" + $("#txtdeposit").val() + "&country=" + $("#txtcountry").val() + "&IPAddress=" + $("#txtIPAddress").val() + "&callback=?" , onSuccessResultOrder);

function onSuccessResultOrder(dataResult) {

var rst = "";

var result = eval('(' + dataResult + ')');

if (result.UserName == "WAITDEMO") {

rst = "Could not create Demo account at this time, Please try again later"

}

else if (result.UserName == "ERRDEMO") {

rst = "Could not create Demo account at this time, Please Check your data or try again later";

}

else {

rst = "UserName is : " + result.UserName + "<br/>"

rst += "Password was sent to your email: " + result.Email;

}

$("#resultAction").html(rst);

}

});

});

</script>

<body>

<table border="1px">

<tbody>

<tr>

<td>fname:<input type="text" id="txtfname" value="Test"/>

tel: <input type="text" id="txttel" value="123456789"/>

</td>

</tr>

<tr>

<td>email:<input type="text" id="txtemail" value="Test@hyrid-solutions.com"/>

address: <input type="text" id="txtaddress" value="Jordan"/>

</td>

</tr>

<tr>

<td>deposit:<input type="text" id="txtdeposit" value="5000"/>

country: <input type="text" id="txtcountry" value="Jordan"/>

IPAddress:<input type="text" id="txtIPAddress" value="IPAddress"/>

</td>

</tr>

<tr>

<td><button id="btnAction"> CreateDemoAccount </button></td>

</tr>

</tbody>

</table>

<div id="resultData"> </div>

<div id="resultAction"> </div>

<div style="display:none" id="progress">Loading ... </div>

</body>

</html>
Kindly update us, if every thing going well with you.

gld1881
11-13-2013, 06:00 AM
this i have already done and it working fine. thanks