Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error with paypal


Guest

Recommended Posts

Posted

Hy,

 

when i try to pay with Paypal i get this ''error''. Does anyone knows what it is about?

 

Thanx!

 

Warning: fopen(/458330-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 331

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 332

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 333

 

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting private key in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 338

 

Warning: unlink(/458330-2-data.txt) [function.unlink]: No such file or directory in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 340

 

Warning: file_get_contents(/458330-2-signed.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 343

 

Warning: fopen(/458330-2-signed.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 347

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 349

 

Warning: unlink(/458330-2-signed.txt) [function.unlink]: No such file or directory in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 355

 

Warning: file_get_contents(/458330-2-encrypted.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 358

 

Warning: unlink(/458330-2-encrypted.txt) [function.unlink]: No such file or directory in /home/www/web121/web/webshop2/includes/modules/payment/paypal_standard.php on line 362

Posted

It's trying to open and write to /458330-2-data.txt. That file would be in the root of your server's filesystem, which you're normally not allowed to do. You're missing some "path" information in there... such as /tmp/458330-2-data.txt or /home/YOURACCOUNT/public_html/shop/tmp/458330-2-data.txt. You'll have to look in the PHP (paypal_standard.php) code to see what variable is being used to define the path, and why it isn't properly set. My guess is that you skipped some step in the PayPal configuration process. The same applies to /458330-2-signed.txt, but fixing the first one may fix the second.

Posted
It's trying to open and write to /458330-2-data.txt. That file would be in the root of your server's filesystem, which you're normally not allowed to do. You're missing some "path" information in there... such as /tmp/458330-2-data.txt or /home/YOURACCOUNT/public_html/shop/tmp/458330-2-data.txt. You'll have to look in the PHP (paypal_standard.php) code to see what variable is being used to define the path, and why it isn't properly set. My guess is that you skipped some step in the PayPal configuration process. The same applies to /458330-2-signed.txt, but fixing the first one may fix the second.

 

 

Line 331

$fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w');

 

Line 332

fwrite($fp, $data);

 

Line 333

fclose($fp);

 

Line 338

openssl_pkcs7_sign(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY), file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY), array('From' => MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY);

 

Line 340

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt');

 

Line 343

$signed = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');

 

Line 347

$fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w');

 

Line 349

fclose($fp);

 

Line 355

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');

 

Line 358

$data = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');

 

Line 362

unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');

 

 

It seems that it have problem with file permissions, because it can't open signed.txt and data.txt or am I wrong?

 

And if anyone could explain me how to configurate PayPal?

 

Thanx!

Posted

If you're not using Paypal Payment buttons in your store, "Enable Encrypted Web Payments" set to FALSE and ignore everything below it such as private key, certificate, etc.

Posted

I did it as ypu say, and I dont get these errors any more, but when it is finished i get another error ''This recipient does not accept payments denominated in WS_Error_XClick_Pref_Foreign_Currency. Please contact the seller and ask him to update his payment receiving preferences to accept this currency.''

Posted

Check settings for your currency Did you use USD for US Dollar or put a $ symbol in its place?

The error just indicates that whatever your settings are - those settings are not acceptable for paypal.

Best Regards,
Gaurav

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...