Re: Any reason a cfhttp post can't be made in a component method?

2012-09-25 Thread Raymond Camden

Nope.

On Tue, Sep 25, 2012 at 7:15 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Can anyone think of a reason that a cfhttp post can't be
 made within a component method?

 Rick



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352744
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Any reason a cfhttp post can't be made in a component method?

2012-09-25 Thread Rick Faircloth

Ok... next question.

Can a jQuery ajax function be used to send post variables
to a component method and have a cfhttp function post those
variables to another domain, in this case,
https://test.authorize.net/gateway/transact.dll ???

I'm at my wits end trying to process form data into two parts.
The data fields that can go to authorize.net and the parts that
need to stay with me and go into my database. Authorize.net forbids
personally identifiable info from going into the merchant-defined fields.

Ergo, I need to post some of the form data to Authorize.net and
if a transaction is approved, post some of that info (not CC numbers, etc)
to my database, along with other info not pertinent to the transaction, such
as in honor of etc.

The easiest way I thought to do this was to use AJAX and submit some of the
data that way (I couldn't get a straight jQuery AJAX post to work...couldn't
get a response from the Authorize.net server, although the transaction was
successful) and I haven't been successful getting the form values with
jQuery AJAX and posting them to Authorize.net by send the form values via
AJAX
to a CFC method, which utilizes CFHTTP for the post.  No response from
the Authorize.net server.

If you know this will work, Ray, how much would it cost you to guide me
through a solution. I have a patient client, but this needs to get done.
I'm at the point now where I'm either considering going to session variables
or just putting all the post variables into a temp table in a database,
then processing the transaction, and, if successful, putting the transaction
data into a permanent table.

I just can't seem to work up a solution from everything I've read (which is
all
I could find) and everyone that would discuss this with me, including
calling Authorize.net, who said we don't support developers...

Can it be done? Can you do it? If so, how much to guide me through it?

Still have my hair, but not for long!

Rick


-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: Tuesday, September 25, 2012 10:54 AM
To: cf-talk
Subject: Re: Any reason a cfhttp post can't be made in a component method?


Nope.

On Tue, Sep 25, 2012 at 7:15 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Can anyone think of a reason that a cfhttp post can't be
 made within a component method?

 Rick





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352745
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Any reason a cfhttp post can't be made in a component method?

2012-09-25 Thread Brook Davies

Hi Rick,

There is no reason why this should not work via the CFC method or even via
the direct ajax method. Some gateways however restrict access to approved
IPs, so the ajax method, originating from the end user IP may not work
directly, which is why you probably want to route it through a CFC. The CFC
method is the best option anyways, because otherwise you would need to do 2
ajax requests to talk to Authorize and then send the results to your server.
You should just call a CFC (via ajax), your CFC should post to Auth.net and
then return record the result and return to the client.

If your transactions are getting approved via your CFHTTP post, then you
should be getting a result. What do you see when you dump the
cfhttp.fileContent result?

I have some authorize.net code you can look at that uses CFHTTP, just email
me off list and I'll send it to you. Its nothing special though.. just a
CFHTTP post and some list parsing code to parse the result...

Brook

-Original Message-
From: Rick Faircloth [mailto:r...@whitestonemedia.com] 
Sent: September-25-12 8:34 AM
To: cf-talk
Subject: RE: Any reason a cfhttp post can't be made in a component method?


Ok... next question.

Can a jQuery ajax function be used to send post variables to a component
method and have a cfhttp function post those variables to another domain, in
this case, https://test.authorize.net/gateway/transact.dll ???

I'm at my wits end trying to process form data into two parts.
The data fields that can go to authorize.net and the parts that need to stay
with me and go into my database. Authorize.net forbids personally
identifiable info from going into the merchant-defined fields.

Ergo, I need to post some of the form data to Authorize.net and if a
transaction is approved, post some of that info (not CC numbers, etc) to my
database, along with other info not pertinent to the transaction, such as
in honor of etc.

The easiest way I thought to do this was to use AJAX and submit some of the
data that way (I couldn't get a straight jQuery AJAX post to work...couldn't
get a response from the Authorize.net server, although the transaction was
successful) and I haven't been successful getting the form values with
jQuery AJAX and posting them to Authorize.net by send the form values via
AJAX to a CFC method, which utilizes CFHTTP for the post.  No response from
the Authorize.net server.

If you know this will work, Ray, how much would it cost you to guide me
through a solution. I have a patient client, but this needs to get done.
I'm at the point now where I'm either considering going to session variables
or just putting all the post variables into a temp table in a database, then
processing the transaction, and, if successful, putting the transaction data
into a permanent table.

I just can't seem to work up a solution from everything I've read (which is
all I could find) and everyone that would discuss this with me, including
calling Authorize.net, who said we don't support developers...

Can it be done? Can you do it? If so, how much to guide me through it?

Still have my hair, but not for long!

Rick


-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com]
Sent: Tuesday, September 25, 2012 10:54 AM
To: cf-talk
Subject: Re: Any reason a cfhttp post can't be made in a component method?


Nope.

On Tue, Sep 25, 2012 at 7:15 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Can anyone think of a reason that a cfhttp post can't be
 made within a component method?

 Rick







~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352746
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm