PDA

View Full Version : Update credit card details through API



mithilavelishala
01-27-10, 08:01 PM
Hi,

I am trying to update the credit card details for a client through the WHMCS API.

$postfields["username"] = $username;
$postfields["password"] = md5($password);
$postfields["action"] = "updateclient";
$postfields["clientid"] = $cid;
$postfields["cardtype"] = $input["card_type"];
$postfields["cardnum"] = $input["cardnumber"];
$postfields["expdate"] = $input["expiration_month"]."/".$input["expiration_year"];

But the credit card details are not being updated. Does WHMCS still support this functionality??

Thanks,
Mithila.

jasonrs
02-12-10, 06:42 PM
Can anyone out there help us with this? I have this same problem when adding the CC in the addclient api call. I'm pretty sure you should be able to add a CC in both the addclient AND updateclient api calls, but neither work.

These are the fields I'm setting.

cardtype
cardnum
expdate


whmcs 4.1

jasonrs
02-12-10, 08:32 PM
Ok, I am able to update the cc with the updateclient api call. mithilavelishala, make sure you pass all these fields for the cc.

cardtype
cardnum
issuenumber (the 3-4 digit number on the back.)
expdate (pass this as just 4 numbers. the system puts the slash in for you.)
startdate (not sure what this is, but pass the month and year the same as the expdate, no slashes)

jasonrs
02-12-10, 08:45 PM
It still doesn't let me provide a credit card in the addclient api call. anyone?

othellotech
02-12-10, 09:56 PM
issuenumber (the 3-4 digit number on the back.)


Issue Number is *NOT* the CVV(2) code on the back of the card

wifiguys
02-24-10, 02:42 PM
In that case, how do you enter the CVV(2)?