Forum

Thread tagged as: Question, Shop

Payment Failed PayPal

My payments keep failing and not sure why

Payment failed
2.8573  0.0006  
Omnipay\PayPal\Message\Response Object
(
    [request:protected] => Omnipay\PayPal\Message\ExpressCompletePurchaseRequest Object
        (
            [liveEndpoint:protected] => https://api-3t.paypal.com/nvp
            [testEndpoint:protected] => https://api-3t.sandbox.paypal.com/nvp
            [parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
                (
                    [parameters:protected] => Array
                        (
                            [username] => paypaltest_api1.designthebox.co.uk
                            [password] => VFMZM2HQX92GSKWB
                            [signature] => ASyonluZdnNUQ-jstYWn6uwEVPygA1qQGicydFrH4.iFXXcJeQYqtWhp
                            [testMode] => 1
                            [solutionType] => Sole
                            [landingPage] => Billing
                            [brandName] => 
                            [headerImageUrl] => 
                            [logoImageUrl] => 
                            [borderColor] => 
                            [token] => EC-5DT74923CC0021723
                            [payerID] => CJKVLXCQNVYLG
                            [amount] => 15.00
                            [currency] => GBP
                            [transactionReference] => 158
                        )

                )

            [httpClient:protected] => Guzzle\Http\Client Object
                (
                    [defaultHeaders:protected] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                )

                        )

                    [userAgent:protected] => Guzzle/3.9.3 curl/7.41.0 PHP/5.6.22
                    [config:Guzzle\Http\Client:private] => Guzzle\Common\Collection Object
                        (
                            [data:protected] => Array
                                (
                                    [curl.options] => Array
                                        (
                                            [78] => 60
                                            [10065] => /var/sites/s/slbs.org.uk/public_html/perch/addons/apps/perch_shop/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
                                            [64] => 1
                                            [81] => 2
                                        )

                                )

                        )

                    [baseUrl:Guzzle\Http\Client:private] => 
                    [curlMulti:Guzzle\Http\Client:private] => Guzzle\Http\Curl\CurlMultiProxy Object
                        (
                            [handles:protected] => Array
                                (
                                    [0] => Guzzle\Http\Curl\CurlMulti Object
                                        (
                                            [multiHandle:protected] => Resource id #169
                                            [requests:protected] => Array
                                                (
                                                )

                                            [handles:protected] => SplObjectStorage Object
                                                (
                                                    [storage:SplObjectStorage:private] => Array
                                                        (
                                                        )

                                                )

                                            [resourceHash:protected] => Array
                                                (
                                                )

                                            [exceptions:protected] => Array
                                                (
                                                )

                                            [successful:protected] => Array
                                                (
                                                )

                                            [multiErrors:protected] => Array
                                                (
                                                    [1] => Array
                                                        (
                                                            [0] => CURLM_BAD_HANDLE
                                                            [1] => The passed-in handle is not a valid CURLM handle.
                                                        )

                                                    [2] => Array
                                                        (
                                                            [0] => CURLM_BAD_EASY_HANDLE
                                                            [1] => An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
                                                        )

                                                    [3] => Array
                                                        (
                                                            [0] => CURLM_OUT_OF_MEMORY
                                                            [1] => You are doomed.
                                                        )

                                                    [4] => Array
                                                        (
                                                            [0] => CURLM_INTERNAL_ERROR
                                                            [1] => This can only be returned if libcurl bugs. Please report it to us!
                                                        )

                                                )

                                            [selectTimeout:protected] => 1
                                            [eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
                                                (
                                                    [listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                                        (
                                                        )

                                                    [sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                            [groups:protected] => Array
                                (
                                )

                            [queued:protected] => Array
                                (
                                )

                            [maxHandles:protected] => 3
                            [selectTimeout:protected] => 1
                            [eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
                                (
                                    [listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                        (
                                        )

                                    [sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                        (
                                        )

                                )

                        )

                    [uriTemplate:Guzzle\Http\Client:private] => Guzzle\Parser\UriTemplate\UriTemplate Object
                        (
                            [template:Guzzle\Parser\UriTemplate\UriTemplate:private] => 
                            [variables:Guzzle\Parser\UriTemplate\UriTemplate:private] => 
                            [regex:Guzzle\Parser\UriTemplate\UriTemplate:private] => /\{([^\}]+)\}/
                        )

                    [requestFactory:protected] => Guzzle\Http\Message\RequestFactory Object
                        (
                            [methods:protected] => Array
                                (
                                    [getInstance] => 0
                                    [__construct] => 1
                                    [fromMessage] => 2
                                    [fromParts] => 3
                                    [create] => 4
                                    [cloneRequestWithMethod] => 5
                                    [applyOptions] => 6
                                    [visit_headers] => 7
                                    [visit_body] => 8
                                    [visit_allow_redirects] => 9
                                    [visit_auth] => 10
                                    [visit_query] => 11
                                    [visit_cookies] => 12
                                    [visit_events] => 13
                                    [visit_plugins] => 14
                                    [visit_exceptions] => 15
                                    [visit_save_to] => 16
                                    [visit_params] => 17
                                    [visit_timeout] => 18
                                    [visit_connect_timeout] => 19
                                    [visit_debug] => 20
                                    [visit_verify] => 21
                                    [visit_proxy] => 22
                                    [visit_cert] => 23
                                    [visit_ssl_key] => 24
                                )

                            [requestClass:protected] => Guzzle\Http\Message\Request
                            [entityEnclosingRequestClass:protected] => Guzzle\Http\Message\EntityEnclosingRequest
                        )

                    [eventDispatcher:protected] => Symfony\Component\EventDispatcher\EventDispatcher Object
                        (
                            [listeners:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                    [request.sent] => Array
                                        (
                                            [100] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => onRequestSent
                                                        )

                                                )

                                        )

                                    [request.clone] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                    [request.before_send] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [0] => Guzzle\Http\RedirectPlugin Object
                                                                (
                                                                    [defaultMaxRedirects:protected] => 5
                                                                )

                                                            [1] => cleanupRequest
                                                        )

                                                )

                                        )

                                )

                            [sorted:Symfony\Component\EventDispatcher\EventDispatcher:private] => Array
                                (
                                )

                        )

                )

            [httpRequest:protected] => Symfony\Component\HttpFoundation\Request Object
                (
                    [attributes] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [request] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [query] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [token] => EC-5DT74923CC0021723
                                    [PayerID] => CJKVLXCQNVYLG
                                )

                        )

                    [server] => Symfony\Component\HttpFoundation\ServerBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [AUTH_TYPE] => Basic
                                    [DOCUMENT_ROOT] => /var/sites/s/slbs.org.uk/public_html
                                    [GATEWAY_INTERFACE] => CGI/1.1
                                    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                                    [HTTP_ACCEPT_ENCODING] => gzip, deflate, sdch
                                    [HTTP_ACCEPT_LANGUAGE] => en-GB,en-US;q=0.8,en;q=0.6
                                    [HTTP_CACHE_CONTROL] => max-age=0
                                    [HTTP_CONNECTION] => close
                                    [HTTP_COOKIE] => p_m=bc530945a249f09697eea037a96a0c34577430bb; cmsa=1; _gat=1; PHPSESSID=d39328737c5a5e99c17834e501738a4a; _ga=GA1.3.1096752691.1470473443
                                    [HTTP_HOST] => slbs.org.uk
                                    [HTTP_UPGRADE_INSECURE_REQUESTS] => 1
                                    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
                                    [HTTP_X_FORWARDED_FOR] => 94.192.120.84
                                    [PATH] => /bin
                                    [PHP_AUTH_PW] => Oscar@2014
                                    [PHP_AUTH_USER] => TheBox
                                    [QUERY_STRING] => token=EC-5DT74923CC0021723&PayerID=CJKVLXCQNVYLG
                                    [REDIRECT_QUERY_STRING] => token=EC-5DT74923CC0021723&PayerID=CJKVLXCQNVYLG
                                    [REDIRECT_STATUS] => 200
                                    [REDIRECT_URL] => /shop/thankyou
                                    [REMOTE_ADDR] => 94.192.120.84
                                    [REMOTE_PORT] => 43963
                                    [REMOTE_USER] => TheBox
                                    [REQUEST_METHOD] => GET
                                    [REQUEST_URI] => /shop/thankyou?token=EC-5DT74923CC0021723&PayerID=CJKVLXCQNVYLG
                                    [SCRIPT_FILENAME] => /var/sites/s/slbs.org.uk/public_html/shop/thankyou.php
                                    [SCRIPT_NAME] => /shop/thankyou.php
                                    [SERVER_ADDR] => 10.168.1.173
                                    [SERVER_ADMIN] => you@example.com
                                    [SERVER_NAME] => slbs.org.uk
                                    [SERVER_PORT] => 80
                                    [SERVER_PROTOCOL] => HTTP/1.1
                                    [SERVER_SIGNATURE] => 
                                    [SERVER_SOFTWARE] => Apache
                                    [PHP_SELF] => /shop/thankyou.php
                                    [REQUEST_TIME_FLOAT] => 1470476364.77
                                    [REQUEST_TIME] => 1470476364
                                    [argv] => Array
                                        (
                                            [0] => token=EC-5DT74923CC0021723&PayerID=CJKVLXCQNVYLG
                                        )

                                    [argc] => 1
                                )

                        )

                    [files] => Symfony\Component\HttpFoundation\FileBag Object
                        (
                            [parameters:protected] => Array
                                (
                                )

                        )

                    [cookies] => Symfony\Component\HttpFoundation\ParameterBag Object
                        (
                            [parameters:protected] => Array
                                (
                                    [p_m] => bc530945a249f09697eea037a96a0c34577430bb
                                    [cmsa] => 1
                                    [_gat] => 1
                                    [PHPSESSID] => d39328737c5a5e99c17834e501738a4a
                                    [_ga] => GA1.3.1096752691.1470473443
                                )

                        )

                    [headers] => Symfony\Component\HttpFoundation\HeaderBag Object
                        (
                            [headers:protected] => Array
                                (
                                    [accept] => Array
                                        (
                                            [0] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                                        )

                                    [accept-encoding] => Array
                                        (
                                            [0] => gzip, deflate, sdch
                                        )

                                    [accept-language] => Array
                                        (
                                            [0] => en-GB,en-US;q=0.8,en;q=0.6
                                        )

                                    [cache-control] => Array
                                        (
                                            [0] => max-age=0
                                        )

                                    [connection] => Array
                                        (
                                            [0] => close
                                        )

                                    [cookie] => Array
                                        (
                                            [0] => p_m=bc530945a249f09697eea037a96a0c34577430bb; cmsa=1; _gat=1; PHPSESSID=d39328737c5a5e99c17834e501738a4a; _ga=GA1.3.1096752691.1470473443
                                        )

                                    [host] => Array
                                        (
                                            [0] => slbs.org.uk
                                        )

                                    [upgrade-insecure-requests] => Array
                                        (
                                            [0] => 1
                                        )

                                    [user-agent] => Array
                                        (
                                            [0] => Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
                                        )

                                    [x-forwarded-for] => Array
                                        (
                                            [0] => 94.192.120.84
                                        )

                                    [php-auth-user] => Array
                                        (
                                            [0] => TheBox
                                        )

                                    [php-auth-pw] => Array
                                        (
                                            [0] => Oscar@2014
                                        )

                                    [authorization] => Array
                                        (
                                            [0] => Basic VGhlQm94Ok9zY2FyQDIwMTQ=
                                        )

                                )

                            [cacheControl:protected] => Array
                                (
                                    [max-age] => 0
                                )

                        )

                    [content:protected] => 
                    [languages:protected] => 
                    [charsets:protected] => 
                    [encodings:protected] => 
                    [acceptableContentTypes:protected] => 
                    [pathInfo:protected] => 
                    [requestUri:protected] => 
                    [baseUrl:protected] => 
                    [basePath:protected] => 
                    [method:protected] => 
                    [format:protected] => 
                    [session:protected] => 
                    [locale:protected] => 
                    [defaultLocale:protected] => en
                )

            [response:protected] => Omnipay\PayPal\Message\Response Object
 *RECURSION*
            [zeroAmountAllowed:protected] => 1
            [negativeAmountAllowed:protected] => 
        )

    [data:protected] => Array
        (
            [TOKEN] => EC-5DT74923CC0021723
            [SUCCESSPAGEREDIRECTREQUESTED] => false
            [TIMESTAMP] => 2016-08-06T09:39:27Z
            [CORRELATIONID] => 121019f095e61
            [ACK] => Failure
            [VERSION] => 119.0
            [BUILD] => 000000
            [L_ERRORCODE0] => 10001
            [L_SHORTMESSAGE0] => Internal Error
            [L_LONGMESSAGE0] => Internal Error
            [L_SEVERITYCODE0] => Error
        )

)
Anthony Elleray

Anthony Elleray 2 points

  • 5 years ago

My payment page is

<?php include('../../perch/runtime.php'); ?>
<?php
if (perch_member_logged_in()) {

  // your 'success' return URL
  $return_url = 'https://slbs.org.uk/shop/thankyou';
  $cancel_url = 'https://slbs.org.uk/';

  perch_shop_checkout('paypal-express', [
    'return_url' => $return_url,
    'cancel_url' => $cancel_url,
  ]);
}
?>
<html>
<head>
</head>
<body>
<p>Please log in:</p>
<p><a href="register-login.php">Login or register here</a></p>
</body>
</html>

My Thank You page is

<?php include('../perch/runtime.php');?>
<?php perch_shop_complete_payment('paypal-express'); ?>
<?php perch_layout('header'); ?>
<?php perch_content('Title Image'); ?>
<div id="caption-pager" class="caption-pager">
    <?php perch_layout('pager'); ?>
</div>
<div class="row">
<?php
if (perch_shop_order_successful()) {
    echo '<h1>Thank you for your order!</h1>';
    perch_form('photoComp.html');
}else{
    echo '<h1>Sorry Your Payment Has Failed!</h1>';
} ?>
</div>
<?php perch_layout('footer'); ?>

Just tried a live transaction and it said payment failed when it actually took the money

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report - we need this with each post to the forum.

Perch: 2.8.31
Production mode: (PERCH_DEVELOPMENT)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_events (1.9.2), perch_forms (1.8.3), perch_gallery (2.8.6), perch_shop_orders (1.0.4), perch_shop_products (1.0.4), perch_shop (1.0.6), dtb_widget (1), perch_members (1.5)
DB driver: PDO
DB tables: TEMP_content_index (28702), TEMP_content_items (788), perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (188), perch2_blog_posts (6), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (3), perch2_category_counts (2), perch2_category_sets (2), perch2_collection_index (0), perch2_collection_items (0), perch2_collection_revisions (0), perch2_collections (0), perch2_content_index (66294), perch2_content_items (28180), perch2_content_regions (76), perch2_events (2), perch2_events_categories (0), perch2_events_to_categories (0), perch2_forms (4), perch2_forms_responses (24), perch2_gallery_albums (6), perch2_gallery_image_versions (1105), perch2_gallery_images (187), perch2_members (2), perch2_members_forms (1), perch2_members_member_tags (1), perch2_members_sessions (3), perch2_members_tags (2), perch2_my_sample_things (1), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (0), perch2_page_templates (3), perch2_pages (33), perch2_resource_log (1923), perch2_resource_tags (33), perch2_resources (501), perch2_resources_to_tags (174), perch2_settings (45), perch2_shop_addresses (266), perch2_shop_admin_index (32), perch2_shop_brands (1), perch2_shop_cart (188), perch2_shop_cart_data (141), perch2_shop_cart_items (31), perch2_shop_countries (250), perch2_shop_currencies (152), perch2_shop_customers (93), perch2_shop_emails (1), perch2_shop_index (150), perch2_shop_option_values (0), perch2_shop_options (0), perch2_shop_order_items (178), perch2_shop_order_promotions (0), perch2_shop_order_statuses (9), perch2_shop_orders (169), perch2_shop_orders_meta (1), perch2_shop_product_files (0), perch2_shop_product_option_values (0), perch2_shop_product_options (0), perch2_shop_product_tags (1), perch2_shop_products (2), perch2_shop_promotions (0), perch2_shop_search (2), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (2), perch2_shop_shippings (1), perch2_shop_tax_exhibits (196), perch2_shop_tax_group_rates (1), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (0), perch2_shop_variants (0), perch2_user_passwords (0), perch2_user_privileges (83), perch2_user_role_privileges (26), perch2_user_roles (3), perch2_users (4), test (978)
Users: 4
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_gallery',
        'perch_blog',
        'perch_forms',
        'perch_events',
        'perch_members',
        'perch_shop',
    );
Scheduled tasks for perch_events: update_category_counts (60 mins)
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: d610bd92b4b53420b51dff0510717d8a
L1: 8aaf6197ad304579a1a14d169fb78c32
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ef8200
content_singlePageEdit: 1
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.18: done
latest_version: 2.8.15
on_sale_version: 2.8.31
perch_gallery_update: 2.8.5
perch_blog_update: 5.0.1
perch_blog_post_url: /blog/{postSlug}
headerScheme: dark
perch_gallery_bucket_mode: single
perch_gallery_bucket: default
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 1
hide_pwd_reset: 1
content_hideNonEditableRegions: 1
content_frontend_edit: 0
perch_gallery_basicUpload: 0
perch_blog_comment_notify: 0
logoPath: /perch/resources/logo.png
siteURL: /
perch_blog_site_name: Swanage Lifeboats Online - Blog
perch_events_update: 1.8
update_2.8.24: done
perch_events_detail_url: /events/{eventSlug}
helpURL: https://designthebox.co.uk
update_2.8.26: done
update_2.8.29: done
update_2.8.31: done
update_runway_2.8.31: done
perch_shop_update: 1.0.6
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: exc
perch_shop_site_url: https://
perch_shop_product_url: /shop/products/{slug}
perch_shop_default_currency: 47
perch_shop_reporting_currency: 47
perch_shop_invoice_number_format: Invoice%d
perch_members_update: 1.4
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_PRODUCTION_MODE: PERCH_DEVELOPMENT
PERCH_DB_USERNAME: slbsorgu_slbs
PERCH_DB_SERVER: 10.169.0.109
PERCH_DB_DATABASE: slbsorgu_slbs
PERCH_DB_PREFIX: perch2_
PERCH_DEBUG: 1
PERCH_EMAIL_FROM: automailer@swanagelifeboat.org.uk
PERCH_EMAIL_FROM_NAME: Swanage Lifeboat
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: mail3.gridhost.co.uk
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_SECURE: ssl
PERCH_EMAIL_PORT: 465
PERCH_EMAIL_USERNAME: automailer@swanagelifeboat.org.uk
PERCH_TZ: UTC
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/sites/s/slbs.org.uk/public_html/perch
PERCH_CORE: /var/sites/s/slbs.org.uk/public_html/perch/core
PERCH_RESFILEPATH: /var/sites/s/slbs.org.uk/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_UNDO_BUFFER: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/sites/s/slbs.org.uk/public_html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
PERCH_SHOP_VERSION: 1.0.6
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.6.22
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.7.13
Free disk space: 23.30 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, mssql, standard, mysql, mysqlnd, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, memcached, memcache, mhash, ionCube Loader, Zend Guard Loader
GD: Yes
ImageMagick: No
PHP max upload size: 100M
PHP max form post size: 100M
PHP memory limit: 128M
Total max uploadable file size: 100M
Resource folder writeable: Yes
Session timeout: 240 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
AUTH_TYPE: Basic
DOCUMENT_ROOT: /var/sites/s/slbs.org.uk/public_html
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.8,en;q=0.6
HTTP_CONNECTION: close
HTTP_COOKIE: p_m=bc530945a249f09697eea037a96a0c34577430bb; cmsa=1; _ga=GA1.3.1096752691.1470473443; PHPSESSID=a556aa27b577e5256fdb1e753be6e325
HTTP_HOST: slbs.org.uk
HTTP_REFERER: https://slbs.org.uk/perch/core/settings/diagnostics/
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
HTTP_X_FORWARDED_FOR: 94.192.120.84
PATH: /bin
PHP_AUTH_PW: Oscar@2014
PHP_AUTH_USER: TheBox
QUERY_STRING: extended
REDIRECT_STATUS: 200
REMOTE_ADDR: 94.192.120.84
REMOTE_PORT: 58043
REMOTE_USER: TheBox
REQUEST_METHOD: GET
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /var/sites/s/slbs.org.uk/public_html/perch/core/settings/diagnostics/index.php
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SERVER_ADDR: 10.168.1.173
SERVER_ADMIN: you@example.com
SERVER_NAME: slbs.org.uk
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Apache
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1470482587.88
REQUEST_TIME: 1470482587
argc: 1

i have the same issue on two websites

they all worked 28th July

i then went on holiday

come back and there not working yet no files have changed

could it be PayPal

just tried a shop that has been live for months and has been un touched and i get the same issue

Just changed the payment gateway to stripe and worked perfectly sit its a issue with paypal and not the process

Any Update on this ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Update on what? I thought you'd solved your issue from your last message.

Not really

PayPal is still not working for me always says payment failed

Drew McLellan

Drew McLellan 2638 points
Perch Support

So you're not now using Stripe?

no i just switched to stripe to test if it was my code causing the error

even tried another paypal sandbox account and same error

just re-downloaded perch_shop and perch and overwrite the files to see if that helped with no luck

just randomly started working again yet i haven't changed any files

i think it was a issue paypal end and they just fixed it

Keeps failing again

its been working constantly without issues now starts to fail again

but absolutely nothing has changed

Fatal error: Call to a member function to_array() on boolean in /var/sites/s/slbs.org.uk/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Order.class.php on line 307

this is displayed after checkout on a blank page

if i refresh i then get the thankyou page

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If it is failing completely randomly then we are not in a position to help, you'll need to figure out under what conditions it fails. If you then believe there is something that we could be doing to mitigate that issue let us know, right now it doesn't sound like a Perch issue.

is it likely to be a paypal issue ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The first issue is, yes.

This new issue is a problem with how members are being recorded against the order. What can you tell us about your process there?

  • Step one is add product to basket

  • Basket is standard just with a checkout button added

<a href="/shop/checkout" class="add-to-cart button">Checkout Now</a>

Checkout has standard customer_create_passwordless with

next="/shop/checkout/payment">

added to the top

you then go to the payment page

<?php include('../../perch/runtime.php'); ?>
<?php
if (perch_member_logged_in()) {

  // your 'success' return URL
  $return_url = 'https://slbs.org.uk/shop/thankyou';
  $cancel_url = 'https://slbs.org.uk/';

  perch_shop_checkout('paypal-express', [
    'return_url' => $return_url,
    'cancel_url' => $cancel_url,
  ]);
}
?>
<html>
<head>
</head>
<body>
<p>Please log in:</p>
<p><a href="register-login.php">Login or register here</a></p>
</body>
</html>

then paypal

then thank you page

<?php include('../perch/runtime.php');?>
<?php perch_shop_complete_payment('paypal-express'); ?>
<?php perch_layout('header'); ?>
<?php perch_content('Title Image'); ?>
<div id="caption-pager" class="caption-pager">
    <?php perch_layout('pager'); ?>
</div>
<div class="row">
<?php
if (perch_shop_order_successful()) {
    echo '<h1>Thank you for your order!</h1>';
    perch_form('photoComp.html');
}else{
    echo '<h1>Sorry Your Payment Has Failed!</h1>';
} ?>
</div>
<?php perch_layout('footer'); ?>

when i get the error

Fatal error: Call to a member function to_array() on boolean in /var/sites/s/slbs.org.uk/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Order.class.php on line 307

then refresh the page the checkout is successful

if i dont get that error its a payment failed

if the whole thing is paypal i understand its not for you to fix just getting frustrated as this is for a a lifeboat websites photo comp that should be running this weekend and had nothing but issues with the checkout process

what makes me think the first issue is paypal is because its not just this website its happening to i have 3 others that i get the same payment failed error

but have not seen any other members on the forum reporting paypal issues