Canceling an unpaid subscription when there is only one payment gateway

3 weeks 2 days ago #320318 by krileon

This is still an issue for us.

Neither issue ticket has been addressed yet so that's to be expected.

Is it possible to create an 'Auto Action' to cancel the basket ?

As far as I'm aware there isn't a trigger that CB Auto Actions could act on to insert anything into the credit card form page or trigger a cancellation. The best workaround I can suggest right now is make sure the basket isn't skipped. You can prevent the basket from being skipped via a number of ways: have more than 1 payment method, enable invoice address, have a coupon code available, have basket terms and conditions enable, have basket intro text configured, or use radio payment method selection. I believe any of those should prevent skipping basket where the cancel link is.


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.

3 weeks 2 days ago - 3 weeks 2 days ago #320324 by joomally
Hi,
thanks for your reply. To simplify the registration process as much as possible, we are trying to avoid the extra page that would be required to display the basket.
I have identified a suitable Auto Action trigger that works for the specific workflow on our site, but just need to know what 'type' of Auto Action to use. I thought perhaps a 'code' or a 'query', if you could tell me the appropriate configuration for the 'Action' tab ?
Thanks

Please Log in to join the conversation.

3 weeks 1 day ago #320332 by krileon
That depends entirely on what trigger you're using and what you're trying to do exactly. There isn't a trigger available for specifically outputting to the credit card form page. You'd need to call CBSubs APIs to try and cancel the basket and to do that would require a basket object or to call the API to render a basket cancel link. I don't recommend doing any of this though and instead just make the basket page available for the time being until a cancel basket link is added to the credit card form page.


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.

3 weeks 3 hours ago #320377 by joomally

krileon wrote: That depends entirely on what trigger you're using and what you're trying to do exactly.

I'd like to cancel the basket.

I was hoping for some code like

DELETE FROM `jos_cbsubs_payment_baskets`
WHERE `user_id` = '[user_id]'
AND .....

I have a trigger that I can use for the Auto Action. I just need the 'Action'

Thanks

Please Log in to join the conversation.

2 weeks 6 days ago #320389 by krileon
We've a pending merge request to implement display of the cancel link on the credit card form. Once accepted and merged a new release will be available. If you want to quickfix implement this yourself for the time being you can do so with the below changes.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidCreditCardsPayHandler.php
ON: Line 567
FROM:
			$ret	.=	$paymentBasket->displayBasket();
TO:
			$ret	.=	$paymentBasket->displayBasket();

			// add cancel link
			cbpaidApp::import( 'processors.cancelpay.cancelpay' );
			$cancelmethod	=	new cbpaidGatewayAccountcancelpay();
			$payClass		=	$cancelmethod->getPayMean();
			$ret	.=	$payClass->getPaymentBasketProcess( $user, $paymentBasket, 'buttons' );

ON: Line 1018
FROM:
		$ret = '<form action="' . $postUrl . '" method="post" autocomplete="off" id="cbsubsCCform" name="cbsubsCCform" class="form-auto m-0 cb_form cbValidation">' . "\n";
TO:
		$ret = '<form action="' . $postUrl . '" method="post" autocomplete="off" id="cbsubsCCform" name="cbsubsCCform" class="form-auto m-0 mt-2 cb_form cbValidation">' . "\n";

There is no way to do what you're wanting without modifications to the code. You should then see a cancel link under the basket and above the credit card form.


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 weeks 2 days ago #320427 by joomally

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.434 seconds

Facebook Twitter LinkedIn