[SOLVED] Promotions, Discount, CB Subs

2 years 10 months ago - 2 years 10 months ago #325211 by 3cellhosting
[SOLVED] Promotions, Discount, CB Subs was created by 3cellhosting
Hello Team,

My client wants to use a discount voucher against CB Subs plan with recurring monthly payments. I have added the voucher in promotions, the discount of which is the same value as the monthly payment. Needless to say that when I tested the voucher it ended up as an error and did not complete. I am guessing this is because the value was reduced to 0.00 so nothing for the payment gateway to process.

Is there any way this can work? If not, is there any other way the client can use a voucher to give a free month when the plan is a monthly payment?

Many thanks
David

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.

Please Log in to join the conversation.

2 years 10 months ago #325224 by krileon
Replied by krileon on topic Promotions, Discount, CB Subs
Most payment gateways do not allow $0 recurring subscriptions. You can only do $0 for the initial purchase for the majority of them.

Is there any way this can work? If not, is there any other way the client can use a voucher to give a free month when the plan is a monthly payment?

Yes, don't allow the promotion to apply to the recurring part of the plan. Only have it apply to initial payment. You can do this by setting "For Autorecurring payments subscriptions only: Second and following auto-recurring payments amounts" to "No" under the Advanced tab of your promotion.


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 10 months ago - 2 years 10 months ago #325237 by 3cellhosting
Replied by 3cellhosting on topic Promotions, Discount, CB Subs
Hi Kyle,

I had already tried that but I did notice that somehow I hadn't selected a plan. In the screenshot I have included all settings from that tab.

The subsequent test caused the same result - no error but did not complete.

Error
Submitted payment request didn't return an error but didn't complete. Please contact site administrator to check error log.

Form displays...

Summary
Art. Num. Item Price
Subscription Plan: 1 month for 3cellhosting £4.99 per one month
Sub-Total £4.99
One month free − £4.99, then £0.00
Total for first payment Free, then £4.99 per one month

Am I missing something?

Checked history and here is the error...


stripe Stripe Payment Intents API error returned. ERROR: This value must be greater than or equal to 1. CODE: parameter_invalid_integer


Call trace:
called in class cbpaidHistory::logError() on line 570 in file cbpaidPayHandler.php
called in class cbpaidPayHandler::_setLogErrorMSG() on line 3520 in file cbpaidsubscriptions.stripe.php
called in class cbpaidstripeoem::getStripePaymentIntentSecret() on line 439 in file cbpaidsubscriptions.stripe.php
called in class cbpaidstripeoem::_drawCCform() on line 593 in file cbpaidCreditCardsPayHandler.php
called in class cbpaidCreditCardsPayHandler::displayPayForm() on line 143 in file cbpaidCreditCardsPayHandler.php
called in class cbpaidCreditCardsPayHandler::resultNotification() on line 1065 in file cbpaidsubscriptions.stripe.php
called in class cbpaidstripeoem::resultNotification() on line 653 in file cbpaidControllerCBTab.php
called in class cbpaidControllerCBTab::getTabComponent() on line 1142 in file cbpaidsubscriptions.php
called in class getcbpaidsubscriptionsTab::getTabComponent() on line 91 in file cbpaidControllerCBComponent.php
called in class CBplug_cbpaidsubscriptions::getCBpluginComponent() on line 880 in file cbPluginHandler.php
called in class cbPluginHandler::call() on line 1427 in file cbTabs.php
called in class cbTabs::_callTabPlugin() on line 1541 in file cbTabs.php
...

So it looks like there is an issue with Stripe when payment value is zero.

Kind regards
David

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.
Attachments:

Please Log in to join the conversation.

2 years 10 months ago #325254 by krileon
Replied by krileon on topic Promotions, Discount, CB Subs
Have added a bug ticket to look into this further. Stripe does not support $0 recurring subscriptions, but it should ideally just put the Stripe subscription into a trial state and push the start date of the recurring amount. It does this already if you actually set an Initial Price/Duration for your plan, but looks like you just have a Regular Price/Duration and are discounting that which is trying to tell Stripe to create a $0 recurring subscription.

forge.joomlapolis.com/issues/8569

So a workaround is probably to use the following in your plan.

Is the first amount and period different: Different first period and price for Registration and Upgrade
First payment price of plan: 4.99
Initial validity duration: 1 month
Regular Price of plan: 4.99
Regular Validity duration: 1 month

That should allow your coupon to discount that first payment price without impacting the recurring part.


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 10 months ago #325281 by 3cellhosting
Replied by 3cellhosting on topic Promotions, Discount, CB Subs
Hi Kyle,

OK, tried that but with same result.

Attached is screenshot of front end result.



The history log shows the same stripe error.

Here are the plan price settings...



Many thanks
David

David
www.3cellhosting.com - where personality, creativity and integrity come as standard.
Attachments:

Please Log in to join the conversation.

2 years 10 months ago #325287 by krileon
Replied by krileon on topic Promotions, Discount, CB Subs
Ok, I don't have any further workarounds to suggest at this time. I'll have to investigate this further (starting today) to see why that's happening.


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.790 seconds

Facebook Twitter LinkedIn