[#8584] CBSubs pay offline option triggers plan as activated - Integrations->CB

2 years 9 months ago #325328 by boyjahq

Value: 1
Remove value on plan deactivation: No

If you want the value reversed on plan deactivation then use the following.

Value: 1
Remove value on plan deactivation: Yes
Value on plan deactivation: 0


Setting either of the ways above does not fix the issue. I tried both of them but it still adds +1 to the value of field "cb_memberyearsdiscount" when the pay offline payment method is chosen. I can see that the payment status is shown as pending in the cbsubs database table. Then when we process the offline payment basket it again triggers the CB Field, adding another +1 to "cb_memberyearsdiscount".

Again, the purpose of this field is to keep track of consecutive years that a user renews membership. This number is used by promotion discounts that are applied to the plan depending on the number of "cb_memberyearsdiscount". If the number is 2 then it is a certain discount to renew. If the number is 3 or 4 then a different discount promotion is applied, etc.

The issue really seems to be that CB Fields is being triggered as an activation even though the payment is pending.

Please Log in to join the conversation.

2 years 9 months ago - 2 years 9 months ago #325332 by krileon
Was able to confirm your issue, but it's due to the reversal behavior. It reverts the value if the subscription isn't active. I've confirmed the below resolves the issue.

Remove value on plan deactivation: No

The following is supposed to work, but doesn't due to an IF check in the code ignoring the 0 and the reversal of checkbox fields isn't working correctly against the Value parameter and is instead reversing based off their current value stored in the profile.

Remove value on plan deactivation: Yes
Value on plan deactivation: 0

Am working on a fix and once fixed the above will work fine again.

forge.joomlapolis.com/issues/8584


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.

2 years 9 months ago - 2 years 9 months ago #325359 by boyjahq
I'm not sure if this is related to your post about a fix, but after extensive testing I find the following, which may be helpful. The issue that I am asking about has nothing to do, as far as I can tell, with CB Fields actions on deactivation. We have disabled all of those for the purpose of testing this issue. We only have CB Fields set to act on activation.

Here is what I have found:

First time user subscribes and chooses offline payment (payment basket pending), CB Fields for the plan ARE NOT triggered until AFTER the payment basket is processed as paid

If the user renews the subscription while it is still active and chooses offline payment (payment basket pending), CB Fields ARE triggered immediately, BEFORE the payment basket is processed as paid. When the payment basket is processed as paid, CB Fields are triggered AGAIN. In the case of a field where the action is to add +1 to the integer, it is therefore added twice: once when offline payment (payment basket pending) is selected and then again when the pending basket is processed as paid.

It is the same result if the subscription is unsubscribed from the backend and the user chooses to resubscribe and chooses offline payment (payment basket pending). CB Fields ARE triggered immediately, BEFORE the payment basket is processed as paid. When the payment basket is processed as paid, CB Fields are triggered AGAIN. In the case of a field where the action is to add +1 to the integer, it is therefore added twice: once when offline payment (payment basket pending) is selected and then again when the pending basket is processed as paid.

however, if the user's subscription is DELETED from the User Management backend, then when they resubscribe and choose to pay offline (payment basket pending), CB Fields are NOT triggered until the payment is processed as paid...

This is made worse when the user selects the plan that they have already initiated an offline payment for (but has not yet been processed as paid yet) and they once again select offline payment, creating a 2nd payment pending basket (this is related to my post www.joomlapolis.com/forum/255-developer-members-support/244033-8568-disable-renew-payment-button-when-payment-pending[#8568] Disable renew/payment button when payment pending ). The CB Fields are triggered as activated each time they initiate an offline payment. If they do it 5 times before a pending basket is processed as paid, CB Fields are triggered as activation 5 times.

The final straw is that the warning message on the payment page:

'A_PAYMENT_BASKET_IS_PENDING_IN_PROGRESS_FOR_PAYMEN_adc904' => 'There is already a payment in process for your membership. Only select a payment option below if you want to change the method by which you will pay your membership fee',

only shows up on rare and fleeting occasions. I see it once in a while when clicking a subscription payment/renewal button but mostly it does NOT display when the situation would seem that the message should in fact show up. That is, when a pending payment already exists for that subscription.

Any advice or guidance you may have would be greatly appreciated. And if you think that the bug you have identified and the fix will address the issues above then we look forward to that fix.

Please Log in to join the conversation.

2 years 9 months ago - 2 years 9 months ago #325362 by krileon
The status checks are not specific enough in CBSubs Fields and a few other integrations. That is being fixed and yes it should fix the issue you're experiencing with it triggering in situations it shouldn't. Here's a bug ticket for that specifically.

forge.joomlapolis.com/issues/8588

Offline baskets can be spammed as well and that'd be a separate issue we need to address. Have added a bug ticket for that as well.

forge.joomlapolis.com/issues/8589


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.

2 years 9 months ago #325372 by krileon
This is now fixed in latest CBSubs build release. The status checks are now more strict and accurate.


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.

2 years 9 months ago #325467 by boyjahq

krileon wrote: Offline baskets can be spammed as well and that'd be a separate issue we need to address. Have added a bug ticket for that as well.

forge.joomlapolis.com/issues/8589


Abut the issue of this message not always showing up on the payment page when a pending payment already exists:

'A_PAYMENT_BASKET_IS_PENDING_IN_PROGRESS_FOR_PAYMEN_adc904' => 'There is already a payment in process for your membership. Only select a payment option below if you want to change the method by which you will pay your membership fee',

I find that, if I reload the payment page then the message shows up as it should.

Anyway, until this issue is resolved, is there some way that we can create a custom message that will show up on the payment page that basically does the same thing? What substitution can we use to get the information that a payment is pending for the viewing user? And what is the condition that we could use to determine whether that message shows or not (basically, whether a pending basket exists or not)?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.243 seconds

Facebook Twitter LinkedIn