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

CIM Hosted Form AUTH_ONLY

I am trying to implement the CIM Hosted Form for Authorization Only using C#/ASP.Net. So far, using the sandbox, I have been able to generate the token and create a transaction using the addPayment web method. However, when I look at the transactions under the CIM page, the status is VOIDED rather than Authorized/Pending Capture.

 

Is there another hidden input that needs to be included in the hidden form to designate AUTH_ONLY? Also, how do we retrieve the transaction_id so that it can be submitted later using the API as prior auth/capture?

 

I noticed that when the form is submitted, it is processed by API.ashx and the JSON response data includes the token and the payment profile ID that was created. Is there a way to retrieve the Payment Profile ID value from the page that is hosting the popup form?

1 ACCEPTED SOLUTION

Accepted Solutions

addPaymen? that is for adding a payment profile. not creating transaction. You use the hosted page have the customer create payment profile, then came back to your site, then you list all their availabe payment profile, create transaction with the one that customer selected.

View solution in original post

RaynorC1emen7
Expert
8 REPLIES 8

addPaymen? that is for adding a payment profile. not creating transaction. You use the hosted page have the customer create payment profile, then came back to your site, then you list all their availabe payment profile, create transaction with the one that customer selected.

RaynorC1emen7
Expert

Thank you for the info and the quick response. I will try to implement as you suggested. I am creating the Customer Profile using the API and parsing the response for a duplicate, and then using getCustomerProfile with that ID if it exists. Here is my C# code in case it helps anyone else:

 

	/// <summary>
        /// Create the customer profile for Authorize.Net
        /// </summary>
        /// <returns>The ID for the customer profile that was created</returns>
        public long CreateCustomerProfile(string emailAddress, string personId)
        {
            long out_id = 0;

            AuthorizeNetWS.CustomerProfileType m_new_cust = new AuthorizeNetWS.CustomerProfileType();
            m_new_cust.email = emailAddress;
            m_new_cust.description = "Web User " + personId;
            m_new_cust.merchantCustomerId = personId;
            AuthorizeNetWS.CreateCustomerProfileResponseType response = SoapAPIUtilities.Service.CreateCustomerProfile(SoapAPIUtilities.MerchantAuthentication, m_new_cust, AuthorizeNetWS.ValidationModeEnum.none);

            for (int i = 0; i < response.messages.Length; i++)
            {
                string result = response.messages[i].text;
                if (response.messages[i].code == "E00039")
                {
                    int startIndex = result.IndexOf("with ID ") + 8;
                    int endIndex = result.IndexOf(" already exists");
                    string pId = result.Substring(startIndex, endIndex - startIndex);
                    long profileId = Convert.ToInt64(pId);
                    AuthorizeNetWS.CustomerProfileMaskedType profile = GetCustomerProfile(profileId);
                    out_id = profile.customerProfileId;
                }
                else
                {
                    out_id = response.customerProfileId;
                }
            }
            return out_id;
        }

 

If anyone else knows how to grab the PaymentProfileId from the JSON response from the addPayment web method, it would still be helpful.

grab the PaymentProfileId from the JSON response from the addPayment web method

If you search the forum, I remember someone try that but don't remember if they got it to work or not.

I have searched through this forum for several days and still have not found a way to capture the PaymentProfileId. Here is the way my system needs to work:

 

1. The web user selects a professional license to renew and is presented with the Hosted Form to add their CC info.

2. The site admin needs to verify some information provided by the web user (related to the professional license.)

3. Several days later, the admin charges the CC once their information is verified. The customer will NOT be returning to the site to select a payment profile -- it is a AUTH_ONLY followed by a PRIOR_AUTH_CAPTURE, several days later.

 

The issue is that once the user provides their CC info, there is no way for us to associate a particular payment profile with a specific web user submission. We can store the customer profile ID but I do not see a way to look up the correct payment profile ID for that transaction based on customer profile ID.

 

Can anyone provide the way to parse the JSON result from Api.ashx and pull out the PaymentProfileId so that I can store that in our DB to look up later? I can see it in FireBug under the Network tab by selecting Api.ashx and viewing the Response tab.

 

It looks like the best solution for this case is to create a unique merchant customer ID for each transaction. That way I can save the customer profile ID in our DB and there should only be one payment profile ID associated with it.

 

Thanks to all who considered or responded to this post!

What happend when an existing customer want to order again? with a different card?

 

And if you going to create a new profile for each transaction, what the point of using CIM at all? Once the transaction is done, you don't need it anymore.

Thanks for following up on this post.

 

We are using the CIM for PCI compliance through the Hosted Form, so the user can add payment information securely.

 

The transaction isn't actually completed for several days -- the customer can enter their information and the account admin can release the payment within 30 days. The nice part is that we won't have to worry about guessing the correct payment profile -- there will be only one payment profile per customer profile. The customer will never reach the 10-card limit and we do want them to add payment information for each transaction, so it does not matter if they use the same card or a different card. It will go through as AUTH_ONLY until some licensing information is verified, and then we can use the API to process the transaction on a later date using ProfileTransPriorAuthCaptureType.

 

I am coding all of this now... please let me know if you see any issues with the process.

 

Thanks!

Ok. that do sound like CIM is useful in that.