Forum OpenACS Q&A: 4.6.3, ecommerce, ordered confirmed then "nothing" logged etc.
A few orders have been placed on a test server using the ecommerce package (with the Authorize gateway package) running Openacs4.6.3, postgres7.2 on FreeBSD4.x.
Most orders show "confirmed" at /ecommerce/admin/orders/by-order-state-and-time Some with paramter test_request set to True, others False (now)
Order ID Date Confirmed Order State Customer Amount # of Items 3000004 October 3, 2003 confirmed Brosten, Torben $187.20 1 3000005 October 4, 2003 confirmed Brosten, Torben $3570.00 10 3000006 October 5, 2003 confirmed Brosten, Torben $882.00 2 3000008 October 6, 2003 confirmed test10, user $54.34 1 3000009 October 6, 2003 confirmed test10, user $187.20 1
There are no notification (success/failure) emails for orders with products.
A separate order for a gift certificate resulted in an email stating: "..the authorization for the gift certificate order you placed.. could not be made."
Here's some detail of one of the above orders:
Overview Order ID 3000008 [snip] TOTAL: $65.22 Ordered by user test10 Confirmed date October 06, 2003 12:06:41 AM Order state confirmed Items [snip] Details [snip] Credit card VISA xxxxxxxxxxxx6780 exp: 03/06 (modify) In basket date October 06, 2003 12:04:34 AM Confirmed date October 06, 2003 12:06:41 AM Authorized date Base shipping charged $7.50 Financial Transactions ID: 4000004 Date: 10/06/03 00:06 Creditcard Last 4: 6780 Amount: $65.22 Type: authorization to charge To Be Captured: Auth Date: Mark Date: Refund Date: Failed: No Shipments No Shipments Have Been Made Returns No Returns Have Been Made Actions * Void Order from: /ecommerce/admin/orders/one?order%5fid=3000008
The aolserver logs don't show any errors. I could not identify any related messages in the general server logs.
No transactions are inserted into the authorize_gateway_result_log table
SELECT * FROM authorize_gateway_result_log; [snip] (0 rows)
No events appear in the server that is emulating authorize.net 3.0 specs. Also, I can login directly to the terminal using parameter values from .. /ecommerce/admin shows:
# Potential Problems (0 unresolved problems) # Orders / Shipments / Refunds (2 orders in last 24 hours; 5 in last 7 days) # Products (11 products; average price: $231.44)
I assume "Potential Problems" refers to ec_problems_log table which also has 0 rows.
My first thought is to check the parameters:
authorize_url: provided by merchant gateway referer_url: https://host:8443/ecommerce/ md5_secret: (same on both servers)
authorize_login and authorize_password work as I can access the payment gateway terminal with them. Ecommerce is mounted in the sitemap at /ecommerce and the payment packaged at /authorize-gateway (not /ecommerce/authorize-gateway ). The docs refer to Authorize.net docs at urls which are in secure zones. I did find some official Authorize.net docs. Nothing for 3.0 emulation, but this doc for 3.1 emulation looks promising.
Any suggestions on where to check next?
1. http://www.authorizenet.com/support/guides.php 2. http://www.authorizenet.com/support/AIM_guide_SCC.pdf
A couple of remarks that might help:
1) With 'test_request = true' all your authorization requests to Authorize.net will be approved. But only authorization requests, all other requests such as 'CAPTURE' will fail.
2) If you have the Authorize.net Gateway mounted at /authorize-gateway then you can check the log at /authorize-gateway/admin. No need to run queries in psql.
3) The customer who ordered won't get a failure notice unless the transaction for the order has been tried and encountered a) a permanent error or b) ran into repeated temporary errors exceeding the PaymentRetryPeriod (an ecommerce package parameter).
4) Upon placing an order the customer receives a confirmation email as soon as the order has been accepted. An order is accepted when the transaction is approved or when an transitory error occured while requesting approval for the transaction.
5) The next email a customer receives is when the order has been schipped. Try shipping these orders and see if a) the authorize-gateway is being contacted (the request should fail, see 1).
6) It is odd that no e-mails went out. At least the confirmation e-mail should have been mailed.
7) To test I would turn the test_request parameter off. Yes, you are now running live transactions. But as transactions are not processed by Authorize.net until the end of the day (configurable in Authorize.net) you can cancel all capture requests that have been approved before they get processed by Authorize.Net. This will give you far more realistic test results.
8) Authorize.Net changed the URLs of their documentation which broke most of the links from authorize-gateway. All links were publically accessible at the time of writing. Try https://secure.authorize.net/docs/ instead.
It seems to me that Authorize.Net has never been contacted or there would have been entries in the log. What exactly when wrong I can not tell from your description. Place trace message in the code and see where it fails.
/authorize-gateway/admin shows "No data found." for "All". Which is consistent. =)
I'll follow your suggestions "..step by step into the darkness. The motion itself is the only truth."
From Bart's Nbr.3 above, PaymentRetryPeriod is the default 8 (hours).
Nbr.7, set test_request to "False". The fulfillment gateway permits a test cc nbr, so all is fine there.
Nbr.5 I cannot figure out how to ship the items.
/ecommerce/admin/orders/fulfillment states "these items are needed in order to fulfill all outstanding orders", word "items" links to /ecommerce/admin/orders/fulfillment-items-needed which shows no items. Also the /ecommerce/admin/orders/one? pages do not present a link to fulfillshipments.
Shipping-avail-p shows "Shipping Avail" for all items entered/ordered.
Next, I'll check permissions on the package files, then map the shopping cart/order logicflow to specific files to identify problem spot(s).
what can I say? Either the orders are screwed up or all items in the order were soft items, e.g. items that don't need shipping such as software you can download.
This document contains authorize.net information for both the 3.0 standard and 3.1.
in reviewing /ecommerce/www/finalize-order.tcl
line 737 shows variable "to_be_capture_p" . Is this supposed to be "to_be_captured_p" (ie. with 'd')?
that is certainly a typo, yet a harmess one. The query text of 'schedule_settlement' that the typo is in, is correct.
Nevertheless, the typo should be corrected. Go ahead if you have commit rights.
Also, how I found this would probably preclude me from such privledges. Here's the recipe based on Alphabits (cereal), math by Abbott and Costello, and lazymind (characteristic of information overload and tired eyes).
Human-based Dumb Compiler Emulation for Intrepretive Lanaguages (and report writing in any language)
1. make a copy of a file containing intrepretive language code
2. convert into spaces all characters not used in variables
3. convert multiple spaces to 1 space (optional)
4. convert spaces to new lines
6. check for orphan words by skim reading the column
Use in place of doodling