• Resolved wpdev1888

    (@wpdev1888)


    Hi, we are having issues with woocommerce square payment. Few customers unable to checkout, and the order is failed. Here is the error we receive:

    Square Payment Failed (Status code ACCESS_TOKEN_EXPIRED: The provided OAuth access token has expired. You must renew the access token via the Renew Access Token endpoint.)

    We would like to ask how to solve this and how to prevent this in the future.

    Hope to hear from you.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @wpdev1888

    Thanks for reaching out!

    It seems that the Square connection process is broken for some reason. Can you please try to reconnect under WooCommerce > Settings > Square?

    After that, try a test transaction in Sandbox Mode. Does that work? If so, live transactions should be OK too.

    Otherwise, please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Thanks!

    Thread Starter wpdev1888

    (@wpdev1888)

    Here is the log

    WordPress Environment
    WC Version: 7.2.2
    REST API Version: ?</img></img> 7.2.2
    WC Blocks Version: ?</img></img> 8.9.2
    Action Scheduler Version: ?</img></img> 3.4.0
    Log Directory Writable: ?</img></img>
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 2 GB
    WP Debug Mode: –
    WP Cron: –
    Language: en_US
    External object cache: ?</img></img>
    Server Environment
    
    Server Info: Apache
    PHP Version: 8.0.25
    PHP Post Max Size: 2 GB
    PHP Time Limit: 70
    PHP Max Input Vars: 16384
    cURL Version: 7.29.0
    NSS/3.53.1
    
    SUHOSIN Installed: –
    MySQL Version: 10.5.16-MariaDB
    Max Upload Size: 2 GB
    Default Timezone is UTC: ?</img></img>
    fsockopen/cURL: ?</img></img>
    SoapClient: ?</img></img>
    DOMDocument: ?</img></img>
    GZip: ?</img></img>
    Multibyte String: ?</img></img>
    Remote Post: ?</img></img>
    Remote Get: ?</img></img>
    
    Database
    
    WC Database Version: 7.2.2
    WC Database Prefix: wp_
    Total Database Size: 47.70MB
    Database Data Size: 42.92MB
    Database Index Size: 4.78MB
    wp_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 2.02MB + Index: 1.27MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 1.02MB + Index: 0.55MB + Engine InnoDB
    wp_aws_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_aws_index: Data: 1.05MB + Index: 0.31MB + Engine InnoDB
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_et_divi_ab_testing_stats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 10.17MB + Index: 0.52MB + Engine InnoDB
    wp_postmeta: Data: 5.23MB + Index: 0.56MB + Engine InnoDB
    wp_posts: Data: 22.13MB + Index: 0.36MB + Engine InnoDB
    wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_usermeta: Data: 0.09MB + Index: 0.03MB + Engine InnoDB
    wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_square_customers: Data: 0.17MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    Post Type Counts
    
    acf-field: 1
    acf-field-group: 1
    attachment: 616
    bc_x1379_op_type: 2
    custom_css: 3
    customize_changeset: 5
    et_body_layout: 8
    et_footer_layout: 8
    et_header_layout: 8
    et_pb_layout: 27
    et_template: 8
    et_theme_builder: 1
    nav_menu_item: 10
    page: 29
    pm_insight: 496
    pm_page: 251
    pm_report: 26
    pm_site_change: 7
    post: 3
    product: 90
    revision: 936
    shop_coupon: 5
    shop_order: 23
    
    Security
    
    Secure connection (HTTPS): ?</img></img>
    Hide errors from visitors: ?</img></img>
    
    Active Plugins (13)
    
    Advanced Custom Fields: by WP Engine – 6.0.6
    Advanced Woo Search: by ILLID – 2.70
    Classic Widgets: by WordPress Contributors – 0.3
    Jetpack: by Automattic – 11.6
    Popups for Divi: by divimode.com – 3.0.5
    Redis Object Cache: by Till Krüss – 2.2.2
    Shortcode in Menus: by Gagan Deep Singh – 3.5.1
    Themify - WooCommerce Product Filter: by Themify – 1.3.9
    WooCommerce Shipping & Tax: by WooCommerce – 2.1.1
    WooCommerce Square: by WooCommerce – 3.4.2
    WooCommerce: by Automattic – 7.2.2
    WordPress Importer: by wordpressdotorg – 0.8
    WP Mail SMTP: by WPForms – 3.7.0
    
    Inactive Plugins (4)
    
    Akismet Anti-Spam: by Automattic – 5.0.2
    CDN Enabler: by KeyCDN – 2.0.6
    Variation Swatches for WooCommerce: by Emran Ahmed – 2.0.17
    WPForms Lite: by WPForms – 1.7.9
    
    Dropin Plugins (2)
    
    fatal-error-handler.php: fatal-error-handler.php
    object-cache.php: Redis Object Cache Drop-In
    
    Must Use Plugins (1)
    
    Nexcess Managed Apps: by Nexcess – 1.35.5
    
    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: –
    Enforce Approved Product Download Directories: ?</img></img>
    Order datastore: WC_Order_Data_Store_CPT
    
    WC Pages
    
    Shop base: #10 - /shop/
    Cart: ?</img></img> Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block.
    Checkout: ?</img></img> Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block.
    My account: #13 - /my-account/
    Terms and conditions: ?</img></img> Page not set
    
    Theme
    
    Name: Divi Child
    Version: 1.0.0
    Author URL: https://www.elegantthemes.com
    Child Theme: ?</img></img>
    Parent Theme Name: Divi
    Parent Theme Version: 4.17.4
    Parent Theme Author URL: https://www.elegantthemes.com
    WooCommerce Support: ?</img></img>
    
    Templates
    
    Overrides: /woocommerce/checkout/thankyou.php
    
    Square
    
    Environment: Production
    Tokenization Enabled:
    Debug Mode: Display at Checkout & Log
    
    Admin
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    
    Disabled Features: minified-js
    new-product-management-experience
    settings
    
    Daily Cron: ?</img></img> Next scheduled: 2023-01-10 18:41:44 -05:00
    Options: ?</img></img>
    Notes: 79
    Onboarding: skipped
    
    Action Scheduler
    
    Complete: 7,108
    Oldest: 2022-12-10 05:00:39 -0500
    Newest: 2023-01-10 04:31:45 -0500
    
    Pending: 4
    Oldest: 2023-01-10 04:32:46 -0500
    Newest: 2023-01-16 13:16:32 -0500
    
    Failed: 4
    Oldest: 2022-08-15 16:28:35 -0400
    Newest: 2022-12-06 18:09:33 -0500
    
    Canceled: 5
    Oldest: 2022-12-27 22:10:44 -0500
    Newest: 2023-01-05 21:35:18 -0500
    
    Status report information
    
    Generated at: 2023-01-10 04:32:10 -05:00
    `
    • This reply was modified 2 years, 2 months ago by wpdev1888.
    Thread Starter wpdev1888

    (@wpdev1888)

    Also just to add we already reconnect our squareup account on woocommerce. We just want to check the cause of the disconnection so that we can prevent it. Thanks.

    Plugin Support abwaita a11n

    (@abwaita)

    Hi @wpdev1888!

    Glad to hear that you were able to reconnect, and hopefully that sorted out everything.

    We just want to check the cause of the disconnection so that we can prevent it.

    If a Square API request returns?ACCESS_TOKEN_EXPIRED,?a connection refresh is attempted to generate a new token. Normally, this happens without requiring any action/input from your side.

    However, in this case, it looks like the token couldn’t be refreshed, so a manual reconnection was required, which you’ve now done.

    For now, we could advise that you keep an eye on this and incase it happens repeatedly, please let us know.
    Thanks!

    Thread Starter wpdev1888

    (@wpdev1888)

    Thank you for the help. We really appreciate it.

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    Thank you for the help. We really appreciate it.

    You’re welcome! I’ll go ahead and close this topic for now. Please open a new topic if you need additional assistance.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Square Payment Failed (Status code ACCESS_TOKEN_EXPIRED)’ is closed to new replies.