Skip to Content Skip to Menu

[#4469] How can I set CB Subs expiry count to 9999 rather than the calculated total at Authorize?

10 years 6 months ago - 10 years 6 months ago #243607 by prestoproducts
For the value in a CB Subs plan:

Total number of occurrences of regular validity/price (0=unlimitted)

I see that CB Subs will not let you input a value that is greater than the maximum amount. For example, I placed “9999” as the “Total number of occurrences” in a plan. I then subscribed the user via Authorize.net’s sandbox account with a card expiration of “12/07/2025.” CB Subs then calculate that there would be 140 occurrences and sent that value over to Authorize.net.

I have a plugin which will update the card on file with A.net, but my understanding is that you cannot change the subscription duration via their API. Is that your understanding as well?

My second question here is regarding the “9999” value. CB Subs 2.0 is implemented on this site. Can you please point me in the direction of where I can update the software locally to override the subscription duration calculation and set “9999” as the total number of occurrences? Thank you for your time.
Last edit: 10 years 6 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #243641 by krileon
Occurrences have to be within the gateways valid range. Authorize.net will not allow 9999 occurrences. If going to set that high why not leave as 0 for unlimited? Not understanding the need for this, sorry.


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 or Create an account to join the conversation.

10 years 6 months ago - 10 years 6 months ago #243662 by prestoproducts
The need for this is due to the fact that we offer an update to the credit card on file with authorize.net. This means that as time moves forward the card expiration date on file with that subscription can be updated to allow for more occurrences than are listed initially at registration. Therefore I would like to work around this with cb subs by inserting the maximum iterations allowed by the gateway to override the limitation of the first card.

If going to set that high why not leave as 0 for unlimited?


We would like it to stay as 0 for unlimited, but cbsubs (as noted) calculates the total. Is there any way to truly set 0 as unlimited?

Authorize.net will not allow 9999 occurrences


It is my understanding that A.net looks for 9999 as the maximum.

Okay but all in all I see two options.

1) Comment out or alter CB Subs to eliminate the override calculation.

2) Add database updates to our plugin for altering expiry date and reset the number of occurrences within CB Subs.

Can you please let me know how one of both of these can be done?
Last edit: 10 years 6 months ago by prestoproducts.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #243701 by krileon
The gateway is coded to not allow occurrences beyond the cards expiration date. So if the card expires in 4 years it won't allow occurrences beyond those 4 years. The only way to remove this is to modify the gateway. Please see the _computeSubscriptionTiming function of the below file.

components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/authorizenet/cbpaidsubscriptions.authorizenet.php

I've created a feature ticket to look into this further for next release.

It is my understanding that A.net looks for 9999 as the maximum.

Correct, after reviewing ARB documentation this is the case.

#4469


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum