[#7166] PostAfPro CBsubs

5 years 10 months ago #304883 by activha
Replied by activha on topic PostAfPro CBsubs
Would it be possible to check if a recurring Commission has already been set ?
And if not set one ?

Because we have the following errors now
PHP Exception occurred on your site. Here you can find the stack trace:

Exception Type: Gpf_Exception
File: /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsactivhapostafpro/papapi.class.php
Line: 6681
Message: Impossible de charger les commission récurrente de l'orderID 10995_42

#0 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsactivhapostafpro/cbsubs.ahapostafpro.php(242): Pap_Api_RecurringCommission->createCommissions()
#1 /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(885): getahacbsubspostafproTab->onCPayAfterPaymentStatusUpdateEvent(Object(CB\Database\Table\UserTable), Object(cbpaidPaymentBasket), Array, 'Completed', 'Pending', 'subscr_payment', Object(cbpaidPaymentNotification))
#2 /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(1298): cbPluginHandler->call(676, 'onCPayAfterPaym...', 'getahacbsubspos...', Array)
#3 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidPayHandler.php(892): cbPluginHandler->trigger('onCPayAfterPaym...', Array)
#4 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/stripe/cbpaidsubscriptions.stripe.php(2151): cbpaidPayHandler->updatePaymentStatus(Object(cbpaidPaymentBasket), 'subscr_payment', 'Completed', Object(cbpaidPaymentNotification), 1, 2, 2, false)
#5 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidCreditCardsPayHandler.php(136): cbpaidstripeoem->handleNotify(Object(cbpaidPaymentBasket), Array)
#6 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidControllerCBTab.php(659): cbpaidCreditCardsPayHandler->resultNotification(Object(cbpaidPaymentBasket), Array, true)
#7 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.php(1116): cbpaidControllerCBTab->getTabComponent(NULL, NULL, 1, Array)
#8 /var/www/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidControllerCBComponent.php(91): getcbpaidsubscriptionsTab->getTabComponent(NULL, NULL, 1, Array)
#9 /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(885): CBplug_cbpaidsubscriptions->getCBpluginComponent(NULL, NULL, 1, Array)
#10 /var/www/html/libraries/CBLib/CB/Legacy/cbTabs.php(1393): cbPluginHandler->call(538, 'getCBpluginComp...', 'CBplug_cbpaidsu...', Array, NULL)
#11 /var/www/html/libraries/CBLib/CB/Legacy/cbTabs.php(1507): cbTabs->_callTabPlugin(NULL, NULL, 'CBplug_cbpaidsu...', 'getCBpluginComp...', '538', Array)
#12 /var/www/html/components/com_comprofiler/comprofiler.php(718): cbTabs->tabClassPluginTabs(NULL, Array, 'cbpaidsubscript...', 'CBplug_cbpaidsu...', 'getCBpluginComp...')
#13 /var/www/html/components/com_comprofiler/comprofiler.php(274): tabClass('com_comprofiler', 'pluginclass', 0)
#14 /var/www/html/libraries/src/Component/ComponentHelper.php(382): require_once('/var/www/html/c...')
#15 /var/www/html/libraries/src/Component/ComponentHelper.php(357): Joomla\CMS\Component\ComponentHelper::executeComponent('/var/www/html/c...')
#16 /var/www/html/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_comprofiler')
#17 /var/www/html/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#18 /var/www/html/libraries/src/Application/CMSApplication.php(195): Joomla\CMS\Application\SiteApplication->doExecute()
#19 /var/www/html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#20 {main}
Request information
GET variables
Array
(
   [option] => com_comprofiler
   [view] => pluginclass
   [plugin] => cbpaidsubscriptions
   [cbpgacctno] => 12
   [do] => gw
   [result] => notify
   [format] => raw
   [Itemid] =>
   [lang] => fr-FR
   [task] => pluginclass
)
POST variables
Array
(
)
COOKIE variables
Array
(
)
REQUEST variables
Array
(
   [option] => com_comprofiler
   [view] => pluginclass
   [plugin] => cbpaidsubscriptions
   [cbpgacctno] => 12
   [do] => gw
   [result] => notify
   [format] => raw
   [language] => fr-FR
   [Itemid] =>
   [lang] => fr-FR
   [ark_inine_enabled] =>
   [task] => pluginclass
)
SERVER variables
Array
(
   [UNIQUE_ID] => Ww0X7Rx7aHPvVQ4Qk@gwjwAAAAM
   [HTTP_AUTHORIZATION] =>
   [HTTPS] => on
   [HTTP_HOST] => activ-ha.com
   [HTTP_X_FORWARDED_FOR] => 54.187.205.235
   [HTTP_X_ORIGINATING_IP] => 54.187.205.235
   [HTTP_CONNECTION] => close
   [CONTENT_LENGTH] => 3078
   [HTTP_ACCEPT] => */*; q=0.5, application/xml
   [HTTP_ACCEPT_ENCODING] => gzip, deflate
   [CONTENT_TYPE] => application/json; charset=utf-8
   [HTTP_CACHE_CONTROL] => no-cache
   [HTTP_STRIPE_SIGNATURE] => t=1527584748,v1=5e32ac8e51d9a4c57d71ff3ab38835c5b73ce1c5c7f58c687c65b9d98b667b94
   [HTTP_USER_AGENT] => Stripe/1.0 (+https://stripe.com/docs/webhooks)
   [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
   [SERVER_SIGNATURE] =>
   [SERVER_SOFTWARE] => Apache
   [SERVER_NAME] => activ-ha.com
   [SERVER_ADDR] => 127.0.0.1
   [SERVER_PORT] => 443
   [REMOTE_ADDR] => 54.187.205.235
   [DOCUMENT_ROOT] => /var/www/html
   [REQUEST_SCHEME] => https
   [CONTEXT_PREFIX] =>
   [CONTEXT_DOCUMENT_ROOT] => /var/www/html
   [SERVER_ADMIN] => admin@activ-ha.com
   [SCRIPT_FILENAME] => /var/www/html/index.php
   [REMOTE_PORT] => 33204
   [GATEWAY_INTERFACE] => CGI/1.1
   [SERVER_PROTOCOL] => HTTP/1.0
   [REQUEST_METHOD] => POST
   [QUERY_STRING] => option=com_comprofiler&view=pluginclass&plugin=cbpaidsubscriptions&cbpgacctno=12&do=gw&result=notify&format=raw
   [REQUEST_URI] => /index.php?option=com_comprofiler&view=pluginclass&plugin=cbpaidsubscriptions&cbpgacctno=12&do=gw&result=notify&format=raw
   [SCRIPT_NAME] => /index.php
   [PHP_SELF] => /index.php
   [REQUEST_TIME_FLOAT] => 1527584749.23
   [REQUEST_TIME] => 1527584749
)

Please Log in to join the conversation.

5 years 10 months ago #304887 by krileon
Replied by krileon on topic PostAfPro CBsubs
Yes, that'll be possible to either check that it exists and if it doesn't to just create new commission or handle that in a try catch. Have added a note to implement that as part of the below ticket.

#7167


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.

5 years 10 months ago #304986 by activha
Replied by activha on topic PostAfPro CBsubs
Thanks
During this time do you have a quick workaround for recurring commissions not existing ?

Please Log in to join the conversation.

5 years 10 months ago #304991 by krileon
Replied by krileon on topic PostAfPro CBsubs
As it's throwing an exception I guess you could wrap a try/catch around lines 215 to 219 and in the catch set $registerSale to true. Can't really suggest anything at this time as I've not tested any of this yet. Ideally it would be best to utilize their API to try and see if commission with the specified order id even exists before attempting recurring commission.


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.
The following user(s) said Thank You: nant, activha

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.160 seconds

Facebook Twitter LinkedIn