Reply
Highlighted
Contributor
Posts: 11
Registered: ‎04-07-2014
Accepted Solution

getting error in AuthorizeNetXMLResponse's _getElementContents

I'm integrating the ARB in my magento site but I'm getting the following error

 

2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 113
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 114
2014-04-07T13:00:22+00:00 ERR (3): Warning: substr() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 115
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 113
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 114
2014-04-07T13:00:22+00:00 ERR (3): Warning: substr() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 115
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 110
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 113
2014-04-07T13:00:22+00:00 ERR (3): Warning: strpos() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 114
2014-04-07T13:00:22+00:00 ERR (3): Warning: substr() expects parameter 1 to be string, array given  in /var/www/mageqb/app/code/local/Excellence/Anetarb/Model/AuthorizeNetXMLResponse.php on line 115

 

Why do I'm getting such message? I'm using the php-sdk.


Accepted Solutions
Highlighted
Solution
Accepted by topic author faisal6621
‎08-21-2015 01:58 AM
Contributor
Posts: 11
Registered: ‎04-07-2014

Re: getting error in AuthorizeNetXMLResponse's _getElementContents

finally got rid of that. API classes and file names should be written in magento (zend) way. Also, 1 class per file need to be declared.

View solution in original post


All Replies
Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: getting error in AuthorizeNetXMLResponse's _getElementContents

[ Edited ]

read the .php file and see what paramter 1 is. Or start by looking at what is in the response

Highlighted
Contributor
Posts: 11
Registered: ‎04-07-2014

Re: getting error in AuthorizeNetXMLResponse's _getElementContents

The response is empty and the parameter 1 expects to be an object of AuthorizeNet_Subscription and that object I'd passed.

Highlighted
Solution
Accepted by topic author faisal6621
‎08-21-2015 01:58 AM
Contributor
Posts: 11
Registered: ‎04-07-2014

Re: getting error in AuthorizeNetXMLResponse's _getElementContents

finally got rid of that. API classes and file names should be written in magento (zend) way. Also, 1 class per file need to be declared.