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'.
09-18-2014 07:30 AM - edited 09-18-2014 07:44 AM
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?
09-18-2014 08:00 AM - edited 09-18-2014 08:03 AM
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. ===================================================================
09-18-2014 09:17 AM
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
09-18-2014 09:53 AM
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.
09-18-2014 01:09 PM
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
09-18-2014 01:13 PM - edited 09-18-2014 01:15 PM
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';
}
}
}
09-18-2014 01:27 PM
Working on the other details for you now.
09-18-2014 01:28 PM
Actually, what I have sent above is the process flow, I'm using the provided linked class to write the XML queries for me...
09-18-2014 01:35 PM
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.
09-18-2014 01:39 PM