Reply
Highlighted
Member
Posts: 3
Registered: ‎08-01-2011
Accepted Solution

CIM PHP SDK / updateCustomerPaymentProfile problem - cannot submit billTo without payment Info

I have no problem using this function to update PAYMENT info, but it fails if I try to update BILLING ( billTo ) info without resubmittinjg payment info.   Obviously, I don't want to keep the CC info on my server, so it's critical that I can update customer billTo info without needing to know the CC info.

 

Code Below shows my call to the Auth.net SDK function (conditionally includes Company Name, if I have one in my data).

 

$custExtId & $ccExtId are looked up earlier in my function and theypopulate Auth.net's $customerProfileId and

$paymentProfileId.

... I've already printed these values out on my page and manually verified that they're the correct Id's via the Auth.net admin console.

 

BEGIN CODE:

 

$request = new AuthorizeNetCIM;
       
            $paymentProfile = new AuthorizeNetPaymentProfile;
            $paymentProfile->billTo->firstName = stripslashes($row["FirstName"]);
            $paymentProfile->billTo->lastName = stripslashes($row["LastName"]);
            if (stripslashes($row["Company"]))$paymentProfile->billTo->company = stripslashes($row["Company"]);
            $paymentProfile->billTo->address = $address;
            $paymentProfile->billTo->city = stripslashes($row["City"]);
            $paymentProfile->billTo->state = stripslashes($row["State"]);
            $paymentProfile->billTo->zip = stripslashes($row["Zip"]);
            $paymentProfile->billTo->phoneNumber = stripslashes($row["Phone"]);
            $paymentProfile->billTo->faxNumber = stripslashes($row["Fax"]);
            $paymentProfile->payment->faxNumber = stripslashes($row["Fax"]);
            $response = $request->updateCustomerPaymentProfile($custExtId,$ccExtId, $paymentProfile);

 

Here's a dump of the service response:

AuthorizeNetCIM_Response Object ( [xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00029 [text] => Payment information is required. ) ) ) [response] => ErrorE00029Payment information is required. [xpath_xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00029 [text] => Payment information is required. ) ) ) )

 

Thanks in advance for any help...

 


Accepted Solutions
Highlighted
Solution
Accepted by topic author bradim
‎08-21-2015 01:58 AM
Member
Posts: 3
Registered: ‎08-01-2011

Re: CIM PHP SDK / updateCustomerPaymentProfile problem - cannot submit billTo without payment Info

Noticed a typo... but still not working...

 

I removed the following line with the FAX:

$paymentProfile->payment->faxNumber = stripslashes($row["Fax"]);

 

ALSO... per other discussions that seemed relevant to this, I've tried sending the last 4 of the CC in the payment info.

I've tried padding with 4 "x"s and that yields this error:

AuthorizeNetCIM_Response Object ( [xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00015 [text] => The field length is invalid for Card Number. ) ) ) [response] => ErrorE00015The field length is invalid for Card Number. [xpath_xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00015 [text] => The field length is invalid for Card Number. ) ) ) )

 

 

And I've tried padding with 12 "x"s and that yields THIS error:

AuthorizeNetCIM_Response Object ( [xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00013 [text] => Card Number is invalid. ) ) ) [response] => ErrorE00013Card Number is invalid. [xpath_xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00013 [text] => Card Number is invalid. ) ) ) )

 

thanks!

View solution in original post

Highlighted
Solution
Accepted by topic author bradim
‎08-21-2015 01:58 AM
Member
Posts: 3
Registered: ‎08-01-2011

Re: CIM PHP SDK / updateCustomerPaymentProfile problem - cannot submit billTo without payment Info

Closing this ticket... turned out to be a bad CC#... very odd.

Other Test CC#'s are ok, but this one fails:

Discover 6011111111111117

 

Sending last 4 prepended by XXXX works fine, as long as the system likes the card# to begin with.

 

 

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author bradim
‎08-21-2015 01:58 AM
Member
Posts: 3
Registered: ‎08-01-2011

Re: CIM PHP SDK / updateCustomerPaymentProfile problem - cannot submit billTo without payment Info

Noticed a typo... but still not working...

 

I removed the following line with the FAX:

$paymentProfile->payment->faxNumber = stripslashes($row["Fax"]);

 

ALSO... per other discussions that seemed relevant to this, I've tried sending the last 4 of the CC in the payment info.

I've tried padding with 4 "x"s and that yields this error:

AuthorizeNetCIM_Response Object ( [xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00015 [text] => The field length is invalid for Card Number. ) ) ) [response] => ErrorE00015The field length is invalid for Card Number. [xpath_xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00015 [text] => The field length is invalid for Card Number. ) ) ) )

 

 

And I've tried padding with 12 "x"s and that yields THIS error:

AuthorizeNetCIM_Response Object ( [xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00013 [text] => Card Number is invalid. ) ) ) [response] => ErrorE00013Card Number is invalid. [xpath_xml] => SimpleXMLElement Object ( [messages] => SimpleXMLElement Object ( [resultCode] => Error [message] => SimpleXMLElement Object ( [code] => E00013 [text] => Card Number is invalid. ) ) ) )

 

thanks!

Highlighted
Solution
Accepted by topic author bradim
‎08-21-2015 01:58 AM
Member
Posts: 3
Registered: ‎08-01-2011

Re: CIM PHP SDK / updateCustomerPaymentProfile problem - cannot submit billTo without payment Info

Closing this ticket... turned out to be a bad CC#... very odd.

Other Test CC#'s are ok, but this one fails:

Discover 6011111111111117

 

Sending last 4 prepended by XXXX works fine, as long as the system likes the card# to begin with.