- Hiding Fields on the Checkout Page
- Installing WooCommerce
- Using WooCommerce
- Using Your Theme's Header & Footer in a Step
- Embedding a Checkout Form on the CartFlows Checkout Page
- Hiding WooCommerce Pages and Products
- Using Pricing Tables
- Adding an Affiliate Program
- Setting a Funnel as the Homepage
- GDPR Compliance
- Dynamic Offers aka Rule Engine
- Instant Layout for Checkout and Thank You Step
- Adding Products from the URL to the Checkout Page
- Setting Up A/B Testing for Steps
- Deleting Plugin Data During Uninstallation
- Importing Ready-Made Templates for Funnels and Steps
- Importing and Exporting Funnels and Step
- URL Parameters
- Replacing the Main Checkout Order with an Upsell or Downsell
- Rolling back to a Previous Version
- Google Address Autocomplete
- Flatsome UX Builder
- ActiveCampaign
- Paypal Reference Transactions
- How PaypPal/Stripe Works
- Enabling Enfold Avia Layout Builder
- Setting Up Authorize.net for Upsell & Downsell
- Supported Payment Gateways
- Setting Up A/B Testing with Google Optimize
- Setting Quantity and Discount for Products on the Checkout Page
- Adding Custom Payment Gateway Support for One-Click Upsell and Downsell
- Creating Subscription Products in WooCommerce for CartFlows Pages
- Supported Multi-Currency Plugins
- Enabling/Disabling Shipping Fields and Ship to Different Address
- Enabling/Adding Coupons on the Checkout Page
- Displaying Account Creation Fields on the Checkout Page
- Setting Up Square Gateway for Upsell & Downsell
- CartFlows Elementor Widgets
- CartFlows Beaver Builder Modules
- CartFlows Block Editor Blocks
- Importing Divi Templates
- Bricks Builder
- OttoKit
- Connecting Stripe Payment Gateway
- LearnDash
- Facebook Pixel
- How to Enable TikTok Pixel Tracking in CartFlows?
- Google Ads Pixel
- How to Enable Pinterest Pixel Tracking in CartFlows?
- How to Enable Snapchat Pixel Tracking in CartFlows?
- Funnel in Test Mode
- Troubleshooting Plugin and Theme Conflicts
- Resolving the "Please Select a Simple, Virtual, and Free Product" Error
- Fixing Endless Loading on the Checkout Page
- Fixing the "We can't seem to find an order for you." Error on the Thank You Page
- Fixing the "Checkout ID Not Found" Error
- Fixing the "Session Expired" Error Message
- Resolving "Order Does Not Exist" Error on Upsell/Downsell Page
- Fixing the "Sorry, This Product Cannot Be Purchased" Error
- Resolving "No Product is Selected" Error
- Disabling Auto-fill of Address Fields Based on Zip Code
- Enabling Theme's Scripts & Styles Without Changing Page Template
- Disabling Auto-fill of Checkout Fields
- Allowing Cache Plugins to Cache CartFlows Pages
- Changing the "Choose a Variation" Text
- VAT Field Not Displaying for WooCommerce EU/UK VAT Compliance Plugin
- Enabling the Product Tab on Store Checkout
- Displaying the Order Summary Open on Mobile Devices
- Refreshing the Checkout Page After CartFlows AJAX Calls
How to Add Custom Payment Gateway Support for One-Click Upsell and Downsell in CartFlows
You can integrate your own payment gateway with CartFlows to support one-click Upsell and Downsell functionality. This requires a few steps to register your gateway and handle the payment process through code.
Follow the steps below to add custom support:
Step 1: Register Your Payment Gateway
You’ll need to define a custom class and file name, then register them with CartFlows.
To do this, either:
Option A: Manually add them inside the CartFlows Pro plugin
- Go to the cartflows-pro/classes/class-cartflows-pro-gateways.php file
- Find the get_supported_gateways function
- Add your class and file to the returned array
Option B: Use the available filter (recommended if adding support via a plugin or theme):
add_filter( 'cartflows_offer_supported_payment_gateways', 'your_function_name' );
/**
* Add new payment gateway in Supported Gateways.
*
* @param array $supported_gateways Supported Gateways by CartFlows.
* @return array.
*/
function your_function_name( $supported_gateways ){
$supported_gateways['payment_gateway_slug'] = array(
'file' => 'yourfilename.php', // Your Custom code's file name
'class' => 'YourClassName', // Class name used in the Custom Code's file.
'path' => 'FullDirectoryPathofTheFile', // Full directory path of the custom code's file.
);
return $supported_gateways; // Adding the payment gateway name.
}
Note: Use the path only if your file is located outside the CartFlows Pro plugin directory.
Step 2: Write the Payment Processing Function
Inside your custom file, create a function named process_offer_payment
. CartFlows will call this automatically when processing the Upsell or Downsell.
This is where your payment logic goes. It should handle charging the customer after the main checkout is completed and the offer is accepted.
Step 3: Place the Custom File in the Correct Directory
If you’re not using a custom path, place your file in:
cartflows-pro/modules/gateways/
You can refer to existing gateway files in that directory to understand how to structure your implementation.
Note: We also offer a sample plugin you can use as a reference when building your own custom gateway integration. Download Sample Plugin
We don't respond to the article feedback, we use it to improve our support content.