Reply
Highlighted
Contributor
Posts: 19
Registered: ‎01-05-2017
Accepted Solution

API error E00001 when calling getHostedPaymentPageRequest using example data

Hi,

 

I am trying to test the Accept Hosted integration method and am getting error when calling getHostedPaymentPageRequest. The error is E00001 "An error occurred during processing. Please try again."  I know the data must be formatted correctly because I'm using the exact Authorize.Net data from the example, just replacing the login ID and transaction key with mine. 

 

Here is my input data which I got directly from the GetHostedPaymentForm() – Sample Request and Response section of the Accept Hosted reference page.

 

 

{
	"getHostedPaymentPageRequest": {
		"merchantAuthentication": {
			"name": "API_LOGIN_ID",
			"transactionKey": "TRANSACTION_KEY"
		},
		"transactionRequest": {
			"transactionType": "authCaptureTransaction",
			"amount": "20.00",
			"customer": {
				"email": "bmcmanus@mail.com"
			},
			"billTo": {
				"firstName": "Ellen",
				"lastName": "Johnson",
				"company": "Souveniropolis",
				"address": "14 Main Street",
				"city": "Pecan Springs",
				"state": "TX",
				"zip": "44628",
				"country": "USA"
			}
		},
		"hostedPaymentSettings": {
			"setting": [{
				"settingName": "hostedPaymentBillingAddressOptions",
				"settingValue": "{\"show\": true, \"required\":true}"
			}, {
				"settingName": "hostedPaymentButtonOptions",
				"settingValue": "{\"text\": \"Pay\"}"
			}, {
				"settingName": "hostedPaymentCustomerOptions",
				"settingValue": "{\"showEmail\":true,\"requiredEmail\":true}"
			}, {
				"settingName": "hostedPaymentPaymentOptions",
				"settingValue": "{\"cardCodeRequired\":true}"
			}, {
				"settingName": "hostedPaymentReturnOptions",
				"settingValue": "{\"url\":\"https://www.google.com\",\"urlText\":\"Continue\",\"cancelUrl\":\"https://mysite.com/cancel\",\"cancelUrlText\":\"hkjhkjhkjhk\"}"
			}, {
				"settingName": "hostedPaymentSecurityOptions",
				"settingValue": "{\"captcha\": false}"
			}, {
				"settingName": "hostedPaymentShippingAddressOptions",
				"settingValue": "{\"show\":false,\"required\":true}"
			}, {
				"settingName": "hostedPaymentStyleOptions",
				"settingValue": "{\"bgColor\": \"EE00EE\"}"
			}]
		}
	}
}

 

I tried running this through code, through Fiddler and even directly from the API reference page by pasting it into the "Try It" box and clicking Send.  All give the E00001 error.

 

What is the issue?

 


Accepted Solutions
Highlighted
Solution
Accepted by topic author wp
‎01-06-2017 11:32 AM
Posts: 2,765
Topics: 57
Kudos: 246
Blog Posts: 67
Registered: ‎12-05-2011

Re: API error E00001 when calling getHostedPaymentPageRequest using example data


All Replies
Highlighted
Solution
Accepted by topic author wp
‎01-06-2017 11:32 AM
Posts: 2,765
Topics: 57
Kudos: 246
Blog Posts: 67
Registered: ‎12-05-2011

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

@wp Did you generate a signature key as mentioned in this post: https://community.developer.authorize.net/t5/Integration-and-Testing/Help-Migrating-from-SIM-to-CIM-...

 

Richard

Highlighted
Contributor
Posts: 19
Registered: ‎01-05-2017

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

Yep, that was it.  And now of course I see that it mentions that requirement right on the reference page.  I guess I saw key and thought transaction key.  Oh well maybe this will help the next person who doesn't RTFM :)

 

Thanks

Highlighted
Member
Posts: 7
Registered: ‎10-13-2016

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

Hi, I've been having the same error despite being able to create the signature key

I'm trying an implementation with CFML

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

Hi @denlopez88,

 

Can you post the request that your code creates?

Highlighted
Member
Posts: 7
Registered: ‎10-13-2016

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

Sure is button with an onclick event attached that perform this post request:

 

$.post("https://apitest.authorize.net/xml/v1/request.api",
{
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "3fHh95RmE",
"transactionKey": "3p5mZ7fBN46F7Jt6"
},
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "20.00",
"customer": {
"email": "bmcmanus@mail.com"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
}
},
"hostedPaymentSettings": {
"setting": [{
"settingName": "hostedPaymentBillingAddressOptions",
"settingValue": "{\"show\": true, \"required\":true}"
}, {
"settingName": "hostedPaymentButtonOptions",
"settingValue": "{\"text\": \"Pay\"}"
}, {
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\":true,\"requiredEmail\":true}"
}, {
"settingName": "hostedPaymentPaymentOptions",
"settingValue": "{\"cardCodeRequired\":true}"
}, {
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"url\":\"https://www.mysite.com/continue\",\"urlText\":\"Continue\",\"cancelUrl\":\"https://mysite.com/cancel\",\"cancelUrlText\":\"Cancel\"}"
}, {
"settingName": "hostedPaymentSecurityOptions",
"settingValue": "{\"captcha\": false}"
}, {
"settingName": "hostedPaymentShippingAddressOptions",
"settingValue": "{\"show\":false,\"required\":true}"
}, {
"settingName": "hostedPaymentStyleOptions",
"settingValue": "{\"bgColor\": \"EE00EE\"}"
}]
}
}
},
function(data,status){
alert("Data: " + data + "\nStatus: " + status);
}
);

what i get is a 200 ok response but in the message body i got this:

{"messages":{"resultCode":"Error","message":[{"code":"E00001","text":"Unexpected character encountered while parsing value: g. Path '', line 0, position 0."}]}}
Highlighted
Member
Posts: 7
Registered: ‎10-13-2016

Re: API error E00001 when calling getHostedPaymentPageRequest using example data

Hi thanks for the quick response, i already manage to get a succesfull response from the authorize.net API, I think I had an issue with how my data was beeing sent in the post request I use JSON.stringify to format my data and finally get my token.