Index: openacs-4/packages/authorize-gateway/authorize-gateway.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/authorize-gateway.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/authorize-gateway/authorize-gateway.info 19 Sep 2002 20:02:43 -0000 1.3 +++ openacs-4/packages/authorize-gateway/authorize-gateway.info 16 Dec 2003 19:21:49 -0000 1.4 @@ -12,7 +12,7 @@ oracle postgresql - Bart Teeuwisse + Bart Teeuwisse Authorize.net payment gateway 2002-05-13 Payment gateway to Authorize.net. An account with Authorize.net and a merchant account are required. Index: openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-create.sql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,15 @@ +create table authorize_gateway_result_log ( + transaction_id varchar2(20) not null, + txn_attempted_type varchar2(18), + txn_attempted_time date, + response varchar2(400), + response_code varchar2(1), + response_reason_code varchar2(2), + response_reason_text varchar2(100), + auth_code varchar2(6), + avs_code varchar2(3), + amount number not null, + constraint authorize_log_pk primary key(transaction_id) +); + +@authorize-gateway-sc-create.sql; Index: openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-drop.sql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,3 @@ +drop table authorize_gateway_result_log; + +@authorize-gateway-sc-drop.sql; Index: openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-create.sql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,69 @@ +-- This is an Authorize.net implementation of the PaymentGateway +-- service contract + +declare + foo integer; +begin + foo := acs_sc_impl.new( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'authorize-gateway' -- impl_owner_name + ); + + foo := acs_sc_impl.new_alias( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'Authorize', -- impl_operation_name + 'authorize_gateway.authorize', -- impl_alias + 'TCL' -- impl_pl + ); + + foo := acs_sc_impl.new_alias( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'ChargeCard', -- impl_operation_name + 'authorize_gateway.chargecard', -- impl_alias + 'TCL' -- impl_pl + ); + + foo := acs_sc_impl.new_alias( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'Return', -- impl_operation_name + 'authorize_gateway.return', -- impl_alias + 'TCL' -- impl_pl + ); + + foo := acs_sc_impl.new_alias( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'Void', -- impl_operation_name + 'authorize_gateway.void', -- impl_alias + 'TCL' -- impl_pl + ); + + foo := acs_sc_impl.new_alias( + 'PaymentGateway', -- impl_contract_name + 'authorize-gateway', -- impl_name + 'Info', -- impl_operation_name + 'authorize_gateway.info', -- impl_alias + 'TCL' -- impl_pl + ); + +end; +/ +show errors + +-- Add the binding + +declare + foo integer; +begin + + acs_sc_binding.new ( + contract_name => 'PaymentGateway', + impl_name => 'authorize-gateway' + ); +end; +/ +show errors Index: openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/sql/oracle/authorize-gateway-sc-drop.sql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,47 @@ +declare + foo integer; +begin + + foo := acs_sc_impl.delete_alias( + 'PaymentGateway', + 'authorize-gateway', + 'Authorize' + ); + + foo := acs_sc_impl.delete_alias( + 'PaymentGateway', + 'authorize-gateway', + 'ChargeCard' + ); + + foo := acs_sc_impl.delete_alias( + 'PaymentGateway', + 'authorize-gateway', + 'Return' + ); + + foo := acs_sc_impl.delete_alias( + 'PaymentGateway', + 'authorize-gateway', + 'Void' + ); + + foo := acs_sc_impl.delete_alias( + 'PaymentGateway', + 'authorize-gateway', + 'Info' + ); + + acs_sc_binding.delete( + contract_name => 'PaymentGateway', + impl_name => 'authorize-gateway' + ); + + acs_sc_impl.delete( + 'PaymentGateway', + 'authorize-gateway' + ); + +end; +/ +show errors \ No newline at end of file Index: openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-create.sql 17 May 2003 10:13:24 -0000 1.3 +++ openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-create.sql 16 Dec 2003 19:21:50 -0000 1.4 @@ -1,16 +1,16 @@ -create table authorize_gateway_result_log ( - transaction_id varchar(20) not null, - txn_attempted_type varchar(18), - txn_attempted_time timestamptz, - response varchar(400), - response_code varchar(1), - response_reason_code varchar(2), - response_reason_text varchar(100), - auth_code varchar(6), - avs_code varchar(3), - amount numeric not null -); - -create index authorize_gateway_result_log_transaction_id on authorize_gateway_result_log(transaction_id); - -\i authorize-gateway-sc-create.sql +create table authorize_gateway_result_log ( + transaction_id varchar(20) not null, + txn_attempted_type varchar(18), + txn_attempted_time timestamptz, + response varchar(400), + response_code varchar(1), + response_reason_code varchar(2), + response_reason_text varchar(100), + auth_code varchar(6), + avs_code varchar(3), + amount numeric not null +); + +create index authorize_gateway_result_log_transaction_id on authorize_gateway_result_log(transaction_id); + +\i authorize-gateway-sc-create.sql Index: openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-drop.sql 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/sql/postgresql/authorize-gateway-drop.sql 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,3 +1,3 @@ -drop table authorize_gateway_result_log; - -\i authorize-gateway-sc-drop.sql +drop table authorize_gateway_result_log; + +\i authorize-gateway-sc-drop.sql Index: openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-oracle.xql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + insert into authorize_gateway_result_log + (transaction_id, txn_attempted_type, txn_attempted_time, response, response_code, + response_reason_code, response_reason_text, auth_code, avs_code, amount) + values + (:transaction_id, :txn_attempted_type, to_date(:txn_attempted_time,'MM/DD/YY HH24:MI:SS'), :response, :response_code, + :response_reason_code, :response_reason_text, :auth_code, :avs_code, :amount) + + + + \ No newline at end of file Index: openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs-postgresql.xql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,17 @@ + + + + postgresql7.1 + + + + insert into authorize_gateway_result_log + (transaction_id, txn_attempted_type, txn_attempted_time, response, response_code, + response_reason_code, response_reason_text, auth_code, avs_code, amount) + values + (:transaction_id, :txn_attempted_type, :txn_attempted_time, :response, :response_code, + :response_reason_code, :response_reason_text, :auth_code, :avs_code, :amount) + + + + \ No newline at end of file Index: openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.tcl 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.tcl 16 Dec 2003 19:21:50 -0000 1.2 @@ -2,7 +2,7 @@ Procedures to implement Authorize.net credit card transactions. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } @@ -23,15 +23,20 @@ Connect to Authorize.net to authorize a transaction for the amount given on the card given. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Send transaction off to gateway set test_request [authorize_gateway.decode_test_request] - set field_seperator [ad_parameter field_seperator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] - set field_encapsulator [ad_parameter field_encapsulator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] - set referer_url [ad_parameter referer_url -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] referer_url]] + set field_seperator [ad_parameter field_seperator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] + set field_encapsulator [ad_parameter field_encapsulator \ + -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] + set referer_url [ad_parameter referer_url \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] referer_url]] # Add the Referer to the headers passed on to Authorize.net @@ -147,18 +152,13 @@ the authorize_gateway_result_log for transaction_id. AuthCapture will be used if there is no prior authorize transaction in the log. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Check for the existence of a prior auth_only for the transaction_id. - if {[db_0or1row select_auth_only " - select transaction_id, auth_code - from authorize_gateway_result_log - where txn_attempted_type='AUTH_ONLY' - and response_code='1' - and transaction_id=:transaction_id"]} { + if {[db_0or1row select_auth_only {}]} { # 2a. The transaction has been authorized, now mark the transaction for settlement. @@ -191,16 +191,22 @@ The transaction id needs to reference a settled transaction performed with the same card. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Send transaction off to gateway set test_request [authorize_gateway.decode_test_request] - set field_seperator [ad_parameter field_seperator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] - set field_encapsulator [ad_parameter field_encapsulator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] - set referer_url [ad_parameter referer_url -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] referer_url]] + set field_seperator [ad_parameter field_seperator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] + set field_encapsulator [ad_parameter field_encapsulator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] + set referer_url [ad_parameter referer_url \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] referer_url]] # Add the Referer to the headers passed on to Authorize.net @@ -298,15 +304,21 @@ } { Connect to Authorize.net to void the transaction with transaction_id. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Send transaction off to gateway set test_request [authorize_gateway.decode_test_request] - set field_seperator [ad_parameter field_seperator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] - set field_encapsulator [ad_parameter field_encapsulator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] - set referer_url [ad_parameter referer_url -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] referer_url]] + set field_seperator [ad_parameter field_seperator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] + set field_encapsulator [ad_parameter field_encapsulator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] + set referer_url [ad_parameter referer_url \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] referer_url]] # Add the Referer to the headers passed on to Authorize.net @@ -394,24 +406,17 @@ payment service contract. Returns the package_key, version, package name cards accepted and a list of return codes. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { array set info [list \ package_key authorize-gateway \ - version [db_string get_package_version " - select version_name - from apm_package_versions - where enabled_p = 't' - and package_key = 'authorize-gateway'"] \ - package_name [db_string get_package_name " - select instance_name - from apm_packages p, apm_package_versions v - where p.package_key = v.package_key - and v.enabled_p = 't' - and p.package_key = 'authorize-gateway'"] \ - cards_accepted [ad_parameter CreditCardsAccepted -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] CreditCardsAccepted]] \ + version [db_string get_package_version {}] \ + package_name [db_string get_package_name {}] \ + cards_accepted [ad_parameter CreditCardsAccepted \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] CreditCardsAccepted]] \ success [nsv_get payment_gateway_return_codes success] \ failure [nsv_get payment_gateway_return_codes failure] \ retry [nsv_get payment_gateway_return_codes retry] \ @@ -433,15 +438,21 @@ Connect to Authorize.net to PRIOR_AUTH_CAPTURE the transaction with transaction id. The transaction needs to have been AUTH_ONLY before calling this procedure. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Send transaction off to gateway set test_request [authorize_gateway.decode_test_request] - set field_seperator [ad_parameter field_seperator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] - set field_encapsulator [ad_parameter field_encapsulator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] - set referer_url [ad_parameter referer_url -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] referer_url]] + set field_seperator [ad_parameter field_seperator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] + set field_encapsulator [ad_parameter field_encapsulator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] + set referer_url [ad_parameter referer_url \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] referer_url]] # Add the Referer to the headers passed on to Authorize.net @@ -543,15 +554,21 @@ Connect to Authorize.net to authorize and shedule the transaction for automatic settling. No further action is needed to complete the transastion. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { # 1. Send transaction off to gateway set test_request [authorize_gateway.decode_test_request] - set field_seperator [ad_parameter field_seperator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] - set field_encapsulator [ad_parameter field_encapsulator -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] - set referer_url [ad_parameter referer_url -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] referer_url]] + set field_seperator [ad_parameter field_seperator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_seperator]] + set field_encapsulator [ad_parameter field_encapsulator \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] field_encapsulator]] + set referer_url [ad_parameter referer_url \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] referer_url]] # Add the Referer to the headers passed on to Authorize.net @@ -657,7 +674,7 @@ Authorize.net response codes to standardized payment service contract response codres. - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { @@ -776,11 +793,13 @@ package. This prevents errors due to incorrect values of the test_request parameter - @author Bart Teeuwisse + @author Bart Teeuwisse @creation-date March 2002 } { - switch -exact [string tolower [ad_parameter test_request -default [ad_parameter -package_id [apm_package_id_from_key authorize-gateway] test_request]]] { + switch -exact [string tolower [ad_parameter test_request \ + -default [ad_parameter \ + -package_id [apm_package_id_from_key authorize-gateway] test_request]]] { "0" - "n" - "no" - @@ -815,15 +834,9 @@ Write the results of the current operation to the database. If it fails, log it but don't let the user know about it. - @author Bart Teeuwisse + @author Bart Teeuwisse } { - if [catch {db_dml do-insert " - insert into authorize_gateway_result_log - (transaction_id, txn_attempted_time, txn_attempted_type, response, response_code, response_reason_code, response_reason_text, response_transaction_id, - auth_code, avs_code, amount) - values - (:transaction_id, :txn_attempted_time, :txn_attempted_type, :response, :response_code, :response_reason_code, :response_reason_text, :response_transaction_id, - :auth_code, :avs_code, :amount)"} errmsg] { + if [catch {db_dml do-insert {}} errmsg] { ns_log Error "Wasn't able to do insert into authorize_gateway_result_log for transaction_id $transaction_id; error was $errmsg" } } Index: openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.xql 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/tcl/authorize-gateway-procs.xql 16 Dec 2003 19:21:50 -0000 1.2 @@ -12,17 +12,6 @@ - - - insert into authorize_gateway_result_log - (transaction_id, txn_attempted_type, txn_attempted_time, response, response_code, - response_reason_code, response_reason_text, auth_code, avs_code, amount) - values - (:transaction_id, :txn_attempted_type, :txn_attempted_time, :response, :response_code, - :response_reason_code, :response_reason_text, :auth_code, :avs_code, :amount) - - - select version_name Index: openacs-4/packages/authorize-gateway/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/authorize-gateway/www/index.adp 22 May 2003 14:20:48 -0000 1.4 +++ openacs-4/packages/authorize-gateway/www/index.adp 16 Dec 2003 19:21:50 -0000 1.5 @@ -1,10 +1,10 @@ - - @title;noquote@ - -
@context_bar;noquote@[ Administer ]
-
- - @context_bar;noquote@ - - -

This package has no user pages.

+ + @title;noquote@ + +
@context_bar;noquote@[ Administer ]
+
+ + @context_bar;noquote@ + + +

This package has no user pages.

Index: openacs-4/packages/authorize-gateway/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/index.tcl 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/index.tcl 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,38 +1,33 @@ -ad_page_contract { - - A place holder for access to the admin pages. - - @author Bart Teeuwisse - @creation-date April 2002 - -} { -} -properties { - title:onevalue - context_bar:onevalue -} - -# Authenticate the user - -set user_id [ad_maybe_redirect_for_registration] - -# Check for admin privileges - -set package_id [ad_conn package_id] -set admin_p [ad_permission_p $package_id admin] - -# Get the name of the package - -if {[db_0or1row get_package_name " - select p.instance_name - from apm_packages p, apm_package_versions v - where p.package_id = :package_id - and p.package_key = v.package_key - and v.enabled_p = 't'"]} { - set title "$instance_name" -} else { - set title "Authorize.net Gateway" -} - -# Set the context bar. - -set context_bar [ad_context_bar] +ad_page_contract { + + A place holder for access to the admin pages. + + @author Bart Teeuwisse + @creation-date April 2002 + +} { +} -properties { + title:onevalue + context_bar:onevalue +} + +# Authenticate the user + +set user_id [ad_maybe_redirect_for_registration] + +# Check for admin privileges + +set package_id [ad_conn package_id] +set admin_p [ad_permission_p $package_id admin] + +# Get the name of the package + +if {[db_0or1row get_package_name {}]} { + set title "$instance_name" +} else { + set title "Authorize.net Gateway" +} + +# Set the context bar. + +set context_bar [ad_context_bar] Index: openacs-4/packages/authorize-gateway/www/admin/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/admin/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/authorize-gateway/www/admin/index-oracle.xql 16 Dec 2003 19:21:50 -0000 1.1 @@ -0,0 +1,32 @@ + + + + oracle8.1.6 + + + + txn_attempted_time + 1 > sysdate + + + + + + txn_attempted_time + 7 > sysdate + + + + + + add_months(txn_attempted_time,1) > sysdate + + + + + + select transaction_id, to_char(txn_attempted_time, 'MM-DD-YYYY HH24:MI:SS') as txn_time, txn_attempted_type, response, response_code, response_reason_code, response_reason_text, auth_code, avs_code, amount + from authorize_gateway_result_log + where '1'='1' [ad_dimensional_sql $dimensional] [ad_order_by_from_sort_spec $orderby $table_def] + + + + \ No newline at end of file Index: openacs-4/packages/authorize-gateway/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/admin/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/admin/index-postgresql.xql 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/admin/index-postgresql.xql 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,32 +1,32 @@ - - - - postgresql7.1 - - - - txn_attempted_time + '1 days'::interval > now() - - - - - - txn_attempted_time + '7 days'::interval > now() - - - - - - txn_attempted_time + '1 months'::interval > now() - - - - - - select transaction_id, to_char(txn_attempted_time, 'MM-DD-YYYY HH24:MI:SS') as txn_time, txn_attempted_type, response, response_code, response_reason_code, response_reason_text, auth_code, avs_code, amount - from authorize_gateway_result_log - where '1'='1' [ad_dimensional_sql $dimensional] [ad_order_by_from_sort_spec $orderby $table_def] - - - - \ No newline at end of file + + + + postgresql7.1 + + + + txn_attempted_time + '1 days'::interval > now() + + + + + + txn_attempted_time + '7 days'::interval > now() + + + + + + txn_attempted_time + '1 months'::interval > now() + + + + + + select transaction_id, to_char(txn_attempted_time, 'MM-DD-YYYY HH24:MI:SS') as txn_time, txn_attempted_type, response, response_code, response_reason_code, response_reason_text, auth_code, avs_code, amount + from authorize_gateway_result_log + where '1'='1' [ad_dimensional_sql $dimensional] [ad_order_by_from_sort_spec $orderby $table_def] + + + + Index: openacs-4/packages/authorize-gateway/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/admin/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/authorize-gateway/www/admin/index.adp 22 May 2003 14:21:10 -0000 1.4 +++ openacs-4/packages/authorize-gateway/www/admin/index.adp 16 Dec 2003 19:21:50 -0000 1.5 @@ -1,7 +1,7 @@ - - @title;noquote@ -
@context_bar;noquote@[ help ]
- - @dimensional_bar@ -

