I set up the basic example that Authorize.net provide sample code for, so:
<%=AuthorizeNet.Helpers.CheckoutFormBuilders.CreditCardForm(true) %>
and
protected void checkout_Click(object sender, EventArgs e) { //pull from the store var gate = OpenGateway(); //build the request from the Form post var apiRequest = CheckoutFormReaders.BuildAuthAndCaptureFromPost(); //set the amount - you can also set this from the page itself //you have to have a field named "x_amount" apiRequest.Queue(ApiFields.Amount, "250"); var response = gate.Send(apiRequest); if (response.Approved) { Response.Write(string.Format("Thank you! Order approved: {0}", response.AuthorizationCode)); //record the order, send to the receipt page Response.Redirect("success.aspx"); } else { //error... oops. Reload the page } }
Like this it goes through successfully.
However, when I add the parameters for the relay response:
apiRequest.Queue(ApiFields.RelayResponse, "TRUE"); apiRequest.Queue(ApiFields.DelimitData, "FALSE"); apiRequest.Queue("x_Relay_URL", postUrl);
It will post to my page, but it posts the following:
x_response_code : 3
x_response_reason_code : 92
x_response_reason_text : The gateway no longer supports the requested method of integration.
as well as the other parameters. Anyone seen this before?
10-22-2013 04:48 PM
If you are doing
var response = gate.Send(apiRequest);
you are using AIM, not DPM.
If you want to keep it simple, download the SIM sample code(not the SDKs) and use the java section on the DPM documentation for the list of fields for DPM.
x_response_code : 3
x_response_reason_code : 92
x_response_reason_text : The gateway no longer supports the requested method of integration.
Mean you are mixing API fields.
10-22-2013 05:19 PM