Support

Home Forums Event Espresso Premium Stripe Integration Error

Stripe Integration Error

Posted: May 1, 2021 at 12:38 pm


victorsfood

May 1, 2021 at 12:38 pm

Hi Team,

We got some issues with the stripe payment gateway.
We are using the latest version of the plugin and I have attached the error log below:

[30-Apr-2021 03:52:28 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Stripe\PaymentIntent::__toArray() in /public_html/wp-content/plugins/event-espresso/gateways/stripe/do_transaction.php:41
Stack trace:
#0 /public_html/wp-includes/class-wp-hook.php(292): espresso_process_stripe(Array)
#1 /public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#2 /public_html/wp-content/plugins/event-espresso/includes/process-registration/payment_page.php(423): apply_filters(‘filter_hook_esp…’, Array)
#3 /public_html/wp-includes/class-wp-hook.php(292): event_espresso_pay(”)
#4 /public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#5 /public_html/wp-includes/plugin.php(484): WP_Hook in /public_html/wp-content/plugins/event-espresso/gateways/stripe/do_transaction.php on line 41
[30-Apr-2021 06:06:25 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Stripe\PaymentIntent::__toArray() in /public_html/wp-content/plugins/event-espresso/gateways/stripe/do_transaction.php:41
Stack trace:
#0 /public_html/wp-includes/class-wp-hook.php(292): espresso_process_stripe(Array)
#1 /public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#2 /public_html/wp-content/plugins/event-espresso/includes/process-registration/payment_page.php(423): apply_filters(‘filter_hook_esp…’, Array)
#3 /public_html/wp-includes/class-wp-hook.php(292): event_espresso_pay(”)
#4 /public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#5 /public_html/wp-includes/plugin.php(484): WP_Hook in /public_html/wp-content/plugins/event-espresso/gateways/stripe/do_transaction.php on line 41

Can you take a look and provide the solution?


Thanks


Seth Shoultes

  • Support Staff

May 3, 2021 at 3:13 pm

Hi there,

Can you please let us know what version of PHP is installed on your server? Also, just to double-check, what version of Event Espresso 4 and Stripe are installed?


victorsfood

May 3, 2021 at 10:12 pm

Hi,

Please find the details below:

PHP Version 7.3.27
Server Software Apache
WP Max Upload Size 256 MB
Server upload_max_filesize 256 MB
Server post_max_size 256 MB
WP Memory Limit 256 MB

Event Espresso – Calendar by Event Espresso version 2.2.9.p,
Event Espresso – Custom Template Display by Event Espresso version 1.0,
Event Espresso – Social Coupons by Seth Shoultes version 1.5.4.p,
Event Espresso – MailChimp Integration by version 1.2,
Event Espresso – Multi Event Registration by Seth Shoultes version 1.0.5.p,
Event Espresso – Recurring Events by Event Espresso version 1.1.9.p,
Event Espresso Template – Category Accordion by Event Espresso version 1.2.p,
Event Espresso Volume Discounts by Seth Shoultes version 0.5.1,
Event Espresso Smooth Integration by Jon Ang version 1.0.0,
Event Espresso by Event Espresso version 3.1.37.18.P,

Let me know, if you need any more information to fix the issue.


Thanks


Tony

  • Support Staff

May 4, 2021 at 2:17 pm

Hi there,

Do you have another plugin installed on your site that uses Stripe?

What is likely happening here is another plugin is loading a newer version of the Stripe library before Event Espresso loads the version included within EE3 and that method has been renamed.

To test this go to:

\wp-content\plugins\event-espresso\gateways\stripe\do_transaction.php

Line 41 will have this:

$intent_array = $intent->__toArray(true);

Change that to:

if (method_exists($intent, '__toArray')) {
   $intent_array = $intent->__toArray(true);
} else {
    $intent_array = $intent->toArray();
}

Does it work then?

The support post ‘Stripe Integration Error’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso