[#6808] CBSubs URL integration question about upgrade

6 years 6 months ago - 6 years 6 months ago #297789 by activha
Hello

Up to now we used the following scheme with CBSubs URL integration in some plans

This message contains confidential information


Since a few builds it seems that this is not fired any longer at any event (registration, suppression, ...)

We tried http or https without success

I checked with Postman and these data works great on our LiveAgent application to successfully create a ticket

Did you change something in the integration ?
Can you check or help ?

thanks
Jean

PS : seems like the confidential tags messes the display, you should read until /confidential for the code used

Please Log in to join the conversation.

6 years 6 months ago #297796 by krileon
Replied by krileon on topic CBSubs URL integration question about upgrade
Try using CB Auto Actions and its Request action with the below.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A

Believe CBSubs URL is still using our older Snoopy library instead of Guzzle, which the Request action in CB Auto Actions does use.


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.

6 years 6 months ago - 6 years 6 months ago #297806 by activha
Replied by activha on topic CBSubs URL integration question about upgrade
Yes this works with CB auto action but that does not seem the right option for us.

We have 30 subplans which need 30 custom fields to be sent. So that would mean 4x30 auto actions in this case for 1st subscription, renewing, expiration and deactivation.

Unless you have a solution to link a key value to the plan id in the auto action ?

We also need to access [PLAN_NAME]

Could you only update CBSubs URL ?

Please Log in to join the conversation.

6 years 6 months ago #297807 by krileon
Replied by krileon on topic CBSubs URL integration question about upgrade

We have 30 subplans which need 30 custom fields to be sent. So that would mean 4x30 auto actions in this case for 1st subscription, renewing, expiration and deactivation.

That's perfectly fine. CB Auto Actions can easily handle thousands of actions. The main concern would be setting up and maintaining them and not so much a performance problem or anything of the sort.

Unless you have a solution to link a key value to the plan id in the auto action ?

You've access to all of that triggers variables, which are as follows.

$_PLUGINS->trigger( 'onCPayUserStateChange', array( &$user, $this->status, $this->plan_id, $replacedPlanId, &$integrationParams, $cause, $reason, $now, &$this, $autorenewed ) );

The plan id is [var3]

We also need to access [PLAN_NAME]

Don't think you'll have access to that, but just the subscription object which is [var9], but as you'd have an auto action per plan you could just hardcode in the name.

Could you only update CBSubs URL ?

Of course, this was just a test to see if it was CBSubs URL specifically or a HTTP request issue in general. Have added a bug ticket to upgrade CBSubs URL.

#6808

I don't have a workaround or immediate solution for now beyond using CB Auto Actions as I'm in the middle of adding recurring payments to our new Stripe gateway, but will review shortly after finishing Stripe recurring payments.


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.

6 years 6 months ago #297808 by activha
Replied by activha on topic CBSubs URL integration question about upgrade
Well, I still cannot see how I can add a pair key-value for custom fields which are dependent on the plan name/id.

So unless you have an idea, I think we'll wait for the fix instead of manually writing 120 auto actions :-(

Please Log in to join the conversation.

6 years 6 months ago #297810 by krileon
Replied by krileon on topic CBSubs URL integration question about upgrade

Well, I still cannot see how I can add a pair key-value for custom fields which are dependent on the plan name/id.

You can get plan id using [var3] substitution on that trigger. There's no substitution for plan name since it's not available to that trigger and requires API calls. You can use substitutions in the value of the request action variables. Substitutions are not supported in the keys, but if needed it's an easy enough feature to implement for a new nightly. You can try using the below to get the plan name, but I don't know if it'll work.

[cb:parse function="getPlan" class="var9" method="get" param="name" /]


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.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn