Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Paypal Ipn And Google Recaptcha (Addon From Ecom Labs) Stoped Working Rate Topic   - - - - -

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3240 posts

Posted 14 November 2018 - 03:26 PM #41

Thanks for fix. In this thread

 

https://forum.cs-car...m/?fromsearch=1

 

I have pointed that I am getting 302 on

 

on HTTP/2.0

"GET /index.php?dispatch=payment_notification.notify&payment=paypal_express&order_id=XXXX&token=EC-XXXXXXXXXXXXXXX&PayerID=XXXXXXXXXX HTTP/2.0" 302

 

Note that E.Qi.Librium is using 4.3.9 Flow.

 

There are several differences in the file but it appears this is what CSC added to E.Qi.Librium's file /app/Tygh/http.php:

 

Find

    /**
     * Parse response contents to split headers
     * @param  string $content response contents
     * @return string contents without headers
     */
    private static function _parseContent($content)
    {
        while (strpos(ltrim($content), 'HTTP/1') === 0) {
            list(self::$_headers, $content) = preg_split("/(\r?\n){2}/", $content, 2);
        }

        return $content;
    }

Replace:

    /**
     * Parse response contents to split headers
     * @param  string $content response contents
     * @return string contents without headers
     */
    private static function _parseContent($content)
    {
        while (strpos(ltrim($content), 'HTTP/1') === 0) {
            list(self::$_headers, $content) = preg_split("/(\r?\n){2}/", $content, 2);
        }
        
        while (strpos(ltrim($content), 'HTTP/2') === 0) {
            list(self::$_headers, $content) = preg_split("/(\r?\n){2}/", $content, 2);
        }

        return $content;
    }


 
  • mokeshop
  • Senior Member
  • Members
  • Join Date: 27-Jul 12
  • 999 posts

Posted 14 November 2018 - 03:37 PM #42

 

Thanks for fix. In this thread

 

https://forum.cs-car...m/?fromsearch=1

 

I have pointed that I am getting 302 on

 

on HTTP/2.0

"GET /index.php?dispatch=payment_notification.notify&payment=paypal_express&order_id=XXXX&token=EC-XXXXXXXXXXXXXXX&PayerID=XXXXXXXXXX HTTP/2.0" 302

 

 

it seems that the issue has been fixed :

https://forum.cs-car...r-agent-header/



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2260 posts

Posted 14 November 2018 - 03:49 PM #43

 

Note that E.Qi.Librium is using 4.3.9 Flow.

 

There are several differences in the file but it appears this is what CSC added to E.Qi.Librium's file /app/Tygh/http.php:

 

Yep, noticed that. Thanks for pointing out the part that fixes the issue :)


When life hands you lemons, bring on the Tequila baby!


 

Posted 14 November 2018 - 07:31 PM #44

Just found this thread.  I'm experiencing the same paypal issue.  Just applied the patch so I'll let you know if it fixes the problem for me too.


http://www.RacingSolution.com
Performance & Styling Auto Parts
CS-Cart v4.5.2


 

Posted 14 November 2018 - 08:31 PM #45

Thank you everyone for the help/fix with this one!  (And especially CS-Cart Support, "E.Qi.Librium" for the modified Http.php file and "The Tool" for making it super easy to find and copy/paste the updated piece of code)  Well done!
 
Teaching/Learning moment:  Please correct me if I'm wrong, but it seems like changes on the server (in most cases here, the WHM update) caused the cart to no longer recognize and fully respond to the newer network protocol (HTTP/2) being used. While code was needed in the cart to update this issue of course, the problem did originate during the server update. Am I missing anything here? 


 
  • incrize
  • Architect
  • CS-Cart Architects
  • Join Date: 05-Aug 15
  • 14 posts

Posted 15 November 2018 - 10:38 AM #46

Hello,

 

The issue has been fixed, the fix will be included into the next version of CS-Cart
You may want to apply the fix by yourself, since it is available in unified diff format:



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11249 posts

Posted 16 November 2018 - 01:25 AM #47

Yeah, that defect affected Recaptha as well.  Quite surprised that they didn't generate a service pack for that change since it affects so many merchants.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3802 posts

Posted 16 November 2018 - 04:35 AM #48

Yeah, that defect affected Recaptha as well.  Quite surprised that they didn't generate a service pack for that change since it affects so many merchants.

 

These changes will be included in the upcoming CS-Cart 4.9.2


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11249 posts

Posted 16 November 2018 - 06:26 PM #49

That doesn't help the merchants that are caught unaware that Recaptcha and Paypal (and probably other responses that use HTTP/2 headers) will now all fail.  You've released service packs for issues with far less impact.  I had to wait for a customer to report to me to tell me they couldn't checkout or submit a contact-us form.  Not good for business..


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11249 posts

Posted 16 November 2018 - 08:04 PM #50

The issue is that Paypal uses Google API's which now use HTTP/2 headers.  In addition to PayPal, Google Recaptcha is also broken on cs-cart.

 

Cs-cart is making the fix available in the next release of cs-cart but has refused to generate a service pack for the current release or an addon that will apply the fix to older versions of V4 cs-cart.  You can dig out the patch in bugtracker if you know where to look!

 

You can install this free addon that will apply the patch on all sites where the app/Tygh/Http.php file exists.  It is a free addon and after you install it once, you should uninstall it and throw it away.

 

You can install it from the URL or download it to your PC and install it as 'local'.  The addon should patch all V4 sites that utilize the Http.php module.  It will detect if the fix has already been applied or not ans act accordingly.

 

The URL is: https://ez-ms.com/pr...p2_fix_v1.0.zip

 

I find it extremely annoying that cs-cart did not address this issue for all V4 sites by issuing a security patch type of addon release or to notify customers that this issue exists.  It impacts Google Recaptcha as well as PayPal.  Hence if you use Recaptcha on checkout, your users won't be able to even get to paypal.

 

Suggest you install the addon to fix the issue and send cs-cart a nasty-gram for not stepping up to the issue.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2260 posts

Posted 17 November 2018 - 04:59 PM #51

Weird, my recaptcha kept working, but my geolocation add-on did have issues resulting in error messages (couldn't define location or something like that).


When life hands you lemons, bring on the Tequila baby!


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2260 posts

Posted 18 November 2018 - 06:59 AM #52

 

Hello,

 

The issue has been fixed, the fix will be included into the next version of CS-Cart
You may want to apply the fix by yourself, since it is available in unified diff format:

 

 

Tested this fix - had around 60 orders paid with paypal, still 2 stayed on open instead of going to processed.


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11249 posts

Posted 18 November 2018 - 10:46 PM #53

Weird, my recaptcha kept working, but my geolocation add-on did have issues resulting in error messages (couldn't define location or something like that).

 

Could be a regional thing.  I.e. maybe the new API's haven't been rolled out to Europe within Google yet (or at least Google Recaptcha sites)?  Who knows...  

 

I just find it extremely annoying that cs-cart thinks that all they have to do is fix it in an upcoming release.  There are far more cs-cart customer on older releases than there are on the newest.  The issue will affect almost everyone running V4 of cs-cart.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3240 posts

Posted 19 November 2018 - 05:45 AM #54

So whoos fix is better from cs-cart or Tool? I have applied fix from Tool and all seems to be working.


Tested this fix - had around 60 orders paid with paypal, still 2 stayed on open instead of going to processed.



 
  • Aletro
  • Senior Member
  • Members
  • Join Date: 05-Dec 14
  • 215 posts

Posted 19 November 2018 - 06:01 AM #55

Same problem here with open status orders from paypal. Very complicate to manage


www.shankara.it | cs-cart v. 3.0.2

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2260 posts

Posted 19 November 2018 - 09:13 AM #56

So whoos fix is better from cs-cart or Tool? I have applied fix from Tool and all seems to be working.

 

 

I am thinking about going back to the first fix, because I had another 10 or so open orders this morning that were paid :(


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11249 posts

Posted 19 November 2018 - 07:08 PM #57

If you want to patch, use the diff listed in the bugtracker.

If that is outside your capability/desire/interest, use the addon we built.  They both apply the same changes to Http.php.  One get done automaticaly when you install the addon, the other you need to insert the code changes.

 

Note: that the Github fix published by cs-cart is different from the one posted in bugtracker and the one I included in the addon.  the addon was built for those who are not comfortable editing php file and/or who simply wanted a quick and easy way to apply the patch.


Edited by tbirnseth, 19 November 2018 - 07:18 PM.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3240 posts

Posted 20 November 2018 - 04:56 AM #58

I am thinking about going back to the first fix, because I had another 10 or so open orders this morning that were paid :(


What type of paypal u use? Website payments or express checkout?

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2260 posts

Posted 23 November 2018 - 05:00 PM #59

What type of paypal u use? Website payments or express checkout?

 

Express - and I don't know what it is, but there are simply days where some payments stay on open. And then all is well for days, and then suddenly the issue is back again....


When life hands you lemons, bring on the Tequila baby!


 
  • mokeshop
  • Senior Member
  • Members
  • Join Date: 27-Jul 12
  • 999 posts

Posted 25 November 2018 - 09:45 AM #60

yes, its seems that the fix stopped working