Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    gld1881
    Guest

    Default

    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.

  2. #17
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Post Check the following notes.

    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.

  3. #18
    gld1881
    Guest

    Default

    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/supp...icle/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.

  4. #19
    b_morar
    Guest

    Post

    Dear Sir,

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

  5. #20
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Post Creating Demo Account.

    Dear sir,



    I have created many demo accounts using CreateDemoAccount function, and its work like charm.

    you can check the following sample:

    Code:
    <!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

  6. #21
    b_morar
    Guest

    Default

    Dear GLD1881,

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

  7. #22
    b_morar
    Guest

    Post

    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 .

  8. #23
    b_morar
    Guest

    Default

    Dear Sir,

    You can use the below sample which works over https :

    Code:
    <!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.

  9. #24
    gld1881
    Guest

    Default

    this i have already done and it working fine. thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unable to get account summary and open positions from demo account
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 15
    Last Post: 07-11-2013, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •