Jump to content

Stripe Gateway


RogerM
 Share

Recommended Posts

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

NH checkout screenshot.png

Stripe screenshot.png

Edited by RogerM
screenshots added
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by RogerM
spelling
Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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 by RogerM
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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'],

 

Link to comment
Share on other sites

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 by bsmither
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...