|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
Wondering where to look for more info, I think I read everything at PayPal on this and looked thru most of this forum.... Could this be a server issue on PayPals side? Many variables are being posted to my IPN script, however I can't seem to get anything back when placing INTEGERS in either the custom or invoice hidden tag.
They leave my site heading to PayPal but are not posted back....
Any Ideas?
TIA,
James
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/22/2002 Posts: 239 Location: ,
|
This definately is not PayPal's fault but I couldn't possibly advise you without seeing an example of your web accept code and a snippet from your IPN script.
Best regards,
Marcus Cicero EliteWeaver UK
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
Thanks Marcus, [PHP 4.2.1] Here is my form, excuse the escape characters:
<FORM ACTION=\"https://www.paypal.com/cgi-bin/webscr\" METHOD=\"post\"> <INPUT TYPE=\"hidden\" NAME=\"cmd\" VALUE=\"_cart\"> <INPUT TYPE=\"hidden\" NAME=\"business\" VALUE=\"$pp_email\"> <INPUT TYPE=\"hidden\" NAME=\"upload\" VALUE=\"1\"> <INPUT TYPE=\"hidden\" NAME=\"no_shipping\" VALUE=\"1\"> <INPUT TYPE=\"hidden\" NAME=\"custom\" VALUE=\"$code2\"> $items_formated <INPUT TYPE=\"image\" SRC=\"http://images.paypal.com/images/x-click-but01.gif\" NAME=\"submit\" ALT=\"Make payments with PayPal - it's fast, free and secure!\"> </FORM>";
Here is the custom tag source output from form: <INPUT TYPE="hidden" NAME="custom" VALUE="5276332">
My IPN script in reference to the custom tag: $custom = $_POST['custom'];
What am I over looking? Thanks! James
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/22/2002 Posts: 239 Location: ,
|
Hi James -
Can you not make the purchase via single item purchasing _xclick instead of _cart? The upload var is invalid but maybe you are using that for something? $custom = $_POST['custom']; is fine but it may not be present due to the fact you are using _cart as they return IPN vars like amount1, amount2 etc. . .
Hope this helped?
Marcus -
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
Ok I see.... It is a cart, that is multiple items may be selected..... I was using or figuring on using either custom or invoice to point me to the customers row of data that was INSERTed just prior to sending them to PayPal. Then I have the purchase info INSERTed into a purchase table via IPN using (so I thought) either the custom or invoice tag to relate the purchase to the customer.
So I gather most would enter all the customer and sales data at the IPN stage.
I guess I need to figure best way to rewrite this....... Any pointers would be helpful, this was due Friday :-(
James
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
The "upload" flag is a recent enhancement that enables merchants to submit cart contents to PayPal. It's used like this: <input type="hidden" name="upload" value="1"> More info: https://www.paypal.com/c...ckout-outside#methodtwo
Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
I think I need to redo a bunch of code here.... What I have is a multi-selectable item cart, but it sends all the info at once to paypal with each item number, value,price in the paypal defined format, a code I need to see in IPN.... As I prepare to send this off to paypal I load much of the info in a customer datatable like name, contact info.... qty, a code to be used later, a string of item numbers.... Then when paypal replies to my IPN script I expect to see the status and of course my code. I insert this data into a order datatable and fire off an email with the code in a querystring so the purchaser can go and download their e-item. I can't seem to get the code back from paypal in the IPN. Question: Should I abandon this approach and wait to enter all data when IPN replies? That is just send off the order to paypal store nothing, when IPN responds then enter the data, generate the code, and fire off the email. Thanks! James
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
I'd suggest storing the data after. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/22/2002 Posts: 239 Location: ,
|
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by paypal_pb[br]The "upload" flag is a recent enhancement that enables merchants to submit cart contents to PayPal. It's used like this: <input type="hidden" name="upload" value="1"> More info: https://www.paypal.com/c...ckout-outside#methodtwo
Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote"> You learn something new every day ;-) Thanks, Marcus
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
Hey guys! How would I get my item numbers out of my IPN POST that were sent from my cart? My IPN script is writen in PHP how do I find item_number_$i in the PayPal IPN post?
TIA!! James
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
In the great history of naming conventions: You send them to PayPal as item_name_1, item_name_2, etc. They come back to you via IPN as item_name1, item_name2, etc. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/12/2002 Posts: 312 Location: ,
|
Yeah thats what I been thinking all along yet I am getting Nothing back via IPN either as item_number, item_number_X same goes for item_name. I am sending it off, it shows on paypal site... I am getting the txn_id....
J
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/22/2002 Posts: 239 Location: ,
|
Getting back on topic:
If I post invoice_x and custom_x then this arrives back in IPN as invoice and custom. However, if I post invoice and custom then like James problem they are not present! As the invoice and custom fields are per transaction only and invoice_x and custom_x are not returned per item then would it not be better to allow us to just post them like in _xclick as a simple invoice and custom?
Now to make this even more peculiar if I have a cart with 4 items and post just invoice_1 and custom_1 with my values then they are still not returned in IPN. However, if I post invoice_4 and custom_4 (the last item in the cart) then they are returned in IPN!
Should we therefore be posting invoice and custom by appending it to the last item in the cart in order to see these values returned in IPN or is this a bug that needs ironing out? Also, is this documented anywhere because I can visualize a lot of frustrated developers trying to figure this one out :)
Best regards, - Marcus
|
|
|
|
Guest
|