Necuima Posted October 16, 2019 Share Posted October 16, 2019 Hi Larry, I am trying to use Stripe from my localhost and have established a test account with Stripe Australia. I am getting error "Class 'Stripe\Stripe_Charge' not found in .....on line 182 - I am on page 508 in the book. I have Stack-Overflowed and tried their solutions but none work. I am not able to use composer as I'm using PHP 5.5.3 on Windows 7 so I did the manual download and as far as I can tell all that is OK. Again, any advice will be most appreciated. Cheers, Necuima Link to comment Share on other sites More sharing options...
Necuima Posted October 16, 2019 Author Share Posted October 16, 2019 It's OK - I tried \Stripe\Charge:: etc and that did not give the error. But now I have another error which seems to be associated with an SSL certificate. As mentioned I am trying to test this on localhost which, in my case, does not have an SSL certificate. I understood from a previous query on Stripe that I could test this from localhost without my XAMPP/Apache having an SSL certificate. Have I mis-understood this? The beginning of the error is: "An error occurred in script 'C:\xampp\htdocs\DMChat\modules\process_payment.php' on line 213: Stripe\Error\ApiConnection Object ( [message:protected] => Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 77]: error setting certificate verify ..............." This was from the catch block: catch (Exception $e) { // Try block failed somewhere else. trigger_error(print_r($e, 1)); } Again, your advice will be most appreciated, Necuima P.S., you can probably figure out that I am using your model/view/controller approach from the advanced book :-) Link to comment Share on other sites More sharing options...
Larry Posted October 16, 2019 Share Posted October 16, 2019 I expect the problem is you CANNOT test from localhost without SSL. If you use Let's Encrypt, you can get a free, legit certificate to use for testing purposes. Link to comment Share on other sites More sharing options...
daviddawn Posted October 16, 2019 Share Posted October 16, 2019 You can also create your own SSL certificate and sign it off for the browser to accept, a simple search on google will give you a tutorial to complete this task. Regards Link to comment Share on other sites More sharing options...
Necuima Posted October 21, 2019 Author Share Posted October 21, 2019 Yes, I now have SSL enabled on my localhost XAMPP environment - thank you for the advice. Link to comment Share on other sites More sharing options...
Recommended Posts