Skip to Content Skip to Menu

CBSubs URL resend

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 7 months ago #303300 by krileon
Replied by krileon on topic CBSubs URL resend
Try making the below change and the next failed request should log its request body to the history log.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsurl/cbsubs.url.php
ON: Lines 158 - 159
FROM:
Code:
} catch ( \Exception $e ) { $logObject->logError( 3, CBPTXT::T( 'CBSUBS_URL_FAILED_ERROR', 'CBSubs URL failed due to error: [error] ([code])', array( '[code]' => $e->getCode(), '[error]' => $e->getMessage() ) ), null );
TO:
Code:
} catch ( \GuzzleHttp\Exception\ClientException $e ) { $logObject->logError( 3, CBPTXT::T( 'CBSUBS_URL_FAILED_ERROR_REQUEST', "CBSubs URL failed due to error: [error] ([code])\n\n[request]", array( '[code]' => $e->getCode(), '[error]' => $e->getMessage(), '[request]' => (string) $e->getRequest() ) ), null );


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 or Create an account to join the conversation.

  • wjgadmin
  • wjgadmin
  • OFFLINE
  • Posts: 489
  • Thanks: 28
  • Karma: 4
6 years 7 months ago #303303 by wjgadmin
Replied by wjgadmin on topic CBSubs URL resend

krileon wrote: However you currently have it configured to send a POST while accessing via browser is GET. Maybe your script expects a GET request and isn't looking in the POST data.


1. Thank you so much for the code snippet to display the output on the next post sent!!!
2. regarding the above, is this possible if both the Activation & Renewal are working without any issues? Meaning the Activation & Renewal are = POST, so that shows the server is expecting it as a POST correct? In my other shopping cart it is sent as a POST, so I guess my question is; would there be any difference in the Activation/Renewal & the Expiration? there is no difference in our script, it is simply posting the new data provided like the new expiration date, but all else is the exact same.

thank you sincerely for trying to assist me further. i am looking into the debug options for the server script, but seeing the output alone should allow me to resolve it :)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 7 months ago #303307 by krileon
Replied by krileon on topic CBSubs URL resend

2. regarding the above, is this possible if both the Activation & Renewal are working without any issues? Meaning the Activation & Renewal are = POST, so that shows the server is expecting it as a POST correct? In my other shopping cart it is sent as a POST, so I guess my question is; would there be any difference in the Activation/Renewal & the Expiration? there is no difference in our script, it is simply posting the new data provided like the new expiration date, but all else is the exact same.

The substitutions available to each subscription state change are all the same so there's no difference in their information available. You need to add appropriate debug code to it so you can find where in your script it's failing or this will continue to be a guessing game. The change above has already been merged for a later CBSubs release, but all it's doing to do is log the raw cURL string to history log.


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 or Create an account to join the conversation.

  • wjgadmin
  • wjgadmin
  • OFFLINE
  • Posts: 489
  • Thanks: 28
  • Karma: 4
6 years 7 months ago #303310 by wjgadmin
Replied by wjgadmin on topic CBSubs URL resend
ok, thank you, this is all that i needed:)
i knew you weren't going to be able to assist with my server and I would never expect that! but the code snippet will be exactly what i need.

as one additional item (if possible) to add in the future, could you add a "Resend" button for the Url posts? if we were able to resend them it would be very helpful in the event that there was an error, we could fix the error and then have the information sent again from cbsubs :)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 7 months ago #303325 by krileon
Replied by krileon on topic CBSubs URL resend
There are no plans to add a resend button as each usage is based off a specific state at the time of that state change. A resend button also would have no idea what user to do this for. The raw cURL call in the history log should be enough to recreate or debug usages.


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 or Create an account to join the conversation.

  • wjgadmin
  • wjgadmin
  • OFFLINE
  • Posts: 489
  • Thanks: 28
  • Karma: 4
6 years 7 months ago #303337 by wjgadmin
Replied by wjgadmin on topic CBSubs URL resend

krileon wrote: The raw cURL call in the history log should be enough to recreate or debug usages.

Ah yes, I didn't think of this option. Indeed being able to see the raw cURL details will allow me to resend manually :)
Thank you!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum