Guest Posted March 10, 2010 Share Posted March 10, 2010 :'( Help! I've been trying to set up OSCommerce with Paypal Website Payments Standard and I'm getting errors I cannot figure out how to fix. Can someone look at this? The errors are first...then I've added the code with the line number at the bottom. I will be forever grateful for any assistance!!! The site is www.jesusshare.net/shop you can go through the order process, selecting Paypal and hitting continue I get the following errors: Warning: fopen(/262699-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 331 Warning: fwrite(): supplied argument is not a valid stream resource in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 332 Warning: fclose(): supplied argument is not a valid stream resource in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 333 Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 338 Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 338 Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting private key in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 338 Warning: unlink(/262699-2-data.txt) [function.unlink]: No such file or directory in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 340 Warning: file_get_contents(/262699-2-signed.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 343 Warning: fopen(/262699-2-signed.txt) [function.fopen]: failed to open stream: Permission denied in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 347 Warning: fclose(): supplied argument is not a valid stream resource in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 349 Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 353 Warning: unlink(/262699-2-signed.txt) [function.unlink]: No such file or directory in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 355 Warning: file_get_contents(/262699-2-encrypted.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 358 Warning: unlink(/262699-2-encrypted.txt) [function.unlink]: No such file or directory in /home/jesussha/public_html/shop/includes/modules/payment/paypal_standard.php on line 362 THE LINES OF CODE: 331 $fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w'); 332 fwrite($fp, $data); 333 fclose($fp); 337 if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) { 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); 340 unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); 343 $signed = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); 347 $fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w'); 349 fclose($fp); 353 openssl_pkcs7_encrypt(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY), array('From' => MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY); 355 unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); 358 $data = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); 362 unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt') Quote Link to comment Share on other sites More sharing options...
BryceJr Posted March 10, 2010 Share Posted March 10, 2010 If you're not using Paypal payment buttons generated from Paypal's website, in your Paypal Standard module, set "Enable Encrypted Web Payments" to FALSE. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2010 Share Posted March 10, 2010 If you're not using Paypal payment buttons generated from Paypal's website, in your Paypal Standard module, set "Enable Encrypted Web Payments" to FALSE. Thanks...that got me past that point! You're a doll! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.