woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
231 stars 202 forks source link

Order payment not validated on multisite with stripe payment #1299

Closed matteolavaggi closed 2 weeks ago

matteolavaggi commented 4 years ago

Describe the bug When a user place an order with credit card payment in woocommerce using stripe gateway, after the paymetn confirmation the user are not redirected to any confirmation page, order are stored in wocoomerce in "waiting payment status", customer are redirect to the top of the last checkout page with no notification.

Stripe payment is processed with success but order in woocomerce are not updated and customer doesn't see any confirmation. This result in a re-submission of the cart because the credit card value still insert in the form, another payment processed on stripe, another order generated with "waiting payment status" ecc.

Setup is a multisite with nginx webserver.

To Reproduce 1) place an order and try to pay with credit card 2) confirm order 3) you does not receive order confirmation, web page simply "move" up and present you again the top of the checkout page with all your data inside (also credit card data) 4) check on stripe dashboard and you can see the payment 5) order on woocommerce is in "wait payment status" but the behavior of the checkout order is wrong (if you place a bank wire order you receive a order confirmation also if the payment is on waiting payment).

Expected behavior a) order confirmation for customer b) order payment confirmed status in woocommerce backoffice

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Nginx config ``` map $uri $blogname{ ~^(?/[^/]+/)files/(.*) $blogpath; } map $blogname $blogid{ default -999; include /var/www/htdocs/wordpress/wp-content/uploads/nginx-helper/map.conf; } server { include /etc/nginx/deny-ip.conf; listen 80; listen [::]:80; server_name www.xxx.it; return 301 https://www.xxx.it$request_uri; } server { include /etc/nginx/deny-ip.conf; proxy_buffer_size 4k; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $host; proxy_redirect off; proxy_connect_timeout 6000; proxy_send_timeout 6000; proxy_read_timeout 6000; send_timeout 6000; expires $expires; listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.xxx.it; root /var/www/htdocs/wordpress; index index.php index.html index.htm; add_header X-NG-Cache-Status $upstream_cache_status; add_header X-NG-Cache-Date $upstream_http_date; location / { try_files $uri $uri/ /index.php?$args; location ~ \.php$ { fastcgi_pass unix:/run/php/php7.2-fpm-wordpress.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 10000; include /etc/nginx/wp-cloudflare-supercache.conf; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } } location /wp-admin/ { location ~ \.php$ { fastcgi_pass unix:/run/php/php7.2-fpm-backend.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 10000; include /etc/nginx/wp-cloudflare-supercache.conf; } } #limita l'accesso a 2 cartelle utilizzate dal plugin wp-customer-area include /etc/nginx/wp-customer-area.conf; # Add support for subdirectory structure in WordPress Multisite if (!-e $request_filename) { rewrite /wp-admin$ $scheme://$host$uri/ permanent; rewrite ^(/[^/]+)?(/wp-.*) $2 last; rewrite ^(/[^/]+)?(/.*.php) $2 last; } location ~ ^(/[^/]+/)?files/(?.+) { try_files /wp-content/blogs.dir/$blogid/files/$rt_file /wp-includes/ms-files.php?file=$rt_file ; access_log off; log_not_found off; expires max; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 24h; log_not_found off; } #avoid php readfile() location ^~ /blogs.dir { internal; alias /var/www/htdocs/wordpress/wp-content/blogs.dir ; access_log off; log_not_found off; expires max; } # Deny access to uploads that are not images, videos, music, etc. location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ { deny all; } # Deny public access to wp-config.php location ~* wp-config.php { deny all; } # Block access to xmlrpc.php location = /xmlrpc.php { deny all; access_log off; log_not_found off; } location ~* .(js)$ { access_log off; proxy_ignore_headers Cache-Control; proxy_ignore_headers X-Accel-Expires; proxy_ignore_headers Expires; proxy_cache_valid 200 302 90d; proxy_cache_valid 404 1d; add_header Pragma public; add_header Cache-Control public; add_header X-GG-Cache-Status $upstream_cache_status; add_header X-GG-Cache-Date $upstream_http_date; expires 90d; gzip_static on; try_files $uri @proxy; http2_push_preload on; } location ~* .(css)$ { access_log off; proxy_ignore_headers Cache-Control; proxy_ignore_headers X-Accel-Expires; proxy_ignore_headers Expires; proxy_cache_valid 200 302 15d; proxy_cache_valid 404 1d; add_header Pragma public; add_header Cache-Control public; add_header X-GG-Cache-Status $upstream_cache_status; add_header X-GG-Cache-Date $upstream_http_date; expires 15d; gzip_static on; try_files $uri @proxy; http2_push_preload on; } location ~* .(ico|jpg|png|gif|jpeg|swf|woff|woff2)$ { access_log off; proxy_ignore_headers Cache-Control; proxy_ignore_headers X-Accel-Expires; proxy_ignore_headers Expires; proxy_cache_valid 200 302 90d; proxy_cache_valid 404 1d; add_header Pragma public; add_header Cache-Control public; add_header X-GG-Cache-Status $upstream_cache_status; add_header X-GG-Cache-Date $upstream_http_date; expires 90d; gzip_static on; try_files $uri @proxy; http2_push_preload on; } location @proxy { http2_push_preload on; proxy_pass http://127.0.0.1:8080; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; } location ~ /\.ht { deny all; } ssl_certificate /etc/letsencrypt/live/www.xxx.it/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/www.xxx.it/privkey.pem; # managed by Certbot } ```

Additional context

Multisite has bot stripe and subscription official plugin for woocommerce.

matteolavaggi commented 4 years ago

When manual call the api url we get a "-1" blank white page (no code inside, only the "-1")

mattallan commented 2 weeks ago

👋 I'm going through some of our older issues labeled with high priority. Given this bug report is 4 years old and has no other reports, I figured it's no longer an issue. That said, I have confirmed that I didn't have any issues with processing payments and renewing subscriptions on my multisite store running the latest Stripe and Subscriptions extensions.

Closing this.