Forum OpenACS Q&A: ecommerce problems

Collapse
Posted by Jason Tauber on
I just setup another ecommerce site running openacs and am getting
the following error:

[28/Feb/2002:14:19:06]
    Error: Ns_PgExec: result status: 7 message: ERROR:  Cannot
insert a duplicate key into unique index
cybercash_stub_transaction_pkey

[28/Feb/2002:14:19:06]
    Error: dbinit: error(localhost::stirlingdb,ERROR:  Cannot insert
a duplicate key into unique index cybercash_stub_transaction_pkey
    ): 'insert into cybercash_stub_transactions
            (order_id, card_number, card_exp, currency, amount_auth)
            values
            ('25', '4111111111111111', '02/01', 'USD', 18)'

[28/Feb/2002:14:19:06]
    Error: Database operation "dml" failed
    Database operation "dml" failed
        while executing
    "ns_db dml $db "insert into cybercash_stub_transactions
            (order_id, card_number, card_exp, currency, amount_auth)
            values
            ('$order_id', '$..."
        ("mauthonly" arm line 4)
        invoked from within
    "switch $command {
        mauthonly {
            regexp {([a-zA-Z]+) ([0-9]+)} $amount all currency
amount_num

            ns_db dml $db "insert into cybercash_stub_tran..."
        (procedure "stub_cc_send_to_server_21" line 9)
        invoked from within
    "stub_cc_send_to_server_21 $command $in_data $out_data"
        (procedure "cc_send_to_server_21" line 2)
        invoked from within
    "cc_send_to_server_21 "$txn_attempted_type" $cc_args $cc_output"
        (procedure "ec_talk_to_cybercash" line 64)
        invoked from within
    "ec_talk_to_cybercash "mauthonly" $cc_args"
        (procedure "ec_creditcard_authorization" line 79)
        invoked from within
    "ec_creditcard_authorization $db $order_id"
        (procedure "ec_sweep_for_cybercash_zombies" line 61)
        invoked from within
    "ec_sweep_for_cybercash_zombies"
        ("eval" body line 1)
        invoked from within
    "eval [concat [list $proc] $args]"
        (procedure "ad_run_scheduled_proc" line 43)
        invoked from within
    "ad_run_scheduled_proc {t f 1800 ec_sweep_for_cybercash_zombies
{} 1014689944 0 t}"
    Notice: Running scheduled proc ec_delayed_credit_denied...

I'm not sure what the problem is.  If anybody knows the answer,
please enlighten me.  Thanks alot.

-Jason Tauber

Collapse
Posted by Rocael Hernández Rizzardini on
The cybercash_stub_transactions table is to track and register all the trasactions that your site make with it, if you are no using cybercash (as I do at www.lectario.com), just comment it out! If you need further help just ask here.
Collapse
Posted by Bart Teeuwisse on
Better still than commenting out the cybercash calls is to install my Cybercash stub package. (https://openacs.org/new-file-storage/one-file.tcl?file_id=322)

This package provides a dummy implementation of the old CyberCash interface. All transactions will be approved. This stub works better than the stub that comes with the ecommerce package.

Download the package from the above link and install on your server. Then visit the parameters of your ecommerce package and make sure that UseCyberCashP parameter in the payment information section is 1 (this is the default value).

Restart your server so that the new CyberCash service becomes available. You can now process credit cards as if you had a real connection to CyberCash.

Please note that the CyberCash interface will soon (in the next month or two) be replaced by a service contract based interface that allows connections to several credit card gateways. The first two gateways to become available under this paradigm are Authorize.net and Verisign.