Pay Pal Functionality

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hellogeetu
    New Member
    • Jul 2006
    • 9

    Pay Pal Functionality

    Hi All,
    i want to add a Pay feature with PayPal Function pls Help me in that i m doing this work for the first time having no idea at all.

    A typical Paypal integration would also involve redirecting to the site's Thank you page after the payment is successfully made. Till then the data is kept in a temporary table and the moved to live table or a status flag is updated. An email is triggered.

    This fuctionalilty is required Pls help me

    geetu
  • rameshsambu
    New Member
    • Oct 2006
    • 15

    #2
    hi geetu,

    first you need a paypal account. if you have one they you will have the
    email which you used to register as the business email. eg. "abcd@efgh. com"

    use the following script to send data to paypal

    Code:
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
      <input type="hidden" name="cmd" value="_xclick" /> <!--- required, dont change --->
      <input type="hidden" name="business" value="abcd@efgh.com" /> <!--- the email registered with paypal --->
      <input type="hidden" name="item_name" value="#unique_transaction_identifier#" /><!--- the unique transaction identifier --->
      <input type="hidden" name="currency_code" value="USD" /> <!--- the currency --->
      <input type="hidden" name="amount" value="#amount_in_transaction#" /><!--- the final amount for paypal --->
       <input type="hidden" name="return" value="http://www.yoursite.com/success.cfm" /> <!--- page having code to take care of success condition --->
      <input type="hidden" name="cancel_return" value="http://www.yoursite.com/failure.cfm" /> <!--- page having code to take care of failure condition --->
        <input type="image" name="submit" src="paypal_buynow.jpg" border="0" alt="Make payments with PayPal, it's fast, free, and secure!">
    <!--- any good paypal image would be fine --->
    </form>
    that is all you need to send transaction data to paypal. you have to track every transaction
    through the unique transaction identifier

    good luck

    Comment

    • Kgirl
      New Member
      • Oct 2006
      • 2

      #3
      In what cases I use this 2 options??
      <input type="hidden" name="return" value="http://www.yoursite.co m/success.cfm" /> <!--- page having code to take care of success condition --->
      after the user pays?? like "congratulation s your order succed or something???

      if the customer decide to cancel the order?? I do not understand because we are using a valid email or not????
      <input type="hidden" name="cancel_re turn" value="http://www.yoursite.co m/failure.cfm" /> <!--- page having code to take care of failure condition --->

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by Kgirl
        In what cases I use this 2 options??
        <input type="hidden" name="return" value="http://www.yoursite.co m/success.cfm" /> <!--- page having code to take care of success condition --->
        after the user pays?? like "congratulation s your order succed or something???

        if the customer decide to cancel the order?? I do not understand because we are using a valid email or not????
        <input type="hidden" name="cancel_re turn" value="http://www.yoursite.co m/failure.cfm" /> <!--- page having code to take care of failure condition --->
        The code was suggested by someone else, but I'll try explaining it.

        I'm not sure exactly what fields Paypal requires in a post request, but yes, the return field is for dealing with a successful transaction, whereas the cancel_return deals with a failed transaction (e.g. user cancels, or details not accepted, etc.).

        The code is just an example, you should of course real values including a valid business email.

        One other thing is that I personally don't approve of this method because of security reasons. I suggest you use a HTTP POST request using cfhttp.

        Comment

        • vincentj
          New Member
          • Nov 2007
          • 1

          #5
          Can I use the code above within Payflow Pro?

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Depends on what fields are required.

            Can you describe what information is needed for Payflow Pro?

            Comment

            Working...