Paypal error: Could not retrieve order
-
Similar error as others have reported. Have tested on Firefox 115.0.3 and Chrome ?115.0.5790.110?
Could not retrieve order. Maybe it was already completed or this browser is not supported. Please check your email or try again with a different browser.The page I need help with: [log in to see the link]
-
Hi @graphikeye
Your checkout page doesn’t work correctly and as a result, it doesn’t enqueue the PayPal button script. So the “Place order” button remains visible and causes the error you mentioned: https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Common-errors#could-not-retrieve-order
The form fields also look messed up on your checkout page, as if this checkout page was built with a third-party plugin. However, PayPal Payments only supports checkout pages that use the
[woocommerce_checkout]
shortcode.So I suggest performing a conflict test as described here: https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Advanced-Troubleshooting#test-on-staging
And if the problem persists with only WooCommerce, PayPal Payments, and the Storefront theme, I suggest creating a new checkout page with the regular checkout shortcode as described here: https://woocommerce.com/document/woocommerce-shortcodes/#how-to-use-shortcodes
I hope this helps!
Kind regards,
NiklasThe check-out page only has the woocommerce shortcode. I’ll trouble shoot the other tips you posted and follow up. Thanks.
- This reply was modified 1 year, 4 months ago by graphikeye.
I just tried it in the troubleshoot mode, same error:
https://postimg.cc/phPqBpwgAll plugins are disabled except paypal and woocommerce.
Going to try switching the theme.I’ve also replaced the check-out page with a new one and added the shortcode. The problem persists, but now I can’t redirect the “Proceed to Check-out to new page” either
I’ve updated Bootstrap to the latest version. The forms look ok now, but the paypal checkout problem persists.
We’re also getting the same issue.
When clicking between payment methods we get the following errors in the console:
Error #1: unhandled_error
Which is then returning an inner value of “err”: “can’t access property \”nodeType\”, o.parentNode is null\nZd</</e<@https://www.paypal.com/sdk/js?client-“… etcError #2: Uncaught TypeError: can’t access property “nodeType”, o.parentNode is null
@stephenatwaters to me it seems like you are getting a completely different error than what I posted. Would you mind starting a separate thread for your issue? My issue pertains to a specific error with the paypal button processing.
Hi @graphikeye
Yes, the fields on the Checkout page look better now. But for some reason, the
button.js
script still is not enqueued. When this file is not loaded, the “Place order” button is not hidden, and the PayPal smarts buttons won’t load.So the PayPal gateway does not work unless this file is loaded.
Such behavior most often could be caused by third-party plugins (e.g. caching or minification).
If the behavior persists with the Storefront theme and only WooCommerce and PayPal Payments active, I suggest navigating to the PayPal Payments settings and clearing theHide Funding Source(s)
field in the Standard Payments settings tab, and then saving the settings.Please let us know how that works out for you. If the problem persists, I suggest contacting the support team with a copy of your system report, which you can access from here:
WooCommerce > Status > Get system report > Copy for support
You can share the report with us either here in the forums or privately?from here, if you prefer. If sending privately, please include a link to this thread for context. Thank you!@stephenatwaters Unless you are using the same hosting, exactly the same plugin setup, and the same settings, your issue is unlikely to be related to the one reported in this thread. Please create a separate thread for yourself so our team can provide appropriate assistance. Thank you!
Kind regards,
NiklasCould you tell me a little more about button.js? Is that part of woocommerce? I’m scrubbing the dirs to locate it and add it to the functions.php and try to force load it. Otherwise I’ll try the other route you mentioned.
Also, the place order button is visible:
https://postimg.cc/sBRzxT73Hi @graphikeye
The
button.js
script is enqueued by the PayPal Payments plugin. It is located in this directory of the plugin:modules/ppcp-button/resources/js/button.js
This script performs several tasks, including hiding the regular “Place order” button and replacing it with the PayPal smart buttons. You can find more details about the behavior you encounter here: https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Common-errors#could-not-retrieve-order
Also, the place order button is visible:
https://postimg.cc/sBRzxT73That’s the problem. Because the “Place order” button technically does not work, as it cannot initiate the PayPal JavaScript checkout flow.
We need to find out why the button script is not loading, as this prevents the PayPal payment process from working on your site.
Unfortunately, there could be many possible causes for such behavior.In some instances, it may be caching/script minification, in others, it may be a console JavaScript error disrupting the JavaScript code execution on the site, or in other cases, it may be a problem on the client site, e.g., by having JavaScript disabled in the browser.
That’s also why you may find a lot of other reports about the “Could not retrieve order” error, but the cause for it is a different one in most cases.We can best judge the possible cause for this on your site when we know some more details, e.g. with a WooCommerce system report.
Kind regards,
NiklasClearing this allows purchases to go through:
“clearing theHide Funding Source(s)
“So for now that’s ok. I will attach a copy of the report so we can investigate further because it would be nice to get the button.js working in good order.
` ### WordPress Environment ### WordPress address (URL): https://www.fireflylanguage.com Site address (URL): https://www.fireflylanguage.com WC Version: 7.9.0 REST API Version: ? 7.9.0 WC Blocks Version: ? 10.4.6 Action Scheduler Version: ? 3.6.1 Log Directory Writable: ? WP Version: 6.2.2 WP Multisite: – WP Memory Limit: ? 40 MB - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.0.29 PHP Post Max Size: 64 MB PHP Time Limit: 50000 PHP Max Input Vars: 5000 cURL Version: 7.64.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.7.38-log Max Upload Size: 64 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 7.9.0 WC Database Prefix: wp_ Total Database Size: 23.52MB Database Data Size: 21.35MB Database Index Size: 2.17MB wp_woocommerce_sessions: Data: 0.02MB + 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.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + 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: 0.02MB + Index: 0.11MB + 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: 0.02MB + Index: 0.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_gla_attribute_mapping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_action_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_field_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_object_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_upgrades: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 5.02MB + Index: 0.09MB + Engine InnoDB wp_postmeta: Data: 1.52MB + Index: 0.11MB + Engine InnoDB wp_posts: Data: 13.06MB + Index: 0.25MB + 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.05MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + 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_yoast_indexable: Data: 0.14MB + Index: 0.08MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 192 custom_css: 4 extb_post_footer: 1 extb_post_header: 2 extb_post_json: 18 extb_post_main: 4 extb_post_sidebar: 2 nav_menu_item: 22 nf_sub: 46 oembed_cache: 9 page: 30 polylang_mo: 2 post: 4 product: 3 revision: 912 shop_order: 9 wp_block: 14 wp_global_styles: 1 wp_navigation: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (9) ### Polylang: by WP SYNTEX – 3.4.4 Akismet Anti-Spam: Spam Protection: by Automattic - Anti Spam Team – 5.2 Health Check & Troubleshooting: by The www.remarpro.com community – 1.6.0 Jetpack: by Automattic – 12.3 Ninja Forms: by Saturday Drive – 3.6.28 WooCommerce Payments: by Automattic – 6.2.1 (update to version 6.2.2 is available) WooCommerce PayPal Payments: by WooCommerce – 2.2.0 WooCommerce Shipping & Tax: by WooCommerce – 2.3.1 WooCommerce: by Automattic – 7.9.0 ### Inactive Plugins (5) ### Better Search Replace: by WP Engine – 1.4.2 Cookie Notice & Compliance for GDPR / CCPA: by Hu-manity.co – 2.4.9 Google Listings and Ads: by WooCommerce – 2.5.0 Hello Dolly: by Matt Mullenweg – 1.7.2 The SEO Framework: by The SEO Framework Team – 4.2.8 ### Must Use Plugins (1) ### Health Check Troubleshooting Mode: by – 1.9.0 ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) 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: ? HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### WC Pages ### Shop base: #2463 - /shop/ Cart: #2465 - /cart/ Checkout: #2482 - /checkout/ My account: #2469 - /my-account/ Terms and conditions: ? Page not set ### Theme ### Name: Fireflylang_theme; Version: (update to version 0 is available) Author URL: Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? Not declared ### Templates ### Overrides: – ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: IT WooCommerce currency supported: ? Advanced Card Processing available in country: ? Pay Later messaging available in country: ? Webhook status: ? PayPal Vault enabled: – ACDC Vault enabled: – Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: – Tracking enabled: ? ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen 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 product-variation-management settings async-product-editor-category-field Daily Cron: ? Next scheduled: 2023-08-03 13:23:01 +01:00 Options: ? Notes: 74 Onboarding: completed ### WooCommerce Payments ### Version: 6.2.1 Connected to WPCOM: Yes Blog ID: 221810328 Account ID: acct_1NZZjaC20knio4Uv ### Action Scheduler ### Complete: 39 Oldest: 2023-07-30 14:24:10 +0100 Newest: 2023-08-03 10:13:47 +0100 Failed: 1 Oldest: 2023-07-30 14:29:44 +0100 Newest: 2023-07-30 14:29:44 +0100 Pending: 1 Oldest: 2023-08-03 15:15:07 +0100 Newest: 2023-08-03 15:15:07 +0100 ### Status report information ### Generated at: 2023-08-03 10:24:23 +01:00
Hi @graphikeye
Thanks for the feedback. I’m glad to hear changing this setting resolved the issue.
There have been a few similar reports in the past and most likely the problem is caused by an invalid initial plugin configuration. However, it is not clear to us how such behavior could be caused as we cannot reproduce it.
In similar cases, users resolved the problem by changing any setting in the Standard payments tab. This may include changing the
Hide Funding Source(s)
or simply changing something else, like the button layout or label.Once the updated settings are saved, and the buttons appear on your Checkout page, it should be fine to tweak the settings according to your preferences.
So normally, it should also be fine to re-insertCredit and debit cards
into theHide Funding Source(s)
setting, if you wish not to prove the black Standard Card Button via PayPal.In essence, we expect this only to be an issue with the initial plugin configuration and it should be working fine once you managed to get the buttons to show.
If you continue to encounter any problems, don’t hesitate to let us know. Thanks!
Kind regards,
NiklasOk, thanks @niklasinpsyde feel free to close the thread.
Happy to help! I hope the team will eventually figure out the cause of this issue to prevent it from happening ??
Don’t hesitate to let us know if there’s anything else we can help with.
Kind regards,
Niklas
- The topic ‘Paypal error: Could not retrieve order’ is closed to new replies.