Index: uc_ideal_lite_payment.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/uc_ideal_lite/uc_ideal_lite_payment.info,v retrieving revision 1.2 diff -u -r1.2 uc_ideal_lite_payment.info --- uc_ideal_lite_payment.info 19 Aug 2008 07:07:37 -0000 1.2 +++ uc_ideal_lite_payment.info 26 Jan 2009 18:26:58 -0000 @@ -2,6 +2,8 @@ name = Ideal Lite description = Receive payments through checkout via Ideal Lite. package = Ubercart - payment -dependencies = uc_payment +dependencies[] = uc_payment +core = 6.x +version = 6.x-1.x-dev Index: uc_ideal_lite_payment.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/uc_ideal_lite/uc_ideal_lite_payment.install,v retrieving revision 1.2 diff -u -r1.2 uc_ideal_lite_payment.install --- uc_ideal_lite_payment.install 19 Aug 2008 07:07:37 -0000 1.2 +++ uc_ideal_lite_payment.install 26 Jan 2009 18:26:34 -0000 @@ -4,20 +4,48 @@ /** * Implementation of hook_install(). */ + +function uc_ideal_lite_payment_schema() { + $schema = array(); + + $schema['uc_payment_ideal'] = array( + 'description' => t("Table for Ubercart payments trough iDEAL easy"), + 'fields' => array( + 'order_id' => array( + 'type' => 'int', + 'default' => 0, + 'not null' => TRUE, + ), + 'transaction_id' => array( + 'type' => 'int', + 'default' => 0, + 'not null' => TRUE, + ), + 'description' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'default' => '0', + 'length' => 64, + ), + 'order_status' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'return_succes' => array( + 'type' => 'text', + ), + ), + 'primary key' => array('order_id'), + ); + + return $schema; +} + function uc_ideal_lite_payment_install() { - switch ($GLOBALS['db_type']) { - case 'mysql': - case 'mysqli': - db_query("CREATE TABLE {uc_payment_ideal} ( - order_id mediumint(9) NOT NULL, - transaction_id mediumint(9) NOT NULL, - description varchar(64) NOT NULL, - order_status tinyint(4) NOT NULL, - return_succes tinytext NOT NULL, - PRIMARY KEY (order_id) - ) /*!40100 DEFAULT CHARACTER SET UTF8 */ "); - break; - case 'pgsql': - break; - } + drupal_install_schema('uc_ideal_lite_payment'); +} + +function uc_ideal_lite_payment_uninstall() { + drupal_uninstall_schema('uc_ideal_lite_payment'); } Index: uc_ideal_lite_payment.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/uc_ideal_lite/uc_ideal_lite_payment.module,v retrieving revision 1.2 diff -u -r1.2 uc_ideal_lite_payment.module --- uc_ideal_lite_payment.module 19 Aug 2008 07:07:37 -0000 1.2 +++ uc_ideal_lite_payment.module 26 Jan 2009 18:26:03 -0000 @@ -16,54 +16,59 @@ /******************************************************************************* * Hook Functions (Drupal) ******************************************************************************/ +/** + * Implementation of hook_theme(). + */ +function uc_ideal_lite_payment_theme() { + return array( + 'uc_ideal_lite_payment_method_form' => array( + 'arguments' => array('form' => NULL), + ), + ); +} /** * Implementation of hook_menu(). */ -function uc_ideal_lite_payment_menu($may_cache) { +function uc_ideal_lite_payment_menu() { $items = array(); - $items[] = array( - 'path' => 'cart/checkout/ideal_lite_request', - 'title' => t('iDEAL Payment Page'), - 'callback' => 'uc_ideal_request_form', - 'access' => user_access('access content'), + $items['cart/checkout/ideal_lite_request'] = array( + 'title' => 'iDEAL Payment Page', + 'page callback' => 'uc_ideal_request_form', + 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); - $items[] = array( - 'path' => 'cart/checkout/ideal_lite_dirreq', - 'title' => t('iDEAL Payment Page'), - 'callback' => 'uc_ideal_lite_dirreq_form', - 'access' => user_access('access content'), + $items['cart/checkout/ideal_lite_dirreq'] = array( + 'title' => 'iDEAL Payment Page', + 'page callback' => 'uc_ideal_lite_dirreq_form', + 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); - $items[] = array( - 'path' => 'cart/checkout/ideal_lite_stat_ok', - 'title' => t('iDEAL Payment'), - 'callback' => 'uc_ideal_lite_stat_call', - 'callback arguments' => array('ok'), - 'access' => user_access('access content'), + $items['cart/checkout/ideal_lite_stat_ok'] = array( + 'title' => 'iDEAL Payment', + 'page callback' => 'uc_ideal_lite_stat_call', + 'page arguments' => array('ok'), + 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); - $items[] = array( - 'path' => 'cart/checkout/ideal_lite_stat_canc', - 'title' => t('iDEAL Payment'), - 'callback' => 'uc_ideal_lite_stat_call', - 'callback arguments' => array('cancel'), - 'access' => user_access('access content'), + $items['cart/checkout/ideal_lite_stat_canc'] = array( + 'title' => 'iDEAL Payment', + 'page callback' => 'uc_ideal_lite_stat_call', + 'page arguments' => array('cancel'), + 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); - $items[] = array( - 'path' => 'cart/checkout/ideal_lite_stat_err', - 'title' => t('iDEAL Payment'), - 'callback' => 'uc_ideal_lite_stat_call', - 'callback arguments' => array('error'), - 'access' => user_access('access content'), + $items['cart/checkout/ideal_lite_stat_err'] = array( + 'title' => 'iDEAL Payment', + 'page callback' => 'uc_ideal_lite_stat_call', + 'page arguments' => array('error'), + 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); @@ -87,7 +92,7 @@ 'callback' => 'uc_payment_method_ideal_lite', 'weight' => 2, 'checkout' => TRUE, - 'backend' => TRUE, + 'no_gateway' => TRUE, ); return $methods; @@ -207,8 +212,6 @@ */ function uc_ideal_lite_payment_settings_form() { - $url_base = url(NULL, NULL, NULL, TRUE); - $form['ideal_lite_key'] = array( '#type' => 'textfield', '#title' => t('Hashkey'), @@ -307,8 +310,6 @@ function uc_ideal_lite_call(&$arg1, $arg2) { - $url_base = url(NULL, NULL, NULL, TRUE); - $redirect_message1 = t('You will be redirected to the iDEAL gateway...'); $redirect_message2 = t('You will return to our shop after completing your iDEAL payment transaction.'); @@ -346,7 +347,6 @@ /*Get request form*/ function uc_ideal_lite_request_form($orderid, $amount) { - $url_base = url(NULL, NULL, NULL, TRUE); $key = variable_get('ideal_lite_key', ''); $acquirerurl = variable_get('ideal_lite_acquirerurl', ''); @@ -448,7 +448,7 @@ //Here you should retrieve the order from the database, mark it as "payed" $order = uc_order_load($_SESSION['ideal_lite_order_id']); if ($order == FALSE) { //Check if order exist - watchdog('uc_ideal_lite_payment', t('iDEAL payment completion attempted for non-existent order.'), WATCHDOG_ERROR); + watchdog('uc_ideal_lite_payment', 'iDEAL payment completion attempted for non-existent order.', array(), WATCHDOG_ERROR); //return; Uitgezet KK 200508 drupal_set_message(t('Something went wrong during the iDEAL payment "return to shop" process. If you are not sure if your payment is processed, pleas contact us regarding this. We will check your payment manualy.'), 'error'); drupal_goto('cart/checkout');