Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-oracle.xql 26 May 2002 04:36:49 -0000 1.3 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-oracle.xql 12 Sep 2002 22:45:47 -0000 1.4 @@ -1,46 +1,25 @@ - oracle8.1.6 + + oracle + 8.1.6 + - + - select ec_order_cost(:order_id) as total_amount, creditcard_id, case when sign(sysdate - confirmed_date - .95) = -1 then 1 else 0 end as youth - from ec_orders - where order_id = :order_id + select c.creditcard_number as card_number, substr(creditcard_expire,1,2) as card_exp_month, substr(creditcard_expire,4,2) as card_exp_year, + c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + a.zip_code as billing_zip, + a.line1 as billing_address, + a.city as billing_city, + nvl(a.usps_abbrev, a.full_state_name) as billing_state, + a.country_code as billing_country + from ec_creditcards c, persons p, ec_addresses a + where c.user_id=p.person_id + and c.creditcard_id = :creditcard_id + and c.billing_address = a.address_id - - - - select transaction_amount as total_amount, creditcard_id, case when sign(sysdate-inserted_date-.95) = -1 then 1 else 0 end as youth - from ec_financial_transactions - where transaction_id = :transaction_id - - - - - - insert into ec_cybercash_log - ([join [ad_ns_set_keys -exclude "cc_time" $bind_vars] ", "], cc_time, txn_attempted_time) - values - ([join [ad_ns_set_keys -exclude "cc_time" -colon $bind_vars] ", "], to_date(:cc_time, 'YYYYMMDDHH24MISS'), sysdate) - - - - - - select to_char(:n_hours_to_add / 24 + to_date(:the_date, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDDHH24MISS') - from dual - - - - - update ec_financial_transactions - set transaction_id = :pgw_transaction_id, refunded_date = sysdate - where transaction_id = :transaction_id - - - Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 26 May 2002 04:36:49 -0000 1.5 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 12 Sep 2002 22:45:47 -0000 1.6 @@ -6,43 +6,20 @@ 7.1 - + - select ec_order_cost(:order_id) as total_amount, creditcard_id, case when now() - confirmed_date < timespan_days(0.95) then 1 else 0 end as youth - from ec_orders - where order_id = :order_id + select c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, + c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + a.zip_code as billing_zip, + a.line1 as billing_address, + a.city as billing_city, + coalesce(a.usps_abbrev, a.full_state_name) as billing_state, + a.country_code as billing_country + from ec_creditcards c, persons p, ec_addresses a + where c.user_id=p.person_id + and c.creditcard_id = :creditcard_id + and c.billing_address = a.address_id - - - select transaction_amount as total_amount, creditcard_id, case when now() - inserted_date < timespan_days(0.95) then 1 else 0 end as youth - from ec_financial_transactions - where transaction_id = :transaction_id - - - - - - insert into ec_cybercash_log - ([join [ad_ns_set_keys -exclude "cc_time" $bind_vars] ", "], cc_time, txn_attempted_time) - values - ([join [ad_ns_set_keys -exclude "cc_time" -colon $bind_vars] ", "], to_date(:cc_time, 'YYYYMMDDHH24MISS'), current_timestamp) - - - - - - select to_char(timespan_days(:n_hours_to_add/24::float) + to_date(:the_date, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDDHH24MISS') - - - - - - update ec_financial_transactions - set transaction_id = :pgw_transaction_id, refunded_date = current_timestamp - where transaction_id = :transaction_id - - - Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.xql 26 May 2002 04:36:49 -0000 1.2 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.xql 12 Sep 2002 22:45:47 -0000 1.3 @@ -17,22 +17,6 @@ where transaction_id = :transaction_id - - - - select c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, - c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, - a.zip_code as billing_zip, - a.line1 as billing_address, - a.city as billing_city, - coalesce(a.usps_abbrev, a.full_state_name) as billing_state, - a.country_code as billing_country - from ec_creditcards c, persons p, ec_addresses a - where c.user_id=p.person_id - and c.creditcard_id = :creditcard_id - and c.billing_address = a.address_id - -