10 / 10
Aug 2010

Any insight on how to incorperate x factor into HTML POST is much appreciated.

Could you clarify what you mean by "x factor" and what you're trying to accomplish?

item_namex

x = item_cart_position



When someone orders 2 products with different names and the info. is sent to my database it drops the item name and makes the qty. 0. Probably because it is not seperating out the products and I think I need to do that with x. However I have no idea how to add x into the mix and w3schools is not telling me.



HTTP POST*

We cannot provide advice or tutorials on general programming techniques, but you may want to research PayPal IPN handling, since our Integration feature is designed to exactly match the PayPal IPN data format, such that most ready-made scripts designed to handle IPN should be able to handle our Integration submissions with little or no modification. Just leave out or disable any parts that would try to validate the IPN with PayPal (which would fail since we are not PayPal) and make sure the script can handle or ignore some extra fields we add to the basic IPN data set, such as 'item_cart_position'.



Regardless of whether we're submitting to your Common Notification URL or to a product-specific Payment Variable Information URL, we always include the full order data for all items in the order. We only include the 'item_cart_position' in submissions to a product-specific Payment Variable Information URL, so you can tell which item in the order triggered that particular submission to that URL.



You will only ever see 'item_name', 'item_number' etc. without a numeric suffix ("X") when there's only one item in the order; in that case we will send the same data for that one item as both 'item_name' and 'item_name1', 'item_number' and 'item_number1', etc. For orders with more than one item, the first item's field names will be suffixed with "1", the second items with "2", etc.

I am starting to understand somewhat, but I am still confused.

PayPal IPN doesnt really seem to clarify what I dont understand. How to make my handler seperate out the data.

Is it as simple as creating another column in my database for item_cart_position?



Im sure whatever it is I am going to kick myself and say duh.

That's a matter of general programming skill and technique that we can't really teach you about, and those of us on the Support team here aren't really programmers ourselves anyway. I reckon if you wanted to filter for the data pertaining to just the one item in the order which triggered a particular submission, your script would get the value of 'item_cart_position' and append that value to the end of 'item_name', 'item_number' and other variable names that we document with X representing the cart position.



E.g. suppose you get a submission with item_cart_position=5. That indicates that the 5th item in the buyer's cart was a product which had a Payment Variable Information URL configured, and this particular submission is being POSTed for that product. Since the submission contains data for all items in the order, if you want to identify which item data is for the product that triggered this submission, you would then be parsing the submission for that item's data given as 'item_name5', 'item_number5', etc.

So I set up my site so that in order to use the e-junkie buttons you have to be logged in. Before you even get to that part I am setting up checks so that if the IP address your using is one that I have on my blocked list OR you try to log in with an email on the blocked list, you basically get told to go away and dont see anything on my websites. It took me like 5 minutes to figure out how to get the IP and block it if needed.

I want to set it up to track inventory from my site as well. When I get more product I just add how many to my database, then have my inventory update as orders are processed. That way when I am out of stock it will not show the add to cart button. Eventually I want to show an "email me when in stock" button instead so that when I increase my inventory it will automatically send out an email to those who asked to recieve it saying hey, we got more. Come buy some.



For some reason however, I still cannot get my head around what I need to do to create a properly working handler. Maybe the POST should actually be arrays?

Or maybe I should actually go take some classes on all this instead of trying to learn mainly from w3schools.



Either way, is there a sandbox or whatever that I can test my handler with fake e-junkie purchases?

If you set your product price to 0.00, or create a Discount Code for 100% off the item total that you can use when testing your cart, that will allow you use our Free Checkout for a 0.00 order total, rather than having to test your cart with actual, paid checkouts.