URL Http Post Not Setting Options Correctly

1 month 2 weeks ago #337510 by wjgadmin
Hi,
I use the CBSubs URL to send http posts to a server. Everything has always worked except I noticed something today and want to make sure it is setup correctly.

There is a setting to set how many licenses a user has per product. It passes this to the server via http post. Here is the option you gave me before and as far as I know, it's always worked so a bit confused as to why this didn't.

EX: user had previously purchased this plan with 1 license (this is an option with a value = 1). user purchased again with 2 licenses (this is an option with a value = 2).
- so the http post should have passed a value = 2, but instead it didn't update the value from 1 to 2, therefore the server received a value of 1.

Here's the code for this http post being passed: licenses_allowed=[cb:if PLAN_OPTS_OPTION_LICENSESRENEW=""]1[cb:else][PLAN_OPTS_OPTION_LICENSESRENEW][/cb:else][/cb:if]

Is there something wrong or some reason this would not have properly updated the value = 2? Also, in this if/else condition.... is it stating IF value = null on the server OR IF value = null in CBSubs? In this case, it should have had a value in both places of 1, but should have overwritten it with 2, correct?

Thank you and look forward to hearing back.

Please Log in to join the conversation.

1 month 2 weeks ago #337511 by wjgadmin
Replied by wjgadmin on topic URL Http Post Not Setting Options Correctly
I can further confirm there is an issue somehow. Just had another user who renewed & previously had 2 licenses. When they renewed, they selected 1 license, however the value wasn't updated server side.

So somehow the value is not being passed correctly. Can you see some issue with the aforementioned code?

I just need it to always pass a value which is specified in the options/value. AND if there isn't currently a value stored (meaning they've never purchased any of the options previously), it should be able to somehow get the new value and send it.

Please Log in to join the conversation.

1 month 2 weeks ago #337512 by krileon
Replied by krileon on topic URL Http Post Not Setting Options Correctly
Strange, seams to be working fine in my tests using CBSubs Emails to email me the option value. Also appears working fine when setting to a field. Are you sure it's not whatever you're sending the HTTP request to that's the problem?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 month 2 weeks ago #337513 by wjgadmin
Replied by wjgadmin on topic URL Http Post Not Setting Options Correctly
You bet, it is updating all the other fields appropriately and not throwing any errors at all. For whatever reason, this is the only value it isn't updating correctly.

Please Log in to join the conversation.

1 month 2 weeks ago #337514 by wjgadmin
Replied by wjgadmin on topic URL Http Post Not Setting Options Correctly
Let me do a thorough run through of the code server side. I will make sure there isn't something that could be missing the incoming data.

I will update in just a bit. Thank you for your patience!

Please Log in to join the conversation.

1 month 2 weeks ago #337515 by wjgadmin
Replied by wjgadmin on topic URL Http Post Not Setting Options Correctly
I sincerely apologize, it looks like there was something on our end. I will confirm 100% on the next user update, but from our testing, it's good.

Basically, we needed to make an update to accept the new options since they were added into CBSubs as they weren't needed server side prior to the options because the value never changed per plan.

Sorry again, I'll keep a close eye on it :)
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.231 seconds

Facebook Twitter LinkedIn