CBsubs changes with version 4.5.2+build.2021.10.07.10.13.17.f313a5004

2 years 5 months ago #326687 by activha
Hello
Since 2021-09-29 05:46:18 +02:00 it seems that our CBSubs plugin cannot access the API of our partner as it used to do for a couple of years.
We use the attached plugin to transfer data to iPaidThat accounting software.
Would you mind to have a quick look and tell us if something has changed in CBsubs which would block the transfer (lines 479 to 549)
Thanks a lot

File Attachment:

File Name: cbsubs.inv...ager.zip
File Size:5 KB
Attachments:

Please Log in to join the conversation.

2 years 5 months ago #326693 by krileon
None of the recent changes would have any impact on that code. We fixed language string parsing for many plugins so a bunch of new language strings were added, we fixed usage of removed Joomla API for J4 compatibility, we fixed AcyMailing integration compatibility, and some other minor issues like parameter defaults not specified in code and only in configuration.

My guess is your HTTP call isn't being sent due to using fopen. You should be using cURL. CBSubs includes a helper function (cbpaidWebservices::httpsRequestGuzzle) for making HTTP calls and CB includes Guzzle so that can also just be used directly.


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 5 months ago #326699 by activha
So if I remove lines 527 to 539 and change them by the following :
$results		=	array();
$fp				=	null;
$status			=	null;

$fp = httpsRequestGuzzle( 'ipaidthat.io/inv/api/activha-webhook/902', $payment_basket_data, 105, $response, $status, 'post', 'normal', '*/*', true, 443, '', '0f24cb76d9f1fa294e50d7d34397c894faac5519', false, null, array( 'Content-type' => 'application/x-www-form-urlencoded', 'Authorization' => 'Bearer 0f24cb76d9f1fa294e50d7d34397c894faac5519' ) )

		if ( ( $fp || ( $status != 200 )) && ( ! Get::get( $results, 'error', array(), GetterInterface::RAW ) ) ) {
			$results	=	array( 'error' => array( 'message' => $fp, 'code' => $status ) );
		}

Should it be ok and take care of the transfer ?

Please Log in to join the conversation.

2 years 5 months ago #326701 by krileon
I've no idea. That plugin is your code not mine. I can't tell you why it doesn't work, but it's worth a try. It's best to just debug the plugin in a test environment to ensure it's fully functional.


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 5 months ago #326702 by activha
I was just asking for the checking of the httpsRequestGuzzle function, which is yours ;-)

Please Log in to join the conversation.

2 years 5 months ago #326706 by krileon
It's a static function on the cbpaidWebservices class. Please use an IDE and load your site into it as a project so you can use autocomplete and phpdoc features.


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

Facebook Twitter LinkedIn