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 4621352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:41:20+00:00 2026-05-22T02:41:20+00:00

I have searched for more than 4 hours now on how to do callback

  • 0

I have searched for more than 4 hours now on how to do callback with PayPal after a payment have been proceeded.

The thing is, I have a site the sells tickets to a LAN Party, and the only way to pay is with PayPal.
Here is my PayPal buy button code:

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="_MY_PAYPAL_EMAIL_">
<input type="hidden" name="item_number" value="<?php echo mktime(); ?>">
<input type="hidden" name="cn" value="<?php echo $_SESSION['userid']; ?>">
<input type="hidden" name="return" value="http://80.202.213.240/apps/tickets/buy/success/" />
<input type="hidden" name="cancel_return" value="http://80.202.213.240/apps/tickets/buy/cancelled/" />
<input type="hidden" name="notify_url" value="http://80.202.213.240/apps/tickets/buy/ipn/" />
<input type="hidden" name="lc" value="NO">
<input type="hidden" name="item_name" value="BitHack - Standard Ticket">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="currency_code" value="NOK">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="button_subtype" value="Tickets">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="submit" value="Add to Cart" class="ticketShowButton submit" title="Payment via PayPal">

The info should then be inserted into a database, that part I have finished.
Just need the callback system to work.
Anyone know any good callback script examples?

BTW, is it possible do use custom inputs?

  • 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-05-22T02:41:21+00:00Added an answer on May 22, 2026 at 2:41 am

    The callback function specified in the return and notify url variables are the programmer’s responsibility. Why? Because each website has it’s own table structure for orders. Try this as a guide:

    On your Paypal profile set your preference to redirect automatically after an order. You will also need to set a default return url. this will be used if you forgot to specify a return url on your order form or query string sent to Paypal.

    Next, set your rm field/variable to “2” (this will tell Paypal API to autoredirect to your return url after the order and pass the order info in POST format)

    You can view the response from Paypal by doing a var_dump($_POST) or print_r($_POST).

    One of the important variables from the response is $_POST[‘payment_status’] which will tell you the outcome of the order. A successful transaction is ‘Completed’. A transaction that requires verification from Paypal or from the merchant’s side is ‘Pending’.

    Lastly, don’t forget to specify ‘invoice’ on your Paypal field/request so you can update the status of your order. Something like:

    $status = $_POST['payment_status'];
    $invoice = $_POST['invoice'];
    mysql_query("UPDATE Orders SET status='$status' WHERE order_id='$invoice'");
    

    I know this is bad and unsafe coding but at least you get the general idea in it’s simplest form.

    Again, don’t rely on other’s codes. Codes in the net exists for reference purposes and not as God’s handwork. Only you have the power to create your own masterpiece 😀

    I hope that helps. Vote up if you like it. Ignore if not.

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

Sidebar

Related Questions

I have searched for hours now and haven't found a solution for my problem.
This is quite a noobish question, I have searched for a few hours now
I have searched for hours however I still have no clue what is wrong
I have lost more time than I care to relate from testing worthless builds
I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating
I've searched SO and have been unable to find this question asked before, but
I have searched around, and it seems that this is a limitation in MS
I have searched but apparently my google foo is weak. What I need is
I have searched the Web for this, but with no luck. Any idea? Thanks.
I have searched high and low for documentation on how to use this feature.

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.