Paypal Redirect After Payment

20 replies
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.
#checkout #digital product delivery #payment #paypal #redirect
  • Profile picture of the author tq
    Thanks,

    I like the idea of leading the purchaser in the direction to avoid potential email/support questions.
    {{ DiscussionBoard.errors[6600045].message }}
    • Profile picture of the author JohnnyDeez
      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. :-)
      Signature

      Software Development Tips for Internet Entrepreneurs: What The Dev

      {{ DiscussionBoard.errors[6600206].message }}
      • Profile picture of the author flashisland
        Originally Posted by JohnnyDeez View Post

        There's probably an auto redirect feature as well. But I couldn't quite get that sorted.
        Here's the instructions for enabling auto-return in PayPal.

        Often websites use this technique in combination with IPN (Instant Payment Notification) to verify the payment has actually been made. One detail to note is that sometimes a visitor will get back to your website before the IPN has been received. If that happens it's best to stick the visitor on a "processing your transaction" screen and refresh the page every few seconds while you wait for the IPN message from PayPal.
        {{ DiscussionBoard.errors[6637747].message }}
  • Profile picture of the author bizamanda
    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
    {{ DiscussionBoard.errors[6637394].message }}
  • Profile picture of the author nik0
    Banned
    Okay this explains why certain clients don't get redirected, they have to click something their selves appearently
    {{ DiscussionBoard.errors[6637767].message }}
  • Profile picture of the author JohnnyDeez
    @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.
    Signature

    Software Development Tips for Internet Entrepreneurs: What The Dev

    {{ DiscussionBoard.errors[6660191].message }}
  • Profile picture of the author Kevin01736
    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.
    {{ DiscussionBoard.errors[6706247].message }}
  • Profile picture of the author WarrenHT
    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!
    {{ DiscussionBoard.errors[6753545].message }}
    • Profile picture of the author WarrenHT
      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...
      {{ DiscussionBoard.errors[6753644].message }}
      • Profile picture of the author JohnnyDeez
        Warren,

        It sounds to me like that might be the problem. But, I haven't used paypal as or with a shopping cart, so I'm not really sure. For me, simply putting the code

        cbt=YOUR BUTTON TEXT HERE

        In the box at the end of the button setup worked. Perhaps you could shoot an email to Paypal and ask them? If you find an answer, make sure to post it up here, as I'm sure there are others with similar problems.
        Signature

        Software Development Tips for Internet Entrepreneurs: What The Dev

        {{ DiscussionBoard.errors[6759570].message }}
  • Profile picture of the author alagappan18
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[6872056].message }}
    • Profile picture of the author JohnnyDeez
      You bet! Glad I could help. :-)
      Signature

      Software Development Tips for Internet Entrepreneurs: What The Dev

      {{ DiscussionBoard.errors[6876273].message }}
  • {{ DiscussionBoard.errors[6903091].message }}
    • Profile picture of the author Coach Dave
      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
      {{ DiscussionBoard.errors[8909343].message }}
  • Profile picture of the author yakim1
    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
    {{ DiscussionBoard.errors[8920356].message }}
  • Profile picture of the author Swordsmith
    Just found this post... Major props to JohnnyDeez for this!
    {{ DiscussionBoard.errors[8949958].message }}
  • Profile picture of the author MonopolyOnline
    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/
    {{ DiscussionBoard.errors[8986484].message }}
  • Profile picture of the author w13
    Thanks Johnny . This is what i was looking for. You're very helpfull .
    {{ DiscussionBoard.errors[9095316].message }}
  • Profile picture of the author Mr Bill
    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!
    {{ DiscussionBoard.errors[9099163].message }}
  • Profile picture of the author KateX
    @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?
    {{ DiscussionBoard.errors[9300159].message }}
  • Profile picture of the author Daisyonta
    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>
    {{ DiscussionBoard.errors[9303582].message }}

Trending Topics