OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Help! PayPal IPN

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Help! PayPal IPN

Postby tshore » Fri May 02, 2008 1:39 pm

I'm desperately trying to get registration open for my client. It's looking pretty good, including the fields I added for selling T-shirts and banquet tickets. However, the IPN isn't marking my payments as paid. Maybe a curl problem?

It's failing this if statement in plugins/paymethod/paypal/PayPalPlugin.inc.php:
Code: Select all
if (strcmp($ret, 'VERIFIED') == 0)


and the email is getting sent out from here:
Code: Select all
} else {
               // An unknown confirmation response was received; notify someone.
               $mail->assignParams(array(
                  'schedConfName' => $schedConf->getFullTitle(),
                  'postInfo' => print_r($_POST, true),
                  'additionalInfo' => "Confirmation return: $ret",
                  'serverVars' => print_r($_SERVER, true)
               ));
               $mail->send();
               exit();
            }


Please, please any suggestions would be very much appreciated.

Here is the email that I get:

Open Conference Systems has encountered unusual activity relating to PayPal
payment support for the conference Canadian Society for Brain, Behaviour and
Cognitive Science 18th Annual Meeting. This activity may need further
investigation or manual intervention.

This email was generated by Open Conference Systems' PayPal plugin.

Full post information for the request:
Array
(
[mc_gross] => 147.00
[address_status] => confirmed
[item_number1] =>
[tax] => 0.00
[item_number2] =>
[payer_id] => V6ZHVKSQFRJGQ
[address_street] => abcd
efgh
[payment_date] => 16:22:43 May 01, 2008 PDT
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => L8S 4S3
[mc_shipping] => 0.00
[mc_handling] => 0.00
[first_name] => Naomi
[mc_fee] => 4.56
[address_country_code] => CA
[address_name] => Naomi Shore
[notify_version] => 2.4
[custom] => 91
[payer_status] => unverified
[business] => webmaster@csbbcs.org
[address_country] => Canada
[num_cart_items] => 2
[mc_handling1] => 0.00
[mc_handling2] => 0.00
[address_city] => Hamilton
[verify_sign] =>
AofeufwthrptM4JIUBRi-lsClW92AWPuIbdtb6l3fJltVf94oObuM0rs
[payer_email] => nps@csbbcs.org
[mc_shipping1] => 0.00
[mc_shipping2] => 0.00
[tax1] => 0.00
[tax2] => 0.00
[txn_id] => 5YK06889JJ176984J
[payment_type] => instant
[last_name] => Shore
[address_state] => Ontario
[item_name1] => CSBBCS 2008 Registration (Non-Members)
[receiver_email] => webmaster@csbbcs.org
[item_name2] => Conference Tshirts: 1/White/M
[payment_fee] =>
[quantity1] => 1
[quantity2] => 1
[receiver_id] => 3Q3BSSM3QDKQY
[txn_type] => cart
[mc_gross_1] => 130.00
[mc_currency] => CAD
[mc_gross_2] => 17.00
[residence_country] => CA
[test_ipn] => 1
[receipt_id] => 2941-0991-2232-5434
[payment_gross] =>
)


Additional information (if supplied):
Confirmation return:

Server vars:
Array
(
[CONTENT_LENGTH] => 1115
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /services/webpages/c/s/csbbcs.org/public
[GDFONTPATH] => /services/share/fonts
[HTTP_HOST] => http://www.csbbcs.org
[MvCONFIG_LIBRARY] =>
/services/websoftware/miva/Empresa/cgi-bin/libmivaconfig.so
[PATH] => /usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin
[REMOTE_ADDR] => 66.135.197.164
[REMOTE_HOST] => ipn.sandbox.paypal.com
[REMOTE_PORT] => 58352
[SCRIPT_FILENAME] =>
/services/webpages/c/s/csbbcs.org/public/ocs/index.php
[SERVER_ADDR] => 216.251.38.226
[SERVER_ADMIN] => or webmaster
[SERVER_DOMAIN] => csbbcs.org
[SERVER_NAME] => http://www.csbbcs.org
[SERVER_PORT] => 80
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.0
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /ocs/index.php/meetings/2008/payment/plugin/Paypal/ipn
[SCRIPT_NAME] => /ocs/index.php
[PATH_INFO] => /meetings/2008/payment/plugin/Paypal/ipn
[PATH_TRANSLATED] =>
/services/webpages/c/s/csbbcs.org/public/meetings/2008/payment/plugin/Paypal/ipn
[PHP_SELF] => /ocs/index.php/meetings/2008/payment/plugin/Paypal/ipn
[REQUEST_TIME] => 1209694829
[argv] => Array
(
)

[argc] => 0
)
Last edited by tshore on Sat May 03, 2008 2:31 pm, edited 1 time in total.
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby tshore » Fri May 02, 2008 1:59 pm

Oh, here's a link to phpinfo.php, just in case that might be helpful:

http://www.csbbcs.org/ocs/phpinfo.php
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby tshore » Fri May 02, 2008 2:00 pm

Oh and I also have PayPal setup for the membership section of this website (separate from OCS) and the IPN works without any problems.
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby tshore » Sat May 03, 2008 2:33 pm

Did I mention that I was desperate? I know it's the weekend, but if anyone over there has anything at all that I could go on, I would, really, really appreciate it. Even if you don't have an answer for me, anything along the lines of "you might try ..." would be a big help.
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby asmecher » Sun May 04, 2008 4:47 pm

Hi tshore,

Yes, this does look like a CURL problem. Are you sure the Paypal IPN URL is properly configured in the Paypal configuration page? Can you check the server log to see if any additional information is logged there? Make sure that PHP is configured to log error messages to a file; this will make PayPal debugging much easier, because otherwise any messages generated during PayPal callbacks will not be available to you.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8676
Joined: Wed Aug 10, 2005 12:56 pm

Re: Help! PayPal IPN

Postby tshore » Sun May 04, 2008 4:59 pm

I don't have access to any error logs at this webhost. Can I instruct PHP to log to a particular file via .htaccess?

Right now I'm looking at the following cURL options:

CURLOPT_PROXY (but I don't know what to put for the proxy server)
CURLOPT_USERAGENT (this I tried already without success, but maybe I need to put something different here)

Here's an explanation for GoDaddy (not my host, but just an example what needs to be done)

http://help.godaddy.com/article/289
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby tshore » Mon May 05, 2008 4:18 am

Solved it. I needed to add this line:

Code: Select all
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);


Found the solution here:

http://www.paypaldeveloper.com/pdn/board/message?board.id=ipn&message.id=7
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby asmecher » Mon May 05, 2008 8:55 am

Hi tshore,

Great, glad to hear it's working.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8676
Joined: Wed Aug 10, 2005 12:56 pm

Re: Help! PayPal IPN

Postby tshore » Mon May 05, 2008 11:31 pm

Perhaps this line should be added to the CVS since it is required for the IPN to work for certain server configurations?
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Help! PayPal IPN

Postby asmecher » Tue May 06, 2008 9:49 am

Hi tshore,

We'll need to wait for more feedback first -- this line isn't necessary for all systems, and may slightly decrease the security of Paypal transactions (though not to a degree I'd be worried about in a single case). We'll definitely be watching for more information on this, though, and the thread may well be useful to other users.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8676
Joined: Wed Aug 10, 2005 12:56 pm

Re: Help! PayPal IPN

Postby cmiddlet » Wed May 07, 2008 3:30 pm

We're running into this problem as well, so will try to fix it with the info provided here.
cmiddlet
 
Posts: 5
Joined: Fri Nov 02, 2007 2:17 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest