Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Fails when Pre Order Product has 'Upon Release' setting enabled for Payment #162

Open
ankitguptaindia opened this issue Oct 12, 2023 · 1 comment
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@ankitguptaindia
Copy link
Member

Describe the Bug

When a customer attempts to make a payment for a Pre Order Product with the 'When to Charge = Upon Release' setting enabled, and they use the PayFast payment method during the checkout process, the payment fails. The PayFast Sandbox screen displays an error message, preventing successful payment processing.

PayFast.+.Preorder.mp4

To Reproduce

  1. Setup PayFast Sandbox payment gateway
  2. Create a Pre Order Product Product
  3. Enable setting When to Charge = Upon Release as shown in below screenshot.
  4. Save the Product
  5. Add Product to cart and go to checkout
  6. Select PayFast method to complete the checkout.
  7. The PayFast Sanbox screen will appear with the error message as shown in below screenshot.

Screenshots

Screenshot 2023-10-12 at 1 53 21 PM

Screenshot 2023-10-12 at 1 52 43 PM

Tested with PayFast Sandbox Env only.

Expected Behavior

When a customer uses the PayFast payment method to purchase a Pre Order Product with the 'When to Charge = Upon Release' setting enabled, the payment should be processed successfully, and no error should occur.

Environment

SystemStatusReport_payfast-test.instawp.xyz_2023-10-12T08-24-57.txt

Additional Details

Same steps works fine with Stripe Payment Gateway.

System status
`
### WordPress Environment ###

WordPress address (URL): https://payfast-test.instawp.xyz
Site address (URL): https://payfast-test.instawp.xyz
WC Version: 8.2.0
REST API Version: ✔ 8.2.0
WC Blocks Version: ✔ 11.1.2
Action Scheduler Version: ✔ 3.6.3
Log Directory Writable: ✔
WP Version: 6.3.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

### Server Environment ###

Server Info: Apache/2.4.56 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
PHP Version: 8.0.29
PHP Post Max Size: 64 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.68.0
OpenSSL/1.1.1f

SUHOSIN Installed: –
MySQL Version: 10.11.2-MariaDB-1:10.11.2+maria~ubu2004
Max Upload Size: 64 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

WC Database Version: 8.2.0
WC Database Prefix: iwp37d0_
Total Database Size: 5.63MB
Database Data Size: 3.76MB
Database Index Size: 1.87MB
iwp37d0_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
iwp37d0_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_woocommerce_order_itemmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
iwp37d0_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
iwp37d0_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
iwp37d0_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
iwp37d0_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_actionscheduler_actions: Data: 0.06MB + Index: 0.11MB + Engine InnoDB
iwp37d0_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_actionscheduler_logs: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
iwp37d0_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
iwp37d0_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_options: Data: 2.28MB + Index: 0.06MB + Engine InnoDB
iwp37d0_postmeta: Data: 0.20MB + Index: 0.20MB + Engine InnoDB
iwp37d0_posts: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
iwp37d0_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
iwp37d0_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
iwp37d0_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
iwp37d0_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
iwp37d0_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
iwp37d0_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
iwp37d0_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
iwp37d0_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
iwp37d0_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
iwp37d0_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
iwp37d0_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
iwp37d0_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
iwp37d0_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB

### Post Type Counts ###

attachment: 23
page: 10
post: 2
product: 20
product_variation: 7
revision: 3
shop_order: 26
shop_subscription: 8
wp_navigation: 1
wp_template: 2

### Security ###

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

### Active Plugins (5) ###

WooCommerce PayFast Gateway: by WooCommerce – 1.5.0 (update to version 1.5.9 is available)
WooCommerce Stripe Gateway: by WooCommerce – 7.6.0
WooCommerce Pre-Orders: by WooCommerce – 2.0.5
Woo Subscriptions: by WooCommerce – 5.5.0
WooCommerce: by Automattic – 8.2.0

### Inactive Plugins (4) ###

Debug Log - Config Tool: by Lukman Nakib – 1.4.3
Pig Latin: by Nikolay Bachiyski – 0.2
Query Monitor: by John Blackbourn – 3.13.1
WP File Manager: by mndpsingh287 – 7.2

### Settings ###

API Enabled: –
Force SSL: –
Currency: ZAR (R)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

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: #5 - /shop/
Cart: #6 - /cart/
Checkout: #7 - /checkout/
My account: #8 - /my-account/
Terms and conditions: ❌ Page not set

### Theme ###

Name: Storefront
Version: 4.5.3
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: –

### Subscriptions ###

WCS_DEBUG: ✔ No
Subscriptions Mode: ✔ Live
Subscriptions Live URL: https://payfast-test.instawp.xyz
Subscriptions-core Library Version: 6.2.0
Subscription Statuses: auto-draft: 1
wc-active: 2
wc-on-hold: 3
wc-cancelled: 2

WooCommerce Account Connected: ❌ No
Report Cache Enabled: ✔ Yes
Cache Update Failures: ✔ 0 failure

### Store Setup ###

Country / State: United States (US) — California

### Subscriptions by Payment Gateway ###

PayFast: wc-active: 2
wc-cancelled: 2
wc-on-hold: 3


### Payment Gateway Support ###

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

Stripe: products
refunds
tokenization
add_payment_method
subscriptions
subscription_cancellation
subscription_suspension
subscription_reactivation
subscription_amount_changes
subscription_date_changes
subscription_payment_method_change
subscription_payment_method_change_customer
subscription_payment_method_change_admin
multiple_subscriptions
pre-orders


### 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
product-variation-management
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: customize-store
minified-js
new-product-management-experience
settings
async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-10-12 10:33:01 +00:00
Options: ✔
Notes: 68
Onboarding: -

### Action Scheduler ###

Complete: 146
Oldest: 2023-10-07 10:34:14 +0000
Newest: 2023-10-12 08:04:26 +0000

Failed: 1
Oldest: 2023-10-07 10:51:55 +0000
Newest: 2023-10-07 10:51:55 +0000

Pending: 3
Oldest: 2023-10-12 09:53:08 +0000
Newest: 2024-03-07 11:20:17 +0000


### Status report information ###

Generated at: 2023-10-12 08:24:41 +00:00
`
@ankitguptaindia ankitguptaindia added type: bug The issue is a confirmed bug. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Oct 12, 2023
@faisal-alvi
Copy link
Member

faisal-alvi commented Aug 8, 2024

@ankitguptaindia when we visit the checkout page, we only see the "Pay Later" option because when to charge is set to "upon release."

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants