Jump to content
Sign in to follow this  
Tarion Korobase

Access L$ Transaction history from Server

Recommended Posts

Hi techis,

I want to build a webserver that verifies payments made to an SL account. How can I Login to my SL account from my own application? Is there some documentation about the login procedure or any library? I would take it in any language, but actually I'm running NodeJS.

 

 

Share this post


Link to post
Share on other sites

Looks good, but have some troubles.

 

First, I had to fix this condition (in 2 places):

if( ! $result = curl_exec($ch))

To:

 if($result != curl_exec($ch))

Second, it is important to give write access to the folder the script is int.

 

and now just gets empty data: 

results.xml:1: parser error : Document is empty

 It might be due to my webspace hosters setup, I will try it locally and then on my own Server.

 Error hndling could be improved, even if I change my password to a wrong one, it just tells me that the file is empty.

Share this post


Link to post
Share on other sites

Uh, I can't quote things here, that statement:

if( ! $result = curl_exec($ch))

 is correct. What it does is that it assigns value of the HTTP request to $result variable. And then checks for the response being empty.

Maybe LL changed the structure or URLs of transaction history, I am going to check later today.

Edit:

Also, I believe it would be better to grab the transaction history from the HTML instead of using the XML files, as they get cached and you would have to play with the date ranges to get the latest transaction history log, where with the HTML page, you will always get the latest one.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...