RogerM Posted August 10, 2022 Share Posted August 10, 2022 (edited) Hi I have installed Stripe payment gateway. Status is active. I have chosen the "Checkout" option for the mode and successfully, chosen priority order, checked default and added the published & secret live API keys. Capture charge is set to Yes. Card payment method is enabled in my Stripe back office. When I test to purchase a product (in live mode) all seems to go OK until the point where I choose to pay by card using stripe on the Basket page and click on the "Secure Checkout" button. The Checkout page tells me the amount due but then there is nothing showing from Stripe to insert the card details and pay. Looking on Stripe it looks like coding is required to set up and customise a checkout page, but CC does this already - I just need the card payment bit to appear for people to insert their card details to be processed and accept to pay. I assumed that the Stripe extension would just link to the payment bit via the API keys and no coding would be required. That's what happens when I used other gateway extensions in the past for Paypal, and when I used Stripe on another website that uses another eCommerce solution. The whole point of an extension is that it does all that bit for me. Am I missing something in CC or is there something that's really easy I have to do in my Stripe account back office that I'm missing? Thanks. Best regards Roger Edited August 10, 2022 by RogerM screenshots added Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 10, 2022 Author Share Posted August 10, 2022 Hi I have just been in chat with Stripe and it seems that there is an issue with the Stripe extension. They can see nothing from their end that I need to do. I shouldn't need to add their checkout when CC does it already. How do I resolve this please? thanks best Roger Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 10, 2022 Share Posted August 10, 2022 My initial thought would be that your browser (or other security application) might be blocking javascript being fetched/executed from js.stripe.com. Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 10, 2022 Author Share Posted August 10, 2022 (edited) Hi Thanks for your thoughts but if that were the case then I presume that my Stripe back office would not be able to tell that the API keys are set up correctly, and I would have the same issue with the Stripe extension on my other website that uses a different eCommerce solution. It works perfectly. On reflection it seems strange that the Stripe extension for CC asks to choose between element or checkout mode when neither are really what is required - I just need the payment processing, not a checkout solution that CC already provides. Best R Edited August 10, 2022 by RogerM spelling Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 10, 2022 Author Share Posted August 10, 2022 I have checked the error log and found the following entry if this helps anybody identify a solution. It would seem to be an error in the extension [<strong>Exception</strong>] /home/customer/www/shop.naturalhealingsolutions.co.uk/public_html/cube/modules/gateway/Stripe/stripe-php-7.83.0/lib/Service/AbstractService.php:73 - The resource ID cannot be null or whitespace. According to my CC php Info I'm using php7.4.30 I see the error log mentions php-7.83.0. Is this difference the issue? If so how do I upgrade my php to the right one? Thanks. Roger Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 11, 2022 Share Posted August 11, 2022 The '7.83.0' seems to be the version of the Stripe library - not the version of PHP that the library is expecting to see. Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 11, 2022 Author Share Posted August 11, 2022 OK thanks. So if that's not the issue, what's the solution as to why this gateway doesn't function at all how its supposed to? Best R Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 12, 2022 Author Share Posted August 12, 2022 (edited) Hi Given that this Gateway extension was written by CubeCart and isn't functioning I'm disappointed by the lack of support in terms of helping find a real resolution. I'd at least expect an own brand extension to work. R Edited August 12, 2022 by RogerM Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 12, 2022 Share Posted August 12, 2022 The error message posted above, when you hover your mouse cursor over that entry, there should be a popover showing a 'stack trace'. The contents of this popover can be swiped by the cursor and copied/pasted. Please let us see the trace. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 12, 2022 Share Posted August 12, 2022 I think it is not so much a problem with the Stripe module, but an issue with CubeCart core code. Please see: https://github.com/cubecart/v6/issues/3039 Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 12, 2022 Author Share Posted August 12, 2022 Hi Thanks. It looks like it's more complicated than my ability to know what I'm doing to sort it. Is this something there will be a CC update for? If so, is it imminent?!! R Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 12, 2022 Share Posted August 12, 2022 I would hope for an update. I am not privvy to the goings on at CC HQ. Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 13, 2022 Author Share Posted August 13, 2022 OK thanks for establishing what the problem is and that at least I'm not going mad! Hopefully the update will be swift so I can get up and running soon. Best R Quote Link to comment Share on other sites More sharing options...
Tony Posted August 14, 2022 Share Posted August 14, 2022 @Al Brookbanks FYI, just in case. Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 19, 2022 Share Posted August 19, 2022 This is just a guess - no idea if this will work. In the module file /skin/checkout.php, near line 5, there is: fetch('index.php?_g=rm&type=plugins&cmd=call&module=Stripe&cart_order_id={/literal}{$DATA.cart_order_id}{literal}&t={/literal}{$DATA.time}{literal}', { Change to: fetch('index.php?_g=rm&type=gateway&cmd=call&module=Stripe&cart_order_id={/literal}{$DATA.cart_order_id}{literal}&t={/literal}{$DATA.time}{literal}', { In the module file `gateway.class.php`, near line 135, there is: 'success_url' => $GLOBALS['storeURL']."/index.php?_g=rm&type=plugins&cmd=process&module=Stripe&cart_order_id=".$order['cart_order_id'], Change to: 'success_url' => $GLOBALS['storeURL']."/index.php?_g=rm&type=gateway&cmd=process&module=Stripe&cart_order_id=".$order['cart_order_id'], Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 19, 2022 Author Share Posted August 19, 2022 Hi Thanks for trying. I really appreciate it, but unfortunately it does exactly the same - no different at all. I guess I'll have to wait for a core update? Many thanks. Best Roger Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 22, 2022 Share Posted August 22, 2022 (edited) After working with another CubeCart user who allowed for intense troubleshooting efforts, it has become apparent that Stripe updated its internal API (as of 1 Aug 2022) that does now cause the Stripe module to throw an Exception, and crashing PHP. Please see: https://github.com/cubecart/v6/issues/3050 Edited August 22, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
RogerM Posted August 23, 2022 Author Share Posted August 23, 2022 Thank you so much - solution 1 of the suggested 3 worked great. Hopefully any updates to Stripe and/or CC won't interfere with the solution... I just have to work out why when a new customer checks out and inputs their address it clears the basket!! At least they can choose again and then it works fine, but it's not ideal and the 2nd easiest way to lose a sale, now the first has been solved! Many thanks once again. Best Roger Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.