Ok thanks.
I set up local testing because primarily its a LOT faster... but also because I had trouble with my test sites getting indexed and screwing around with the page rank of my real site.
I'll figure it out. Thanks.
- Steven
Ok thanks.
I set up local testing because primarily its a LOT faster... but also because I had trouble with my test sites getting indexed and screwing around with the page rank of my real site.
I'll figure it out. Thanks.
- Steven
Without getting too technical: You can set it so that certian directories are not cataloged or looked at by the bots.
Talk to your host about this
Zen-Venom Get Bitten
Get Your Business Found
The PayPal IPN is a notification ("Instant Payment Notification" they call it) that posts back to your webserver from PayPal's webserver to notify you of an event related to transactions in your PayPal account.
It requires a true reachable webserver in order to send the notification.
If you are testing "locally" then you'll need to supply the IP address of your "local" webserver so that it can talk to you.
Since you're most likely sitting behind a router of some sort, you would likely need to configure said router to allow port-80 and port-443 traffic to come through to the computer you're using as a development webserver.
And, since you're most likely using a dynamic IP address, which changes periodically (hourly or as long as weekly), you will likely need some sort of dynamic name service such as is offered by no-ip.com or dyndns.com -- these can update the IP address via a program running on your local PC so that "mysite.no-ip.com" will redirect itself automatically to you ... including paypal tests.
This has the added benefit of letting you show your development work to others too if needed.
PayPal Express Checkout orders only rely on IPN if you're paying by echeck or have your PayPal profile configured to not auto-accept payments from unconfirmed addresses or from certain currencies. Otherwise the order will be automatically set to Processing (or whatever order-status you've configured it to in ZC).
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Ok, so I almost got my paypal testing setup.
Set up the Sandbox accounts; changed my paypal IPN module to point at sandbox; configured my computer so outside world can see it; got a domain name and set up the IPN return URL to the proper setting....
Everything works, except for some reason when I finish a PayPal order, it does't set the status to 'processing' like it should (and does on my live server). Just leaves it as 'pending'. Any thoughts?
- Steven
What is the URL to your test server ?
What is the URL that your IPN's are being returned to?
Can it be accessed from outside your router?
If not, you'll not get the updates.
If you turn on the debug logging, do you get any results in the logs ?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
http://dab.criticalnode.com/shop/Originally Posted by DrByte
http://dab.criticalnode.com/shop/ipn_main_handler.phpWhat is the URL that your IPN's are being returned to?
Should be?!?Can it be accessed from outside your router?I'll give that a try.If you turn on the debug logging, do you get any results in the logs ?
- Steven
yes I do... not that they mean anything to me :) But yes, I do get a 5k log file that I'm not sure is safe to post the contents of.
Please don't put any more effort into this Dr.B. I have bigger fish to fry right now anyway. Thank you for your help.
- Steven
Ok, I'm back asking for help again :)
I had a chance to go through that log file, and it seems the problem might be because the IPN is returning an unrecognized txn_type. Looking through the ipn_main_handler.php file I gather that it is expecting a "unique" or "express_checkout" or one of the many other types, none of which are "web_accept" so it gets interpreted as "unknown". Is this my problem?
Here's the whole file (edited where the info might be sensitive for some reason):Code:Jan 07 2007 18:15 -- IPN WARNING:: Could not establish txn type unknown postdata=txn_type=web_accept
- StevenCode:Jan 07 2007 18:15 -- IPN NOTICE::ipn_application_top -> language files okay Jan 07 2007 18:15 -- IPN INFO - POST VARS received: txn_type=web_accept &payment_date=18:15:25 Jan 07, 2007 PST &last_name=Fakename &residence_country=CA &pending_reason=unilateral &item_name=SmartieParts Purchase &payment_gross= &mc_currency=CAD &business=steven@fakemail.com &payment_type=instant &verify_sign=[removed just in case] &payer_status=unverified &test_ipn=1 &tax=0.00 &payer_email=steven@fakemail.com &txn_id=0 &quantity=1 &receiver_email=steven@fakemail.com &first_name=Steven &payer_id=[removed just in case] &item_number= &payment_status=Pending &shipping=0.00 &mc_gross=38.42 &custom=zenid=[removed just in case] &charset=windows-1252 ¬ify_version=2.1 &cmd=_notify-validate Jan 07 2007 18:15 -- IPN INFO - POST VARS sent back: POST /cgi-bin/webscr HTTP/1.1 Host: www.sandbox.paypal.com Content-type: application/x-www-form-urlencoded Content-length: 677 Connection: close txn_type=web_accept &payment_date=18:15:25 Jan 07, 2007 PST &last_name=Fakename &residence_country=CA &pending_reason=unilateral &item_name=SmartieParts Purchase &payment_gross= &mc_currency=CAD &business=steven@fakeemail.com &payment_type=instant &verify_sign=[removed just in case] &payer_status=unverified &test_ipn=1 &tax=0.00 &payer_email=steven@fakeemail.com &txn_id=0 &quantity=1 &receiver_email=steven@fakeemail.com &first_name=Steven &payer_id=[removed just in case] &item_number= &payment_status=Pending &shipping=0.00 &mc_gross=38.42 &custom=zenid=[removed just in case] &charset=windows-1252 ¬ify_version=2.1 &cmd=_notify-validate Jan 07 2007 18:15 -- IPN INFO - CURL INFO confirmation report HTTP/1.1 200 OK ,Date: Mon, 08 Jan 2007 02:15:30 GMT ,Server: Apache/1.3.27 (Unix) mod_ssl/2.8.12 OpenSSL/0.9.7a PHP/4.3.2 ,Set-Cookie: cookie_check=yes; expires=Thu, 05-Jan-2017 02:15:31 GMT; path=/; domain=.paypal.com ,Set-Cookie: Apache=24.67.117.185.98631168222530910; path=/; expires=Wed, 31-Dec-36 02:15:30 GMT ,Connection: close ,Transfer-Encoding: chunked ,Content-Type: text/html; charset=UTF-8 , ,8 ,VERIFIED , Jan 07 2007 18:15 -- Breakpoint: 1 Jan 07 2007 18:15 -- Breakpoint: 2 Jan 07 2007 18:15 -- IPN NOTICE::Processing SANDBOX transaction. Jan 07 2007 18:15 -- Breakpoint: 3 Jan 07 2007 18:15 -- Breakpoint: 4 txn_type=unknown ordersID = 0 IPN_id=0 Jan 07 2007 18:15 -- IPN DEBUG::uniqueness-test. Relevant data from POST: txn_type = unknown parent_txn_id = txn_id = 0 Jan 07 2007 18:15 -- IPN NOTICE::Set transaction type = unknown POST data: txn_type=web_accept &payment_date=18:15:25 Jan 07, 2007 PST &last_name=Fakename &residence_country=CA &pending_reason=unilateral &item_name=SmartieParts Purchase &payment_gross= &mc_currency=CAD &business=steven@fakeemail.com &payment_type=instant &verify_sign=[removed just in case] &payer_status=unverified &test_ipn=1 &tax=0.00 &payer_email=steven@fakeemail.com &txn_id=0 &quantity=1 &receiver_email=steven@fakeemail.com &first_name=Steven &payer_id=[removed just in case] &item_number= &payment_status=Pending &shipping=0.00 &mc_gross=38.42 &custom=zenid=[removed just in case] &charset=windows-1252 ¬ify_version=2.1 &cmd=_notify-validate Jan 07 2007 18:15 -- Breakpoint: 5 txn_type=unknown Jan 07 2007 18:15 -- IPN WARNING:: Could not establish txn type unknown postdata=txn_type=web_accept &payment_date=18:15:25 Jan 07, 2007 PST &last_name=Fakename &residence_country=CA &pending_reason=unilateral &item_name=SmartieParts Purchase &payment_gross= &mc_currency=CAD &business=steven@fakeemail.com &payment_type=instant &verify_sign=[removed just in case] &payer_status=unverified &test_ipn=1 &tax=0.00 &payer_email=steven@fakeemail.com &txn_id=0 &quantity=1 &receiver_email=steven@fakeemail.com &first_name=Steven &payer_id=[removed just in case] &item_number= &payment_status=Pending &shipping=0.00 &mc_gross=38.42 &custom=zenid=[removed just in case] &charset=windows-1252 ¬ify_version=2.1 &cmd=_notify-validate
Actually, in your case, the cause for the IPN not doing anything is that your payment is being held until the PayPal account with the specified email address is created.
PayPal's "unilateral boarding" means that they'll take the customer's money and hold it for a (short) period to allow you the merchant to actually link the business email address to a real PayPal account, rather than reject the payment because it couldn't find a PayPal account associated with the merchant email address supplied (ie: receiver_email).&pending_reason=unilateral
&receiver_email=steven@fakemail.com
Ideally this should never happen, because you would have a real PayPal account set up to receive the money. Thus the IPN processing engine in Zen Cart is simply treating this as unknown.
However, once the new account is created, or the email address is linked to a real account, there should be a new IPN notice sent to your site, which will be treated as a "unique" transaction, thereby releasing the order, etc.
If you wish to have it recognize the unilateral type transactions in logs, try this:
If you're using v1.3.7, you could locate this code in the paypal_functions.php file:
and add the following immediately below it:Code:case 'intl': ipn_debug_email('IPN NOTICE:: Found pending-intl record in database'); if ($postArray['payment_status'] == 'Completed') $transType = 'cleared-intl'; if ($postArray['payment_status'] == 'Denied') $transType = 'denied-intl'; break;This will at least cause the new status to be recognized when the logs are recording progress.Code:case 'unilateral': ipn_debug_email('IPN NOTICE:: Found record in database. TRANSACTION IS IN *unilateral* STATUS pending creation of a PayPal account for this receiver_email address.'); $transType = 'pending-unilateral'; break;
Then ... and this may require more testing ... in ipn_main_handler.php you'll see this around line 133:add another case immediately after pending-verify:Code:switch ($txn_type) { case 'pending-address': case 'pending-intl': case 'pending-multicurrency': case 'pending-verify':This is just a guess, as I haven't tested it.Code:case 'pending-unilateral':
Again, it's almost redundant, as until you have actually collected the money, there's no point in the order doing anything ... cuz you haven't been paid.
Last edited by DrByte; 8 Jan 2007 at 04:36 AM. Reason: updated
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks