Username: Password:

Author Topic: Kosetenlos Free and Credit based XML services  (Read 14382 times)

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #15 on: May 10, 2010, 11:16:06 am »
It seems I just put one more line which is not needed. So are the same :)

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #16 on: May 11, 2010, 05:37:36 am »
Even if there is 15 credits, it says , not enough credit for 15 credit and the same is for 35 credit, the freeSMS is OK, Reply #7 is working fine for 15 credit but it seems something is wrong with 35 credit, I have to check it after I got 35 credits, it may be something refers to sms[from] value that is constant in 15 credit but in 35 credit can vary between 3 values :) I thought both might go the same in this manner that, their first value will be selected as default but this seems not assigned to the 35 credit, I will check it in few days

Zydio, I am sorry that I didn't take this issue in consideration before :(
« Last Edit: May 11, 2010, 06:15:23 am by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #17 on: May 11, 2010, 07:04:58 am »
I have updated to this one that works with 15 credit but I need more credits to check the 35 one, just 2 codes are added

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Kosetenlos Free and Credit based XML services
« Reply #18 on: May 11, 2010, 07:57:32 am »
You were not using my latest version, maybe that's why it said not enough credit even if you had 15 credits.
Or maybe because you have to check again the service config, I have inverted the two modes and your config data maybe swapped now.

I've integrated your changes with my latest credit checking steps.

Please try again when you have more credits, also to test if your change fixes the problem of the changing field.

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #19 on: May 11, 2010, 08:20:45 am »
I used the post #11 attachment which had that problem, but it was ok with the attachment of post #7, Ok thanks for the update. I will check it in following days :)

About the 15 credit, the new script is OK now, I have to check for 35 credits the following days to see whether the problem is resolved or not ...

This is the Final Lap as is told in car racing ;)
« Last Edit: May 11, 2010, 08:24:55 am by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #20 on: May 12, 2010, 07:42:18 am »
Zydio, that change will not work for the usernames which have registered the mobile number, today I get the credits and the source page is like this:

<select class="field" name="sms[from]" id="frmTextSMSFromSelect">
<option value="smskostnlos" >smskostnlos</option>

<option value="+XXXXXXXXXX" selected="selected">+XXXXXXXXXX</option>
<option value="custom">frei wählbar&hellip;</option>
</select>

When the 15 credit is selected, sender will be disabled to "smskostenlos"
When 35 credit is selectedm sender will have choices but the default choice is "+XXXXXXXXXX" the mobile number!

That's why I didn't consider it, because I thought in 15 credit it will be locked on "smskosetenlos" and in 35 credit the default is the sender's number!

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #21 on: May 12, 2010, 07:44:53 am »
In this case , does the name="sms[from]" take its value from the options? additionally "<" is not supported to be searched in XML... If so, I think this should also be defined at first when the credits 15 or 35 are being selected
« Last Edit: May 12, 2010, 07:50:23 am by mip104 »

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Kosetenlos Free and Credit based XML services
« Reply #22 on: May 12, 2010, 09:49:05 am »
In this case , does the name="sms[from]" take its value from the options? additionally "<" is not supported to be searched in XML... If so, I think this should also be defined at first when the credits 15 or 35 are being selected

In this case , does the name="sms[from]" take its value from the options? additionally "<" is not supported to be searched in XML... If so, I think this should also be defined at first when the credits 15 or 35 are being selected
The select sends the value of the <option> the user selects.
That is, the select you pasted can post one of the following three bits of data:
  • sms[from]=smskostnlos
  • sms[from]=+XXXXXXXXXX
  • sms[from]=custom

And you can search "<" char, you only need to replace it with its equivalent entity, that is "&lt;"..

With your infos I've updated the service once again, also fixing a problem with the credit check for 15 credits messages (there was a problem indeed).

I've only a doubt left: you said the value="+XXXXXXXXX" is the option to set your number as sender, which costs 35 credits, is this right?
value="smskostenlos" is the 15 credits mode...but..what is the value="custom" mode?!?!?
« Last Edit: May 12, 2010, 09:51:48 am by Zydio »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #23 on: May 12, 2010, 12:05:09 pm »
Thanks Zydio, really you have done all things now :)
Yes that is right "+XXXXXXXXXX" is the number that you have registered in site which can be used for 35 credit, because in 35 credit you have options between these three "Smskostnlos", "+XXXXXXXXX", and "custom". I have never used the custom, may be that is there for who that has registered for many numbers. because while I chose custom the box gets cleaned, so one can type something there.
But in 15 Credit the sender part is locked on "smskosetnlos"
« Last Edit: May 12, 2010, 12:40:48 pm by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #24 on: May 12, 2010, 12:30:34 pm »
This part makes it not working, jumps to logout, I deleted it :)

    <fork id="sender_check">
      <condition type="empty" var1="$sender" ko_error="$L_ERROR_GENERIC" />
    </fork>

It had a typo too, I changed it to "smskostnlos"

      <var in="page" name="sender" search="regex" regex='option value="(\+[\d]+)"' />
$sender is empty when using the 15 credit, I think it is looking for a number ?! so the condition fork should not be there
« Last Edit: May 12, 2010, 12:56:17 pm by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #25 on: May 12, 2010, 12:32:55 pm »
Now 15 is working again, and I think 35 will be ok too, but I will wait to check for 35 too
« Last Edit: May 12, 2010, 12:39:57 pm by mip104 »

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Kosetenlos Free and Credit based XML services
« Reply #26 on: May 12, 2010, 01:12:51 pm »
Quote
It had a typo too, I changed it to "smskostnlos"
Sorry for the typo

This part makes it not working, jumps to logout, I deleted it :)

    <fork id="sender_check">
      <condition type="empty" var1="$sender" ko_error="$L_ERROR_GENERIC" />
    </fork>

      <var in="page" name="sender" search="regex" regex='option value="(\+[\d]+)"' />
$sender is empty when using the 15 credit, I think it is looking for a number ?! so the condition fork should not be there
Mmhh... yes I extract the phone number in that regex.
But the following fork:
Code: [Select]
    <fork id="sender_fork">
      <condition type="equal" var1="$credit_mode" var2="hspeed" ok_id="sender_check" ko_id="kostenlos_sender" />
    </fork>
is used to make the execution jump directly to the offending tag you posted in case $credit_mode is "hspeed" that is the value when you want to use your mobile phone number (35 credits), isn't it?
Otherwise (if $credit_mode is NOT "hspeed", that is 15 credits), the following step is executed:
Code: [Select]
    <dummy id="kostenlos_sender">
      <var name="sender" value="smskostnlos" />
    </dummy>
And this step fixes the $sender to be "smskostnlos", and this means that the following test for emptiness of the $sender variable should work anyway.

Its strange that you were brought to logout (this means the error was raised)..are you sure you had selected the 35 credits mode in service config? I can't test it right now as my stupid internet connection fails to open kostenlos website right now.

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #27 on: May 12, 2010, 01:15:29 pm »
Yes I have checked both, but that part is not working well, I will trace it again tomorrow to find out what is wrong with that section. The web site the same as yours here too unfortunately :(

The logic seems OK but a generic error is comes up, in that fork part which should be checked
« Last Edit: May 12, 2010, 01:23:01 pm by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Kosetenlos Free and Credit based XML services
« Reply #28 on: May 12, 2010, 01:35:07 pm »
I just traced it with another account of my friends with 15 credits


Entering step "kostenlos_sender"
Assignment: $sender = smskostnlos
Entering step "sender_check"
Evaluate condition: Is 'smskostnlos' empty?
Evaluation result => The condition is NOT verified, this means: the following error will be thrown: '$L_ERROR_GENERIC'
Entering step "5"

This is checking for being empty, I mean if it is not empty if will thrown the error!

It is strange!
« Last Edit: May 12, 2010, 01:42:43 pm by mip104 »

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Kosetenlos Free and Credit based XML services
« Reply #29 on: May 12, 2010, 06:48:35 pm »
Oh silly me...I was saying in the xml service "when 'is $sender empty?' is not satisfied (ko_error), that is when $sender is not empty, throw an error..I had inverted the error condition!

The fix can be made in two ways, like this:
Quote
<condition type="empty" var1="$sender" ok_error="$L_ERROR_GENERIC" />
or like that:
Quote
<condition type="not_empty" var1="$sender" ko_error="$L_ERROR_GENERIC" />
I choose the latter.

Please use the attached script, this should hopefully be the final one (if the 35 credits mode also works).