diff --git a/wc_umpesa.php b/wc_umpesa.php
new file mode 100644
index 0000000..ead88f4
--- /dev/null
+++ b/wc_umpesa.php
@@ -0,0 +1,480 @@
+id = 'umpesa';
+ $this->icon = 'https://pay.uxtcloud.com/images/icon.png';//WP_PLUGIN_URL . "/" . plugin_basename(dirname(__FILE__)) . '/images/logo.jpg'; //apply_filters('ipay-logo', WC()->plugin_url() . '/images/logo-small.png');
+ $this->has_fields = false;
+ $this->method_title = __( 'umpesa', 'woocommerce' );
+ $this->method_description = __( 'Payments Made Easy' );
+ $this->callback_url = $this->umpesa_callback();
+
+ // load the settings
+ $this->init_form_fields();
+ $this->init_settings();
+
+ // Define user set variables
+ $this->title = $this->get_option( 'title' );
+ $this->description = $this->get_option( 'description' );
+ $this->instructions = $this->get_option( 'instructions', $this->description );
+ $this->appname = $this->get_option( 'appname' );
+ $this->authkey = $this->get_option( 'authkey' );
+ $this->shortcode = $this->get_option( 'shortcode' );
+ $this->hsh = $this->get_option( 'hsh' );
+ $this->live = $this->get_option( 'live' );
+ $this->mpesa = $this->get_option( 'mpesa' );
+ $this->autopay = $this->get_option( 'autopay' );
+
+ //=====================================================================================================================
+
+
+ //Actions
+
+ // actions handling the callback:
+
+ add_action('init', array($this, 'callback_handler'));
+
+ add_action ('woocommerce_api_'.strtolower( get_class( $this ) ), array( $this, 'callback_handler' ) );
+
+ //Saving admin options
+ if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) ) {
+
+ add_action( 'woocommerce_update_options_payment_gateways_'.$this->id, array( $this, 'process_admin_options' ) );
+
+ } else {
+
+ add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
+
+ }
+
+ add_action( 'woocommerce_receipt_umpesa', array( $this, 'receipt_page' ) );
+
+}
+
+/**
+*Initialize Gateway Form Fields - Backend Settings
+*/
+
+public function init_form_fields() {
+
+ $this->form_fields = array(
+ 'enabled' => array(
+ 'title' => __( 'Enable/Disable', 'woocommerce' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Enable Umpesa Payments Gateway', 'woocommerce' ),
+ 'default' => 'yes'
+ ),
+ 'title' => array(
+ 'title' => __( 'Title', 'woocommerce' ),
+ 'type' => 'text',
+ 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
+ 'default' => __( 'umpesa', 'woocommerce' ),
+ 'desc_tip' => true,
+ ),
+ 'description' => array(
+ 'title' => __( 'Description', 'woocommerce' ),
+ 'type' => 'textarea',
+ 'description' => __( 'Payment method description that the customer will see on your checkout.', 'woocommerce' ),
+ 'default' => __( 'Place order and pay using (M-PESA)
Powered by www.uxtcloud.com', 'woocommerce' ),
+ 'desc_tip' => true,
+ ),
+ 'instructions' => array(
+ 'title' => __( 'Instructions', 'woocommerce' ),
+ 'type' => 'textarea',
+ 'description' => __( 'Instructions that will be added to the thank you page and emails.', 'woocommerce' ),
+ 'default' => __( 'Place order and pay using (M-PESA)
Powered by www.uxtcloud.com', 'woocommerce' ),
+ // 'css' => 'textarea { read-only};',
+ 'desc_tip' => true,
+ ),
+ 'authkey' => array(
+ 'title' => __( 'Authentication key', 'woocommerce' ),
+ 'description' => __( 'Authentication key', 'woocommerce' ),
+ 'type' => 'text',
+ 'default' => __( 'authkey', 'woocommerce'),
+ 'desc_tip' => false,
+ ),
+ 'appname' => array(
+ 'title' => __( 'App Name', 'woocommerce' ),
+ 'description' => __( 'App Name', 'woocommerce' ),
+ 'type' => 'text',
+ 'default' => __( 'Uxtcloud', 'woocommerce'),
+ 'desc_tip' => false,
+ ),
+ 'shortcode' => array(
+ 'title' => __( 'Shortcode', 'woocommerce' ),
+ 'description' => __( 'Paybill/Till number', 'woocommerce' ),
+ 'type' => 'text',
+ 'default' => __( 'Shortcode', 'woocommerce'),
+ 'desc_tip' => false,
+ ),
+ 'live' => array(
+ 'title' => __( 'Live/Demo', 'woocommerce' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Make iPay live', 'woocommerce' ),
+ 'default' => 'no',
+ ),
+ 'mpesa' => array(
+ 'title' => __( 'MPESA', 'woocommerce' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Turn On Mobile MPESA', 'woocommerce' ),
+ 'default' => 'yes',
+ ),
+ 'autopay' => array(
+ 'title' => __( 'autopay', 'woocommerce' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Turn On autopay', 'woocommerce' ),
+ 'default' => 'yes',
+ ),
+ );
+}
+
+/**
+ * Generates the HTML for the admin settings page
+ */
+public function admin_options(){
+ /*
+ *The heading and paragraph below are the ones that appear on the backend ipay settings page
+ */
+ echo '
' . 'Payments Made Easy' . '
'; + + echo '