Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some services work, some don't #26

Closed
upwebdesign opened this issue May 1, 2015 · 12 comments
Closed

Some services work, some don't #26

upwebdesign opened this issue May 1, 2015 · 12 comments

Comments

@upwebdesign
Copy link
Contributor

I am hoping I can get some answers/suggestions with this issue I am having with the API. For example, I am able to "load" a contact and get contact fields, no problem. I can "search" saved searches from the API, awesome. BUT, when I try to use the "AffiliateService" OR "AffiliateProgramService "methods, an exception is thrown.

Sample call:
$infusionsoft->affiliates()->affPayouts(xxxxx, Carbon::now()->subMonth(), Carbon::now());

Results in:

HttpException in InfusionsoftSerializer.php line 34:

exception 'fXmlRpc\Exception\ResponseException' with message 'No such handler: AffiliateService.affPayouts'

This is the case for ALL AffiliateService methods. There must be something I am not quite understanding, or is the API incomplete? We are supposed to pass dateTime objects into the methods, correct?

It seams as though the handler is named incorrectly...

Thanks for any guidance!

@mfairch
Copy link
Contributor

mfairch commented May 1, 2015

The handler was named incorrectly. Its supposed to be APIAffiliateService but we'll handle that on the backend so you don't have to change any code to use it.

I verified the AffiliateProgramService works though.

@mfairch mfairch closed this as completed in b98dd98 May 1, 2015
mfairch pushed a commit that referenced this issue May 1, 2015
@upwebdesign
Copy link
Contributor Author

Thanks for the quick response, sorry about my late response, I did not get notification of your response and stumbled upon it just now.

@upwebdesign
Copy link
Contributor Author

OK, finally had a chance to test this out. Composer updated to the latest fix. Now, all I get is a white screen of death. No PHP errors in logs, just a white screen.

@upwebdesign
Copy link
Contributor Author

Found this in my log:

Fatal error: Class undefined: \Infusionsoft\Api\AffiliateService in /vendor/infusionsoft/php-sdk/src/Infusionsoft/Infusionsoft.php on line 567

@upwebdesign
Copy link
Contributor Author

Confirmed this fixed the problem:

class APIAffiliateService extends AbstractApi {

should be

class AffiliateService extends AbstractApi {

@mfairch mfairch reopened this May 14, 2015
@upwebdesign
Copy link
Contributor Author

This is my attempt to use Affiliate Program Service (AffiliateProgramService):

Infusionsoft::affiliatePrograms()->getProgramsForAffiliate((int)xxxxx);
Infusionsoft::affiliatePrograms()->getAffiliatePrograms();

This is what I get:

HttpException in InfusionsoftSerializer.php line 34:
exception 'fXmlRpc\Exception\RuntimeException' with message 'Invalid XML. Expected one of "string", "array", "struct", "int", "biginteger", "i8", "i4", "i2", "i1", "boolean", "double", "float", "bigdecimal", "dateTime.iso8601", "dateTime", "base64", "nil", "dom", "#text", got "value" on depth 9 (context: "")' in /vendor/lstrojny/fxmlrpc/src/fXmlRpc/Exception/RuntimeException.php:41

@upwebdesign
Copy link
Contributor Author

How did you verify AffiliateProgramService is working? Every time I try it does not work...

@mfairch
Copy link
Contributor

mfairch commented May 22, 2015

The XML that is being sent back isn't being parsed right for you. Issue #3 is what you are experiencing now.

@upwebdesign
Copy link
Contributor Author

Im confused, what am I supposed to do if the XML that is being sent back to me isn't being parsed correctly? Obviously getAffiliatePrograms() does not accept any arguments for me to miss "type" a value, yet I still get the exception. The reference to issue #3 has to do with saved searches. Standing by.

@mfairch
Copy link
Contributor

mfairch commented May 22, 2015

#3 was reported with Saved Searches but affects more than just Saved Searches. Take a look at the issue on fxmlrpc lstrojny/fxmlrpc#36

@upwebdesign
Copy link
Contributor Author

Thanks for pointing that out. Your composer.json file is pulling in release "lstrojny/fxmlrpc": "0.8.*", which I assume does not have the fxmlrpc lstrojny/fxmlrpc#36 fix in it. It looks like it failed: lstrojny/fxmlrpc@0.8.3...master Am I reading this correctly?

@upwebdesign
Copy link
Contributor Author

So, is this my issue because Im not sure what direction I need to take to solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants