Forum
Community Login
Infusionsoft Community
Welcome, Guest
Please Login or Register.    Lost Password?
Re:API on Credit Cards (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 1
TOPIC: Re:API on Credit Cards
#2945
rus (User)
Junior Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
API on Credit Cards 12 Months ago Karma: 0  
Hi,

I'm new with this infusion api, my goal is I want to make a form (with php) to add/replace the credit card for current recurring order.

Right now I just started to add the credit card into CreditCard table using DataService.add and it doesn't return error, but I can't see in our infusion website - People - Orders - Credit Card.

And also in the InvoiceService.validateCreditCard, it said that one of the parameter is creditCard - (struct) The credit card values (as specified in api table documentation). But I never found the "api table documentation", what is the struct anyway ?

Am I in the right path or I have to get another approach to set my goal?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2984
KLeavitt (User)
CMAC
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 11 Months, 3 Weeks ago Karma: 3  
Hi Russ, we have a little Infusionsoft add-on called CustomerHub that will allow you to do this and a bunch of other stuff too.

Check it out: https://www.infusedsystems.com/products/customerhub

We have quite a few people using CustomerHub successfully already.

Good luck,

Kyle
 
Report to moderator   Logged Logged  
 
Kyle Leavitt
Infused Systems
w 866.551.4937
kyle@infusedsystems.com
www.infusedsystems.com
  The administrator has disabled public write access.
#3020
nateleavitt (User)
Senior Boarder
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 11 Months, 3 Weeks ago Karma: 1  
rus,

Here is a link to the documentation which I'm assuming you already have: http://help.infusionsoft.com/default.asp?id=526&SID=&Lang=1

Look in the api_field_access.xml file for the list of fields under the CreditCard table.
 
Report to moderator   Logged Logged  
 
Nathan Leavitt
Infused Systems

866.551.4937
info@infusedsystems.com
http://www.infusedsystems.com
  The administrator has disabled public write access.
#3383
Matt31 (User)
Junior Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 10 Months, 3 Weeks ago Karma: 0  
I am having this exact same problem. I first create a user and then I try to add a credit card. It processes fine and even provides me with a valid CreditCard ID, but when I go to look at the user under Order->Credit Cards (and even create a Credit Card report) in Infusionsoft, nothing is there. Here is the code. It is a bit hardwired in right now, but still does not produce a credit card. (The output of this function produces an integer, like 159).

*************************************

function addCC_IS () {

global $client, $key;

$outp = 1; // set default return to 1 (ran ok)

#The contact variables sets up the data as it will be added to the database
$credit_c = array(
"ContactId" => "76825",
"NameOnCard" => "Joe Blow",
"CardNumber" => "5490123512361236",
"CardType" => "MasterCard",
"ExpirationMonth" => "02",
"ExpirationYear" => "2012"
);

#This sets up the call. DataService.add is the name of the service, and the second array
#is a list of the parameters
$call = new xmlrpcmsg("DataService.add", array(
php_xmlrpc_encode($key), #The encrypted API key
php_xmlrpc_encode("CreditCard"), #The table we are adding to
php_xmlrpc_encode($credit_c) #The data to be added
));

#This actually makes the call and stores the result in $result
$result = $client->send($call);
$blah = $result->value();
#Check to see if we have an error. If not, print out the results.
if($result->faultCode()) {
$outp = 'Code: '.$result->faultCode().' Summary: '.$result->faultString().'';
}

return $blah;

}
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3390
Matt31 (User)
Junior Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 10 Months, 3 Weeks ago Karma: 0  
OK, figured out my problem...

When defining the ContactId in the array, I put the variable within quotes. That was a bad thing! The database was not able to locate the user. The fix (for me) was:

"ContactId" => 76825,

(Not "ContactId" => "76825",)

cheers...matt
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3410
modessey (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 10 Months, 2 Weeks ago Karma: 0  
Matt,
Were you able to capture the customer info, (name, cc, etc.) and then use it again if the customer wanted to buy the next product offered.

I am trying to find a more secure way of capturing the customer info and after they purchase the first product and the transaction is complete, I can offer them another product and all they have to do is click the "no thank you" link or the "yes" link and then I automatically have their info without them having to enter it in all over again.

Thanks,
Michelle
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3412
Matt31 (User)
Junior Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:API on Credit Cards 10 Months, 2 Weeks ago Karma: 0  
Hey Michelle,

First, I am no expert at this and I am learning it myself right now so I can't be 100% about anything here. From the way I set it up, though, I believe what you are talking about can easily be done. The way the scripting works is that you first need to store both the user and their credit card first (before you charge anything). Once both are entered into the system (using a DataService.add in both cases), the user AND credit card are stored in infusionsoft and each have ID's associated with them. From that point, if you wish you charge that credit card, you just need to:

1) Create a blank invoice (InvoiceService.createBlankOrder)
2) Add an item (InvoiceService.addOrderItem)
3) Charge the card (InvoiceService.chargeInvoice)

These three steps can be done (I think) whenever you want (since the card is already stored in the users account).

Right now, I use this for a simple Buy It Now function, but I don't see any reason why you could not use this to upsell someone AFTER they have already made the first purchase.

If anyone knows better, let me know...this is how I currently understand it (I've only been playing with it for about a week, but so far, it seems to work!)...

cheers...matt
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop