Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:21:44+00:00 2026-06-14T16:21:44+00:00

I am writing a php script in Paypal form. I am sending return url

  • 0

I am writing a php script in Paypal form. I am sending return url using $testUrl variable which will work after successful payment but it is not redirecting to that url.

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
   <select name="amount">
      <option value="10">10 SEK</option>
      <option value="20">20 SEK</option>
      <option value="30">30 SEK</option>
   </select>
    <?php $testUrl= "http://www.google.com"; ?> 
     <input type="hidden" name="cmd" value="_s-xclick" />
     <input type="hidden" name="hosted_button_id" value="3FWC3TJEYANK4" />
     <input type="image"  src="https://www.sandbox.paypal.com/en_US/i/btn/btn_donate_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" />
     <input type="hidden" name="notify_url" value="http://beeurban.ayond.com/wp-content/payment/ipn.php" />
     <input type="hidden" name="currency_code" value="SEK" />
     <input type="hidden" name="return" value="<?php echo $testUrl ; ?>" />  
   </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:21:45+00:00Added an answer on June 14, 2026 at 4:21 pm

    Your problem is that you’re using a hosted button. You can’t add additional fields to the button code like this when you’re using hosted buttons. Everything has to be configured within the button manager in your PayPal account. Your notify_url probably isn’t working either, from what I’m seeing, because that would have to be setup in the button manager, too…unless you have the same notify URL setup in your profile under Instant Payment Notification Preferences. Then that would take effect, but what you’re passing here would be ignored.

    In the button manager, Step 3 – Customized Advanced Features, has an option for “Take customers to this URL when they finish checkout” that you need to enable and fill in your return URL there. You’ll also see under “advanced variables” that you can add notify_url there.

    Unfortunately, you can’t use dynamic values like you’re attempting to do with that PHP variable for the return URL. If the return URL is something that can change depending on the order you’ll need to use a non-hosted button.

    To do that, in Step 2 – Track Inventory, Profit & Loss, you’ll need to uncheck the Save button at PayPal box. This will give you different HTML code that will have more fields included, and then you can add your own values for return, notify_url, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a php script which will run through cron . Its task
I'm writing a php script that will fetch data from a given URL and
I am writing a PHP script (which also uses linux bash commands) which will
I am writing PHP script, which will store mouse position over the page with
I am writing php code which will work under *nix systems. I need to
I'm writing a php script which will enable people to change the theme of
I am writing a PHP script for a client which will be installed on
I'm writing a PHP script that downloads a series of generated files (using wget
I am writing a PHP script that will launch a program on the server.
I'm writing a PHP script which inserts rows into a SQLite database. The code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.