cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Correct format for passing Customer IP in CIM

What is the correct format for passing the Customer IP Address under a CreateCustomerProfileTransaction in CIM? I have tried to pass as below but keep getting an error  E00013 : Extra Options is invalid.

 

<v1:transaction>

<v1:profileTransVoid>

<v1:customerProfileId>999999999</v1:customerProfileId>

<v1:customerPaymentProfileId>999999999</v1:customerPaymentProfileId>

<v1:transId>99999999</v1:transId>

</v1:profileTransVoid>

</v1:transaction>

<v1:extraOptions>x_customer_ip/255.255.255.255</v1:extraOptions>

 

iowa
Member
1 ACCEPTED SOLUTION

Accepted Solutions

It like a url param. x_customer_ip=255.255.255.255

View solution in original post

RaynorC1emen7
Expert
4 REPLIES 4

It like a url param. x_customer_ip=255.255.255.255

RaynorC1emen7
Expert

Thank you. That worked.

Hello,


I have set the following code fro transaction but during transaction when i store "customerIP" it gives error

$request = new AuthorizeNetCIM;

$transaction->amount = $payable_amount;
$transaction->customerProfileId = $memberData[0]['auth_customer_profile_id'];
$transaction->customerPaymentProfileId = $_SESSION["sess_ary"][$_REQUEST["oldcard"]];
$transaction->customerIP="192.168.0.53";
$transaction->order->invoiceNumber = $orderId;
$transaction->order->description = PROGRAM_DESCRIPTION_FOR_PAYMENT;
//$transaction['customerIP']="192.168.0.53";
$response = $request -> createCustomerProfileTransaction("AuthCapture", $transaction);

Response With Error:

[response] => ErrorE00003The element 'profileTransAuthCapture' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customerIP' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'customerShippingAddressId, order, taxExempt, recurringBilling, cardCode, splitTenderId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
[xpath_xml] => SimpleXMLElement Object
(
    [messages] => SimpleXMLElement Object
        (
            [resultCode] => Error
            [message] => SimpleXMLElement Object
                (
                    [code] => E00003
                    [text] => The element 'profileTransAuthCapture' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customerIP' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'customerShippingAddressId, order, taxExempt, recurringBilling, cardCode, splitTenderId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
                )

        )

)

Can you please guide us why i got error when i have add "customerIP" in trasaction request?

Thank you
Dev

testing
Contributor


Hello,


I have myseld resolved that BIG issue as i need to store IP address in request.


Step 1:

If any one use SDK then in AuthorizeNetCIM.php file find function _setPostString() and replace with following.

protected function _setPostString()
{
    ($this->_validationMode != "none" ? $this->_xml->addChild('validationMode',$this->_validationMode) : "");
    $this->_post_string = $this->_xml->asXML();

    // Add extraOptions CDATA
    if ($this->_extraOptions) {
       if ($this->_extraOptions) {
            $this->_xml->addChild("extraOptions");
            $this->_post_string = str_replace("<extraOptions/>",'<extraOptions><![CDATA[' . $this->_extraOptions . ']]></extraOptions>', $this->_xml->asXML());
            $this->_extraOptions = false;
        }

    }
    // Blank out our validation mode, so that we don't include it in calls that
    // don't use it.
    $this->_validationMode = "none";
}



Step 2:

- You must have to pass the one parameter "x_customer_ip="192.168.0.53"'" in function named createCustomerProfileTransaction(). This function is used at the time of final transaction.

eg.

$response = $request -> createCustomerProfileTransaction("AuthCapture", $transaction,'x_customer_ip="192.168.0.53"');


Thank you.
Dev