Forum

Thread tagged as: Problem, PayPal

Perch PayPal Shop - Suddenly Not Working

Hi guys,

We put a site live that was using the Perch PayPal Shop App recently, and the checkout has suddenly stopped functioning.

It was working a couple of days ago (11th September is the last confirmed order), but now when you go to add a product to cart, it redirects you to PayPal (as expected), but then reports that "Your Cart is Empty".

To our knowledge, nothing has changed on the site since we put it live around the 7th of September - does anyone know of any reason that this has fallen over?

Thanks, Harry

EDIT: Forgot my diagnostics report, if it helps:

Perch: 2.8.31, PHP: 5.4.13, MySQL: 5.5.30, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_shop_paypal (1.2.3), perch_forms (1.8.3), perch_blog (5.0), perch_comments (1.2), perch_members (1.5), perch_twitter (3.5.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_twitter', 'perch_forms', 'perch_comments', 'perch_shop_paypal' );
PERCH_LOGINPATH: /cms
PERCH_PATH: /var/www/vhosts/activegloucestershire.org/httpdocs/cms
PERCH_CORE: /var/www/vhosts/activegloucestershire.org/httpdocs/cms/core
PERCH_RESFILEPATH: /var/www/vhosts/activegloucestershire.org/httpdocs/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
REQUEST_URI: /cms/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/activegloucestershire.org/httpdocs
HTTP_HOST: www.activegloucestershire.org
Harry Ray

Harry Ray 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Something will have changed, code can't self destruct :) So either that is on your server, or at the PayPal end or the data being sent is different but you will need to figure out what happened to make it stop working.

Is it working in your development environment?

Hi Rachel,

Sure - But as far as the timestamps on the server go, and as far as us making any changes - nothing!

I've logged in and checked the IPN URL specified inside the client's PayPal account, and that's still correct.

Nope, not working in development either!

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If it isn't working in development you can turn on debug and start to step through the process to isolate what is happening. So that would be the first thing to do.

Okay - thanks!

Do you have any idea at this stage of what might have caused this?

I can see that PayPal has gone through a look-and-feel type change since we launched the site, I'm not sure if that update had any technical implications but I take it that an update on the PayPal side of things could have caused this issue?

EDIT - Perch Debug Output

I'm not really finding anything in the debug output - there are two unrelated errors, but they would have been present since launch.

Debug Message
[1] SELECT * FROM perch2_pages WHERE pagePath='/training-and-courses/product.php' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[6] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/training-and-courses/product.php' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='social links' AND (regionPage='/training-and-courses/product.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=50 AND idx.itemRev=13)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/_social_links.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='admin' LIMIT 1
[4] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=2 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=2 AND p.pagePath='/training-and-courses/product.php' LIMIT 1
[4] Using template: /templates/navigation/item.html
Using template: /templates/search/search-form.html
[26] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/training-and-courses/product.php' LIMIT 1
[1] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-019', '000') ORDER BY pageTreePosition DESC
[7] Using template: /templates/navigation/item.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='mobile' LIMIT 1
[10] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=6 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=6 AND p.pagePath='/training-and-courses/product.php' LIMIT 1
[10] Using template: /templates/navigation/item.html
[1] SELECT pageID, pageParentID, pageDepth, pageTreePosition FROM perch2_pages WHERE pagePath='/training-and-courses/product.php' OR pageSortPath='/training-and-courses/product.php' LIMIT 1
[nil] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageTreePosition LIKE '000-019%' AND pageDepth >=1 AND pageDepth<=4 ORDER BY pageTreePosition ASC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='sidebar widgets' AND (regionPage='/training-and-courses/product.php' OR regionPage='*')
[nil] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=726 AND idx.itemRev=0)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Using template: /templates/content/_sidebar_widgets.html
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/training-and-courses/product.php' OR pageSortPath='/training-and-courses/product.php' LIMIT 1
[nil] SELECT * FROM perch2_pages WHERE pageHidden=0 AND pageNew=0 AND pageTreePosition IN ('000-019', '000') ORDER BY pageTreePosition
[] Using template: /templates/navigation/breadcrumbs.html
[nil] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='page subheading' AND (regionPage='/training-and-courses/product.php' OR regionPage='*')
No matching content regions found. Check region name (page subheading) and page path options.
[nil] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE idx.regionID IS NULL AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Using template: /templates/content/_page_subheading.html
[37] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT p.* FROM perch2_shop_products p WHERE productStatus='Live' AND productSlug='first-aid'
Array
(
    [0] => Array
        (
            [productID] => 15
            [productCode] => FirstAid18/9/16
            [productTitle] => First aid
            [productSlug] => first-aid
            [productDescRaw] => 
            [productDescHTML] => 
            [productDynamicFields] => {"date":null,"productImage":null}
            [productStatus] => Live
            [productCount] => 9
            [productPrice] => 65.00
            [productCourse] => 18
            [productDate] => 
            [isFinished] => 0
            [dateDate] => 2016-09-18
            [coursedateDate] => 2016-07-31 00:00:00
        )

)
[nil] SELECT optionID, optionKey, optionValues FROM perch2_shop_product_options WHERE productID = 15
[] Using template: /templates/shop/product_options.html
[1] Using template: /templates/shop/product.html
[nil] SELECT c.* FROM perch2_shop_categories c, perch2_shop_products_to_categories p2c WHERE c.categoryID=p2c.categoryID AND p2c.productID='15'
[37] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[nil] SELECT c.categoryID, c.categoryTitle, c.categorySlug, COUNT(p2c.productID) AS qty FROM perch2_shop_categories c, perch2_shop_products_to_categories p2c, perch2_shop_products p WHERE p2c.categoryID=c.categoryID AND p2c.productID=p.productID AND p.productStatus='Live' GROUP BY c.categoryID ORDER BY c.categoryTitle ASC
[] Using template: /templates/shop/category_link.html
Array
(
    [type] => 8
    [message] => Use of undefined constant mobile - assumed 'mobile'
    [file] => /var/www/vhosts/thirdfloordigital.net/ag.thirdfloordigital.net/inc/header.php
    [line] => 125
)
Rachel Andrew

Rachel Andrew 394 points
Perch Support

No I don't have any ideas - things don't just stop working, something has changed. So we'll need more information - unfortunately when working with a third party like PayPal you will have to do some detective work.

Hi all,

It's started working again this morning, according to the client.

Thanks for the help.