PDA

View Full Version : Powerful Product for Simple Problem


Jon Gibson
03-12-2009, 07:27 PM
Hello:

SETUP
I have eCart 4, a form, and database set up to take the following user inputs:
1. Name (first and last)
2. Address fields
3. Credit Card field
4. Amount of Donation field
5. Donate button
No DB connection or any PHP has been applied (although I have all of the pertinent information).

GOAL:
To use eCart as the shopping cart that connects to Authorize.net

QUESTION/DESIRED OUTCOME
Am I using the right tool (eCart)? Or is there an easier way to connect? This is my first time connecting to a Merchant Account. I would like to have eCart connect my form fields to the Authorize.net account.

Thank you,
Jon

Ray Borduin
03-13-2009, 07:23 AM
Yes, create a shopping cart. Add an add to cart button with the amount set to "updatable" from a text field. Set the ID to 1 and select the Replace option if item is already in cart.

Apply the local checkout server behavior in eCart for Authorize.net.

That should do it.

Jon Gibson
03-13-2009, 08:49 AM
I know I need to put in a lot more time studying the eCart to fully maximize its functionality. So I thank you for providing a solution that will address my specific need.

I will post a follow up by tomorrow with the successful results.

Jon Gibson
03-13-2009, 05:11 PM
Ray,

Unfortunately the solution did not work for me. I believe that to accomplish my task with any level of success I am going to have to work completely through the dynamic and static tutorials.

I would like to suggest to the WebAssist team a solution receipt for simple tasks like mine. The documentation is fantastic for a fully operational store, but to use eCart for a two field donation is very overwhelming.

Thank you for your solution . . . it didn't work only because I don't have a firm grasp on e-commerce and how to use eCart (yet).

Jon

Jon Gibson
03-16-2009, 08:14 PM
Hopefully you see this Ray:

I have gone through the two tutorials and feel a little bit better about using eCart. I know I need another month or so using it to get good, but . . .

STATUS:
1. I followed your previous directions, but made a few modifications. Instead of the local checkout behavior, I used the checkout wizard.
2. Everything works great until I get the credit card submit. I get the error page saying my transaction could not be processed at this time.

QUESTIONS:
1. My Authorize.net account is still in TEST MODE. Would this affect the transaction causing the "Could not process at this time" error?
2. Am I missing an Authorize.net requirement by using the checkout wizard?

Link to the donation and subsequent checkout form:
http://www.lrciviccouncil.org/donation.php

Thank you,
Jon

Ray Borduin
03-17-2009, 07:23 AM
No, test mode should always be successful, so that is not the problem.

On your failure page, go to the Bindings tab and click the plus button.

Go to Webassist->eCart->local checkout response and choose Authorize.net.

This will allow you to drag and drop things like Error Messages from authorize.net to give you more information on why the transaction was rejected. It could be any number of things.

Jon Gibson
03-18-2009, 02:29 PM
Good afternoon Ray:

I would like to share the steps I have taken with the hope that maybe you see something I missed.

1. I have two pages: donation.php and donation-details.php

2. On donation.php:
a. ID set to 1 and Replace Cart option enabled.
b. Quantity is hidden with default value of 1.
c. Price is visible and updatable via List (not text box).
d. Add to Cart button with GO TO PAGE set to donation-details.php

3. Donation-details.php:
a. Summary of charges with a SUBMIT DONATION button
b. DONATION button set up with Checkout Wizard to generate all pages. When clicked you are taken to Checkout.php (generated by the wizard).

4. On the Checkout.php: all of the credit card fields. The user fills those out and hits the Checkout Button which takes them to Confirm.php (generated by the wizard)

5. Here the summary is redisplayed and users can choose to modify the order or submit (SUBMIT ORDER button).
Here is where the problem occurs: When the SUBMIT ORDER button on Confirm.php is clicked by the user they are automatically taken to checkout_failure.php

I added the behavior to the failure page, but have been unable to generate any error codes. I am not sure how to drag and drop the error codes.

UPDATE (MARCH 18, 2009):
After adding the binding behavior, create a table (2 columns by 6 rows) in checkout_failure.php. Click on the twirly (triangle) to expand the Local Checkout Response (in the Bindings panel). I dragged out the following six responses: Response Code, Subcode, Reason Code, Reason Text, AVS Response Code, and way down at the bottom, Full Response.

Run your cart and the errors will appear.



Not sure if it makes a difference, but I am using static pages (no DB of any kind)

I contacted authorize.net and the support said that none of my attempts have 'reached' their server.

I do have PASSWORD REQUIRED MODE set to ON.
The following statement is from Authorize.net:
To use Password-Required Mode with a shopping cart, please contact your shopping cart provider and ask them to enable their cart to pass your password or transaction key with every transaction.

QUESTIONS
How do I start generating error codes, as I do not receive a 'string' of text on failure.php? Did I miss something in the above steps?

Thank you!
Jon

Ray Borduin
03-18-2009, 03:41 PM
Your steps seem correct. Are you using local checkout or remote checkout in the checkout wizard?

Jon Gibson
03-18-2009, 05:04 PM
I felt like I was doing everything right . . . after doing the WA tutorials and re-doing this cart a million times I felt good about the WebAssist steps.

I am using local checkout. I talked with another authorize.net support tech and he said that I should try generating a new transaction ID.

I'm going to give it a go tonight after work and I'll post the results.

Thank you for looking at my steps!

UPDATE:
I figured out how to put in the drag and drop error codes you referred to! Here is what I got:
1. Response Code: 3
2. Response Subcode: 1
3. Reason Code: 270
4. Reason Text: (TESTMODE) Line item 1 is invalid

If there are other codes I should apply to further clarify the problem, let me know. I am off to look up the code meanings . . .

Thanks again Ray!
Jon

Ray Borduin
03-19-2009, 06:55 AM
Well this tells me exactly what the problem is... line item 1 is invalid means that you are probably setting the name or description to a field that is too long.... Drag and drop the "Full Request" and "Full Response" onto your page and send those (remove your username, password, and security key where present). Looking at that will tell me the exact problem.

My guess is that either it has an invalid amount or the name and/or description are too long. I can't believe Authorize.net support couldn't tell you that, but make sure to give them the reason code and reason text and they should be able to be more accurate with you.

Or send them the full request that is literally everything you send to them at checkout, and somebody familiar with their api would be able to spot the exact problem.

Jon Gibson
03-19-2009, 08:36 AM
Here is what I get in the full response (I removed the numbers just in case they were passwords of some type):

<td>Full Response</td>
<td>3::1::270::(TESTMODE) Line item 1 is invalid.::000000::P::0::*****code removed*********::1 (1)::50.00::CC::auth_capture::::Jon::Gibson::::467 5 Marea Circle::Huntington Beach::CA::92649::US::714-287-7262::::jgsb2001@mac.com::::::::::::::::::::::::FA LSE::::**********code removed**************::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::</td>

Ray Borduin
03-19-2009, 08:38 AM
Full request would be more informative. This is a response telling you what was wrong with your request... it says line item1 was invalid... I want to see what line item 1 has in the original request.

Jon Gibson
03-19-2009, 08:52 AM
Here it is:

<td>Full Request</td>
<td>x_login=********_tran_key=************_version=3.1&x_invoice_num=ji508o788cl0uqh6tsucbaklc2&x_test_request=TRUE&x_method=CC&x_type=AUTH_CAPTURE&x_relay_response=FALSE&x_delim_data=TRUE&x_delim_char=::&x_customer_ip=216.100.93.127&x_amount=25.00&x_description=1 (1)&x_line_item=1<|><|><|>1<|>25<|>YES&x_card_num=1234567890123456&x_exp_date=november2010&x_card_code=119&x_email_customer=TRUE&x_tax_exempt=FALSE&x_first_name=Jon&x_last_name=Gibson&x_address=7528 Hope Lane&x_city=Fountain Valley&x_state=CA&x_zip=92684&x_phone=777-222-5555&x_fax=&x_email=jgsb2001@mac.com&x_country=US&x_recurring_billing=NO</td>
</tr>

Ray Borduin
03-19-2009, 09:54 AM
OK, so the problem has to be:

x_line_item=1<|><|><|>1<|>25<|>

and in the authorize.net documentation I can see that this should be:

ID<|>Name<|>Description<|>Quantity<|>Price<|>Taxable

