InfusionSoft API PHP SDK

Hello,

I want to know about infusionsoft phpsdk.

Whe new user is regsitered in our website then at same time i want to hit your API to add the same user in infusionsoft account.

But I dont want any authuntication at user end. Please let me know how it is possible to implement phpsdk in my website.

Thanks

Would you elaborate? Just a little more detail about what you to accomplish or want to have happen on the Infusionsoft side would be helpful.

I have a website. Every time a new user signs up on my website, I want to create a new contact in infusionsoft at the time when user registered on my website. Do I have to use the API for this?

You bet. Have a look at our REST API documentation, specifically Create a Contact and Create or Update a Contact.

  1. You can get auth code from your website to IS for one time only. Save that auth code to your application.
    1.1 PHP SDK has that link “’ a href=”’ . $infusionsoft->getAuthorizationUrl() . '" Click here to authorize ‘/a’". This link will direct to IS page first, and redirect you back to the URL address you have defined in your “object => redirectUri”.
  2. Then you will need to update token within few hours. Always use the same auth code that you have got from step 1 to generate/renew the token.
  3. Then make API calls.

If you want to know more, email me at ming@austbook.net

Thanks Ming for your response. I will do the same and get back to you.

I am getting problem in the APIs.

I have a website where I am registering users. After new user registration , we will give user an option to select the plan. These plans are also added in the infusionsoft account. After that we give them an option to add credit card card details.

Now I want to create this user order in the infusionsoft. Could you please recommend which API is best to use .

I have Contact Id,
I have plan id(Product Id)
I have user credit card details.
Thats it…
So please let me know which API should I use to create new order in infusionsoft?

Hi @Geek_Tech, I think you will have to make two API calls to create an order given the information you have.

First you will want to use DataService.add to add the credit card to the system. Then you can take the credit card id that’s returned along with the rest of your data (contact id and product id) to make a call to OrderService.placeOrder which will create a new order.

Thanks for your reply…
but I am getting error in this API
My blank order is not created
I am passing this …
$orderid = $infusionsoft->invoices(‘xml’)->createBlankOrder($infusionsoftContactId, $userdata[‘user_name’], date(‘Ymd\TH:i:s’),0,0);

error message:
Message: fXmlRpc\Exception\FaultException: No method matching arguments: java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer in /mnt/stor1-wc1-

Infusionsoft\Api\InvoiceService->createBlankOrder(‘99’, ‘Test Order’, ‘20170914T12:51:…’, 0, 0)

I am no PHP expert. However the error you are receiving is our server saying it can’t match the method signature. I would try passing 99 as a number not a string. It is a long on our side and might be the issue.

I am passing 99 as integer now but getting same error.

I have resolved the above issue.
I want to know about payment procedure.
I have created the order on the infusionsoft.
And billing is automated by infusionsoft itself then how could I get the payment status of the user in my website? if payment is done or pending?
Could you please let me know the API

Can you create a new thread please for the payment question?

Thanks for your support…Solution is solved by date param. I have passed the date as string but we need to pass the datetime object rather then string.

2 Likes

This is the correct answer. We need to send the PHP date and time object but document says we need to send a String which is incorrect.

Correct Example:
$datetime = new \DateTime(‘now’, new \DateTimeZone(‘America/New_York’));
$manualPayment = $infusionsoft->invoices(“xml”)->addManualPayment(12, 5.68, $datetime, “Credit Card”, “Sample Payment”, false);

Can you show me where the doc is wrong so we can fix it? This seems to be documented correctly here https://developer.infusionsoft.com/docs/xml-rpc/#invoice-add-a-payment-to-an-invoice

Thanks @Ravi_Ravi, I passed along your comments to the SDK developer. Their response was:

the SDK converts the datetime object into a string, so the docs are technically right
That said, we’ll take your feedback and see if we can make improvements.