woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.41k stars 10.76k forks source link

Paypal IPN conflict? Incorrect URLs and response URL fails. #29543

Closed SteveFeher closed 3 years ago

SteveFeher commented 3 years ago

Prerequisites (mark completed items with an [x]):

Describe the bug IPN response fails to return correctly to the store.

Expected behavior PayPal payment received should have a response back to the store indicating that the payment was valid, received, and processing.

Actual behavior WooCommerce version 5.1.0 running. I have PayPal (standard) and Credit Card payment methods enabled. Credit Card Payments go through fine without error. PayPal payments are sent to PayPal and payments are accepted. IPN response fails to return correctly to the store. Orders from customers that pay via PayPal do have their orders saved in the store, but status remains at "pending payment", despite the payment processing at PayPal being correct.

Configuration at PayPal for IPN Notification URL - https://www.domain.com/?wc-api=WC_Gateway_Paypal/

In history logs at PayPal, they are responding to a slightly different URL Notification URL - https://www.domain.com/wc-api/WC_Gateway_Paypal/

Steps to reproduce the bug (We need to be able to reproduce the bug in order to fix it.) Steps to reproduce the bug: This is all on the admin side -- cannot share private access.

  1. Customer makes an order and pays via PayPal
  2. PayPal validates and confirms payment. Should use IPN to notify back to WooCommerce of successful transaction and order should be updated from "Pending Payment" to "Processing". Does not happen -- order remains at "Pending Payment" status, despite accurate payment being received.
  3. Review PayPal IPN logs and find the following: Notification URL https://www.domain.com/wc-api/WC_Gateway_Paypal/ HTTP Response Code 500 Delivery Status Failed No. of Retries 16

According to PayPal, they claim that WooCommerce is sending an "Override" on the URL.... and in this case, that's apparently happening. According to PayPal, "...partners and their merchants can override this setting via an http call. An override will ignore the setting and use a different value instead."

Screenshots I cannot share screenshots of this code publicly.... I will be happy to share privately with devs.

Isolating the problem (mark completed items with an [x]):

Possible Solution Is there source code in the WooCommerce core that would designate an "Override URL"? Nothing in the software GUI allows me to change this, but perhaps there's a hardcode location that should be reviewed? If that's something accessible, please provide guidance and I can review.

WordPress Environment

`

WordPress Environment

WordPress address (URL): https://www..com Site address (URL): https://www..com WC Version: 5.1.0 REST API Version: ✔ 5.1.0 WC Blocks Version: ✔ 4.4.3 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 2.1.3 Log Directory Writable: ✔ WP Version: ❌ 5.6.2 - There is a newer version of WordPress available (5.7) WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache PHP Version: 7.4.16 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d

SUHOSIN Installed: – MySQL Version: 10.2.36-MariaDB Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 5.1.0 WC Database Prefix: wp_ Total Database Size: 96.11MB Database Data Size: 77.30MB Database Index Size: 18.81MB wp_woocommerce_sessions: Data: 17.72MB + Index: 0.68MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.73MB + Index: 0.36MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 6.48MB + Index: 3.77MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM botnet_list: Data: 0.02MB + Index: 0.02MB + Engine InnoDB botnet_reports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_reports_160318: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_reports_160319: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_reports_160320: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_reports_160321: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB botnet_scripts_stat: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cp_users: Data: 0.00MB + Index: 0.00MB + Engine MyISAM ipv4toc: Data: 2.17MB + Index: 0.00MB + Engine MyISAM membership_codespirit: Data: 0.00MB + Index: 0.00MB + Engine MyISAM membership_list: Data: 0.00MB + Index: 0.00MB + Engine MyISAM membership_scripts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM membership_scripts_stat: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 0.83MB + Index: 0.22MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 0.44MB + Index: 0.27MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_comments: Data: 2.01MB + Index: 0.96MB + Engine MyISAM wp_gf_addon_feed: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gf_addon_payment_callback: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_gf_addon_payment_transaction: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_gf_draft_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gf_entry: Data: 0.11MB + Index: 0.02MB + Engine MyISAM wp_gf_entry_meta: Data: 0.68MB + Index: 0.56MB + Engine MyISAM wp_gf_entry_notes: Data: 0.04MB + Index: 0.02MB + Engine MyISAM wp_gf_form: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gf_form_meta: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_gf_form_revisions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gf_form_view: Data: 0.09MB + Index: 0.04MB + Engine MyISAM wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 3.20MB + Index: 0.35MB + Engine MyISAM wp_postmeta: Data: 9.61MB + Index: 4.77MB + Engine MyISAM wp_posts: Data: 1.96MB + Index: 0.62MB + Engine MyISAM wp_revslider_css: Data: 0.09MB + Index: 0.01MB + Engine MyISAM wp_revslider_css_bkp: Data: 0.09MB + Index: 0.00MB + Engine MyISAM wp_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_layer_animations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_navigations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_sliders: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_revslider_sliders_bkp: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_revslider_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_slides_bkp: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_revslider_static_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rg_form: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rg_form_meta: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_rg_form_view: Data: 0.03MB + Index: 0.02MB + Engine MyISAM wp_rg_incomplete_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rg_lead: Data: 0.09MB + Index: 0.01MB + Engine MyISAM wp_rg_lead_detail: Data: 0.22MB + Index: 0.35MB + Engine MyISAM wp_rg_lead_detail_long: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rg_lead_meta: Data: 0.28MB + Index: 0.09MB + Engine MyISAM wp_rg_lead_notes: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_rg_zapier: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_termmeta: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_terms: Data: 0.01MB + Index: 0.03MB + Engine MyISAM wp_term_relationships: Data: 0.07MB + Index: 0.17MB + Engine MyISAM wp_term_taxonomy: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_usermeta: Data: 3.34MB + Index: 2.11MB + Engine MyISAM wp_users: Data: 0.15MB + Index: 0.14MB + Engine MyISAM wp_wcm_sds_brands: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.03MB + Index: 0.03MB + Engine MyISAM wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.11MB + Index: 0.10MB + Engine MyISAM wp_wc_order_stats: Data: 0.03MB + Index: 0.03MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.03MB + Index: 0.06MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfBlockedIPLog: Data: 0.08MB + Index: 0.05MB + Engine MyISAM wp_wfBlocks7: Data: 0.09MB + Index: 0.05MB + Engine MyISAM wp_wfConfig: Data: 1.59MB + Index: 0.01MB + Engine MyISAM wp_wfCrawlers: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_wfFileChanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfFileMods: Data: 3.76MB + Index: 0.85MB + Engine MyISAM wp_wfHits: Data: 16.70MB + Index: 0.68MB + Engine MyISAM wp_wfHoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfIssues: Data: 0.04MB + Index: 0.01MB + Engine MyISAM wp_wfKnownFileList: Data: 1.81MB + Index: 0.26MB + Engine MyISAM wp_wfLiveTrafficHuman: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wfLocs: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wfLogins: Data: 0.37MB + Index: 0.08MB + Engine MyISAM wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfNotifications: Data: 0.02MB + Index: 0.00MB + Engine MyISAM wp_wfPendingIssues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfReverseCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfSNIPCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfStatus: Data: 0.75MB + Index: 0.29MB + Engine MyISAM wp_wfTrafficRates: Data: 0.14MB + Index: 0.13MB + Engine MyISAM wp_woocommerce_shipping_table_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_indexable: Data: 0.78MB + Index: 0.16MB + Engine MyISAM wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine MyISAM wp_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_yoast_primary_term: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_yoast_seo_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_seo_meta: Data: 0.10MB + Index: 0.11MB + Engine MyISAM

Post Type Counts

amn_mi-lite: 2 attachment: 1023 custom_css: 1 nav_menu_item: 51 oembed_cache: 1 page: 33 post: 2 product: 310 product_variation: 17 revision: 174 shop_order: 2303 shop_order_refund: 8 was: 5

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (30)

Gravity Perks: by Gravity Wiz – 2.2.2 Gravity Forms: by Gravity Forms – 2.4.23 Birds Custom Login: by Frédéric Serva – 1.0.8 Breadcrumb NavXT: by John Havlik – 6.6.0 Envato Market: by Envato – 2.0.6 Gravity Forms PayPal Standard Add-On: by Gravity Forms – 3.4 Gravity Forms Zapier Add-On: by Gravity Forms – 4.0 GP Conditional Pricing: by Gravity Wiz – 1.2.44 GP Price Range: by Gravity Wiz – 1.1 WooCommerce Quickview: by James Kemp – 3.0.5 WPBakery Page Builder: by Michael M - WPBakery.com – 6.6.0 Non-Purchasable WooCommerce Products: by Guy Primavera – 1.3 Really Simple CAPTCHA: by Takayuki Miyoshi – 2.1 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 Slider Revolution: by ThemePunch – 6.4.6 Search By SKU - for Woocommerce: by Unroll Digital – 0.7.1 OXY Shortcodes: by Smartdatasoft – 1.0 WooCommerce Transaction Express credit card gateway: by TransFirst – 1.0.0.9 WooCommerce UPS Shipping Plugin with Print Label: by PluginHive – 4.1.1 WooCommerce Admin: by WooCommerce – 2.1.3 WooCommerce Advanced Shipping: by Jeroen Sormani – 1.0.14 WooCommerce AvaTax: by SkyVerge – 1.11.2 WooCommerce Bulk Pricing: by WP Lab – 1.9.6 WooCommerce Conditional Shipping and Payments: by SomewhereWarm – 1.9.3 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.1 WooCommerce: by Automattic – 5.1.0 Wordfence Security: by Wordfence – 7.4.14 Yoast SEO: by Team Yoast – 16.0.2 WP Force SSL: by WebFactory Ltd – 1.57 WP Super Cache: by Automattic – 1.7.2

Inactive Plugins (2)

Google Analytics Dashboard for WP (GADWP): by ExactMetrics – 6.7.0 WooCommerce No Shipping Message: by dangoodman – 2.0.8

Dropin Plugins (2)

advanced-cache.php: advanced-cache.php maintenance.php: maintenance.php

Settings

API Enabled: ✔ Force SSL: ✔ Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: ✔

WC Pages

Shop base: #1 - /shop/ Cart: #2 - /cart/ Checkout: #3 - /checkout/ My account: #4 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Shopical Pro Version: 1.2.2 Author URL: https://afthemes.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: shopical-pro/woocommerce/archive-product.php shopical-pro/woocommerce/content-product.php shopical-pro/woocommerce/content-single-product.php shopical-pro/woocommerce/content-widget-reviews.php shopical-pro/woocommerce/single-product.php

Action Scheduler

Complete: 885 Oldest: 2021-02-27 13:51:39 -0500 Newest: 2021-03-30 14:25:53 -0400

Pending: 2 Oldest: 2021-03-30 15:25:53 -0400 Newest: 2021-03-31 13:49:32 -0400

Status report information

Generated at: 2021-03-30 14:39:00 -04:00 `

SteveFeher commented 3 years ago

Anyone have any thoughts on this? Suggestions?

zhongruige commented 3 years ago

Hi @SteveFeher,

Thank you for taking the time to report this. I was unable to reproduce the issue on my end using:

Replication Steps

Screen Shot 2021-04-06 at 11 19 40 AM Screen Shot 2021-04-06 at 11 21 03 AM Screen Shot 2021-04-06 at 11 21 37 AM Screen Shot 2021-04-06 at 11 21 53 AM Screen_Shot_2021-04-06_at_11_23_14_AM

To help further narrow down the issue, I noticed one of the plugins installed is the Gravity Forms PayPal Payments Standard Add-On. It is possible this plugin could be causing a conflict--just to verify, are you seeing this also with that plugin disabled, and are customers using this plugin to pay? Additionally, does it work as expected in Sandbox mode for PayPal or is the issue still occurring (including with the Gravity Forms PayPal plugin disabled)?

Screen Shot 2021-04-06 at 11 15 02 AM

Thanks!

github-actions[bot] commented 3 years ago

As a part of this repository’s maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.

After 7 days with no activity this issue will be automatically be closed.
github-actions[bot] commented 3 years ago

This issue was closed because it has been 14 days with no activity.