|
|
|
|
|
Forum
|
|
|
Re:API on Credit Cards (1 viewing) (1) Guests
Favoured: 1
|
|
|
TOPIC: Re:API on Credit Cards
|
Matt31 (User)
Junior Boarder
Posts: 9
|
|
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;
}
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
| |
|
|
|
rus
|
2008/11/24 00:10
|
| |
|
|
|
KLeavitt
|
2008/11/28 06:12
|
| |
|
|
|
nateleavitt
|
2008/12/01 08:37
|
| |
|
|
|
Matt31
|
2008/12/30 21:06
|
| |
|
|
|
Matt31
|
2009/01/01 13:42
|
| |
|
|
|
modessey
|
2009/01/05 05:37
|
| |
|
|
|
Matt31
|
2009/01/05 07:28
|
|
|
|
|
|