Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2323

Authorize.Net CIM profile storage updates

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0-b1
    • Component/s: Gateways
    • Labels:
      None

      Description

      Problem

      Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

      API docs:
      https://developer.authorize.net/api/reference/#customer-profiles-get-customer-profile-ids

      i.e.:

      Function Fields Used For Duplicate Profile Verification
      createCustomerProfileRequest merchantCustomerId
      description
      e-mail
      createCustomerPaymentProfileRequest customerProfileId
      cardNumber
      accountNumber
      routingNumber
      billToFirstName
      billToLastName
      billToAddress
      billToZip
      createCustomerShippingAddressRequest customerProfileId
      firstName
      lastName
      address
      zip
      phoneNumber

      If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

      Note: The error response will include the ID number of the duplicate profile.

      Example error response

      <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>Error</resultCode>
      		<message>
      			<code>E00039</code>
      			<text>A duplicate record with ID 1220992516 already exists.</text>
      		</message>
      	</messages>
      	<customerPaymentProfileIdList />
      	<customerShippingAddressIdList />
      	<validationDirectResponseList />
      </createCustomerProfileResponse>
      

      If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

      Changes

      Current behavior

      When storing a CC or ACH account, we currently:

      1. Attempt to create the customer profile (if we can't re-use one we already have)
      2. Attempt to create a new payment profile for the account details
      3. Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

      New behavior

      This has to be updated to:

      1. Attempt to create the customer profile (if we can't re-use one we already have)
        • Look for error E00039
        • Parse the text message E00039 for customer profile ID
        • Set the parsed profile ID as the customer profile ID for creating the payment profile
      2. Attempt to create a new payment profile for the account details
        • Look for error E00039
        • Parse the text message E00039 for payment profile ID
        • Set the parsed profile ID as the payment profile ID for the account
      3. If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
      4. Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Description Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        tyson Tyson Phillips (Inactive) made changes -
        Description Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}
        tyson Tyson Phillips (Inactive) made changes -
        Description Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}
        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        tyson Tyson Phillips (Inactive) made changes -
        Description Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        Example error response:
        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        tyson Tyson Phillips (Inactive) made changes -
        Description Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        Example error response:
        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        h3. Problem
        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        h4. Example error response
        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        h3. Changes
        h4. Current behavior
        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        h4. New behavior
        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        tyson Tyson Phillips (Inactive) made changes -
        Description h3. Problem
        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        h4. Example error response
        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        h3. Changes
        h4. Current behavior
        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        h4. New behavior
        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        h3. Problem
        Authorize.Net CIM allows ACH and CC to be stored offsite. However, their API returns an error attempting to create new customer or payment profiles if they detect a duplicate. See https://support.authorize.net/authkb/index?page=content&id=A116&pmv=print

        API docs:
        https://developer.authorize.net/api/reference/#customer-profiles-get-customer-profile-ids

        i.e.:
        ||Function||Fields Used For Duplicate Profile Verification||
        |createCustomerProfileRequest|merchantCustomerId
        description
        e-mail|
        |createCustomerPaymentProfileRequest|customerProfileId
        cardNumber
        accountNumber
        routingNumber
        billToFirstName
        billToLastName
        billToAddress
        billToZip|
        |createCustomerShippingAddressRequest|customerProfileId
        firstName
        lastName
        address
        zip
        phoneNumber|

        {quote}
        If one of the above functions is submitted, and if the fields used for duplicate profile verification contain the exact details as an existing profile, E00039 will occur.

        *Note: The error response will include the ID number of the duplicate profile.*
        {quote}

        h4. Example error response
        {code}
        <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>Error</resultCode>
        <message>
        <code>E00039</code>
        <text>A duplicate record with ID 1220992516 already exists.</text>
        </message>
        </messages>
        <customerPaymentProfileIdList />
        <customerShippingAddressIdList />
        <validationDirectResponseList />
        </createCustomerProfileResponse>
        {code}

        If an error occurs, the profile ID is returned, albeit in a text message we would have to parse (note: unreliably) and use to re-attempt storage.

        h3. Changes
        h4. Current behavior
        When storing a CC or ACH account, we currently:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        # Attempt to create a new payment profile for the account details
        # Return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta)

        h4. New behavior
        This has to be updated to:
        # Attempt to create the customer profile (if we can't re-use one we already have)
        #* Look for error E00039
        #* Parse the text message E00039 for customer profile ID
        #* Set the parsed profile ID as the customer profile ID for creating the payment profile
        # Attempt to create a new payment profile for the account details
        #* Look for error E00039
        #* Parse the text message E00039 for payment profile ID
        #* Set the parsed profile ID as the payment profile ID for the account
        # If either profile currently exists (i.e. we are not adding them new), then we must update the profiles (see AuthorizeNetCim::update, ::updateProfile, ::updatePaymentProfile)
        # Only on success, return the customer profile ID and payment profile ID (which will be stored with the Payment Account in Blesta). On failure, return false
        admin Paul Phillips made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Rank Ranked lower
        admin Paul Phillips made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Rank Ranked lower
        admin Paul Phillips made changes -
        Priority Minor [ 4 ] Major [ 3 ]
        admin Paul Phillips made changes -
        Fix Version/s Short Term [ 10800 ]
        Hide
        admin Paul Phillips added a comment -

        This has been reported by some customers lately. If the client deletes an existing payment account before creating a new one then they are unable to create a new one and staff needs to log into authorize.net and delete the profile first.

        Show
        admin Paul Phillips added a comment - This has been reported by some customers lately. If the client deletes an existing payment account before creating a new one then they are unable to create a new one and staff needs to log into authorize.net and delete the profile first.
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Story Points 3
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.9.0-b1 [ 11301 ]
        Fix Version/s Short Term [ 10800 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.9.0 Sprint 6 [ 104 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        jonathan Jonathan Reissmueller added a comment - - edited

        Do we really want to ignore when the payment account already exists? In this way we could have multiple payment accounts in Blesta being paired with the same Authorize.net payment profile.

        Show
        jonathan Jonathan Reissmueller added a comment - - edited Do we really want to ignore when the payment account already exists? In this way we could have multiple payment accounts in Blesta being paired with the same Authorize.net payment profile.
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours, 15 minutes [ 8100 ]
        Worklog Id 13300 [ 13300 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 2 hours, 15 minutes [ 8100 ] 2 hours, 46 minutes [ 9960 ]
        Worklog Id 13301 [ 13301 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 2 hours, 46 minutes [ 9960 ] 3 hours, 28 minutes [ 12480 ]
        Worklog Id 13302 [ 13302 ]
        Automated transition triggered when Jonathan Reissmueller created pull request #8 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        admin Paul Phillips added a comment -

        What would be the alternative?

        Show
        admin Paul Phillips added a comment - What would be the alternative?
        Hide
        jonathan Jonathan Reissmueller added a comment -

        To just not allow you to submit payment credentials that already exist in Authorize.net. But I actually ended up implementing a fix with the best of both worlds that will reject the duplicate if it exists in Blesta, but link it up instead if it only exists in Authorize.net.

        Show
        jonathan Jonathan Reissmueller added a comment - To just not allow you to submit payment credentials that already exist in Authorize.net. But I actually ended up implementing a fix with the best of both worlds that will reject the duplicate if it exists in Blesta, but link it up instead if it only exists in Authorize.net.
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #8 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Mar/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 3 hours, 28 minutes
              3h 28m

                Agile