@result_table@

- + + @title;noquote@ +
@context_bar;noquote@[ help ]
+ + @dimensional_bar@ +

@result_table@

+ Index: openacs-4/packages/authorize-gateway/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/admin/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/admin/index.tcl 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/admin/index.tcl 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,80 +1,70 @@ -ad_page_contract { - - Lists the log of the results - - @author Bart Teeuwisse - @creation-date April 2002 -} { - {orderby "txn_time*"} -} -properties { - title:onevalue - context_bar:onevalue - dimensional_bar:onevalue -} - -# Authenticate the user - -set user_id [ad_maybe_redirect_for_registration] - -# Check for admin privileges - -set package_id [ad_conn package_id] -set admin_p [ad_permission_p $package_id admin] - -# Get the package name and set the title. - -if {[db_0or1row get_package_name " - select p.instance_name - from apm_packages p, apm_package_versions v - where p.package_id = :package_id - and p.package_key = v.package_key - and v.enabled_p = 't'"]} { - set title "$instance_name Administration" -} else { - set title "Administration" -} - -# Set the context bar. - -set context_bar [ad_context_bar] - -# Dimensional slider definition for narrowing the selection. - -set dimensional { - {response_code "Result" approved { - {approved "approved" {where "[db_map result_approved]"} } - {declined "declined" {where "[db_map result_declined]"} } - {error "error" {where "[db_map result_error]"} } - {any "all" {} } - } } - {transaction "Time of transaction" 1d { - {1d "last 24 hours" {where "[db_map transaction_last_24hours]"}} - {1w "last week" {where "[db_map transaction_last_week]"}} - {1m "last month" {where "[db_map transaction_last_month]"}} - {any "all" {} } - } } -} -set dimensional_bar [ad_dimensional $dimensional] - -# Definition for ad_table. - -set table_def { - {transaction_id "ID" {} {}} - {txn_time "Date" {txn_attempted_time desc} {}} - {txn_attempted_type "Type" {} {}} - {response_code "Result" {} {}} - {response_reason_code "Reason" {} {}} - {response_reason_text "Explanation" no_sort {}} - {auth_code "Authorization" {} {}} - {avs_code "AVS" {} {}} - {response "Verbatim response" no_sort {}} -} - -# Create the table to display the results from Authorize.net - -set result_table [ad_table result_select " - select transaction_id, to_char(txn_attempted_time, 'MM-DD-YYYY HH12:MI:SS AM') as txn_time, txn_attempted_type, response, response_code, response_reason_code, - response_reason_text, auth_code, avs_code, amount - from authorize_gateway_result_log - where '1'='1' [ad_dimensional_sql $dimensional] - [ad_order_by_from_sort_spec $orderby $table_def]" $table_def] +ad_page_contract { + + Lists the log of the results + + @author Bart Teeuwisse + @creation-date April 2002 +} { + {orderby "txn_time*"} +} -properties { + title:onevalue + context_bar:onevalue + dimensional_bar:onevalue +} + +# Authenticate the user + +set user_id [ad_maybe_redirect_for_registration] + +# Check for admin privileges + +set package_id [ad_conn package_id] +set admin_p [ad_permission_p $package_id admin] + +# Get the package name and set the title. + +if {[db_0or1row get_package_name {}]} { + set title "$instance_name Administration" +} else { + set title "Administration" +} + +# Set the context bar. + +set context_bar [ad_context_bar] + +# Dimensional slider definition for narrowing the selection. + +set dimensional { + {response_code "Result" approved { + {approved "approved" {where "[db_map result_approved]"} } + {declined "declined" {where "[db_map result_declined]"} } + {error "error" {where "[db_map result_error]"} } + {any "all" {} } + } } + {transaction "Time of transaction" 1d { + {1d "last 24 hours" {where "[db_map transaction_last_24hours]"}} + {1w "last week" {where "[db_map transaction_last_week]"}} + {1m "last month" {where "[db_map transaction_last_month]"}} + {any "all" {} } + } } +} +set dimensional_bar [ad_dimensional $dimensional] + +# Definition for ad_table. + +set table_def { + {transaction_id "ID" {} {}} + {txn_time "Date" {txn_attempted_time desc} {}} + {txn_attempted_type "Type" {} {}} + {response_code "Result" {} {}} + {response_reason_code "Reason" {} {}} + {response_reason_text "Explanation" no_sort {}} + {auth_code "Authorization" {} {}} + {avs_code "AVS" {} {}} + {response "Verbatim response" no_sort {}} +} + +# Create the table to display the results from Authorize.net + +set result_table [ad_table result_select {} $table_def] Index: openacs-4/packages/authorize-gateway/www/admin/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/admin/index.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/admin/index.xql 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/admin/index.xql 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,32 +1,32 @@ - - - - - - select p.instance_name - from apm_packages p, apm_package_versions v - where p.package_id = :package_id - and p.package_key = v.package_key - and v.enabled_p = 't' - - - - - - response_code='1' - - - - - - response_code='2' - - - - - - response_code='3' - - - - + + + + + + select p.instance_name + from apm_packages p, apm_package_versions v + where p.package_id = :package_id + and p.package_key = v.package_key + and v.enabled_p = 't' + + + + + + response_code='1' + + + + + + response_code='2' + + + + + + response_code='3' + + + + Index: openacs-4/packages/authorize-gateway/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/doc/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/authorize-gateway/www/doc/index.adp 22 May 2003 14:21:31 -0000 1.4 +++ openacs-4/packages/authorize-gateway/www/doc/index.adp 16 Dec 2003 19:21:50 -0000 1.5 @@ -29,7 +29,7 @@

Janine Sisk of furfly.net and Bart Teeuwisse + href="mailto:bart.teeuwisse@thecodemill.biz">Bart Teeuwisse teamed up to design a general purpose payment service contract and to create the first implementations of the contract. Janine developed the interface to PayflowPro the successor of CyberCash @@ -212,7 +212,7 @@

Credits

The @package_name@ was designed and written by Bart Teeuwisse + href="mailto:bart.teeuwisse@thecodemill.biz">Bart Teeuwisse for Berklee College Of Music while working as a subcontractor for furfly.net.

Index: openacs-4/packages/authorize-gateway/www/doc/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/doc/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/doc/index.tcl 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/doc/index.tcl 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,44 +1,44 @@ -ad_page_contract { - - Index to documentation of the Authorize.net Gateway, an - implementation of the Payment Service Contract. - - @author Bart Teeuwisse - @creation-date May 2002 - -} { -} -properties { - title:onevalue - context_bar:onevalue -} - -# Authenticate the user - -set user_id [ad_maybe_redirect_for_registration] - -set package_name "Authorize.net Gateway" -set title "$package_name Documentation" -set package_url [apm_package_url_from_key "authorize-gateway"] -set package_id [apm_package_id_from_key "authorize-gateway"] - -# Check if the package has been mounted. - -set authorize_gateway_mounted [expr ![empty_string_p $package_url]] - -# Check for admin privileges - -set admin_p [ad_permission_p $package_id admin] - -# Check if the ecommerce and the shipping service contract packages -# are installed on the system. - -set ecommerce_installed [apm_package_installed_p ecommerce] -set payment_gateway_installed [apm_package_installed_p "payment-gateway"] - -# Set the context bar. - -set context_bar [ad_context_bar $package_name] - -# Set signatory for at the bottom of the page - -set signatory "bart.teeuwisse@7-sisters.com" +ad_page_contract { + + Index to documentation of the Authorize.net Gateway, an + implementation of the Payment Service Contract. + + @author Bart Teeuwisse + @creation-date May 2002 + +} { +} -properties { + title:onevalue + context_bar:onevalue +} + +# Authenticate the user + +set user_id [ad_maybe_redirect_for_registration] + +set package_name "Authorize.net Gateway" +set title "$package_name Documentation" +set package_url [apm_package_url_from_key "authorize-gateway"] +set package_id [apm_package_id_from_key "authorize-gateway"] + +# Check if the package has been mounted. + +set authorize_gateway_mounted [expr ![empty_string_p $package_url]] + +# Check for admin privileges + +set admin_p [ad_permission_p $package_id admin] + +# Check if the ecommerce and the shipping service contract packages +# are installed on the system. + +set ecommerce_installed [apm_package_installed_p ecommerce] +set payment_gateway_installed [apm_package_installed_p "payment-gateway"] + +# Set the context bar. + +set context_bar [ad_context_bar $package_name] + +# Set signatory for at the bottom of the page + +set signatory "bart.teeuwisse@thecodemill.biz" Index: openacs-4/packages/authorize-gateway/www/doc/license.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/authorize-gateway/www/doc/license.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/authorize-gateway/www/doc/license.tcl 21 May 2002 18:36:25 -0000 1.1 +++ openacs-4/packages/authorize-gateway/www/doc/license.tcl 16 Dec 2003 19:21:50 -0000 1.2 @@ -1,28 +1,28 @@ -ad_page_contract { - - License information of the Authorize.net Gateway, an - implementation of the Payment Service Contract. - - @author Bart Teeuwisse - @creation-date May 2002 - -} { -} -properties { - title:onevalue - context_bar:onevalue -} - -# Authenticate the user - -set user_id [ad_maybe_redirect_for_registration] - -set package_name "Authorize.net Gateway" -set title "$package_name License" - -# Set the context bar. - -set context_bar [ad_context_bar [list . $package_name] License] - -# Set signatory for at the bottom of the page - -set signatory "bart.teeuwisse@7-sisters.com" +ad_page_contract { + + License information of the Authorize.net Gateway, an + implementation of the Payment Service Contract. + + @author Bart Teeuwisse + @creation-date May 2002 + +} { +} -properties { + title:onevalue + context_bar:onevalue +} + +# Authenticate the user + +set user_id [ad_maybe_redirect_for_registration] + +set package_name "Authorize.net Gateway" +set title "$package_name License" + +# Set the context bar. + +set context_bar [ad_context_bar [list . $package_name] License] + +# Set signatory for at the bottom of the page + +set signatory "bart.teeuwisse@thecodemill.biz"