Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-05-2012, 03:59 PM
ZooZ online Store's Avatar
ZooZ online Store ZooZ online Store is offline
 
Join Date: Apr 2012
Posts: 2
Question Problems with implementing SSO API on asp.NET site

Hello and thank you very much for a nice shopping engine!!

I tryed to translate the example code from here

So that is what i figured out:
PHP Code:
Dim profile As New _profile
            profile
.appid "ZOOZ-123456"
            
profile.userid "46548126486"
            
profile.profile.email "test@example125.su"
            
profile.profile.billingPerson = New billing_person With _
               
.city "Москва"_
               
.companyName "zoo"_
               
.countryCode "ru"_
               
.name "jaggy_Sm"_
               
.postalCode "123456"_
               
.stateOrProvinceCode "00"_
               
.street "Leninsky 15-20"}
           
            
Dim timestamp As String DateDiff("s""01/01/1970 00:00:00"Now()).ToString
            Dim message 
As String profile.ToJson
            message 
Convert.ToBase64String(Encoding.Unicode.GetBytes(message))

            
            
Dim password As String "rY9n123465487"
            
Dim MyHash As New SHA1CryptoServiceProvider()
            
Dim myhmacsha1 As New HMACSHA1(Encoding.Unicode.GetBytes(password))
            
Dim hashValue As Byte() = myhmacsha1.ComputeHash(Encoding.Unicode.GetBytes(message " " timestamp))


            
Dim hmac As String Convert.ToBase64String(hashValue)
            
Dim ecwid_sso_profile As String message " " hmac " " timestamp
            SSO_out
.Text ecwid_sso_profile 
PHP Code:
<script>
    var 
ecwid_sso_profile '<asp:Literal ID="SSO_out" runat="server" EnableViewState="False"></asp:Literal>';
</script> 
the result of this code looks like:
HTML Code:
<script>
    var ecwid_sso_profile = 'ewAiAGEAcABwAGkAZAAiADoAIgBaAE8ATwBaAC0AMQAxADMANQAxADAAMwAiACwAIgB1AHMAZQByAGkAZAAiADoAIgA0ADYANQA0ADgAMQAyADYANAA4ADYAIgAsACIAcAByAG8AZgBpAGwAZQAiADoAewAiAGUAbQBhAGkAbAAiADoAIgB0AGUAcwB0AEAAZQB4AGEAbQBwAGwAZQAxADIANQAuAHMAdQAiACwAIgBiAGkAbABsAGkAbgBnAFAAZQByAHMAbwBuACIAOgB7ACIAbgBhAG0AZQAiADoAIgBqAGEAZwBnAHkAXwBTAG0AIgAsACIAYwBvAG0AcABhAG4AeQBOAGEAbQBlACIAOgAiAHoAbwBvACIALAAiAHMAdAByAGUAZQB0ACIAOgAiAEwAZQBvAG4AdABpAGUAdgBzAGsAeQAgADEANQAtADEAYQAiACwAIgBjAGkAdAB5ACIAOgAiABwEPgRBBDoEMgQwBCIALAAiAGMAbwB1AG4AdAByAHkAQwBvAGQAZQAiADoAIgByAHUAIgAsACIAcABvAHMAdABhAGwAQwBvAGQAZQAiADoAIgAxADIANQAwADAAOQAiACwAIgBzAHQAYQB0AGUATwByAFAAcgBvAHYAaQBuAGMAZQBDAG8AZABlACIAOgAiADAAMAAiAH0AfQB9AA== Zanf5C2wEDrEVE4amzqkIu8AWVs= 1338924653';
</script>
BUT there is a problem! ecwid store on my test page (http://localhost/ecwid.aspx) acts as i am signed in, but none of data transfered with "profile" is actually used in a store, and even worth - when i change data in "profile" as if another user has logged in shop acts as nothing happened - for example things i put in a cart with a previous user stays there. What am i doing wrong and how to fix it?

Ps. Sorry for my English, i`d better ask this question in russian but it might be interesting to other users... ; )
Reply With Quote
  #2  
Old 06-06-2012, 06:13 PM
ZooZ online Store's Avatar
ZooZ online Store ZooZ online Store is offline
 
Join Date: Apr 2012
Posts: 2
Default

well! I fixed a problem... But ecwid is still not using information that i provide with a profile...
all exept user name is ignored by ecwid and thats really odd!
Reply With Quote
  #3  
Old 06-13-2012, 01:35 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Ecwid Team
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,502
Default

1. You can ask the question in Russian here: http://www.ecwid.com/forums/forumdisplay.php?f=10
2. Make sure the "var ecwid_sso_profile = '…" script is always there in the Ecwid page.
__________________
Eugene Efimochkin, Team
_________________________
Shipping methods are not showing up? Here is how to set it up properly!
Have a question? Look up the answer at our help portal!

⬇ Click Thanks, please, if this reply helped you.
Reply With Quote
  #4  
Old 06-13-2012, 03:39 PM
Makfruit's Avatar
Makfruit Makfruit is online now
Ecwid Team
 
Join Date: Oct 2011
Posts: 3,123
Default

Hi,

In addition to Eugene's message:

I don't see anything in your code that prevents transferring a customer information from your scripts to Ecwid. However it is a bit difficult to find out the reason of issue basing on the code fragment you provided. Could you give us the full VB code that generates the ecwid_sso_profile value? Also, it would be helpful if you provide us with a result page where your custom code is implemented so we could see how it currently works. If there isn't a publicly accessible page, then you could simply attach an HTML page to your message here.
__________________
Matvey Kuritsyn
Ecwid Team

‣ Find ready answers, demos, tips and tricks and more in Ecwid Help Center

‣ Check out Ecwid video tutorials or share your own tutorial with us

---
⇩ Click Thanks, please, if this reply helped you.
Reply With Quote
Reply

Tags
asp.net, sso

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:43 PM.
Powered by vBulletin® Version 3.8.6. Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.