K
karen
i would have preferred to post this in a group related to credit card
payment gateways, but i couldn't find one. please refer me if you
know where this question would be better posted.
i am trying to parse the "relay response" from authorizenet. i am NOT
getting back the kind of response i am expecting. that is, i am
expecting a bunch of fields in name-value pairs, and instead i am
getting a formatted html page!
here is the form i use to request the payment form (i am using the
method where customer enters credit card info into page hosted on
AUTHORIZENET's server, not my own):
<form action="<%=Paymentech.post_url_str%>" method="post"
name="get_paymentech">
<!--fields for requesting payment form-->
<input type="hidden" name="x_login"
value="<%=Paymentech.getLogin()%>">
<input type="hidden" name="x_show_form" value="PAYMENT_FORM">
<input type="hidden" name="x_amount" value="<%=amount%>">
<input type="hidden" name="x_fp_sequence"
value="<%=order.getOrderId()%>">
<input type="hidden" name="x_fp_timestamp" value="<%=timestamp%>">
<input type="hidden" name="x_fp_hash" value="<%=fp%>">
<input type="hidden" name="x_relay_response" value="True">
<input type="hidden" name="x_type" value="AUTH_ONLY">
<input type="hidden" name="x_invoice_num"
value="<%=order.getOrderId()%>">
<!--pass the billing info for the receipt-->
<%
Address address=order.getBillingAddress();
String add1=address.getAddress2();
if(add1!=null)
add1=address.getAddress1()+","+add1;
else
add1=address.getAddress1();
%>
<input type="hidden" name="x_email" value="<%=cust.getEmail()%>">
<input type="hidden" name="x_cust_id"
value="<%=cust.getCustomerId()%>">
<input type="hidden" name="x_first_name"
value="<%=address.getFirstName()%>">
<input type="hidden" name="x_last_name"
value="<%=address.getLastName()%>">
<input type="hidden" name="x_address" value="<%=add1%>">
<input type="hidden" name="x_city" value="<%=address.getCity()%>">
<input type="hidden" name="x_state" value="<%=address.getState()%>">
<input type="hidden" name="x_zip" value="<%=address.getZip()%>">
<input type="hidden" name="x_country" value="USA">
<!--pass the shipping info for receipt-->
<%
address=order.getShippingAddress();
add1=address.getAddress2();
if(add1!=null )
add1=address.getAddress1()+","+add1;
else
add1=address.getAddress1();
%>
<input type="hidden" name="x_ship_to_first_name"
value="<%=address.getFirstName()%>">
<input type="hidden" name="x_ship_to_last_name"
value="<%=address.getLastName()%>">
<input type="hidden" name="x_ship_to_address" value="<%=add1%>">
<input type="hidden" name="x_ship_to_city"
value="<%=address.getCity()%>">
<input type="hidden" name="x_ship_to_state"
value="<%=address.getState()%>">
<input type="hidden" name="x_ship_to_zip"
value="<%=address.getZip()%>">
<input type="hidden" name="x_ship_to_country" value="USA">
</form>
this SUCCEEDS in getting the payment form to display. i enter the
test credit card data into the payment form. i receive a receipt via
email correctly informing me of the transaction amount and all the
billing and shipping info. BUT on the URL on my server which is
supposed to receive the relay response from authorizenet, i receive
the following:
<HTML><BODY><H3>The following errors have occurred.</H3>(13) The
merchant login ID or password is invalid or the account is
inactive.<BR></BODY></HTML><HTML><BODY><H3>The following errors have
occurred.</H3>(13) The merchant login ID or password is invalid or the
account is inactive.<BR></BODY></HTML>
that response is not even formatted in the way i expect. it does not
include the dozen or so various values the authnet docs tell me i
should receive. it also does not make sense that my login id was
invalid or inactive, as authnet already found my credentials
sufficient to send me the payment form and email receipt!
any idea what gives??
(i have been harrassing authnet support about this for quite a while
now, to no avail.)
thanks!!!!!
-k
payment gateways, but i couldn't find one. please refer me if you
know where this question would be better posted.
i am trying to parse the "relay response" from authorizenet. i am NOT
getting back the kind of response i am expecting. that is, i am
expecting a bunch of fields in name-value pairs, and instead i am
getting a formatted html page!
here is the form i use to request the payment form (i am using the
method where customer enters credit card info into page hosted on
AUTHORIZENET's server, not my own):
<form action="<%=Paymentech.post_url_str%>" method="post"
name="get_paymentech">
<!--fields for requesting payment form-->
<input type="hidden" name="x_login"
value="<%=Paymentech.getLogin()%>">
<input type="hidden" name="x_show_form" value="PAYMENT_FORM">
<input type="hidden" name="x_amount" value="<%=amount%>">
<input type="hidden" name="x_fp_sequence"
value="<%=order.getOrderId()%>">
<input type="hidden" name="x_fp_timestamp" value="<%=timestamp%>">
<input type="hidden" name="x_fp_hash" value="<%=fp%>">
<input type="hidden" name="x_relay_response" value="True">
<input type="hidden" name="x_type" value="AUTH_ONLY">
<input type="hidden" name="x_invoice_num"
value="<%=order.getOrderId()%>">
<!--pass the billing info for the receipt-->
<%
Address address=order.getBillingAddress();
String add1=address.getAddress2();
if(add1!=null)
add1=address.getAddress1()+","+add1;
else
add1=address.getAddress1();
%>
<input type="hidden" name="x_email" value="<%=cust.getEmail()%>">
<input type="hidden" name="x_cust_id"
value="<%=cust.getCustomerId()%>">
<input type="hidden" name="x_first_name"
value="<%=address.getFirstName()%>">
<input type="hidden" name="x_last_name"
value="<%=address.getLastName()%>">
<input type="hidden" name="x_address" value="<%=add1%>">
<input type="hidden" name="x_city" value="<%=address.getCity()%>">
<input type="hidden" name="x_state" value="<%=address.getState()%>">
<input type="hidden" name="x_zip" value="<%=address.getZip()%>">
<input type="hidden" name="x_country" value="USA">
<!--pass the shipping info for receipt-->
<%
address=order.getShippingAddress();
add1=address.getAddress2();
if(add1!=null )
add1=address.getAddress1()+","+add1;
else
add1=address.getAddress1();
%>
<input type="hidden" name="x_ship_to_first_name"
value="<%=address.getFirstName()%>">
<input type="hidden" name="x_ship_to_last_name"
value="<%=address.getLastName()%>">
<input type="hidden" name="x_ship_to_address" value="<%=add1%>">
<input type="hidden" name="x_ship_to_city"
value="<%=address.getCity()%>">
<input type="hidden" name="x_ship_to_state"
value="<%=address.getState()%>">
<input type="hidden" name="x_ship_to_zip"
value="<%=address.getZip()%>">
<input type="hidden" name="x_ship_to_country" value="USA">
</form>
this SUCCEEDS in getting the payment form to display. i enter the
test credit card data into the payment form. i receive a receipt via
email correctly informing me of the transaction amount and all the
billing and shipping info. BUT on the URL on my server which is
supposed to receive the relay response from authorizenet, i receive
the following:
<HTML><BODY><H3>The following errors have occurred.</H3>(13) The
merchant login ID or password is invalid or the account is
inactive.<BR></BODY></HTML><HTML><BODY><H3>The following errors have
occurred.</H3>(13) The merchant login ID or password is invalid or the
account is inactive.<BR></BODY></HTML>
that response is not even formatted in the way i expect. it does not
include the dozen or so various values the authnet docs tell me i
should receive. it also does not make sense that my login id was
invalid or inactive, as authnet already found my credentials
sufficient to send me the payment form and email receipt!
any idea what gives??
(i have been harrassing authnet support about this for quite a while
now, to no avail.)
thanks!!!!!
-k