Jump to content

Stripe module not creating order


nick_developer

Recommended Posts

Hi I installed the official Stripe payment module  on prestashop 1.7.6.5 

The module is connected to the Stiripe API and Webhook corruptly.  

The problem is that the payment is captured by Stripe with our errors, but prestashop don't create the order.
The order confirm page is being shown by everything stays in the cart and the order is not created.

Anyone has the same issue ?
Thanks, best regards

 

 

Edited by nick_developer (see edit history)
Link to comment
Share on other sites

Hi Nick, I have solved the similar type of issue . There is  bug in the Stripe module .

Order is not created because during ValidateOrder call the  function is not getting the secure_key.

The module is trying to create customer object from cart id.

So In the ValidationOrderActions.php Goto line no. 305 and 

Change this line 

$customer = new Customer($this->conveyor['cart']->id);

To

$customer = new Customer($this->conveyor['cart']->id_customer);

 

I am expert in payment gateway related modules .

Edited by vcsahu16 (see edit history)
Link to comment
Share on other sites

Hi, thanks for help, 
the Stripe support said t me that with the version 2.3.5 (just released) the problem will be ok, but after the upgrade the order isn't created after the checkout. 
I've altro tried your bugfix  (and deleting the cache too) but the problem still the same: the checkout and the payment bring the user to the order confirmation page, but the order isn't created. 

thanks for help

 

Link to comment
Share on other sites

15 minutes ago, nick_developer said:

Hi, thanks for help, 
the Stripe support said t me that with the version 2.3.5 (just released) the problem will be ok, but after the upgrade the order isn't created after the checkout. 
I've altro tried your bugfix  (and deleting the cache too) but the problem still the same: the checkout and the payment bring the user to the order confirmation page, but the order isn't created. 

thanks for help

 

Hi nick,

 

Then try this In the ValidationOrderActions.php Go near  line no. 310:

Replace

if (isset($customer->secure_key)) {

$this->conveyor['secure_key'] = $customer->secure_key;

} else {

$this->conveyor['secure_key'] = false;

}

with

 

if (isset($this->conveyor['cart']->secure_key)) {

$this->conveyor['secure_key'] = $this->conveyor['cart']->secure_key;

} else {

$this->conveyor['secure_key'] = false;

}

I think this should work for you . Let me know your response

Edited by vcsahu16 (see edit history)
Link to comment
Share on other sites

Hi,

 have the same problem.
I contacted support today and received the following response:

Quote

Thanks you for contact us, can you please install the last version 2.3.5 Module Stripe, you can find it in Addons, this version will be resolve the problem. After instalation, don't forget, go to the module and click in SAVE.

 

I have installed the current version now, and hope that the problem is solved after clicking "SAVE".

Are there any other experiences with it?

Link to comment
Share on other sites

Im not sure, but yesterday i read this post in the french prestashop forum:

 

https://help.202-ecommerce.com/stripe-for-prestashop/procedure-to-replace-the-stripe-key-in-the-database/

 

maybe that is your problem?

 

I have a payment today via stripe that worked.

The only thing i have done is update from 2.3.4 to 2.3.5, and i think its important to click "save".

Edited by BlackCrow (see edit history)
Link to comment
Share on other sites

Hello, i'm try to configure the official stripe module (v2.3.5) on a quite new prestashop site (v1.7.7.5) but i've some trouble.
Appear the messare "Webhook configuration cannot be found in PrestaShop, click on save button to fix issue. A new webhook will be created on Stripe, then saved in PrestaShop." on top of the module page. After insert the keys and click the save button the error is still there and also appear the following message: "$config must be a string or an array - [Stripe\Exception\InvalidArgumentException 0] "

Anyone got the same issue?
Any suggestions for the solution?

Giacomo

 

Link to comment
Share on other sites

44 minutes ago, ottojack said:

Hello, i'm try to configure the official stripe module (v2.3.5) on a quite new prestashop site (v1.7.7.5) but i've some trouble.
Appear the messare "Webhook configuration cannot be found in PrestaShop, click on save button to fix issue. A new webhook will be created on Stripe, then saved in PrestaShop." on top of the module page. After insert the keys and click the save button the error is still there and also appear the following message: "$config must be a string or an array - [Stripe\Exception\InvalidArgumentException 0] "

Hi, 
select the test mode then save, and then set the production mode and press save. 
This will make the error not appear, but on my Prestashop it didn't solved the problem of confirm an order.

 

 

Link to comment
Share on other sites

Following your suggestions i've find out the way to save the keys.
1. save test keys - all fine
2. clean db as descibed here https://help.202-ecommerce.com/stripe-for-prestashop/procedure-to-replace-the-stripe-key-in-the-database/
3. add the live keays  - all fine

Seems all ok but...
Testing the solution all fine (the card processing was fine form the client side) but surprise! No order created in BO and the founds fom the card was not taken but there is only a pre-authorization...

Keep looking on it...

Link to comment
Share on other sites

  • 2 weeks later...
On 7/26/2021 at 9:23 AM, vcsahu16 said:

Hi nick,

 

Then try this In the ValidationOrderActions.php Go near  line no. 310:

Replace

if (isset($customer->secure_key)) {

$this->conveyor['secure_key'] = $customer->secure_key;

} else {

$this->conveyor['secure_key'] = false;

}

with

 

if (isset($this->conveyor['cart']->secure_key)) {

$this->conveyor['secure_key'] = $this->conveyor['cart']->secure_key;

} else {

$this->conveyor['secure_key'] = false;

}

I think this should work for you . Let me know your response

Hi @vcsahu16,

I'm facing the same issue reported by Nick, and just tried your sugestion, but it doesn't work. Have you heard about any other solution for this?

Thanks,

Lorena

 

Link to comment
Share on other sites

I have been having te same problem with my stripe module. The update doesn;t work. Orders are not 'captured' Its driving me nuts and I am losong orders left right and centre. I have uninstalled and reinstalled the old module which says udate. It doesn;t work. I have udated - it doesn't work. Ive downloaded the current module and it wonlt even install it. Driving me nuts.Please can anyone help? I have prestashop version 1.7.6.8 and am NOT au fait with source codes etc

Link to comment
Share on other sites

Where do I find this webhook? And I'm not sure that I am comfortable handling a data base. This link is not much help at all. I think I;ll leave it with mu=y old module which at least works, even if it does tell me that an incrrect amount has been paid even when te correct amount has been paid.

Link to comment
Share on other sites

Hi,
uninstall the current from your prestashop, then follow the guide in the previous link. You have to access to your database, find the table "ps_configuration" and search for the record whose name is "STRIPE_WEBHOOK_SIGNATURE". Delete this record, then re-install the 2.3.6 version.
If you didn't find the record with that name, just re-install the 2.3.6 version.

 

Link to comment
Share on other sites

39 minutes ago, nick_developer said:

Hi,
uninstall the current from your prestashop, then follow the guide in the previous link. You have to access to your database, find the table "ps_configuration" and search for the record whose name is "STRIPE_WEBHOOK_SIGNATURE". Delete this record, then re-install the 2.3.6 version.
If you didn't find the record with that name, just re-install the 2.3.6 version.

 

I;ve already said I have no idea how to access the database.

Link to comment
Share on other sites

20 hours ago, Littlepants said:

I;ve already said I have no idea how to access the database.

I think you need professional help.

How did you get the access data to your database when installing prestashop (username, password, database name)?

Your hoster must have all this information for you. Also the access to the database.

what is your hosting provider?

 

Link to comment
Share on other sites

 

On 8/25/2021 at 10:21 AM, nick_developer said:

Hi, try to do this procedure before installing the new update (or remove the update, and then re-install) 

https://help.202-ecommerce.com/stripe-for-prestashop/procedure-to-replace-the-stripe-key-in-the-database/

I have just discovered that this 'webhook' is not in the shop but in my Stripe account. I think I have found and deleted it.

Link to comment
Share on other sites

1 hour ago, Littlepants said:

 

I have just discovered that this 'webhook' is not in the shop but in my Stripe account. I think I have found and deleted it.

Hi,
the webhook that connect your Stripe account to our Prestashop is in your Stripe account website.
Once you configure the Prestashop Stripe it saves the Stripe webhook in your prestashop database in the record specified in previous posts. 
In some cases you have to delete the webhook record form the Prestashop database to let the Stripe configuration procedure to re-create the updated webhook record.

So you have to delete the webhook record in the database, not the webhook in your Stripe account. If you deleted the Stripe account webhook you can recreate it (or maybe it creates a new webhook when you configure Stripe on your Prestashop).

 

Link to comment
Share on other sites

On 8/27/2021 at 3:21 PM, nick_developer said:

Hi,
the webhook that connect your Stripe account to our Prestashop is in your Stripe account website.
Once you configure the Prestashop Stripe it saves the Stripe webhook in your prestashop database in the record specified in previous posts. 
In some cases you have to delete the webhook record form the Prestashop database to let the Stripe configuration procedure to re-create the updated webhook record.

So you have to delete the webhook record in the database, not the webhook in your Stripe account. If you deleted the Stripe account webhook you can recreate it (or maybe it creates a new webhook when you configure Stripe on your Prestashop).

 

But I can't FIND it in the database of the shop. Advanced perameters/database brings the attached window

 

Edited by Littlepants
removing screenshot (see edit history)
Link to comment
Share on other sites

12 hours ago, Littlepants said:

But I can't FIND it in the database of the shop. Advanced perameters/database brings the attached window

Database.tiff 184.13 kB · 1 download

read the tips again in this thread.
you need a database access from your hoster, or install phpmyadmin yourself as mentioned.
in prestashop backoffice you will NOT find the database!

 

in phpMyAdmin it looks like this:

grafik.thumb.png.bb3c40b888fea56fe7db81903ae6a507.png

 

Link to comment
Share on other sites

40 minutes ago, Littlepants said:

I can't ebven find this to install!

Hi,
do you have a FTP at your host where Prestashop is installed? If not get a FTP client ( https://filezilla-project.org ) and configure it with the login and password of your FTP account. If you don't know these detail you have to ask at your provider. 

Then, once you have the FTP, download PhpMyadmin ( https://www.phpmyadmin.net/downloads/ ), extract the download and you get a folder. Rename the folder with a comfortable name ( name_choosen_for_phpmyadmin_folder ) and then upload this folder to your FTP space in the base folder. 

After the upload you can access at PhpMyAdmin form  https:/www.yuorwebsitename.com/name_choosen_for_phpmyadmin_folder

To login in PhpMyAdmin you need the username and the password of your database.

 

Link to comment
Share on other sites

2 minutes ago, nick_developer said:

Hi,
do you have a FTP at your host where Prestashop is installed? If not get a FTP client ( https://filezilla-project.org ) and configure it with the login and password of your FTP account. If you don't know these detail you have to ask at your provider. 

Then, once you have the FTP, download PhpMyadmin ( https://www.phpmyadmin.net/downloads/ ), extract the download and you get a folder. Rename the folder with a comfortable name ( name_choosen_for_phpmyadmin_folder ) and then upload this folder to your FTP space in the base folder. 

After the upload you can access at PhpMyAdmin form  https:/www.yuorwebsitename.com/name_choosen_for_phpmyadmin_folder

To login in PhpMyAdmin you need the username and the password of your database.

 

Littlepants does not have any access to ftp or database... thats the problem @nick_developer

The problem can only be fixed by his hoster..

Link to comment
Share on other sites

I have now been onto my web man. He has deleted that webhook for me. I have downloaded the new module, unistalled the old one, tried to upload the new moduule once again but I still get 'oops something went wrong. There is something wrong in the module. I'm giving up. I have reinstalled the mold version 2.2.3. which at least works and allows my customers to make orders

It's a shame that there's no-one who can solve this problem

 

Link to comment
Share on other sites

51 minutes ago, Littlepants said:

I have now been onto my web man. He has deleted that webhook for me. I have downloaded the new module, unistalled the old one, tried to upload the new moduule once again but I still get 'oops something went wrong. There is something wrong in the module. I'm giving up. I have reinstalled the mold version 2.2.3. which at least works and allows my customers to make orders

It's a shame that there's no-one who can solve this problem

 

Try to re-install it checking the option to delete the folder during the Uninstall. 
Then re-install it. After that do the configuration (but usually the previous parameters will still there, so just click save on the configuration).


 

Link to comment
Share on other sites

5 hours ago, BlackCrow said:

Thats a problem with your hoster.

The upload limit is too low. Contact your admin and ask him to increase it. Or finally find a better hoster, then you won't have such problems.

Dine that. The new module now uploads but the same old same old. I've tested it and STILL the payments aren't being captured. So yet again I have uploaded the 2.3.2. module again.

Link to comment
Share on other sites

16 minutes ago, Littlepants said:

Dine that. The new module now uploads but the same old same old. I've tested it and STILL the payments aren't being captured. So yet again I have uploaded the 2.3.2. module again.

Actually it doesn't even tdo that. It doesn't send anythjng to Stripe at all. I have tested it, the items remain in my cart and nothing even shows on my stripe payments atall - not even 'uncaptured'

Link to comment
Share on other sites

39 minutes ago, Littlepants said:

Actually it doesn't even tdo that. It doesn't send anythjng to Stripe at all. I have tested it, the items remain in my cart and nothing even shows on my stripe payments atall - not even 'uncaptured'

Hi, that's may happen if there's no webhook set on Stripe. Have you saved the Stripe configuration in Prestashop ? 
 

Link to comment
Share on other sites

1 hour ago, nick_developer said:

Hi, that's may happen if there's no webhook set on Stripe. Have you saved the Stripe configuration in Prestashop ? 
 

I configured it if that's what you mean. Connected to my Stripe account, set it to test mode and tested it. Nothing. Nothing in Stripe and the items are still in my cart. How do I set a webhook in stripe?

 

Edited by Littlepants
more info (see edit history)
Link to comment
Share on other sites

3 hours ago, Littlepants said:

I configured it if that's what you mean. Connected to my Stripe account, set it to test mode and tested it. Nothing. Nothing in Stripe and the items are still in my cart. How do I set a webhook in stripe?

 

Maybe you should upgrade your Prestashop. I see your Screenshot, Version 1.7.6.8. Prestashop current version is 1.7.7.7. And you have 11 Moduls to upgrade.

First -> upgrade Prestashop and Modules to current version -> then we talk about stripe further.

I already told you, old versions are not secure! The 1.7.6.8 is from september 2020 🙄

You are a security risk...

Link to comment
Share on other sites

On 8/27/2021 at 3:21 PM, nick_developer said:

Hi,
the webhook that connect your Stripe account to our Prestashop is in your Stripe account website.
Once you configure the Prestashop Stripe it saves the Stripe webhook in your prestashop database in the record specified in previous posts. 
In some cases you have to delete the webhook record form the Prestashop database to let the Stripe configuration procedure to re-create the updated webhook record.

So you have to delete the webhook record in the database, not the webhook in your Stripe account. If you deleted the Stripe account webhook you can recreate it (or maybe it creates a new webhook when you configure Stripe on your Prestashop).

 

How do I re-create it?

Link to comment
Share on other sites

52 minutes ago, Littlepants said:

How do I re-create it?

Hi,
when you save your preferences (production or test) it will create the webhook record in the database. 
Sometimes on some installations I got the error on the testing mode, but clicking on save again the error disappeared and everything worked.
 

Link to comment
Share on other sites

5 minutes ago, nick_developer said:

Hi,
when you save your preferences (production or test) it will create the webhook record in the database. 
Sometimes on some installations I got the error on the testing mode, but clicking on save again the error disappeared and everything worked.
 

It's the webhook in my stripe account which isn't there.

 

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Version 3.0.5 on PS 1.7.8.1, issue is still there. Testing order worked fine, but production mode generates no orders. Money are still payed tho, so it can be done manually, but its a pain. Support is not really to help in this.

Link to comment
Share on other sites

On 6/1/2023 at 8:51 PM, Holoweb said:

Version 3.0.5 on PS 1.7.8.1, issue is still there. Testing order worked fine, but production mode generates no orders. Money are still payed tho, so it can be done manually, but its a pain. Support is not really to help in this.

Hi, on Prestashop 1.7.8.8 with the current Stipe module there are no problem.
Have a try to unistall completely the module then re-install it.

Best regards

Link to comment
Share on other sites

We are experiencing the same issues across different shops. I have also tested it with a clean installation of PrestaShop 8.0.4 and Stripe 3.0.5.

Credit card payments are functioning properly, but other payment methods such as EPS and PayPal are not generating orders. However, Stripe is still receiving the payment.

The previous version (2.x) was developed by 202 Commerce, and they have made it publicly available on GitHub. Is there a GitHub repository for the current version as well?

Link to comment
Share on other sites

2 hours ago, itnomic said:

We are experiencing the same issues across different shops. I have also tested it with a clean installation of PrestaShop 8.0.4 and Stripe 3.0.5.

Should you be in a shared hosting environment you need to check if a php version was outsourced. Like php 7.2 and now they use php7.4. 

Link to comment
Share on other sites

We are using PHP 7.4 on all our PrestaShop 1.7.8.x shops.

I also made a fresh installation of PrestaShop 1.7.8.9 with Stripe 3.0.5 and PHP 7.4 and tried to make a payment with EPS (Test Mode).

And it works! But only the first time?! All subsequent orders with EPS no longer work. I tried it with different clients.

Maybe it's a runtime problem. I will check this tomorrow.

 

  • Like 1
Link to comment
Share on other sites

It seems that the new Stripe module has a lot of bugs. I have tested it several times, and sometimes an order was created, but most of the time it doesn't work.

If you activate PrestaShop in Debug mode, it is not possible to pay anything with Stripe. You receive a SyntaxError (JSON.parse: bad parsing).

I recommend not using this version of Stripe until they have properly tested it and fixed all the bugs.

Link to comment
Share on other sites

We are receiving no errors, customer is just not redirected back and from our poitnt it loks like cart was abbandoned. We do check manually for payment everyday, conmtected stripe support, but till now, nothing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...