Server Side Hidden Paypal Formfields?!

Discussion in 'Programming' started by j0ned, Jan 22, 2007.

  1. #1
    After searching for days, literally this entire weekend, I'm at a loss. Here's what I'm looking to accomplish.

    I'd like to submit dynamic hidden form fields to paypal, taking advantage of their 'buy it now' button. Here's what I've tried..

    
    <cfhttp url="https://www.paypal.com/cgi-bin/webscr" method="post">
    <cfhttpparam type="formfield" name="cmd" value="_xclick">
    <cfhttpparam type="formfield" name="business" value="myemail@here.com">
    <cfhttpparam type="formfield" name="item_name" value="Placing my STATIC ITEM NAME HERE">
    <cfhttpparam type="formfield" name="item_number" value="1">
    <cfhttpparam type="formfield" name="amount" value="10.00">
    <cfhttpparam type="formfield" name="no_shipping" value="1">
    <cfhttpparam type="formfield" name="return" value="http://www.mydomain.com/thankyou/">
    <cfhttpparam type="formfield" name="cancel_return" value="http://www.mydomain.com/cancelled/">
    <cfhttpparam type="formfield" name="no_note" value="1">
    <cfhttpparam type="formfield" name="currency_code" value="USD">
    <cfhttpparam type="formfield" name="lc" value="US">
    </cfhttp> 
    
    Code (markup):
    This returns a blank page... And I haven't even tried using dynamic #variable# fields, yet..

    Even with the..
     
    <cfhttp .... redirect="yes">
    
    Code (markup):
    added, a blank page is still returned.

    Can someone please provide an example, or point me in the right direction as to how this can be done? Putting the hidden form fields in the invoice or "buy now" page is NOT an option...

    Thanks!
     
    j0ned, Jan 22, 2007 IP
  2. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #2
    put a timeout on the http request...
     
    datropics, Jan 22, 2007 IP
  3. j0ned

    j0ned Active Member

    Messages:
    684
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #3
    ok... and?

    still a blank page.
     
    j0ned, Jan 22, 2007 IP
  4. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    what was the amount that you put in your time out?

    BTW do you have something like <cfset Content = cfhttp.fileContent> ?

    You'll need to put that after your <cfhttp>...</cfhttp> tag
     
    datropics, Jan 24, 2007 IP