-1

After successfully testing the Stripe Checkout in localhost, I uploaded the pertinent files to my web hosting site, but am now encountering this error as soon as I enter it's 'home' page:

Line 204:

self::$appInfo = self::$appInfo ?: [];

Parse error: syntax error, unexpected '[' in /.../Stripe.php on line 204

The website is up to date regarding the SSL and my web hosting service is Web Hosting Hub. I have also not modified anything from the Stripe.php file that is included in the library.

Is it not as cut-and-dry to set up the live version of Stripe Checkout as I thought after doing some local testing?

1 Answers1

2

As the comments say.

Since PHP 5.4, you can use the short version on an array [] As per Stripe's official PHP github repository, the minimum requirement is PHP 5.4.

If you have commandline access to your server you can use php -v to find out the version of your php. If not, you can upload a file with this inside:

<?php
phpinfo();

When you visit that file in your web browser it will tell you the version of your PHP. For example: enter image description here

DarkMukke
  • 2,469
  • 1
  • 23
  • 31