pay-now / paynow-woocommerce

WooCommerce Plugin for Paynow
https://paynow.pl
Other
12 stars 7 forks source link

Call to undefined function wc_add_notice() #3

Closed bifera closed 5 years ago

bifera commented 5 years ago

After providing API key & signature key, on saving WooCommerce payments settings, the following error appears:

Uncaught Error: Call to undefined function wc_add_notice() in /public_html/kahawa.pl/wp-content/plugins/woocommerce-gateway-paynow/includes/class-wc-gateway-paynow.php:75

WooCommerce v: 3.7.0

emilleszczak2 commented 5 years ago

Thanks for feedback. I just released new version with fixes: https://github.com/pay-now/paynow-woocommerce/releases/tag/v1.0.2

bifera commented 5 years ago

Hi, thanks for reply. Unfortunately this release does not work on our environment. The plugin is added, activated, API & signature key provided. On last checkout step, after selecting the Paynow payment method and clicking "Buy and pay" button, only an error notice appears:

"Podczas płatności wystąpił błąd. Skontaktuj się z obsługą sklepu lub spróbuj ponownie. "

Is there a way to debug it locally?

this is the system report: `

WordPress Environment

WordPress address (URL): https://kahawa.pl Site address (URL): https://kahawa.pl WC Version: 3.7.0 REST API Version: ✔ 1.0.2 Log Directory Writable: ✔ WP Version: 5.2.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: pl_PL External object cache: –

Server Environment

Server Info: Apache PHP Version: 7.0.33 - Rekomendujemy używanie PHP w wersji 7.2 lub wyższej w celu osiągnięcia większej wydajności oraz bezpieczeństwa. Jak zaktualizować wersję PHP PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.65.3 OpenSSL/1.0.2s

SUHOSIN Installed: – MySQL Version: 5.7.25-28-log Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 3.7.0 WC Database Prefix: wp_ MaxMind GeoIP Database: ✔ Całkowity rozmiar bazy danych: 33.28MB Rozmiar bazy danych: 27.74MB Rozmiar indeksu bazy danych: 5.54MB wp_woocommerce_sessions: Data: 0.08MB + 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.05MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.13MB + Index: 0.14MB + 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_aepc_custom_audiences: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aepc_logs: Data: 3.52MB + Index: 0.00MB + Engine InnoDB wp_aiowps_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_failed_logins: Data: 14.52MB + Index: 0.00MB + Engine InnoDB wp_aiowps_global_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_login_activity: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_aiowps_login_lockdown: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_permanent_block: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.17MB + Index: 0.09MB + Engine InnoDB wp_dotpay_instructions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_dotpay_oneclick_cards: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_ewwwio_images: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 2.25MB + Index: 0.08MB + Engine InnoDB wp_postmeta: Data: 3.50MB + Index: 3.98MB + Engine InnoDB wp_posts: Data: 2.42MB + Index: 0.14MB + 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.05MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.27MB + Index: 0.25MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + 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_woof_query_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_seo_links: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (26)

Advanced Custom Fields: Flexible Content Field: przez Elliot Condon – 2.1.0 Advanced Custom Fields: Repeater Field: przez Elliot Condon – 2.1.0 Advanced Custom Fields PRO: przez Elliot Condon – 5.7.12 All-in-One WP Migration: przez ServMask – 7.8 All In One WP Security: przez Tips and Tricks HQ Peter Petreski Ruhul Ivy – 4.4.1

Autoptimize: przez Frank Goossens (futtta) – 2.5.1 BackWPup: przez Inpsyde GmbH – 3.6.10 Cache Enabler: przez KeyCDN – 1.3.4 Klasyczny edytor: przez Kontrybutorzy WordPressa – 1.5 Contact Form 7: przez Takayuki Miyoshi – 5.1.4 Email Text Customizer for WooCommerce: przez EnigmaWeb – 1.0.3 – Nietestowane z używaną wersją WooCommerce Force Regenerate Thumbnails: przez Pedro Elsner – 2.0.6 Pixel Caffeine: przez AdEspresso – 2.0.8 – Nietestowane z używaną wersją WooCommerce Popups - WordPress Popup: przez timersys – 1.9.3.7 Really Simple SSL: przez Rogier Lankhorst Mark Wolters – 3.2.5

SVG Support: przez Benbodhi – 2.3.15 GDPR Cookie Consent Banner: przez termly – 2.3.14 WooCommerce Customizer: przez SkyVerge – 2.7.0 WooCommerce Dotpay Gateway: przez Dotpay (tech@dotpay.pl) – 3.0.13 – Nietestowane z używaną wersją WooCommerce Zapłać z Paynow: przez mElements S.A. – 1.0.2 Booster for WooCommerce: przez Algoritmika Ltd – 4.5.1 WooCommerce: przez Automattic – 3.7.0 WordPress Importer: przez wordpressdotorg – 0.6.4 Yoast SEO: przez Zespół Yoast – 12.2 WP Desk Helper: przez WP Desk – 1.7.0 – Nietestowane z używaną wersją WooCommerce WooCommerce Google Merchant XML: przez WP Desk – 1.6.11

Inactive Plugins (0)

Dropin Plugins (1)

advanced-cache.php: advanced-cache.php

Settings

API Enabled: ✔ Force SSL: – Currency: PLN (zł) Currency Position: right_space 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: –

WC Pages

Strona sklepu: #4 - /sklep/ Koszyk: #5 - /koszyk/ Zamówienie: #6 - /zamowienie/ Moje konto: #7 - /moje-konto/ Regulamin: #244 - /regulamin-sklepu/

Theme

Name: Kahawa Theme Version: 0.1 Author URL: http://github.com/justaniewska Child Theme: ✔ Parent Theme Name: Storefront Parent Theme Version: 2.5.0 – 2.5.3 jest dostępne Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ✔

Templates

Overrides: kahawa-theme/woocommerce/emails/admin-cancelled-order.php kahawa-theme/woocommerce/emails/admin-failed-order.php kahawa-theme/woocommerce/emails/admin-new-order.php kahawa-theme/woocommerce/emails/customer-completed-order.php kahawa-theme/woocommerce/emails/customer-invoice.php kahawa-theme/woocommerce/emails/customer-new-account.php kahawa-theme/woocommerce/emails/customer-note.php kahawa-theme/woocommerce/emails/customer-on-hold-order.php kahawa-theme/woocommerce/emails/customer-processing-order.php kahawa-theme/woocommerce/emails/customer-refunded-order.php kahawa-theme/woocommerce/emails/customer-reset-password.php kahawa-theme/woocommerce/emails/email-addresses.php kahawa-theme/woocommerce/emails/email-customer-details.php kahawa-theme/woocommerce/emails/email-footer.php kahawa-theme/woocommerce/emails/email-header.php kahawa-theme/woocommerce/emails/email-order-details.php kahawa-theme/woocommerce/emails/email-order-items.php kahawa-theme/woocommerce/emails/email-styles.php kahawa-theme/woocommerce/loop/loop-end.php

Action Scheduler

Complete: 0 Oldest: – Newest: –

Pending: 0 Oldest: – Newest: –

Canceled: 0 Oldest: – Newest: –

In-progress: 0 Oldest: – Newest: –

Failed: 0 Oldest: – Newest: –

`

emilleszczak2 commented 5 years ago

@bifera You can find logs into the Woocommerce -> Status -> Logs (wp-admin/admin.php?page=wc-status&tab=logs). From the list chose woocommerce-gateway-paynow.

Do you integrate with Sandbox or Production ?

bifera commented 5 years ago

the logs were as follows:

2019-10-08T19:04:57+00:00 DEBUG Error: You did not provide Api Key 2019-10-08T19:04:57+00:00 DEBUG Error: You did not provide Api Key 2019-10-08T19:07:27+00:00 DEBUG Error: You did not provide Api Key - null 2019-10-08T19:08:14+00:00 DEBUG Error: You did not provide Api Key - null 2019-10-08T19:08:43+00:00 DEBUG Error: You did not provide Api Key 2019-10-08T19:08:43+00:00 DEBUG Error: You did not provide Api Key

I used Production keys.

emilleszczak2 commented 5 years ago

It means that you did not provide API keys in correct way. For Production your configuration should looks like on screen below.

Screenshot 2019-10-10 at 08 17 31
bifera commented 5 years ago

But of course I did, as I mentioned before - I provided API key & signature key for production.

Please see the following screenshots:

1) the settings step-1

2) the error when clicking "buy and pay" with "paynow" payment method selected step-2

3) the error log for today. please note that the last one, with "- Null" note appeared on clicking "Buy and pay" button. all previous were logged on saving the plugin settings. step-3

emilleszczak2 commented 5 years ago

@bifera You had right, there was a problem with production configuration. I released a new version yesterday. Please download newest version.

bifera commented 5 years ago

Thanks! It looks like it works now. No errors in logs, after clicking "Buy" button the user gets redirected on payment page.