Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:04:05+00:00 2026-05-27T07:04:05+00:00

I am using the following code $customerProfile = new AuthorizeNetCustomer; $customerProfile->description = Description of

  • 0

I am using the following code

$customerProfile = new AuthorizeNetCustomer;
    $customerProfile->description = "Description of customer";
    $customerProfile->merchantCustomerId = "honululu27";
    $customerProfile->email = "user2@domain.com";

    // Add payment profile.
    $paymentProfile = new AuthorizeNetPaymentProfile;
    $paymentProfile->payment->creditCard->cardNumber = "4111111111111111";
    $paymentProfile->payment->creditCard->expirationDate = "2015-10";
    $customerProfile->paymentProfiles[] = $paymentProfile;

    //Check customer
    $request = new AuthorizeNetCIM;
    $response = $request->createCustomerProfile($customerProfile);
    echo $response->getCustomerProfileId(); //shows up only in case of success
    echo $response->xml->resultCode; //never shows up
        echo $response->xml->message->code; //never shows up
        echo $response->xml->customerProfileId; //shows up only in case of success

        // Confused about the portion below
    if($response->isOk())
    {
        echo "Success";
        echo $response->getCustomerProfileId();
    }
    else
    {
        echo "FAILED";
        echo $response->xml->resultCode;
    }

Now, as you can probably tell, i am a novice at this, so I can’t figure out how to display the message text and code. The only thing working is the customer id, which shows up in case of success, but what about all the other xml fields like messages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:04:06+00:00Added an answer on May 27, 2026 at 7:04 am

    echo $response->getCustomerProfileId(); //shows up only in case of success
    echo $response->xml->customerProfileId; //shows up only in case of success

    That makes sense since you only get a profile ID if the API call is successful

    echo $response->xml->resultCode; //never shows up

    Try echo $response->xml->messages->resultCode

    echo $response->xml->message->code; //never shows up

    Try echo $response->xml->messages->message->code

    Here is a sample response which shows the XML structure of a CIM response. It should help you see why the code you have isn’t working.

    <?xml version="1.0" encoding="utf-8"?>
    <createCustomerProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
      <messages>
        <resultCode>Ok</resultCode>
        <message>
          <code>I00001</code>
          <text>Successful.</text>
        </message>
      </messages>
      <customerProfileId>5427896</customerProfileId>
      <customerPaymentProfileIdList>
        <numericString>4796541</numericString>
      </customerPaymentProfileIdList>
      <customerShippingAddressIdList>
        <numericString>4907537</numericString>
      </customerShippingAddressIdList>
      <validationDirectResponseList>
        <string>1,1,1,This transaction has been approved.,EY6CR8,Y,2165732750,none,Test transaction for ValidateCustomerPaymentProfile.,0.00,CC,auth_only,12345,John,Smith,,123 Main Street,Townsville,NJ,12345,,800-555-1234,,user@example.com,none,none,none,none,none,none,none,none,0.00,0.00,0.00,FALSE,none,72784EF27A4DD684150C39B923FC4478,,2,,,,,,,,,,,XXXX1111,Visa,,,,,,,,,,,,,,,,</string>
      </validationDirectResponseList>
    </createCustomerProfileResponse>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the following code: Private Sub MakeMeSomeXmlBeforeRyanGetsAngry() Dim db As New MyDBDataContext Dim customer
i am using following code $doc = new DOMDocument(); $doc->strictErrorChecking = false; @$doc->loadHTML($data); $xpath
Android: I am using following code to insert image into album According to description
I created a DB using following code. Dim conn As New SqlConnection(Server=.\SQLExpress;Data Source=;Integrated Security=SSPI)
I am using following code UiApplication.getUiApplication().invokeLater(new Runnable(){ public void run(){ // your code here
I am using following code to setup connection string: ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder
I am Using Following Code for Send the Email from my application but problem
Hi I am using following code to add my application to StartUp of Windows.
I'm using following code: $config['base_url'] = http://www.aaa.com/; Also Im using Flash navigation: on(release) {
I am using following code in rowdatabound function. Protected Sub gvwMileStone_RowDataBound(ByVal sender As System.Object,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.