• Resolved mario.scalabrino

    (@marioscalabrino)


    Hello Woocommerce,

    The paypal standard integration was working but now it is not.

    After successful payment the order is still on hold.

    I used the paypal Simulator and if I use this URL
    https://www.certifydoc.eu/?wc-api=WC_Gateway_Paypal
    “IPN was sent and the handshake was verified”

    In Woocommerce>system status> logs I can see in the paypal log
    05-09-2016 @ 17:46:01 – Generating payment form for order 2387. Notify URL: https://www.certifydoc.eu/wc-api/WC_Gateway_Paypal/

    If I take this new notification URL and I use it with the IPN simulator, doesn’t answer
    https://www.certifydoc.eu/wc-api/WC_Gateway_Paypal/

    What happened? It seems that woocommerce is sending a new Notify URL but it is the old one that works.

    Please help.

    Thank you in advance

    ### WordPress Environment ###
    
    Home URL: https://www.certifydoc.eu
    Site URL: https://www.certifydoc.eu
    WC Version: 2.5.5
    Log Directory Writable: ?
    WP Version: 4.5.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.18 (Ubuntu)
    PHP Version: 5.5.34-1+deb.sury.org~trusty+1
    PHP Post Max Size: 120 MB
    PHP Time Limit: 0
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.49
    Max Upload Size: 100 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    
    ### Active Plugins (25) ###
    
    Polylang: by Frédéric Demarle – 1.9
    Ultimate Addons for Visual Composer: by Brainstorm Force – 3.13.7
    All-in-One WP Migration: by ServMask – 5.41
    TPV Virtual del Banco Sabadell: by Banco Sabadell – 2.0
    EU Cookie Law: by Alex Moss
    Marco Milesi
    Peadig
    Shane Jones – 2.9.2
    
    Google Analytics Dashboard for WP: by Alin Marcu – 4.9.3.1
    I Agree! Popups: by Talisman Solutions – 1.0
    WPBakery Visual Composer: by Michael M - WPBakery.com – 4.11.2
    Log Viewer: by Markus Fischbacher – 14.05.04
    Membership 2: by WPMU DEV – 4.0.0.7
    myCRED: by Gabriel S Merovingi – 1.6.9
    Nav Menu Roles: by Kathy Darling – 1.8.1
    Social Login: by Claude Schlesser – 5.0
    Slider Revolution: by ThemePunch – 5.1.4
    Shortcodes in Menus: by Gagan Deep Singh and Saurabh Shukla – 3.1
    Hyyan WooCommerce Polylang Integration: by Hyyan Abo Fakher – 0.25
    WooCommerce Admin Bar Addition: by David Decker - DECKERWEB – 2.7.0
    WooCommerce - Autocomplete Orders: by Serious Plugins – 1.1.3
    WooCommerce EU VAT Compliance (Free): by David Anderson – 1.10.21
    WooCommerce Stripe Gateway: by WooThemes – 2.6.12
    WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 1.5.31
    WooCommerce PDF Invoices & Packing Slips Premium Templates: by Ewout Fernhout – 2.1.9
    WooCommerce: by WooThemes – 2.5.5
    WooThemes Helper: by WooThemes – 1.6.2
    WP Overnight Sidekick: by Jeremiah Prummer – 1.0.1
    
    ### Settings ###
    
    Force SSL: ?
    Currency: EUR (€)
    Currency Position: right
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #1598 - /en/shop/
    Cart: #1571 - /en/cart/
    Checkout: #1576 - /en/checkout/
    My Account: Page does not contain the shortcode: [woocommerce_my_account]
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Impreza Child
    Version: 1.0
    Author URL: https://us-themes.com/
    Child Theme: ?
    Parent Theme Name: Impreza
    Parent Theme Version: 2.10
    Parent Theme Author URL: https://us-themes.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: Impreza-child/woocommerce/checkout/thankyou.php

    https://www.ads-software.com/plugins/woocommerce/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Settings > Permalinks > Save. Then retry.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    Thank you Mike for your fast response.

    I’ve already tried this; I found it in another thread. Anyway I did it several times now saving multiple times, going back and forth from one permalink to the other but it didn’t work.

    You can see it yourself just by clicking the two URLs, the listener stays the old one. The new one is a 404 error.

    I copy a screenshot of the actual permalink situation, maybe it is useful.
    https://snag.gy/rFcdWu.jpg

    What can I try now? Any idea on how to wake up the new listener?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Do you have any extra rules in your htaccess file?

    wc-api is a standard endpoint we added a while back. Other things rely on it besides paypal.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    In the apache2 website directory root /var/www/html/.htaccess file I have only this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    To make the above work I had to go to the file /ect/apache2/apache2.conf and change AllowOverride from “none” to “FileInfo”

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    #AllowOverride None I have changed this
    AllowOverride FileInfo
    Require all granted
    </Directory>

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    That looks fine.

    Have you done any testing with plugins off/different theme to rule out conflicts? After disabling things, remember to resave permalinks to clean up any problems they are causing.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    I made the testing you suggested and I found the problem.

    It is Polylang plugin. In my configuration it adds ../en/.. or ../es/.. or ../it/.. to every page.

    If I activate again polylang and save permalink I have the same problem because it adds the language info.

    The IPN listener is active at these URLs with Polylang activated.
    https://www.certifydoc.eu/en/wc-api/WC_Gateway_Paypal/
    https://www.certifydoc.eu/es/wc-api/WC_Gateway_Paypal/
    https://www.certifydoc.eu/it/wc-api/WC_Gateway_Paypal/

    Any suggestion? Is there a way to tell woocommerce to add the language, for example /en/?
    Or a way to exclude that page in polylang (I know I should ask polylang for it)?

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    I found two possible solutions, Mike which one do you think is the safest?

    1).The first is to go to functions.php and make a private patch as explained here https://www.ads-software.com/support/topic/polylang-and-woocommerce-paypal-ipn-issue?replies=3

    function custom_rewrite_basic_wc() {
      add_rewrite_rule('^wc\-api/(.+)/?', 'index.php?wc-api=$matches[1]', 'top');
    }
    add_action('init', 'custom_rewrite_basic_wc');

    I didn’t test this though.

    2). The second that worked for me is to go back to the polylang settings settings>languages>settings>url modification (click settings) and click on the check box “Hide URL language information for default language”
    This check box has the effect that only for the default language (in my case /en/) polylang doesn’t add the ../en/.. part.
    Now it works because when paypal send the IPN to the URL given by woocommerce the listener is there at https://www.yourdomain.eu/wc-api/WC_Gateway_Paypal/

    Now I receive the IPN and my orders are updated to completed (not pending payment anymore)

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    The 2nd solution sounds fine. Thanks for sharing.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    Mike, thank you for the great plugin and the prompt support.

    I posted a more detailed explanation of the solution it worked in my case here:
    https://www.ads-software.com/support/topic/polylang-conflicting-with-woocommerce-paypal-checkout?replies=5

    Resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘There is no listener at /wc-apiWC_Gateway_Paypal but works at ?wc-api=WC_Gateway’ is closed to new replies.