Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe gives fatal error after payment is done #8

Open
loppanloppis opened this issue Oct 23, 2021 · 0 comments
Open

Stripe gives fatal error after payment is done #8

loppanloppis opened this issue Oct 23, 2021 · 0 comments

Comments

@loppanloppis
Copy link

Hi!

First off I'd like to send HUGE thank you's to Todor for providing this amazing crowdfunding extension completely for free. Truly appreciated man! Thank you.

I'm on versions Joomla 3.10.2, running Crowdfunding 2.7.3, Crowdfunding Library 2.7.3 and Stripe Payment plugin 2.4.2.

I'm stuck with an issue receiving Stripe payments. Paypal works fine, also bank transfers.

On Stripe's end, everything seems 100% correct, payment goes through correctly and as far as I can tell, my webhook works fine.

When user returns to my site after payment, instead of seeing the "Thank you" page, the user gets :

Call to a member function getTitle() on null

Digging further in the logs :

Your site caused a blank screen upon a visit of this URL: 

https://www.mydevsite.com/index.php?option=com_crowdfunding

HTTP_REFERER: https://www.mydevsite.com/index.php/crowdfunding/backing?layout=payment&rid=10

Error message data: 
1 Call to a member function getTitle() on null in file: /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Payment/Plugin.php line: 215

Backtrace: 
/customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Payment/Plugin.php:215
#0 /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Payment/Plugin.php(859): Crowdfunding\Payment\Plugin->sendMails(Object(Prism\Payment\Result), Object(Joomla\Registry\Registry))
#1 /customers/1/5/e/mydevsite.com/httpd.www/libraries/joomla/event/event.php(70): Crowdfunding\Payment\Plugin->onAfterPaymentNotify('com_crowdfundin...', Object(Prism\Payment\Result), Object(Joomla\Registry\Registry))
#2 /customers/1/5/e/mydevsite.com/httpd.www/libraries/joomla/event/dispatcher.php(160): JEvent->update(Array)
#3 /customers/1/5/e/mydevsite.com/httpd.www/components/com_crowdfunding/controllers/payments.php(253): JEventDispatcher->trigger('onafterpaymentn...', Array)
#4 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/MVC/Controller/BaseController.php(702): CrowdfundingControllerPayments->process()
#5 /customers/1/5/e/mydevsite.com/httpd.www/components/com_crowdfunding/crowdfunding.php(17): Joomla\CMS\MVC\Controller\BaseController->execute('checkout')
#6 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Component/ComponentHelper.php(402): require_once('/customers/1/5/...')
#7 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/customers/1/5/...')
#8 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_crowdfundin...')
#9 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#10 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/CMSApplication.php(225): Joomla\CMS\Application\SiteApplication->doExecute()
#11 /customers/1/5/e/mydevsite.com/httpd.www/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#12 {main}

Another log reveals more details :

Your site caused a blank screen upon a visit of this URL: 

https://www.mydevsite.com/index.php?option=com_crowdfunding&task=notifier.notify&format=raw&payment_service=stripe

Error message data: 
1 Argument 1 passed to Crowdfunding\Project\Command\UpdateFunds::__construct() must be an instance of Crowdfunding\Project\Project, instance of Crowdfunding\Project given, called in /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Observer/Transaction/TransactionObserver.php on line 128 in file: /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Project/Command/UpdateFunds.php line: 39 


To disable these emails proceed to your Extensions -> Plug-in manager -> disable plg_system_fatal_catcher 
It is very important that you fix all php fatal errors on your site. Resend this email to your developer.

Backtrace: 
/customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Project/Command/UpdateFunds.php:39
#0 /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Observer/Transaction/TransactionObserver.php(128): Crowdfunding\Project\Command\UpdateFunds->__construct(Object(Crowdfunding\Project))
#1 /customers/1/5/e/mydevsite.com/httpd.www/libraries/joomla/observer/updater.php(159): Crowdfunding\Observer\Transaction\TransactionObserver->onAfterProcessTransaction('com_crowdfundin...', Object(Crowdfunding\Transaction\Transaction), Array)
#2 /customers/1/5/e/mydevsite.com/httpd.www/libraries/Crowdfunding/Transaction/TransactionManager.php(83): JObserverUpdater->update('onAfterProcessT...', Array)
#3 /customers/1/5/e/mydevsite.com/httpd.www/plugins/crowdfundingpayment/stripe/stripe.php(520): Crowdfunding\Transaction\TransactionManager->process('com_crowdfundin...', Array)
#4 /customers/1/5/e/mydevsite.com/httpd.www/plugins/crowdfundingpayment/stripe/stripe.php(371): plgCrowdfundingPaymentStripe->storeTransaction(Array)
#5 /customers/1/5/e/mydevsite.com/httpd.www/libraries/joomla/event/event.php(70): plgCrowdfundingPaymentStripe->onPaymentNotify('com_crowdfundin...', Object(Joomla\Registry\Registry))
#6 /customers/1/5/e/mydevsite.com/httpd.www/libraries/joomla/event/dispatcher.php(160): JEvent->update(Array)
#7 /customers/1/5/e/mydevsite.com/httpd.www/components/com_crowdfunding/controllers/notifier.raw.php(119): JEventDispatcher->trigger('onpaymentnotify', Array)
#8 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/MVC/Controller/BaseController.php(702): CrowdfundingControllerNotifier->notify()
#9 /customers/1/5/e/mydevsite.com/httpd.www/components/com_crowdfunding/crowdfunding.php(17): Joomla\CMS\MVC\Controller\BaseController->execute('notify')
#10 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Component/ComponentHelper.php(402): require_once('/customers/1/5/...')
#11 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/customers/1/5/...')
#12 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_crowdfundin...')
#13 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#14 /customers/1/5/e/mydevsite.com/httpd.www/libraries/src/Application/CMSApplication.php(225): Joomla\CMS\Application\SiteApplication->doExecute()
#15 /customers/1/5/e/mydevsite.com/httpd.www/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#16 {main}

