Check2pay Payment Gateway Integration

Merchant Service Blog - Get Cheaper Rates On Credit Card, Debit Card ,Echeck And ACH Processing. Apply Now
Check2pay Payment gateway integration

Check2Pay Echeck Payment Gateway Integration with Woocomerce

Disclaimer – This Guide is only for reference and should not be considered accurate. We can not guarantee that the code is secure. We advise merchants to self-code all integration or Take help of any qualified coder or software expert.

This guide is an unofficial guide about how to integrate check2pay payment gateway with woocomerce. For detailed and accurate integration instruction you must contact check2pay. This guide can not be considered accurate and free from errors.

In our test environment we found the integration to be working fine. Off-course the server parameters and the regular modification and updates from the service providers infrastructure also plays a key role in the plugin functionality. To understand and implement the plugin you must have detailed knowledge of Soap client, PHP, MySQL, Woocomerce, and WordPress. Knowledge of additional technology will also be helpful.

Note:- We offer Paid Integration support for check2pay echeck payment gateway. The Integration cost is $ 200 and requires access to your web-server, website and secret parameters provided by check2pay. Please email us on [email protected] for more details. The integration process can sometimes take time and that is why these rates are non-negotiable. We work with many high risk merchant account providers for tech support. We will be happy to provide the integration assistance for additional gateways as well.

Check2pay offers reliable services to merchants for accepting echeck as payment option.

The plugin uses multiple files and each file position in plugin folder can be found below. The username, Password, and secure key are always different for each merchant. Please coordinate with your re-seller or check2pay directly for exact information. We may also help you in case if you need professional paid help

Folder View Check2pay Payment Gateway Integration

This is the inside view of the main folder of the plugin. It includes 2 folders and 1 php file.

Folder view of the language folder

Here is an image showing 2 files that need to be in the includes folder.


Click me if you need professional assistance in the integration process. Charges applicable

woocommerce-gateway-check2pay.php

Place it inside the main folder as it appears in the first image.

here is the code of the file

exit; // Exit if accessed directly
}
/**

*/
/*
*
*/

if ( ! class_exists( ‘Woocommerce_Gateway_Check2Pay’ ) ) {

/**
* class: Woocommerce_Gateway_Check2Pay
* desc: plugin class to Woocommerce Gateway Check2Pay
*/
class Woocommerce_Gateway_Check2Pay {

private static $instance;

public static function instance() {
if ( ! self::$instance ) {
self::$instance = new Woocommerce_Gateway_Check2Pay();
if ( in_array( ‘woocommerce/woocommerce.php’, apply_filters( ‘active_plugins’, get_option( ‘active_plugins’ ) ), true ) ) {
self::$instance->setup_constants();
self::$instance->hooks();
self::$instance->includes();
self::$instance->load_textdomain();

add_filter( ‘woocommerce_payment_gateways’, array( self::$instance, ‘add_wc_gateway’ ) );
}
}

return self::$instance;
}

private function setup_constants() {
// Plugin path
define( ‘WOO_GM_DIR’, plugin_dir_path( __FILE__ ) );

// Plugin URL
define( ‘WOO_GM_URL’, plugin_dir_url( __FILE__ ) );
}

private function hooks() {
register_activation_hook( __FILE__, array( ‘Woocommerce_Gateway_Check2Pay’, ‘activate’ ) );
register_deactivation_hook( __FILE__, array( ‘Woocommerce_Gateway_Check2Pay’, ‘deactivate’ ) );
}

private function includes() {
require_once WOO_GM_DIR . ‘includes/gateway.php’;
}

/**
* Add the gateway to WooCommerce.
*
* @access public
* @param array $methods
* @return array
*/
function add_wc_gateway( $methods ) {

$methods[] = ‘WC_Gateway_Check2Pay’;
return $methods;
}

public function load_textdomain() {
// Set filter for language directory
$lang_dir = WOO_GM_DIR . ‘/languages/’;
$lang_dir = apply_filters( ‘woo_gateway_check2pay_lang_dir’, $lang_dir );

// Traditional WordPress plugin locale filter
$locale = apply_filters( ‘plugin_locale’, get_locale(), ” );
$mofile = sprintf( ‘%1$s-%2$s.mo’, ‘woocommerce-gateway-check2pay’, $locale );

// Setup paths to current locale file
$mofile_local = $lang_dir . $mofile;
$mofile_global = WP_LANG_DIR . ‘/woocommerce-gateway-check2pay/’ . $mofile;

if ( file_exists( $mofile_global ) ) {
// Look in global /wp-content/languages/woocommerce-gateway-check2pay/ folder
load_textdomain( ‘woocommerce-gateway-check2pay’, $mofile_global );
} elseif ( file_exists( $mofile_local ) ) {
// Look in local /wp-content/plugins/woocommerce-gateway-check2pay/languages/ folder
load_textdomain( ‘woocommerce-gateway-check2pay’, $mofile_local );
} else {
// Load the default language files
load_plugin_textdomain( ‘woocommerce-gateway-check2pay’, false, $lang_dir );
}
}

// END public function __construct()
/**
* Hook into the WordPress activate hook
*/
public static function activate() {

}

/**
* Hook into the WordPress deactivate hook
*/
public static function deactivate() {

}
}

// END class Woocommerce_Gateway_Check2Pay
} // END if(!class_exists(“Woocommerce_Gateway_Check2Pay”))

function woocommerce_gateway_check2pay_load() {
if ( ! class_exists( ‘WooCommerce’ ) ) {

require_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );

$plugins = get_plugins();

foreach ( $plugins as $plugin_path => $plugin ) {
if ( ‘WooCommerce’ === $plugin[‘Name’] ) {
define( ‘HAS_WOO’, true );
break;
}
}
add_action( ‘admin_notices’, ‘woocommerce_gateway_check2pay_notice’ );
} else {
return Woocommerce_Gateway_Check2Pay::instance();
}
}

add_action( ‘plugins_loaded’, ‘woocommerce_gateway_check2pay_load’ );

function woocommerce_gateway_check2pay_notice() {
if ( HAS_WOO ) {
echo ‘

‘ . wp_kses( __( ‘Woocommerce Gateway Check2Pay add-on requires WooCommerce! Please activate it to continue!’, ‘woocommerce-gateway-check2pay’ ), $allowed_html_array ) . ‘

‘;
} else {
echo ‘

‘ . wp_kses( __( ‘Woocommerce Gateway Check2Pay add-on requires WooCommerce! Please install it to continue!’, ‘woocommerce-gateway-check2pay’ ), $allowed_html_array ) . ‘

‘;
}
}

Feel free to contact us in case if you need an account with a reliable echeck or ACH Payment processor

 

Bankim Chandra

Bankim Chandra

Bankim Chandra is a Merchant Account consultant. He works with merchants globally and helps businesses in getting reliable payment processing solution. He writes extensively on the internet about Payment Gateways, Credit Card Processing, Echeck Processing, Chargeback Alerts, ACH and Business Funding.

Leave a Replay

Get An International Merchant Account

Recent Posts

Follow Us

Sign up for our Newsletter

Get updates about latest blog post and new services. Apply Now To Get Merchant Services At Low Cost.