Plugin Directory

Changeset 1848588


Ignore:
Timestamp:
03/28/2018 02:14:18 PM (8 years ago)
Author:
cardinalmarketing
Message:

Remove CardinalCommerce OneConnect version 2.0. Replace with CardinalCommerce OneConnect version 1.2.0. Plugin rewrite.

Location:
cardinalcommerce-oneconnect
Files:
9 added
3 edited

Legend:

Unmodified
Added
Removed
  • cardinalcommerce-oneconnect

  • cardinalcommerce-oneconnect/trunk/README.txt

    r1785810 r1848588  
    44Requires at least: 4.6
    55Tested up to: 4.7.5
    6 Stable tag: 1.1.0
     6Stable tag: 1.2.0
    77License: GPLv3 or later
    88LicenseURI: http://www.gnu.org/licenses/gpl-3.0.html
     
    9292== Changelog ==
    9393
    94 = 2017.12.12 - Version 2.0 =
    95  * Changes the way ECI, CAVV, and XID are passed to Authorize.Net
     94= 2018.03.28 - Version 1.2.0 =
     95 * Operability with a wider variety of WooCommerce configurations
     96 * Simplify plugin configuration by removing Processor ID, Merchant ID, and Transaction Password
     97 * Support payment brand icon customization
    9698
    9799= 2017.11.07 - Version 1.1.0 =
  • cardinalcommerce-oneconnect/trunk/cardinalcommerce-oneconnect.php

    r1767229 r1848588  
    11<?php
    2 /*
    3 Plugin Name: CardinalCommerce OneConnect
    4 Plugin URI: https://developer.cardinalcommerce.com
    5 Description: Module for processing payments with CardinalCommerce and optional Cardinal Consumer Authentication (CCA)
    6 Version: 1.1.0
    7 Author: CardinalCommerce
    8 Author URI: https://cardinalcommerce.com
    9 License: Proprietary
    10 License URI: data:Proprietary
    11 Text Domain: wc-cardinalprocessormodule
    12 */
     2
     3/**
     4 * Plugin Name:  CardinalCommerce OneConnect
     5 * Plugin URI:   https://developer.cardinalcommerce.com/
     6 * Description:  Module for processing payments with CardinalCommerce and optional Cardinal Consumer Authentication (CCA)
     7 * Version:      1.2.0
     8 * Author:       CardinalCommerce
     9 * Author URI:   https://cardinalcommerce.com/
     10 * License:      Proprietary
     11 * License URI:  data:Proprietary
     12 */
    1313
    1414if ( ! defined( 'ABSPATH' ) ) {
    15     exit;
     15    exit;
    1616}
    1717
    18 const PLUGIN_NAME = 'wc-cardinalprocessormodule';
    19 const GATEWAY_CLASS = 'WC_Gateway_CardinalPM_Common';
     18define( 'CARDINAL_ONECONNECT_VERSION', '1.2.0' );
     19define( 'CARDINAL_ONECONNECT_PLUGIN_FILE', __FILE__ );
    2020
    21 const CARDINALPM_VERSION='1.1.0';
    22 
    23 function wc_gateway_cardinalpm() {
    24     static $plugin;
    25 
    26     if ( ! isset( $plugin ) ) {
    27         require_once( __DIR__ . '/includes/classes/class-wc-gateway-cardinalpm-plugin.php' );
    28 
    29         $plugin = new WC_Gateway_CardinalPM_Plugin( __FILE__, CARDINALPM_VERSION, 'cardinalpm', GATEWAY_CLASS );
    30     }
    31 
    32     return $plugin;
     21function Cardinal_OneConnect_add_gateway( $methods ) {
     22    require_once plugin_dir_path(CARDINAL_ONECONNECT_PLUGIN_FILE) .
     23        'Gateway.php';
     24    $methods[] = 'WC_Payment_Gateway_Cardinal_OneConnect';
     25    return $methods;
    3326}
    3427
    35 wc_gateway_cardinalpm()->maybe_run();
     28add_filter( 'woocommerce_payment_gateways', 'Cardinal_OneConnect_add_gateway' );
     29
     30function Cardinal_OneConnect_order_status_changed(
     31        $order_id, $from_status, $to_status) {
     32    require_once plugin_dir_path(CARDINAL_ONECONNECT_PLUGIN_FILE) .
     33        'Gateway.php';
     34    $gateway = new WC_Payment_Gateway_Cardinal_OneConnect();
     35    return $gateway->order_status_changed($order_id, $from_status, $to_status);
     36}
     37
     38add_action( 'woocommerce_order_status_changed',
     39            'Cardinal_OneConnect_order_status_changed', 10, 3 );
Note: See TracChangeset for help on using the changeset viewer.