Reply
Highlighted
Member
Posts: 2
Registered: ‎02-06-2014

Pre-populate CIM popup with existing db data

Hello there.

 

I searched the web for hours and I did not find a solution. Hope to get a fresh view from you guys :)

 

My client has a database of 1000s of customers with credit card data in DB. Now, they use authorize.net CIM for new customers and enter data manually in the popup (for new customers).

 

What they want is somehow populate the CIM popup with the db data for each existing customer when on their profile, or have the customers click a link and the popup will open with db data. Anything to avoid having customers type their data again.

 

The languages used are PHP and JS.

 

Here is what I considered, and if you have any idea that would get the db data to the popup without manually entering it, would be awesome.

 

First I wanted to populate the popup with JS from the clients site to update the popup from authorize.net. Just run a JS function when the popup opens and set the data we have to the form. This does not work as it turns out it is a security issue and you cannot run JS when domains don't match so easily.

 

The second method I thought of (not yet implemented) was to get the popup with PHP curl and show it to the clients page. That way the popup and the site would be on the same domain and I could populate the form with JS or PHP.

 

(in case it exists and has eluded me )The third method, I thought would be to pass the db data as specific parameters (like: {'ccNumber': '1234123412341234'}) when I am requesting the popup from authorize.net . And when the popup shows up the data will be there.

 

The fourth method that I considered was a JS only ugly work-around found here: http://gem-session.com/2010/08/inception-manipulating-cross-domain-iframes-with-javascript

 

I have no good ideas left, and was not able to find one that fit.

 

Thank you for your atention and don't hesitate to ask any questions.

 

Best regards,

Robert.

 

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Pre-populate CIM popup with existing db data

Couldn't you load the db info to the CIM now? why make your existing customers click a link?

Highlighted
Member
Posts: 2
Registered: ‎02-06-2014

Re: Pre-populate CIM popup with existing db data

The existing customers have no connection yet to the authorize.net .

This functionality was just finished by another developer. Only new customers will get the CIM popup to enter their data.

 

If you have some solution in mind, a link or a description of the solution would be much apreciated.

Thank you.

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Pre-populate CIM popup with existing db data

What I mean is that for existing customers, use either the xml or soap CIM interface to upload the their CC info.

http://developer.authorize.net/api/cim/