So you are missing a name and description for your item in the cart... perhaps they are necessary. That is the only potential problem I can see with item 1.

Jon Gibson
03-19-2009, 10:28 AM
I did not remove any of the PHP tags or anything, so should I manually add that information? Where would I add that info?

I am pretty sure that I have followed all of the webassist steps correctly and have not changed anything except the donation field.

Thank you Ray.

Ray Borduin
03-19-2009, 10:46 AM
You must not be setting it in the add to cart button. Did you give your item a name and description there? Double click on the add to cart server behavior and make sure a name and description are specified.

Jon Gibson
03-19-2009, 10:59 AM
That fixed it! Thank you again for time and patience, Ray!

I will post one last update tonight for others to follow just in case it helps.

Have a great day!
Jon

UPDATE 3/20/09:
Errors made in connecting with Authorize.net:
1. Not setting the Name and Description fields when inserting the ADD TO CART button.
SOLUTION:
Drop error codes in checkout_failure.php. Refer to direction in previous posts within this thread.

WORKFLOW (Dreamweaver):
1. Create two pages:to insert an Add to Cart button page (example: donation.php) and another to add a checkout button.
2. On the add to cart page: insert Add to Cart button. I set ID field set to 1 and Replace if in Cart set to Replace; Quantity field set to 1 and hidden; Price field set to updatable via list. Where I made a mistake was in not setting defaults for the Name and Description fields. I set these to Name: Donation. Description: Thank you for your Donation to . . .
3. On the Checkout button page: Insert a Form via the Form Manager (eCart tab). Configure as desired. Then, outside of the Form, place a Checkout button. Run the Checkout Wizard and configure as desired.
4. Go to each page generated by the Checkout Wizard (four in total) and remove the thumbnail for an image.
5. Upload and test.
6. If not successful, drop the error codes from the Bindings panel onto checkout_failure.php. The most useful being: Reason Code, Reason Text, and Full Request. When you apply Full Request, be careful. It will return your Login ID and your Transaction Key, so be sure to remove the error codes immediately after testing.

If you have a more specific question about the process, I would be glad to share what I have learned.

Many thanks to Ray for the help in solving this problem.

Jon Gibson
03-20-2009, 05:01 PM
Hello Ray,

I am having a problem with the TEST MODE. I have taken the TEST MODE off in my authorize.net account settings. However, I am still receiving emails that say TEST MODE. I contacted customer support and they said that it may be something on my end with the eCart, stating "that most carts have a test mode." I told him that I was pretty sure there was no such thing with the eCart.

I read the configuration support in the WebAssist help file, but the response fields did not help.

Is there something I need to configure in eCart itself?

Many thanks, Ray.

Jon Gibson
03-21-2009, 10:39 AM
Sorry Ray . . . figured it out. I need to slow down a little bit:)

SOLUTION:
1. In confirm.php, open Code View.
2. About line 149 or so, you should see this line:
$AuthNet_required[0][$nextIndex] = "x_test_request";
$AuthNet_required[1][$nextIndex] = "TRUE";
3. Change the "TRUE" value to "FALSE"

That's it.

Again, feel free to post questions here and I will be glad to share what I have learned from Ray and reading about eCart and Authorize.net thus far.

nolan.orfield348105
04-10-2009, 01:39 PM
I just wanted to say thank you to both Jon and Ray for this very insightful thread. I purchased eCart yesterday to accomplish the same objective: Authorize.NET donation form using eCart.

I'm glad I found this posting before I got too deep into the coding. I ran into all the same problems/questions as Jon! .. forgot to assign a name/description for the "add to cart" buttons, didn't know how to set x_test_request to FALSE.

You guys saved me hours of frustration! Thanks Jon for taking the time to come back and post your progress/findings.

Here's what I came up with: http://mmore.org/?page_id=22

Jon Gibson
04-11-2009, 04:37 PM
Thanks Nolan, Ray was and is a huge help/support.

By the way your site is awesome! Love the colors and overall feel . . . and what a great cause.

Best wishes and glad the community was of help:)

