Reply
Contributor
Posts: 16
Registered: ‎09-18-2014

CIM ccv (cardCode) help

[ Edited ]

Hello,

 

I and a colleague of mine have been writing some code to interface with Authorize.net's CIM, in doing so; I am trying to get the CCV to be validated when adding a payment profile to Authorize.

 

According to the var dumping of (PHP) variables, it appears to be only "acknowledging" the addition when using the "createCustomerProfileTransactionRequest", resulting in an error...

 

Curious if any others have run into this, and why the setParam option when set seems to be ignored on the others end?

 

Here is the class that I am using presently:

 

http://orangomedia.com/projects/authorize/authorizenet.cim.class.txt

 

Is there any pointers one can offer?  I feel it might be simple, as a matter of placement, the structure is a bit vast for the API so any assistance is appreciated!

 

When dropping the items in the code to include the cardCode as part of the payment fields, it results in the following error:

 

The element 'payment' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'cardCode' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM ccv (cardCode) help

[ Edited ]

read thru the schema, ccv is part of payment type.

https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

 

and the xml doc is here

http://www.authorize.net/support/CIM_XML_guide.pdf

 

can you post the request xml? did you put the CCV inside the credit card node or outside?

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

Based on the links you have provided; the only time I can get the functionality is when using the validateCustomerPaymentProfileRequest; and then adding the information in.

 

=================================================================== validateCustomerPaymentProfileRequest This method is used to check a customer payment profile by generating a test transaction for it. The merchant must be signed up for the CIM service to use it. ===================================================================

 
Just felt as if this is a bit of redundancy, I guess that all in the same context we could create the payment account after validating it, if it validates, go forward with creating it, or applying a payment.
 
Just seems redundant to only include it in the validation, and creating profile transaction request after it, but perhaps it was for validations sake, which I guess the flow could be adopted easily.
 
Could you elaborate your interpretation of my request?
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM ccv (cardCode) help

You get use the CCV when you create the payment profile.

and when create any transaction with auth piece. ie auth_only, auth_capture

and using validateCustomerPaymentProfile

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

That does NOT appear to be the case when adding a card, I can enter any CVV when adding a new card without it erroring.

 

We would like, when adding a new card for the CCV to be verified, we set it as a required entry to validate the credit card unless there are other options for validating the card.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM ccv (cardCode) help

[ Edited ]

That does NOT appear to be the case when adding a card, I can enter any CVV when adding a new card without it erroring.

My guess it is was not in the correct sequence or node. Can you post the xml request xxxx out the data, just need the structure.

 

try it here

http://developer.authorize.net/api/reference/

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

I provided the PHP coding above, as you can see, just review the functions.

 

// This function is used to create a new customer payment profile for an existing customer profile
function createCustomerPaymentProfileRequest() {
$this->xml = "<?xml version='1.0' encoding='utf-8'?>
<createCustomerPaymentProfileRequest xmlns='AnetApi/xml/v1/schema/AnetApiSchema.xsd'>
<merchantAuthentication>
<name>" . $this->login . "</name>
<transactionKey>" . $this->transkey . "</transactionKey>
</merchantAuthentication>
" . $this->refId() . "
" . $this->customerProfileId() . "
<paymentProfile>
" . $this->customerType() . "
<billTo>
" . $this->billTo_firstName() . "
" . $this->billTo_lastName() . "
" . $this->billTo_company() . "
" . $this->billTo_address() . "
" . $this->billTo_city() . "
" . $this->billTo_state() . "
" . $this->billTo_zip() . "
" . $this->billTo_country() . "
" . $this->billTo_phoneNumber() . "
" . $this->billTo_faxNumber() . "
</billTo>
<payment>
" . $this->paymentType() . "
" . $this->transactionCardCode() . "
</payment>
</paymentProfile>
" . $this->validationMode() . "
</createCustomerPaymentProfileRequest>";
$this->process();
}

 

function transactionCardCode()
{
if (isset($this->params['transactionCardCode']))
{
if (preg_match('/^[0-9]{3,4}$/', $this->params['transactionCardCode']))
{
return "<cardCode>" . $this->params['transactionCardCode'] . "</cardCode>";
}
else
{
$this->error_messages[] .= 'setParameter(): transactionCardCode must be 3 to 4 digits';
}
}
}

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

Working on the other details for you now.

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

Actually, what I have sent above is the process flow, I'm using the provided linked class to write the XML queries for me...

Contributor
Posts: 16
Registered: ‎09-18-2014

Re: CIM ccv (cardCode) help

From the review of the CIM document it is referencing that in order to validate in the way I want it to validate, I have to add it, validate it apply the code, then if it fails delete?

 

This seems like WAY to much to incorporate and should be something on Authorizes side.  I am still reviewing the CIM document now.