woocommerce / woocommerce-gateway-payfast

South African payment gateway supporting subscriptions, deposits & pre-orders
https://wordpress.org/plugins/woocommerce-payfast-gateway/
41 stars 15 forks source link

Credential validation #216

Closed johndcoy closed 1 day ago

johndcoy commented 6 months ago

Describe the Bug

Credentials are not validated from the settings page and are not required to save changes.

To Reproduce

  1. Go to Settings > Payments > Payfast
  2. Add valid or invalid credentials, and/or omit the credentials field(s)
  3. Scroll down and save
  4. See the issue

Expected Behavior

We can add a check to validate the credentials from the settings page, otherwise, the required fields (ID,Key, Passphrase) are not validated nor are they required. Alternatively, we can make the fields required to save settings. The credentials are required for both live and sandbox environments so disabling the payment option would be the only scenario where credentials would need to be removed/omitted.

The following fields should be required for settings to be saved:

woocommerce_payfast_merchant_id woocommerce_payfast_merchant_key woocommerce_payfast_pass_phrase

Environment

Screenshots:

Screenshot Screenshot link: https://d.pr/i/2uAdq7

Additional Details

System status ` ### WordPress Environment ### WordPress address (URL): https://coy-test-site.mystagingwebsite.com Site address (URL): https://coy-test-site.mystagingwebsite.com WC Version: 8.8.2 REST API Version: ✔ 8.8.2 Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.5.2 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: ✔ ### Server Environment ### Server Info: nginx PHP Version: 7.4.33 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 8.7.1 OpenSSL/1.1.1w SUHOSIN Installed: – MySQL Version: 5.5.5-10.4.26-MariaDB-log Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 8.8.2 WC Database Prefix: wp_ Total Database Size: 737.17MB Database Data Size: 345.56MB Database Index Size: 391.61MB 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.19MB + Index: 0.08MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 1.89MB + 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.05MB + 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: 16.19MB + Index: 15.38MB + 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: 10.20MB + Index: 8.11MB + Engine InnoDB wp_advanced_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_advanced_notification_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_afwc_campaigns: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_afwc_commission_plans: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_afwc_hits: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_afwc_payouts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_afwc_payout_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_afwc_referrals: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_ariadminer_connections: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_auctions_for_woocommerce_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_automatewoo_abandoned_carts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_customers: Data: 5.52MB + Index: 12.09MB + Engine InnoDB wp_automatewoo_customer_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_guests: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_automatewoo_guest_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_logs: Data: 0.08MB + Index: 0.11MB + Engine InnoDB wp_automatewoo_log_meta: Data: 0.28MB + Index: 0.22MB + Engine InnoDB wp_automatewoo_queue: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_queue_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_referrals: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_referral_advocate_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_automatewoo_referral_invites: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_buckaroo_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 3.52MB + Index: 3.80MB + Engine InnoDB wp_email_log: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_customers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_followup_customer_carts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_followup_email_coupons: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_followup_email_excludes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_email_logs: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_followup_email_orders: Data: 0.16MB + Index: 0.09MB + Engine InnoDB wp_followup_email_order_coupons: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_followup_email_tracking: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_followup_followup_history: Data: 0.20MB + Index: 0.05MB + Engine InnoDB wp_followup_order_categories: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_order_items: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_subscribers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_gf_entry: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_entry_meta: Data: 0.08MB + Index: 0.08MB + Engine InnoDB wp_gf_entry_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gf_form_meta: Data: 0.16MB + Index: 0.00MB + Engine InnoDB wp_gf_form_view: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gla_attribute_mapping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gla_budget_recommendations: Data: 0.19MB + Index: 0.14MB + Engine InnoDB wp_gla_merchant_issues: Data: 2.02MB + Index: 0.00MB + Engine InnoDB wp_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_capability: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_groups_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_group_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_languages_translations: Data: 0.19MB + Index: 0.08MB + Engine InnoDB wp_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_mo_files_domains: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_strings: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_icl_string_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_pages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_positions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_translations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_urls: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translate: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translate_job: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translations: Data: 0.16MB + Index: 0.33MB + Engine InnoDB wp_icl_translation_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_layerslider: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_layerslider_revisions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automation_runs: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_automation_run_logs: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_mailpoet_automation_run_subjects: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_automation_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automation_versions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_log: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletters: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_scheduled_tasks: Data: 1.50MB + Index: 0.63MB + Engine InnoDB wp_mailpoet_scheduled_task_subscribers: Data: 24.56MB + Index: 15.52MB + Engine InnoDB wp_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscribers: Data: 14.52MB + Index: 33.75MB + Engine InnoDB wp_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_segment: Data: 4.52MB + Index: 4.03MB + Engine InnoDB wp_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 9.42MB + Index: 0.28MB + Engine InnoDB wp_postmeta: Data: 50.64MB + Index: 128.33MB + Engine InnoDB wp_posts: Data: 6.42MB + Index: 1.75MB + Engine InnoDB wp_rg_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rg_form_meta: Data: 0.16MB + Index: 0.00MB + Engine InnoDB wp_rg_form_view: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_rg_incomplete_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rg_lead: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_rg_lead_detail: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_rg_lead_detail_long: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rg_lead_meta: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_rg_lead_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_say_what_strings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_sensei_pro_groups_courses: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_sensei_pro_groups_students: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_snippets: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.11MB + Index: 0.14MB + Engine InnoDB wp_terms: Data: 0.36MB + Index: 0.53MB + Engine InnoDB wp_term_relationships: Data: 0.27MB + Index: 0.19MB + Engine InnoDB wp_term_taxonomy: Data: 0.45MB + Index: 0.48MB + Engine InnoDB wp_usermeta: Data: 139.66MB + Index: 135.23MB + Engine InnoDB wp_users: Data: 13.52MB + Index: 13.55MB + Engine InnoDB wp_wclsi_items: Data: 0.11MB + Index: 0.17MB + Engine InnoDB wp_wclsi_item_attribute_sets: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wclsi_item_categories: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wclsi_item_e_commerce: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_wclsi_item_images: Data: 0.05MB + Index: 0.09MB + Engine InnoDB wp_wclsi_item_prices: Data: 0.08MB + Index: 0.05MB + Engine InnoDB wp_wclsi_item_shops: Data: 0.08MB + Index: 0.08MB + Engine InnoDB wp_wcpv_commissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcs_payment_retries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availabilitymeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_wc_cvo_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_od_time_framemeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_od_time_frames: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_orders: Data: 0.48MB + Index: 0.73MB + Engine InnoDB wp_wc_orders_meta: Data: 2.52MB + Index: 4.03MB + Engine InnoDB wp_wc_order_addresses: Data: 0.36MB + Index: 0.66MB + Engine InnoDB wp_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_order_composite_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_operational_data: Data: 0.25MB + Index: 0.16MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.25MB + Index: 0.28MB + Engine InnoDB wp_wc_order_stats: Data: 0.23MB + Index: 0.22MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.13MB + Index: 0.11MB + Engine InnoDB wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_pos_grid_tiles: Data: 0.02MB + Index: 0.02MB + 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.14MB + Index: 0.22MB + 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_warranty_products: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wdslayer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wdsslide: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wdsslider: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_bis_activity: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_bis_notifications: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_woocommerce_bis_notificationsmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_buckaroo_transactions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 1.52MB + Index: 2.00MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_exported_csv_items: Data: 1.52MB + Index: 0.09MB + Engine InnoDB wp_woocommerce_gc_activity: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_gc_cards: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_gc_cardsmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_pickup_locations_geodata: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_prl_deploymentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_prl_deployments: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_prl_frequencies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_prl_tracking_conversions: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_software_activations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_software_licenses: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpml_mails: Data: 20.52MB + Index: 0.00MB + Engine InnoDB wp_wps_hit: Data: 0.02MB + Index: 0.14MB + Engine InnoDB wp_wps_index: Data: 0.11MB + Index: 0.14MB + Engine InnoDB wp_wps_key: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wps_object_term: Data: 0.05MB + Index: 0.09MB + Engine InnoDB wp_wps_object_type: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_wps_query: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wps_uri: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wps_user_agent: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wps_woo_quickbooks_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wp_phpmyadmin_extension__errors_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wrd_discounts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wrd_sent_coupons: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wtbp_columns: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wtbp_modules: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wtbp_modules_type: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wtbp_tables: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wtbp_usage_stat: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wt_pf_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wt_pf_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wt_pf_fbsync_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yoast_indexable: Data: 0.02MB + Index: 0.09MB + 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 ### acf: 1 addify_rfq: 1 addify_whp: 2 attachment: 3358 avia_framework_post: 6 aw_workflow: 9 bookable_person: 40 bookable_resource: 9 country_restriction: 1 course: 2 custom_css: 6 event_ticket: 7 fgf_rules: 1 follow_up_email: 9 global_product_addon: 8 jp_img_sitemap: 10 jp_img_sitemap_index: 5 jp_sitemap: 5 jp_sitemap_master: 5 lesson: 8 mailpoet_page: 1 mc4wp-form: 1 nav_menu_item: 60 oembed_cache: 1 order_shipment: 6 page: 55 pdr_product_base: 16 pos_outlet: 1 pos_receipt: 1 pos_register: 1 post: 6 prl_engine: 1 product: 1015 product_variation: 32 project: 1 question: 1 quiz: 8 revision: 252 safecss: 1 shipping_package: 4 shop_coupon: 5 shop_order: 1664 shop_order_refund: 12 shop_subscription: 73 sidebar: 1 wc_booking: 106 wc_membership_plan: 4 wc_order_email: 1 wc_order_status: 8 wc_pickup_location: 1 wc_product_tab: 1 wc_stamps_label: 1 wc_user_membership: 7 wc_voucher: 2 wc_voucher_template: 1 wc_zapier_feed: 1 wcpf_item: 2 wcpf_project: 2 wp_global_styles: 4 wp_navigation: 8 wp_template: 4 wp_template_part: 1 wsl_stores: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (18) ### Afterpay Gateway for WooCommerce: by Afterpay – 3.8.5 Google Listings and Ads: by WooCommerce – 2.6.8 Gutenberg: by Gutenberg Team – 18.1.2 Jetpack: by Automattic – 13.4-a.3 MailPoet: by MailPoet – 4.49.0 Metorik Helper: by Metorik – 1.7.1 Storefront Blog Customiser: by WooCommerce – 1.3.0 Storefront Mega Menus: by WooCommerce – 1.6.2 Storefront Parallax Hero: by WooCommerce – 1.5.7 Storefront Powerpack: by WooCommerce – 1.6.3 WooCommerce Payfast Gateway: by WooCommerce – 1.6.2 WooPayments: by Automattic – 7.5.3 WooCommerce Product CSV Import Suite: by WooCommerce – 1.10.69 WooCommerce Shipping & Tax: by WooCommerce – 2.5.4 Woo Subscriptions: by WooCommerce – 6.2.0 WooCommerce: by Automattic – 8.8.2 WP Crontrol: by John Blackbourn – 1.16.3 WP Mail Logging: by WP Mail Logging Team – 1.12.0 ### Inactive Plugins (29) ### Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.2 AutomateWoo: by WooCommerce – 6.0.17 (update to version 6.0.20 is available) Bankful: by Bankful – 2.0.6 Code Snippets: by Code Snippets Pro – 3.6.4 Klarna Payments for WooCommerce: by klarna – 3.5.2 Loco Translate: by Tim Whitlock – 2.6.7 Mailchimp for WooCommerce: by Mailchimp – 4.0.1 MC4WP: Mailchimp for WordPress: by ibericode – 4.9.12 Pressable Automated Migration: by Pressable – 5.48 Site Kit by Google: by Google – 1.125.0 Storefront Footer Bar: by WooThemes – 1.0.4 Storefront Hamburger Menu: by WooCommerce – 1.2.2 Storefront Homepage Contact Section: by WooThemes – 1.0.5 Storefront Pricing Tables: by WooCommerce – 1.1.0 Storefront Product Hero: by WooThemes – 1.2.13 Storefront Product Sharing: by WooCommerce – 1.0.6 Storefront Reviews: by WooCommerce – 1.0.6 WC Buckaroo BPE Gateway: by Buckaroo – 3.11.1 WebToffee WooCommerce Product Feed & Sync Manager: by WebToffee – 2.1.7 WooCommerce Authorize.Net Gateway: by SkyVerge – 3.10.2 WooCommerce Bookings: by WooCommerce – 2.1.0 (update to version 2.1.2 is available) WooCommerce GoCardless Gateway: by WooCommerce – 2.6.3 (update to version 2.6.4 is available) WooCommerce PayPal Payments: by WooCommerce – 2.6.1 WooCommerce Product Vendors: by WooCommerce – 2.2.6 (update to version 2.2.7 is available) WooCommerce Square: by WooCommerce – 4.6.1 WooCommerce Stripe Gateway: by WooCommerce – 8.2.0 WooCommerce Subscriptions Resource: by Prospress Inc. – 1.0.0 WooCommerce Table Rate Shipping: by WooCommerce – 3.1.6 (update to version 3.1.9 is available) WP phpMyAdmin: by Puvox.software – 5.2.1.12 ### Dropin Plugins () ### advanced-cache.php: advanced-cache.php object-cache.php: Memcached ### Must Use Plugins (2) ### Health Check Troubleshooting Mode: by – 1.7.1 System Plugin: by – 4.35.0 ### Settings ### API Enabled: – Force SSL: – Currency: ZAR (R) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: accommodation-booking (accommodation-booking) booking (booking) bundle (bundle) composite (composite) external (external) grouped (grouped) simple (simple) store_credit (store_credit) subscription (subscription) variable (variable) variable subscription (variable-subscription) yith_bundle (yith_bundle) Taxonomies: Product Visibility: exclude_from_catalog (exclude_from_catalog) exclude_from_search (exclude_from_search) 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) visible (visible) 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: ✔ ### Logging ### Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 days Level threshold: – Log directory size: 2 MB ### WC Pages ### Shop base: #31285 - /shop/ Cart: #25590 - /cart/ Checkout: #31286 - /checkout/ My account: #25591 - /my-account/ Terms and conditions: #335 - /home/ ### Theme ### Name: Storefront Version: 4.5.5 Author URL: https://woocommerce.com/ 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: ✔ ### Templates ### Overrides: – ### WooPayments ### Version: 7.5.3 Connected to WPCOM: Yes WPCOM Blog ID: 119881172 Account ID: acct_1MMaE4FhWdSNKXK9 Payment Gateway: Enabled Test Mode: Enabled Enabled APMs: card,ideal WooPay: Disabled WooPay Incompatible Extensions: No Apple Pay / Google Pay: Enabled (product,cart,checkout) Fraud Protection Level: basic Multi-currency: Enabled Public Key Encryption: Disabled Auth and Capture: Enabled Documents: Disabled Logging: Enabled ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://coy-test-site.mystagingwebsite.com Subscriptions-core Library Version: 7.0.0 Subscription Statuses: draft: 1 wc-active: 11 wc-expired: 7 wc-pending-cancel: 1 wc-pending: 1 wc-on-hold: 39 wc-cancelled: 13 WooCommerce Account Connected: ✔ Yes Active Product Key: ✔ Yes Custom Retry Rules: ✔ No Custom Retry Rule Class: ✔ No Custom Raw Retry Rule: ✔ No Custom Retry Rule: ✔ No Retries Migration Status: ✔ Completed Report Cache Enabled: ✔ Yes Cache Update Failures: ❌ 1 failures ### Store Setup ### Country / State: United States (US) — Oklahoma ### Subscriptions by Payment Gateway ### other: wc-active: 1 wc-expired: 2 wc-on-hold: 16 Check payments: wc-on-hold: 3 Cash on delivery: wc-cancelled: 1 WooPayments: draft: 1 wc-active: 6 wc-cancelled: 4 wc-expired: 1 wc-on-hold: 2 wc-pending-cancel: 1 ### Payment Gateway Support ### WooPayments: products refunds multiple_subscriptions subscription_cancellation subscription_payment_method_change_admin subscription_payment_method_change_customer subscription_payment_method_change subscription_reactivation subscription_suspension subscriptions subscription_amount_changes subscription_date_changes tokenization add_payment_method Check payments: products Cash on delivery: products Payfast: products pre-orders subscriptions subscription_cancellation subscription_suspension subscription_reactivation subscription_amount_changes subscription_date_changes subscription_payment_method_change subscription_payment_method_change_customer WooPayments (iDEAL): products refunds multiple_subscriptions subscription_cancellation subscription_payment_method_change_admin subscription_payment_method_change_customer subscription_payment_method_change subscription_reactivation subscription_suspension subscriptions subscription_amount_changes subscription_date_changes tokenization add_payment_method ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store 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 product-variation-management product-virtual-downloadable product-external-affiliate product-grouped product-linked product-pre-publish-modal 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-custom-fields settings async-product-editor-category-field launch-your-store Daily Cron: ✔ Next scheduled: 2024-04-24 18:34:16 -07:00 Options: ✔ Notes: 220 Onboarding: completed ### MailPoet ### Sending Method: MailPoet Send all site's emails with: Default WordPress sending method Task Scheduler method: Action Scheduler Cron ping URL: https://coy-test-site.mystagingwebsite.com?mailpoet_router&endpoint=cron_daemon&action=ping ### Action Scheduler ### Complete: 2,539 Oldest: 2024-03-24 11:32:54 -0700 Newest: 2024-04-24 10:51:41 -0700 Failed: 6,214 Oldest: 2020-12-02 20:42:58 -0800 Newest: 2024-04-23 14:59:09 -0700 Pending: 12 Oldest: 2024-04-24 10:53:41 -0700 Newest: 2024-06-13 10:16:37 -0700 ### Status report information ### Generated at: 2024-04-24 10:51:48 -07:00 `
iamdharmesh commented 3 months ago

Hi @dkotter,

I have started looking into this. There are two things needed to fix the issue:

1. Make credential fields required: Currently, the form fields are not required, but there is a check on the credential fields in live mode. If the credential fields are empty, a notice is displayed to the store owner indicating that these fields need to be filled in order for Payfast to work. The payment gateway will not be listed on the checkout page until the credential fields are filled out (for live mode only). I believe this approach is sufficient as it informs the store owner that credentials are required and also allows the merchant to remove the credentials at any time. We could apply this to sandbox as well if needed.

image

2. Validate credentials: I have checked the Payfast APIs and did not find any API that helps us validate all the credentials (merchant ID, merchant key, and passphrase). There is a Ping API that can validate the merchant ID and passphrase but not the merchant key, as the merchant key is not required to call that API. The merchant key is only needed in the checkout form.

Should we proceed with using the Ping API to validate the merchant ID and passphrase only, and display a notice if these credentials are invalid, similar to how we handle required fields? Please let me know what you think about this approach.

Thank you. cc: @jeffpaul

dkotter commented 3 months ago

We could apply this to sandbox as well if needed

I think this would be nice to add

Should we proceed with using the Ping API to validate the merchant ID and passphrase only, and display a notice if these credentials are invalid, similar to how we handle required fields

I'm fine with adding this.

That said, I don't think this is a high priority issue. I'd recommend we change this to a normal priority and if we have time, we can get these checks added.