Paypal Redirect After Payment

by 20 replies
36
I'm sure this has been posted elsewhere, but I had a hell of a time finding it. So, I thought I would post this for anyone who is looking for this in the future.

Basically, I'm going to cover how you can easily get people back to your website, download page, or any custom link after your customer pays through one of your custom Paypal buttons.

When using Paypal, it's difficult to get the system well integrated into your website, as clients will pay, and then end up on the Paypal page with a weird link that has your email address as the name. See Screenshot:



I'm not sure if you can do an auto-redirect with a normal, free account. But here is the solution I found. Simply add a custom button at the end of checkout that says something like 'CLICK HERE TO FINISH PROCESS', (or something like that).

Step 1: Create a custom button, go to the Merchant Services Tab.


Step 2: Create a custom button.


Step 3: Give your button a name.


Step 4: Go down to '3. Customize Advanced Features'.


Step 5: Enter the link where you want your customer to go after payment. Then, enter this custom code in the box under that.
cbt=THIS TEXT WILL BE A BUTTON.


The end result will look like this at checkout


I like to use text like 'Click Here to Finish Your Order (required).' Hope that helps some people out as it took me a couple of hours of searching on the Internet to find a solution to this problem that was reasonable.
#programming #checkout #digital product delivery #payment #paypal #redirect
  • Thanks,

    I like the idea of leading the purchaser in the direction to avoid potential email/support questions.
    • [1] reply
    • Yup! There's probably an auto redirect feature as well. But I couldn't quite get that sorted. This seemed like a really simple and easy solution for someone selling an ebook, or one-off service. :-)
      • [1] reply
  • Wow...I've been looking for this trick everywhere...and now I found it here. Very simple script but hard to find...lol! Thanks a lot for the sharing JohnnyDeez...

    Cheers,
    Amanda
  • Banned
    Okay this explains why certain clients don't get redirected, they have to click something their selves appearently
  • @bizamanda,

    Indeed! I spent a good hour or two searching on the net. There are lots of solutions, but none that seemed acceptable to me. Hope this works out for you!

    @flashIsland,

    Thanks for posting this! I agree that using IPN (allowing you to create serial numbers, register product purchases, etc...) is a great way to go. Thanks.

    @nik0

    Yeah, perhaps the auto-redirect method above will solve that problem. I tried it once but couldn't seem to get it to work. Will have to give that another go. At least if you have a big orange button that says 'DOWNLOAD' you're more likely to get your product delivered.
  • That return page is priceless real estate as well.
    I sell a physical product, but it applies to digital sales too.....

    That page is a seriously good place for a newsletter signup - you wind up with a quality list of people who already trust you enough to spend money with you.
    they are more likley than any other page on your site to signup right there and then when they have just bought something. They are "in the zone"
    I have a great sweetener for them on mine, a 15% off sitewide code for an affiliate (photo developing), and of course a link to click, and the promise of regular other discount codes for affiliates in me newsletters.
    And, of course, a facebook "like this site" button.
    A couple of weeks after purchase they get an autoresponder from "customer services" hoping their order arrived safely and inviting them, to leave feedback.
    (which gets added to the hundreds of other glowing testimonials from previous customers)
    three birds with one stone, as they say.
    I really like the custom button implimentation, instead of the autoreturn. I may be using that on one or two particular products. Thanks for digging up the info!




    btw: love your web site what the dev Jonny: spot on advice about freelancer fixed rate jobs.
    • [ 1 ] Thanks
  • [DELETED]
  • Hello,

    I went through the steps, but ended up with the standard HTML code for a button. How did you actually get the button onto the page after checkout? I must have missed something along the way...

    Thanks!
    • [1] reply
    • I think I may have figured out why this isn't working for me. I don't use PayPal buy now buttons, that is managed through 1ShoppingCart, with PayPal as the payment choice.

      I was thinking I could replace just the email link with the button, but it seems to be tied to using the PayPal button for payment. Does that sound right?

      I really want to figure this out as I have a few folks each day who miss the link to return to the site...
      • [1] reply
  • Banned
    [DELETED]
  • Banned
    [DELETED]
    • [1] reply
  • Johnny you did a great job. It could help all.
    • [1] reply
    • THIS WAS EXACTLY what I was looking for.

      Geez, I spent at least an hour on the phone with 4-5 different paypal customer service reps that knew nothing about this!!!

      That button will hopefully drastically lesson the number of folks who miss the re-direct link after payment.

      thanks...I just wanted an easy solution without shopping carts or monthly fees and such.

      -DAVE
  • Here is how you get auto-return to work after a buyer has finished paying at PayPal...

    First you must make sure you have a business PayPal account. If you don't it is free to upgrade.

    Login to your PayPal account and click Profile. When it drops down click "My Selling Tools".

    Next look for "Website preferences" and click the update link.

    Turn ON auto return by clicking the "On" radio button. Then add your thank you page url to the "Return URL" text box. Lastly, scroll to the bottom of the page and click the Save button.

    Now, when buyers finish paying for the product, they will automatically return to your thank you page with out having to click the return to merchant link.

    You only get one static url to use for the return url. But, if you create your payment buttons correctly a return url is stated in the button code. This new return url in the button code will autormatically send the buyer to the new or different return url instead of the static url in the My Selling Tools setup.

    The important part is that the auto return is set to "On". PayPal just requires a static url so you can turn on the auto return.

    This way you can sell multiple products and send the buyer automatically to different thank you page urls.

    It just takes a minute or two to have buyers automatically returned to your site. This prevents the buyer from clicking on other links that PayPal puts with the return to merchant link.

    This helps to improve product delivery

    I hope this has been helpful,
    Steve Yakim
  • Just found this post... Major props to JohnnyDeez for this!
    • [ 1 ] Thanks
  • Thanks Johnny, tremendous help.

    I go old school with the classic api "HTML Variables for Recurring Payments Buttons".

    The "webpage button" Johnny makes is encrypted and more secure.

    But with the classic api, all the form fields are hidden from view but displayed on the webpage.

    I use the classic because I need to make custom recurring subscriptions based on an individual client.

    This classic api helps simplified passing the client's specific variables to PayPal.

    Plus I can modify the "return to" webpage based on the purchase (no need to create dozens of encrypted BUY buttons).

    Within the PayPal "Subscribe" button form submission I use these four hidden HTML variable fields to control client redirects and PayPal IPN:

    input type="hidden" name="cbt" value="return to MySite.com" /
    !-- this is the link text for the PayPal return button for a successful purchase --


    input type="hidden" name="return" value="http://mysite.com/paypal/thank_you" /
    !-- this is the webpage for a successful purchase --


    input type="hidden" name="cancel_return" value="http://mysite.com/paypal/halt" /
    !-- this is the webpage if they decide not to process the order/subscription --


    input type="hidden" name="notify_url" value="http://mysite.com/paypal/showmethemoney" /
    !-- this is the PayPal Instant Payment Notification Link --


    Instead of using the encrypted buttons like Johnny shows, I need to create custom payment forms for each client using the classic api "HTML Variables for Recurring Payments Buttons"


    Confusion as all this PalPal api, but once implemented, it just works.

    Been working for 11 years now.

    I hope this helps.

    PM if you got questions.

    Developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
  • Thanks Johnny . This is what i was looking for. You're very helpfull .
  • Now THAT is a great tip! Thanks. I have a business account and so use the redirect after purchase feature described above but knowing how to adjust that button (which I presume appears briefly until the redirection takes effect?) is really handy!
  • @yakim1

    Your advice would be very useful if only I could get it to work! You say the redirect URL is contained in the button code. I'm not seeing that. The redirect URL does not appear in the button code. I have a redirect link set up, and it works perfectly, but the problem is I am using PP to accept payments from three separate business entities (or 3 different websites, if you like). So it's not great that when people submit payment to site A, they get redirected to site B. (PayPal really should make it possible to have a unique redirect associated with each individual button.)
    Anyway - any ideas on why I'm not seeing the redirect URL in my button code?
  • Banned
    [DELETED]
  • PHP Code:
    <?php
    ='https://www.sandbox.paypal.com/cgi-bin/webscr'// Test Paypal API URL
    ='your_seller_id'// Business email ID
    ?>
    <h4>Welcome, Guest</h4>

    <div class="product">            
        <div class="image">
            <img src="http://www.phpgang.com/wp-content/uploads/gang.jpg" />
        </div>
        <div class="name">
            PHPGang Payment
        </div>
        <div class="price">
            Price:$10
        </div>
        <div class="btn">
        <form action="<?php echo ; ?>" method="post" name="frmPayPal1">
        <input type="hidden" name="business" value="<?php echo ; ?>">
        <input type="hidden" name="cmd" value="_xclick">
        <input type="hidden" name="item_name" value="PHPGang Payment">
        <input type="hidden" name="item_number" value="1">
        <input type="hidden" name="credits" value="510">
        <input type="hidden" name="userid" value="1">
        <input type="hidden" name="amount" value="10">
        <input type="hidden" name="cpp_header_image" value="http://www.phpgang.com/wp-content/uploads/gang.jpg">
        <input type="hidden" name="no_shipping" value="1">
        <input type="hidden" name="currency_code" value="USD">
        <input type="hidden" name="handling" value="0">
        <input type="hidden" name="cancel_return" value="http://demo.phpgang.com/payment_with_paypal/cancel.php">
        <input type="hidden" name="return" value="http://demo.phpgang.com/payment_with_paypal/success.php">
        <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
        <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
        </form> 
        </div>
    </div>
    • [ 2 ] Thanks
  • [DELETED]
  • [DELETED]

Next Topics on Trending Feed

  • 36

    I'm sure this has been posted elsewhere, but I had a hell of a time finding it. So, I thought I would post this for anyone who is looking for this in the future. Basically, I'm going to cover how you can easily get people back to your website, download page, or any custom link after your customer pays through one of your custom Paypal buttons.