Connecting Tech Pros Worldwide Help | Site Map

Tracking PayPal orders by order ID

Familiar Sight
 
Join Date: Sep 2007
Posts: 207
#1: 3 Weeks Ago
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 :
Expand|Select|Wrap|Line Numbers
  1. <form name="checkout_confirmation" action="https://secure.paypal.com/cgi-bin/webscr" method="post">
  2.  
  3. <input type="hidden" name="cmd" value="_xclick">
  4. <input type="hidden" name="business" value="myemail@provider.com">
  5. <input type="hidden" name="item_name" value="fresh OSCommerce Store">
  6. <input type="hidden" name="amount" value="221.96">
  7. <input type="hidden" name="shipping" value="5.00">
  8. <input type="hidden" name="currency_code" value="USD">
  9. <input type="hidden" name="return" value="http://netmotor.se/checkout_process.php">
  10. <input type="hidden" name="cancel_return" value="http://netmotor.se/checkout_payment.php">
  11. <input type="image" src="includes/languages/english/images/buttons/button_confirm_order.gif" border="0" alt="Confirm Order" title=" Confirm Order ">
  12.  
  13. </form>
  14.  
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's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: 3 Weeks Ago

re: Tracking PayPal orders by order ID


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)?
Familiar Sight
 
Join Date: Sep 2007
Posts: 207
#3: 3 Weeks Ago

re: Tracking PayPal orders by order ID


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
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#4: 3 Weeks Ago

re: Tracking PayPal orders by order ID


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.
Reply