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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:59:11+00:00 2026-06-13T11:59:11+00:00

I had implemented IPN handler (copt paste it from code project) in one of

  • 0

I had implemented IPN handler (copt paste it from code project) in one of the project for the first time.

The problem in the user can registered to my website with some email address and then while paying he can use some different email address

And the IPN handler request variable give the email address with which it pays. How should i find out which user had paid.

if (strResponse == "VERIFIED")
        {
            //check the payment_status is Completed
            //check that txn_id has not been previously processed
            //check that receiver_email is your Primary PayPal email
            //check that payment_amount/payment_currency are correct
            //process payment

            string payerEmail = Request.Form["payer_email"];
            string paymentStatus = Request.Form["payment_status"];
            string receiverEmail = Request.Form["receiver_email"];
            string amount = Request.Form["mc_gross"];
         }

Solutions:

Pass some addiditonal may be user id in the payment processing page and assume it will be returned in IPN handler.

Or ask the user to enter the paypal email address before paying. (not feels good)

Any help in this regard is appreciated

  • 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-13T11:59:12+00:00Added an answer on June 13, 2026 at 11:59 am

    I usually POST, within the cart info, a custom field that identifies my local transaction, or my local cart. IPN will send that custom field back to you, so that you can match the transaction with your user. Or you can just pass the USER_ID, and get it back regardless of the transaction.

    Send paypal your custom data in your form using this field:

    <input type="hidden" name="custom" value="YOUR_CUSTOM_INFO_HERE">
    

    Handle IPN in your callback:

    if (strcmp ($res, "VERIFIED") == 0) {
      // This is the custom field i posted within the cart form.
      $cid = $_POST['custom'];
      $txn_id = $_POST['txn_id'];
      $cart = load_cart_by_cid($cid);
      if (!empty($cart)) {
        // Fetch your user from cart and do things with it,
        // along with your security checks.
        $user = $cart->getUser();
        // For example, store the transaction.
        TransactionManager::saveTransaction($user, $txn_id);
      }
    }
    

    Source is php, but i think is verbose enough to be easily translated in java, or c#, or whatever.

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

Sidebar

Related Questions

I have implemented antiforgery token on my login page. Now I had one user
I had implemented facebook login in my project using javascript code. It was working
I have implemented mail composer. But it opens mail composer whenever user had implemented
Since short time ago, Google + has had hangouts implemented on the iPhone. You
Need some help with this problem in implementing with XSLT, I had already implemented
I've got a UITableView with custom tablecells. First I had a version which implemented
I have come across BugSense which I had implemented in one of my recent
I have a project on that uses core data and I had migration implemented
I need to run several functions at the same time. I had successfully implemented
Our project had implemented Entity framework and we were floating the entity object type

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.