cancel
Showing results for 
Search instead for 
Did you mean: 

sample full CIM process

There doesn't seem to be a full picture of the payment process. The API documentation shows sample code for Auth and Capture, but that code requires the CustomerPaymentProfileId (I am using CIM). In order to know that PaymentProfileID value, you must present payment options to the user and let them select which option they wish to use. But this step is not described anywhere in the documentation. I assume there is a function to grab these payment options so I can display them to the user, but I don't see an example of the entire process.

 

I guess I am looking for a flow chart or example checkout process.

stzoid
Member
4 REPLIES 4

You can look at the CIM sample code

http://developer.authorize.net/downloads/samplecode/

 

RaynorC1emen7
Expert

Thank you, that code review was useful. I don't use any of those programming languages, but I could follow the logic.

 

However, all of the CIM samples assumed that the PaymentProfielD and also the PaymentAddressID were known at the time the function was called. This means the user had to have made the selection to Buy by clicking on a particular record containing the PaymentProfileID they wanted to use. That means I have to ensure I always collect and store any changes they make to their PaymentProfile (adding or deleting PaymentProfileIDs or AddressProfileIDs, etc.) and present those options to the buyer in a grid. I am just suprised this fact is not in a flowchart, sample code or in the official documentation (unless I missed it.)

 

Thanks again.

stzoid
Member

Try the C# one, it show the CreateCustomerProfile, GetCustomerProfile, CreateCustomerPaymentProfile, UpdateCustomerPaymentProfile, GetCustomerProfile, CreateTransaction, and DeleteCustomerProfile.

 

You will have to stored at the least the customer pofile id, then use it on GetCustomerProfile, where it return the paymentprofileid or the address one.

Thanks. That is what I am doing, using getCustomerProfile to get the PaymentProfiles to present payment options to the user to select which one they want to use. I am used to PayPal which is a lot easier.

 

I find this CIM to be lacking features:

 

  • difficult (not impossible) to omit Shipping details from the hosted Profile. That should be a simple parameter in the function.

  • same for omitting the Bank Account option from the New Payment Method options, that should be easy to omit.

  • not possible to limit the number of credit cards to only one.

  • not possible to retrieve a users CustomerProfile if you "lost" the customerProfileID from your database. At the same time you cannot delete the profile because that function also requires the customerProfileID. So if you lose the customerProfileID (has to be accounted for in error trapping), then I assume you have to go online and hunt for it in your customer records. Instead I hacked this in my code to grab the profile ID from this error statement: "A duplicate record with ID xxxxxx already exists." 

  • I have not done this yet but I know I need to review my code and ensure that my user records are not tied to the Authorize.net customerProfile on ONLY the users email address.

  • it also is not easy to display the stored credit card profiles to the customer for them to select which one to use. getCustomerProfile only returns the last four digits of the credit card, nothing else. Kind of hard to display only that minimal information to the buyer to have them choose which one to use. I don't even get the expiration date so I cannot tell the user in advance that their credit card has expired or will soon.

It seems for the CIM to be fully effective, it wants me to manage the account from my application, have them enter the credit card details on MY application and then push that information to Authorize.net. But that defeats the purpose, requires me to install SSL, which I was trying to avoid in this situation.