CBsubs change payment error

6 months 5 days ago #335586 by activha
CBsubs change payment error was created by activha
Hello

I have activated Stripe portal and we have the link displayed under the subscription plan on the frontend.
However this link brings an empty page instead of redirecting to Stripe portal.
An example link is cercle.business/component/comprofiler/pluginclass/cbpaidsubscriptions?cbpgacctno=12&cbpbasket=6935&do=gw&result=change&cbpid=cbp653a35277922a675502696

All settings are correctly applied in Stripe gateway and the gateway works fine for payments. It correctly uses our pay.cercle.business subdomain listed in Stripe portal.

What should I do ?
Thanks
Jean

Please Log in to join the conversation.

6 months 4 days ago #335598 by krileon
Replied by krileon on topic CBsubs change payment error
Seams to be working fine in my tests. It only works if the user has a Stripe customer account attached. It shouldn't display the button if there isn't one so that might be the issue if you weren't using Stripe customer accounts before.


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 months 4 days ago - 6 months 4 days ago #335599 by krileon
Replied by krileon on topic CBsubs change payment error
Reviewed the code and it will be an empty page if there's no basket id sent, which yours is sending. If the basket doesn't exist. If the basket doesn't belong to the viewing user. If they've no Stripe customer id stored in CBSubs. In all these cases an error should be logged in CBSubs > History Log.

I do however see a bug. It's displaying the button even if they don't have a Stripe customer id stored. So that does need fixed. It should be creating a Stripe customer for them when accessing that page if one doesn't exist. Please check CBSubs > History Log for any errors.


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 months 4 days ago #335601 by activha
Replied by activha on topic CBsubs change payment error
Yes I have this  
stripe Stripe Billing Portal API error returned. ERROR: Invalid URL: Non-ASCII characters in URLs must be percent-encoded in order for the URL to be valid. CODE: url_invalid: Payment method for this subscription cannot be changed.


Call trace:
called in class cbpaidHistory::logError() on line 571 in file cbpaidPayHandler.php
called in class cbpaidPayHandler::_setLogErrorMSG() on line 684 in file cbpaidsubscriptions.stripe.php
called in class cbpaidstripeoem::resultNotification() on line 743 in file cbpaidControllerCBTab.php
called in class cbpaidControllerCBTab::getTabComponent() on line 1155 in file cbpaidsubscriptions.php
called in class getcbpaidsubscriptionsTab::getTabComponent() on line 92 in file cbpaidControllerCBComponent.php
called in class CBplug_cbpaidsubscriptions::getCBpluginComponent() on line 880 in file cbPluginHandler.php
called in class cbPluginHandler::call() on line 1611 in file cbTabs.php
called in class cbTabs::_callTabPlugin() on line 1725 in file cbTabs.php
called in class cbTabs::tabClassPluginTabs() on line 731 in file comprofiler.php
called in function tabClass() on line 284 in file comprofiler.php
called in function require_once() on line 71 in file LegacyComponentDispatcher.php
called in class Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() on line 73 in file LegacyComponentDispatcher.php
...
However the menu item is /panier-paiement-closed

Please Log in to join the conversation.

6 months 4 days ago #335607 by krileon
Replied by krileon on topic CBsubs change payment error
It's the return_url erroring. It's built using the following.
$_CB_framework->pluginClassUrl( [ 'plugin' => 'cbpaidsubscriptions', 'do' => 'displayplans' ], false )

So that would be the menu item with a menu type of Community Builder > Plugin with Plugin set to CB Paid Subscriptions and Do set to Display Plans.

Strange their API is complaining about this though. It's sent in the POST body so it shouldn't need urlencode applied to it as it's not sent as GET. Please make the following change and confirm if this fixes your issue. If it does will commit the fix for next build release.

IN: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/stripe/cbpaidsubscriptions.stripe.php
ON: Line 3183
FROM:
										'return_url'	=>	$_CB_framework->pluginClassUrl( [ 'plugin' => 'cbpaidsubscriptions', 'do' => 'displayplans' ], false ),
TO:
										'return_url'	=>	urlencode( $_CB_framework->pluginClassUrl( [ 'plugin' => 'cbpaidsubscriptions', 'do' => 'displayplans' ], false ) ),


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 months 4 days ago #335611 by activha
Replied by activha on topic CBsubs change payment error
Tests on the dev site seems to work fine now.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.708 seconds

Facebook Twitter LinkedIn