Tracking PayPal orders by order ID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bnashenas1984
    Contributor
    • Sep 2007
    • 257

    #1

    Tracking PayPal orders by order ID

    Hi every one
    I'v been googling for more than 1 week but I don't seem to find any answer for my question. unfortunatly there are not many articles about using Paypal in a self made script.

    I looked at the oscommerce source and found the code to use PayPal.

    Here it is :
    Code:
    <form name="checkout_confirmation" action="https://secure.paypal.com/cgi-bin/webscr" method="post">
    
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="myemail@provider.com">
    <input type="hidden" name="item_name" value="fresh OSCommerce Store">
    <input type="hidden" name="amount" value="221.96">
    <input type="hidden" name="shipping" value="5.00">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="return" value="http://netmotor.se/checkout_process.php">
    <input type="hidden" name="cancel_return" value="http://netmotor.se/checkout_payment.php">
    <input type="image" src="includes/languages/english/images/buttons/button_confirm_order.gif" border="0" alt="Confirm Order" title=" Confirm Order ">
    
    </form>
    Everything works fine with this code but the problem is that I don't know how to track orders by order ID.
    Lets say 5 customers order products at the same time and pay with PayPal.

    SO, The question is how we can see which order is payed . I mean is there a way to send the order ID to PayPal . The seller needs to check if the payment is done correctly before he sends the product.


    Any suggestion will be appreciated
    Thanks
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Hi, bnashenas1984.

    Can you clarify a few things for me?
    • Are you wanting to store the order ID on your server?
    • Where does the order ID come from (paypal, or your site)?

    Comment

    • bnashenas1984
      Contributor
      • Sep 2007
      • 257

      #3
      Hello Markus

      We have a shopping cart in our website which sores order details and ID in a database when ever the customer clicks on CHECK OUT button. and then they will be redirected to Paypal to pay.

      Lets say several customers order products and pay with PayPal.

      Order ID's look like this:

      ORD001
      ORD002
      ORD003
      ORD004


      At the end of each day the owner of the store will check he's PayPal account to see which orders have been payed for.

      My question is how we know which money transfer is for which order. I mean there must be some order ID or something to identify each transaction.

      But as you can see in the code i sent in my previous post there is no ID sent to PayPal.


      Thanks

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        I see the problem now. I've never worked with PayPal before, so my suggestions will be shots-in-the-dark.

        Anyway, after looking at this page, I notice that you can also send along an 'item_number' variable to PayPal through the form. You might use this section to pass the order-id. I'm not sure how this is displayed on the PayPal side, though. You will have to test it.

        Mark.

        Comment

        Working...