[Ppext] Buttonmanager Wont Work

Im using ppext extension for paypal, it is great. But, everything works on localhost test server.

When I upload to live server, buttonmanager won’t save buttons in database.




 $nvp = array(

		                'BUTTONTYPE'=>'BUYNOW',

		                'L_BUTTONVAR0'=>'currency_code=EUR', //get currency from database settings

		                'L_BUTTONVAR1'=>'item_name=' . $model->name, //project name

		                'L_BUTTONVAR2'=>'item_number=' . $donation->idproject_donations, //donation database ID

		                'L_BUTTONVAR3'=>'amount=' . $donation->amount

		            );

				    $bMan->createButton($model->name . $nmb, $nvp);

this works on localhost, but on live server it doesn’t!

i’m using this in my view file:


<a href="<?php echo $bm->getButton($donation->buttonID)->emailLink . '&custom=' . Yii::app()->user->id; ?>" class="projectbid">

where $donation->button id is an int value from another table, which stores other information about payment,

so I search for button via $donation->buttonID table, and get that ID using button manager.

that part works!

but when creating new donation on live server the

$bMan_createButton(…)

doesn’t work, doesn’t insert new records in ppbutton table (table for ppext extension).

Help me, I lost whole 3 days searching for error in this.

My live server supports, PHP 5.2, 5.3, 5.4… i tried them all - siply put, buttonManager on live server wont save to database.

I have the Rights extension enabled, could it be it makes problems?

What are the log files saying - any exceptions?

Hello, I can not find anything strange in Yii logs, so I opened Cpanel error log and found this:




[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * About to connect() to api-3t.sandbox.paypal.com port 443 (#0), referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] *   Trying 173.0.82.83..., referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * connected, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * Connected to api-3t.sandbox.paypal.com (173.0.82.83) port 443 (#0), referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * error setting certificate verify locations:, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21]   CAfile: /home4/fundomen/public_html/protected/modules/payPal/components\\cacert.pem, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21]   CApath: none, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] , referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * Closing connection #0, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * About to connect() to api-3t.sandbox.paypal.com port 443 (#0), referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] *   Trying 173.0.82.83..., referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * connected, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * Connected to api-3t.sandbox.paypal.com (173.0.82.83) port 443 (#0), referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * error setting certificate verify locations:, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21]   CAfile: /home4/fundomen/public_html/protected/modules/payPal/components\\cacert.pem, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21]   CApath: none, referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] , referer: http://fundoment.com/index.php?r=project/create

[Sun Sep 16 03:26:55 2012] [error] [client 178.149.224.21] * Closing connection #0, referer: http://fundoment.com/index.php?r=project/create



So it seems that on live server paypal wont create buttons because of certificate?

I managed to disable certificates by adding

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

but will it make site vunerable? Do I need to get SSL certificate for site at my host?

Did a quick google search and it looks like you’re going to have to get a CA certificate or disable the check with the above method. I read that quite a few sites have the check turned off. Good luck.

The procedure now works with above code added/replaced.

OK that solves the functionality problem. Now, I have a problem with security. Since it is a website which will handle lots of transactions, I need secure connections, additional checks (in PayPal IPN listener, for example) and similar.

What do you suggest I should do about it?

Does cURL have special procedures for certificate verification?

Is buying a SSL certificate from hosting company enough?

Does paypal have some additional secure procedures?

Thank you all for you have given my view different angle to solve this.

Sorry, I don’t have any direct experience with this issue and not sure if the Yii forum will give you the answers you need.