RE: PayPal IPN v0.98 for Milestone 2 released!

kwyjibo <[email protected]> 12 Sep 2003 14:16:20 -0000
Newsgroups gmane.comp.web.oscommerce.contributions
Message-ID <d886998856c7865055a25832b01efb72@osCommerce-Forums>
This message was sent from: Contributions
http://forums.oscommerce.com/viewtopic.php?p=228395#228395
----------------------------------------------------------------

[quote="Maureen"]I've installed this contrib and for the most part having it working OK. 

1) The install text states *not* to set the order status default to PayPal Processing or it will always stay on that setting. I have my default set at Pending. I received the PayPal email confirming the order payment but the order status remains "pending"

2) The default for "item_name" is the store name. I would expect it to be the name of the item purchased. It was a bit confusing when the PayPal notification listed the store as the Item/Product Name. I guess with a multiple product order all the item names can't be listed but can a change be made to query the first product? If not, is it possible to change the title to state "Store Name"? Would I just have to change every instance of "item_name" to "store_name"

3) The default for "item_number" is the currency id. The same question here...can it query the first item product model, order number, or maybe be left blank?

4) The store owner did not receive an email for the order. Just the IPN. I've read others having this problem but haven't come across the solution.

I am using version 0981 on MS2. I guess these are minor issues being that generally it is working but would like to make the changes so that it works perfectly...  :)[/quote]

I just installed this contrib, but haven't tested it yet, but the answers are based on looking at the code.

1) If you take a look at the code, it sets the order status to Paypal Processing (99999) throughout the checkout process itself. After the valid paypal payment goes through, it switches the order status to whatever is set into the paypal config settings. Of course, the paypal processing status is really never visible to anyone at all. So technically, if you set the default order status to Paypal Processing, it will never change status in that sense. I'm not sure what status you would logically want it to be, I just leave it as Pending since that's how all my CC orders are left as. The other option is just to define your own order status like PayPal payment recieved or something in the osc database.

2) If you can follow the cart contents and pass it on to the file where it sends the data to paypal, it is possible to put the whole cart contents. I did that with the Verisign contribution and put all the cart contents into the comments section for example. But with the verisign processing, it passes the data through a POST method. The paypal passes all the data through a GET url and I'm sure some text in an item list would possibly mess up the data to be passed through correctly. Of course you could strip all slashes, quotes, etc from the product listing. I believe it can be done if you really want that. As far as changing Item name, that is a specific variable for paypal. 

3) It uses the $insert_id for the item number which is the osc order number, so that seems to be a good choice to use to help track the order.

4) dont know as i haven't tested it out yet.