select count(*) from ec_gift_certificates where gift_certificate_id=:gift_certificate_id
select gift_certificate_state from ec_gift_certificates where gift_certificate_id=:gift_certificate_id
insert into ec_creditcards
(creditcard_id, user_id, creditcard_number, creditcard_last_four, creditcard_type, creditcard_expire, billing_zip_code)
values
(:creditcard_id, :user_id, :creditcard_number, :ccstuff_1, :creditcard_type,:expiry,:billing_zip_code)
update ec_financial_transactions set failed_p='t', to_be_captured_p='f' where transaction_id=:transaction_id
update ec_gift_certificates set gift_certificate_state='failed_authorization' where gift_certificate_id=:gift_certificate_id