arthurganem (January 4th, 2013)
<?php /* Plugin Name: Merchee Description: Merchee Gateway Plugin Version: 0.1 Author: Arthur Ganem License: Creative Commons Attribution 3.0 Unported License */ // Creating the Form for the Admin function merchee_gateway_values() { global $action_gateway_values; $action_gateway_values = array( // Tab Start array( 'type' => 'tab', 'tabname' => 'Merchee Gateway', 'id' => ''), // Title array( 'type' => 'title', 'name' => 'Merchee Options', 'id' => ''), // Enable-Disable Select Box array( 'type' => 'select', 'name' => 'Enable Merchee', 'options' => array( 'yes' => 'Yes', 'no' => 'No'), 'id' => 'merchee_enable'), // Tab End array( 'type' => 'tabend', 'id' => ''), ); } // Load the Form . . . add_action( 'cp_action_gateway_values', 'merchee_gateway_values'); // Payment Option in Front End function merchee_add_gateway_option() { if(get_option('merchee_enable','no')=='yes') { echo '<option value="merchee">Visa / MasterCard</option>'; } } // Load the Payment option add_action( 'cp_action_payment_method', 'merchee_add_gateway_option'); /* From here on I don't know what to do */ //Process the Payment . . . $merchee_process_vals = array( 'cp_payment_method' => 'merchee', 'item_name' => '', /*Don't know how to extrct this from the user...*/ 'item_number' => '', 'item_amount' => '', 'notify_url' => '', 'return_text' => '', 'return_url' => 'http://merchee.com/blabla'); function merchee_process($merchee_process_vals) { /* no idea what to do here */ } add_action( 'cp_action_gateway', 'merchee_process',10,1);
arthurganem (January 4th, 2013)
There are currently 1 users browsing this thread. (0 members and 1 guests)