kwsim
04-28-2009, 08:43 AM
Well this tells me exactly what the problem is... line item 1 is invalid means that you are probably setting the name or description to a field that is too long.... Drag and drop the "Full Request" and "Full Response" onto your page and send those (remove your username, password, and security key where present). Looking at that will tell me the exact problem.

My guess is that either it has an invalid amount or the name and/or description are too long. I can't believe Authorize.net support couldn't tell you that, but make sure to give them the reason code and reason text and they should be able to be more accurate with you.

Or send them the full request that is literally everything you send to them at checkout, and somebody familiar with their api would be able to spot the exact problem.

This has nothing to do with the Name or Description field. The first line item is the ID [item Number] as mentioned in the Authorize.net AIM Documentation. If I remove the ID from the XML the confirm page works fine.

According to Authorize.net AIM Documentation the ID field is a string field and by default your cart system uses this ad the primary key of the item from the products tbl. I have a character field called SKU and I am using it as the ID for the Authorize.net XML and I'm still getting the 270 error returned be the AIM API.

Ray Borduin
04-28-2009, 09:05 AM
270 could be a problem with the value of the ID, name, or description fields. In his case it was the description, as we could tell by viewing the full request. If you post your full request we could analyze what exactly causes the problem in your case.

kwsim
04-29-2009, 10:55 AM
270 could be a problem with the value of the ID, name, or description fields. In his case it was the description, as we could tell by viewing the full request. If you post your full request we could analyze what exactly causes the problem in your case.

And here is the request from the checkout_failure page:

3/270 - (TESTMODE) Line item 1 is invalid.

x_login=XXXXXXXX&x_tran_key=XXXXXXXXX&x_version=3.1&x_invoice_num=50527551-309&x_test_request=TRUE&x_method=CC&x_type=AUTH_CAPTURE&x_relay_response=FALSE&x_delim_data=TRUE&x_delim_char=::&x_customer_ip=207.241.65.1&x_amount=345.00&x_description=1 New Passport (86)<|>New Passport<|>1<|>$0.00<|>NO&x_line_item=spsnwpp<|>&x_card_num=4007000000027&x_exp_date=042009&x_card_code=679&x_email_customer=FALSE&x_tax_exempt=FALSE&x_first_name=Kenneth&x_last_name=Sim&x_address=3133 Sunrise Dr.&x_city=Crown Point&x_state=IN&x_zip=46307&x_phone=219-616-3595&x_fax=&x_email=ken@nologyinteractive.com&x_country=US&x_ship_to_first_name=Kenneth&x_ship_to_last_name=Sim&x_ship_to_address=3133 Sunrise Dr.&x_ship_to_city=Crown Point&x_ship_to_state=IN&x_ship_to_zip=46307&x_ship_to_country=US&x_ship_to_phone=219-616-3595&x_ship_to_fax=&x_recurring_billing=NO

This error only occurs when I add the ID to the code.

Ray Borduin
04-29-2009, 12:11 PM
Well that definitely looks wrong. Please post a support incident. Are you sure you are using the most recent version of ecart and the most recent version of the authorize.net include file.

The problem is specifically in this area:

x_description=1 New Passport (86)<|>New Passport<|>1<|>$0.00<|>NO&x_line_item=spsnwpp<|>

it should probably be something like:
x_description=1 New Passport&x_line_item=spsnwpp<|>(86)<|>New Passport<|>1<|>$0.00<|>NO

so something is wrong in the include file. It probably doesn't liek the zero dollar item either. It looks like it may be missing other items. It appears to be a bug, my guess is that it would be fixed if you updated to the most recent version of eCart you have available and reapplied the local checkout server behavior before uploading the dependent files.

nunez_r336980
11-24-2009, 08:59 AM
I would like to suggest to the WebAssist team a solution receipt for simple tasks like mine. The documentation is fantastic for a fully operational store, but to use eCart for a two field donation is very overwhelming.

Jon

I second this idea. I also need to put up a simple donation form quickly and a recipe would be very appreciated. Jon was nice enough to writeup what he did but unfortunately it's not working for me. He may have been using an earlier version of ecart.

Office Guy-172461
11-24-2009, 10:51 AM
I converted Jon's write-up to an article:

Using eCart for a simple donation page
http://www.ipvac.com/kb/entry/217/

I will update it/correct it as more information is posted.