Lastly, the com_crowdfunding.payment.php error log tells us :


NOTIFIER ERROR: The object must be an array or an object that implements ArrayAccess
 (CONTROLLER_NOTIFIER_ERROR) 
'INPUT:JoomlaCMSInputInput::__set_state(array(
   'inputs' => 
  array (
    'cookie' => 
    JoomlaCMSInputCookie::__set_state(array(
       'inputs' => 
      array (
      ),
       'options' => 
      array (
      ),
       'filter' => 
      JoomlaCMSFilterInputFilter::__set_state(array(
         'stripUSC' => 0,
         'tagsArray' => 
        array (
        ),
         'attrArray' => 
        array (
        ),
         'tagsMethod' => 0,
         'attrMethod' => 0,
         'xssAuto' => 1,
         'tagBlacklist' => 
        array (
          0 => 'applet',
          1 => 'body',
          2 => 'bgsound',
          3 => 'base',
          4 => 'basefont',
          5 => 'canvas',
          6 => 'embed',
          7 => 'frame',
          8 => 'frameset',
          9 => 'head',
          10 => 'html',
          11 => 'id',
          12 => 'iframe',
          13 => 'ilayer',
          14 => 'layer',
          15 => 'link',
          16 => 'meta',
          17 => 'name',
          18 => 'object',
          19 => 'script',
          20 => 'style',
          21 => 'title',
          22 => 'xml',
        ),
         'attrBlacklist' => 
        array (
          0 => 'action',
          1 => 'background',
          2 => 'codebase',
          3 => 'dynsrc',
          4 => 'formaction',
          5 => 'lowsrc',
        ),
         'blockedChars' => 
        array (
          0 => '&tab;',
          1 => '&space;',
          2 => ':',
          3 => '&column;',
        ),
      )),
       'data' => 
      array (
      ),
    )),
  ),
   'options' => 
  array (
  ),
   'filter' => 
  JoomlaFilterInputFilter::__set_state(array(
     'tagsArray' => 
    array (
    ),
     'attrArray' => 
    array (
    ),
     'tagsMethod' => 0,
     'attrMethod' => 0,
     'xssAuto' => 1,
     'tagBlacklist' => 
    array (
      0 => 'applet',
      1 => 'body',
      2 => 'bgsound',
      3 => 'base',
      4 => 'basefont',
      5 => 'canvas',
      6 => 'embed',
      7 => 'frame',
      8 => 'frameset',
      9 => 'head',
      10 => 'html',
      11 => 'id',
      12 => 'iframe',
      13 => 'ilayer',
      14 => 'layer',
      15 => 'link',
      16 => 'meta',
      17 => 'name',
      18 => 'object',
      19 => 'script',
      20 => 'style',
      21 => 'title',
      22 => 'xml',
    ),
     'attrBlacklist' => 
    array (
      0 => 'action',
      1 => 'background',
      2 => 'codebase',
      3 => 'dynsrc',
      4 => 'formaction',
      5 => 'lowsrc',
    ),
     'blockedChars' => 
    array (
      0 => '&tab;',
      1 => '&space;',
      2 => ':',
      3 => '&column;',
    ),
  )),
   'data' => 
  array (
    'option' => 'com_crowdfunding',
    'task' => 'notify',
    'format' => 'raw',
    'payment_service' => 'stripe',
    'Itemid' => NULL,
  ),
))
'

As far as I can tell, the error appears around when com_crowdfunding tries to create a new transaction in the database. In phpmyadmin I do find the transaction in _crowdf_paymentsession, but it's never transfered to the _crowdf_transactions table. Also, no e-mail is sent out.

Again, the payment reaches Stripe just fine.

I can force the transaction to go through if I comment out some lines in TransactionObserver.php but this is probably not a good solution, and although I managed to get a correct entry in the _crowdf_transactions table, and an e-mail going out to the backer that way, the same error message was still shown in the backend. Also I'm not sure how this "solution" affects other areas.

I'm truly stuck here, and truly grateful for advice! Thank you :).

Best regards

Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant