Index: openacs.org-dev/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs.org-dev/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs.org-dev/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 9 Jul 2002 17:35:05 -0000 1.1.1.1
+++ openacs.org-dev/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 8 Oct 2002 15:47:05 -0000 1.1.1.2
@@ -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
-
-
-