delta_blues Posted October 20, 2009 Posted October 20, 2009 Greetings… I have had a PayPal Merchant account for some years. Having made over 200 eBay transactions. Trying to setup a PayPal standard payment module, has been a 100% failure. I have posted several PayPal support incidents, and have not had one form mail that I could reply to. And I’m talking about dozens. The PayPal sandbox has nothing to do with testing my shopping cart. Making a PayPal “Buy Now” button has nothing to do with the setup. In fact the button just redirects to make another button. Below are the error received. Maybe some in the forum can make sense of this. PayPal support can’t. ----------------------------------------------------------------------------- Warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/189265-3-data.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 331 Warning: fopen(/189265-3-data.txt) [function.fopen]: failed to open stream: Operation not permitted in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 331 Warning: fwrite(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 332 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 333 Warning: unlink() [function.unlink]: open_basedir restriction in effect. File(/189265-3-data.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 365 Warning: unlink() [function.unlink]: open_basedir restriction in effect. File(/189265-3-signed.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 368 Warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/189265-3-encrypted.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 370 Warning: fopen(/189265-3-encrypted.txt) [function.fopen]: failed to open stream: Operation not permitted in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 370 Warning: filesize() [function.filesize]: open_basedir restriction in effect. File(/189265-3-encrypted.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fread(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 372 Warning: unlink() [function.unlink]: open_basedir restriction in effect. File(/189265-3-encrypted.txt) is not within the allowed path(s): (/home/deltasli/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 374 ------------------------------------------------------------------------------------------------------------------ Here is the PHP code starting at line 331… if (MODULE_PAYMENT_PAYPAL_STANDARD_EWP_STATUS == 'True') { $parameters['cert_id'] = MODULE_PAYMENT_PAYPAL_STANDARD_EWP_CERT_ID; $random_string = rand(100000, 999999) . '-' . $customer_id . '-'; $data = ''; reset($parameters); while (list($key, $value) = each($parameters)) { $data .= $key . '=' . $value . "\n"; } $fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w'); fwrite($fp, $data); fclose($fp); unset($data); if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) { 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); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); // remove headers from the signature $signed = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $signed = explode("\n\n", $signed); $signed = base64_decode($signed[1]); $fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w'); fwrite($fp, $signed); fclose($fp); unset($signed); 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); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); // remove headers from the encrypted result $data = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); $data = explode("\n\n", $data); $data = '-----BEGIN PKCS7-----' . "\n" . $data[1] . "\n" . '-----END PKCS7-----'; unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } else { exec(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_OPENSSL . ' smime -sign -in ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt -signer ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY . ' -inkey ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY . ' -outform der -nodetach -binary > ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); exec(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_OPENSSL . ' smime -encrypt -des3 -binary -outform pem ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY . ' < ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt > ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $fh = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', 'rb'); $data = fread($fh, filesize(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt')); fclose($fh); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } $process_button_string = tep_draw_hidden_field('cmd', '_s-xclick') . tep_draw_hidden_field('encrypted', $data); unset($data); } else { reset($parameters); while (list($key, $value) = each($parameters)) { $process_button_string .= tep_draw_hidden_field($key, $value); } } return $process_button_string; } function before_process() { global $customer_id, $order, $order_totals, $sendto, $billto, $languages_id, $payment, $currencies, $cart, $cart_PayPal_Standard_ID; global $$payment; $order_id = substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1); $check_query = tep_db_query("select orders_status from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); if (tep_db_num_rows($check_query)) { $check = tep_db_fetch_array($check_query); if ($check['orders_status'] == MODULE_PAYMENT_PAYPAL_STANDARD_PREPARE_ORDER_STATUS_ID) { $sql_data_array = array('orders_id' => $order_id, 'orders_status_id' => MODULE_PAYMENT_PAYPAL_STANDARD_PREPARE_ORDER_STATUS_ID, 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => ''); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); } } ----------------------------------------------------------------------------------------------------------- Best Regards, Robert Your identity is a figment of your imagination…
BryceJr Posted October 20, 2009 Posted October 20, 2009 Create a folder with 755 permission in your root directory via FTP or your webhost cpanel File Manager and call it "session_temp" or whatever name you want to call it. Log in to your osc admin panel>>modules>>payment --paypal standard->EDIT Under "Working Directory", type or paste this -> /home/deltasli/public_html/session_temp/ While still in your osc admin panel, go to CONFIGURATION>>SESSIONS "SESSION DIRECTORY" type or paste this -> /home/deltasli/public_html/session_temp
delta_blues Posted October 21, 2009 Author Posted October 21, 2009 OK, Bryce... Thank you for reading my post and for your reply. I have copied and pasted your input into notepad and am on my way to make the update. Although I am wondering, what am I to do with these changes once they are made... Best Regards, Robert Your identity is a figment of your imagination…
BryceJr Posted October 21, 2009 Posted October 21, 2009 ... Although I am wondering, what am I to do with these changes once they are made...Once you're done, try setting up Paypal Standard. You shouldn't see any of the errors you saw last time. In your original post, Paypal Standard was looking for an empty folder to write data. It found /tmp. Unfortunately, that area is forbidden. My previous post creates a folder for paypal to write data WITHIN the allowed area of your webspace. This also takes care of any problem that may arise in your SESSION directory regarding "open_basedir restriction in effect".
delta_blues Posted October 21, 2009 Author Posted October 21, 2009 Greetings, Bryce... Thank you for your explanation. Should I first remove all of the PayPal Standard setup which I have already done, before I attempt a re-install. If this is true, I may as well dump the entire osCommerce cart and MySQL database and start over once again, as I have already done twice, while attempting to setup PayPal Standard. PayPal,through my efforts, has literally cause my website to become non-functioning and irreparable (at least by me) twice in the last 2 months. I would be better off to insert a note telling the customer to go to their PayPal account and pay me, or send a request for money! Best Regards, Robert Your identity is a figment of your imagination…
BryceJr Posted October 21, 2009 Posted October 21, 2009 ...Should I first remove all of the PayPal Standard setup which I have already done, before I attempt a re-install.You don't have to but it won't hurt. PayPal,through my efforts, has literally cause my website to become non-functioning and irreparable (at least by me) twice in the last 2 months.If you're referring to the above errors, the instructions I provided should fix it. You may also want to consider installing Paypal IPN instead of Paypal Standard. You can find it ->here. Look for the one uploaded on "16 Nov 2007". Instructions inside the package.
delta_blues Posted October 21, 2009 Author Posted October 21, 2009 OK, Bryce, Thank you for your reply. See below the instruction I followed when I made the install, that told me to install and then uninstall IPN... Best Regards, and thank you for your input. --------------------------------------------------------------------------------------------- 1. Find the PayPal login page for your Country 2. Login to your account or sign up for a new account for your shop (sales@<yourshop>.co.uk is a good one for UK shops) don't forget to make a mailbox for this email address and to add it to My Store in the Send Extra Order Emails to section 3. Once you have an account and are logged in, go to Profile and in the right hand column click on Payment Receiving Preferences 4. In here you have the choice of accepting just your default currency, or having other currencies converted. We found that having them converted let us accept orders from EEC countries as well as the UK 5. Block multiple payments so that you don't get duplicate orders 6. Set the Credit Card Statement Name so that customers will recognize payments to you on their Credit Card Statements when they pay that way through PayPal 7. Save the page and go to Profile>Instant Payment Notification Preferences 8. Activate Instant Payment Notification 9. The notification URL should be http://<your web site>/catalog/checkout_process.php 10. Save the page then go to Profile>Website Payment Preferences 11. Turn on Auto Return 12. Set the return URL to http://<your website>/catalog/ipn.php Depending on the template you are using you may NOT have this file, you should still set the return url to this file as that seems to be what PayPal is looking for. I don't have this file in my site and the orders arrive just fine. 13. Leave Payment Data Transfer set to off as this module doesn't support it (You need PayPal Pro for that) 14. Using this module you are using PayPal to handle all your Credit Card payments so you don't need encrypted payments. If you do want to have them you need to buy a SSP certificate and that is beyond the scope of this tutorial so set Encrypted Website Payments to off 15. To ensure that customers are returned to your site and you are notified of the order details you need to make set PayPal account optional to off 16. As your customers have already supplied their phone number when they created an account with you, you don't need to ask them for it again. Turn Contact telephone number off 17. As this module doesn't use Express Checkout, Say no to Support Giro and Bank Transfer Payments 18. Save the page then go to Custom Payment Page Styles 19. In here you can change the colour of the PayPal page, add your logo to the payment confirmation page and generally integrate the PayPal page with your site 20. You are now ready to install the Website Payments Standard module to your site The file listing is as follows: * catalog/ext/modules/payment/paypal_standard_ipn.php * catalog/includes/languages/english/modules/payment/paypal_standard.php * catalog/includes/modules/payment/paypal_standard.php Configure the module Once the module is uploaded, login to your Admin page and go to Modules>Payment. In here you can configure the new module. 1. You will see that there are now three PayPal modules showing PayPal - PayPal IPN - PayPal Website Payments Standard 2. Uninstall both PayPal and PayPal IPN if you have already installed and activated them 3. Install PayPal Website Payments Standard 4. Click on the Edit button in the right hand column 5. Set Enable PayPal Website Payments Standard to True 6. In email address put the address you have used to set up your PayPal account 7. Check on the forums if you need to set a payment zone - in the UK accepting only GBP you don't and can leave this as none 8. Set preparing Order Status to Preparing [PayPal Standard] to intercept bad orders or ones that don't complete 9. Set PayPal Acknowledged Orders Status to Processing 10. Set the Gateway Server to Sandbox while testing but remember to set it to live when testing is over 11. Set Transaction method to Sale 12. Set Page Style to PayPal 13. Set the Debug E-Mail Address to the email address you want emails from PayPal to go to about orders that are not completed or any problems with payment NB. It should not be the same email address you use for your PayPal account 14. Set the sort order of display to where you want the PayPal option to come in your payment options list in the shopping cart. Low numbers come first in the list but 0 comes at the end so be careful what you choose 15. If you aren't using encrypted payments you can ignore the rest of the list - we don't use them so I haven't found out what they are for other than they are something to do with secure websites (https://) the module works just fine without them. Your identity is a figment of your imagination…
BryceJr Posted October 21, 2009 Posted October 21, 2009 #1-20 are settings with regard to your paypal account which will enable the payment module to work with your paypal account. ... 7. Save the page and go to Profile>Instant Payment Notification Preferences 8. Activate Instant Payment Notification ... These two are settings within your Paypal account NOT paypal ipn payment module. "8. Activate Instant Payment Notification" DOES NOT mean install the paypal ipn payment module and activate it. It's a setting in your paypal account not oscommerce payment module. Configure the module Once the module is uploaded, login to your Admin page and go to Modules>Payment. In here you can configure the new module. ... 2. Uninstall both PayPal and PayPal IPN if you have already installed and activated them ... If PayPal and PayPal IPN payment modules are installed and activated, uninstall/remove them.
delta_blues Posted October 21, 2009 Author Posted October 21, 2009 #1-20 are settings with regard to your paypal account which will enable the payment module to work with your paypal account. These two are settings within your Paypal account NOT paypal ipn payment module. "8. Activate Instant Payment Notification" DOES NOT mean install the paypal ipn payment module and activate it. It's a setting in your paypal account not oscommerce payment module. If PayPal and PayPal IPN payment modules are installed and activated, uninstall/remove them. Your identity is a figment of your imagination…
delta_blues Posted October 21, 2009 Author Posted October 21, 2009 Greetings, Bryce… I suppose that you now can see where all of the confusion and problems came from… I apologize for all of the text you are reading. I now have copies all of the instructions and explanations you’ve posted and glued them into one page. I’m ready to have a go at it. Best Regards, Robert Your identity is a figment of your imagination…
delta_blues Posted October 22, 2009 Author Posted October 22, 2009 Hello, Hopefully I will receive some more input... Since I am ignorantly copying and pasting, it's really not possible to check my own work. Below are the errors which I have re-caused. No doubt I left something out, misunderstood, I did not write anything to avoid typos. Best Regards, Robert --------------------------------------------------------------------------------------------------------- Warning: fopen(/home/deltasli/public_html/session_temp//214645-5-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 331 Warning: fwrite(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 332 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 333 Warning: unlink(/home/deltasli/public_html/session_temp//214645-5-data.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 365 Warning: unlink(/home/deltasli/public_html/session_temp//214645-5-signed.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 368 Warning: fopen(/home/deltasli/public_html/session_temp//214645-5-encrypted.txt) [function.fopen]: failed to open stream: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 370 Warning: filesize() [function.filesize]: Stat failed for /home/deltasli/public_html/session_temp//214645-5-encrypted.txt (errno=2 - No such file or directory) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fread(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 372 Warning: unlink(/home/deltasli/public_html/session_temp//214645-5-encrypted.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 374 ----------------------------------------------------------------------------- // remove headers from the signature $signed = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $signed = explode("\n\n", $signed); $signed = base64_decode($signed[1]); $fp = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w'); fwrite($fp, $signed); fclose($fp); unset($signed); 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); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); // remove headers from the encrypted result $data = file_get_contents(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); $data = explode("\n\n", $data); $data = '-----BEGIN PKCS7-----' . "\n" . $data[1] . "\n" . '-----END PKCS7-----'; unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } else { exec(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_OPENSSL . ' smime -sign -in ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt -signer ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY . ' -inkey ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY . ' -outform der -nodetach -binary > ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); exec(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_OPENSSL . ' smime -encrypt -des3 -binary -outform pem ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY . ' < ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt > ' . MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $fh = fopen(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', 'rb'); $data = fread($fh, filesize(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt')); fclose($fh); unlink(MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } $process_button_string = tep_draw_hidden_field('cmd', '_s-xclick') . tep_draw_hidden_field('encrypted', $data); Your identity is a figment of your imagination…
BryceJr Posted October 22, 2009 Posted October 22, 2009 Modules>>Payment>> paypal standard "Working Directory", /home/deltasli/public_html/session_temp/ Change it to this -> /home/deltasli/public_html/session_temp <-trailing slash removed Make sure that the folder "session_temp" has a 755 permission via FTP or cpanel.
delta_blues Posted October 23, 2009 Author Posted October 23, 2009 Hello, Bryce... Thank you very much for responding once again. Although there thousands if not millions of forum post and replies. Your help in this forum promotes and contributes to the progress and growth of others, rather than diminishing those around you as many are inclined to do. ------------------------------------------------------------------------------------------------------------- OK, I removed the trailing slash. The chmod/unix permissions are set at 755. Since paypay_standard is the only file mentioned in the error, it doesn't appear that I should check the permissions on any other files on the server side. --------------------------------------------------------------------------------------------------------------- Best Regards, Your unmet friend Robert Your identity is a figment of your imagination…
delta_blues Posted October 23, 2009 Author Posted October 23, 2009 I made up a test customer, entered a test order process and received these errors. But, the payment process did continue and opened PayPal sandbox. Best Regards, Robert ------------------------------------------------------------------------------------------------------------------ Warning: fopen(/home/deltasli/public_html/session_temp/745129-5-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 331 Warning: fwrite(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 332 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 333 Warning: unlink(/home/deltasli/public_html/session_temp/745129-5-data.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 365 Warning: unlink(/home/deltasli/public_html/session_temp/745129-5-signed.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 368 Warning: fopen(/home/deltasli/public_html/session_temp/745129-5-encrypted.txt) [function.fopen]: failed to open stream: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 370 Warning: filesize() [function.filesize]: Stat failed for /home/deltasli/public_html/session_temp/745129-5-encrypted.txt (errno=2 - No such file or directory) in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fread(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 371 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 372 Warning: unlink(/home/deltasli/public_html/session_temp/745129-5-encrypted.txt) [function.unlink]: No such file or directory in /home/deltasli/public_html/includes/modules/payment/paypal_standard.php on line 374 Your identity is a figment of your imagination…
BryceJr Posted October 23, 2009 Posted October 23, 2009 Your "PayPal Website Payments Standard" settings should look somewhat like this. Enable PayPal Website Payments Standard TRUE E-Mail Address This should be the email address you use for your paypal account Payment Zone None Set Preparing Order Status Preparing [PayPal Standard] Set PayPal Acknowledged Order Status default Gateway Server Live(if site is ready) or Sandbox(testing <--additional settings for this) Transaction Method Sale Page Style Debug E-Mail Address Your paypal email address or any alternate email address Sort order of display. 0 Enable Encrypted Web Payments False <-For forum purposes, put "YES" if you have any of these below and "NO" if you don't. No details needed.-> Your Private Key Your Public Certificate PayPals Public Certificate Your PayPal Public Certificate ID
BryceJr Posted October 23, 2009 Posted October 23, 2009 If you are using paypal payment buttons generated from paypal's website ... Enable Encrypted Web Payments <-- 1. This is TRUE. <- AND ... 2. You need to generate these. -> Your Private Key Your Public Certificate PayPals Public Certificate Your PayPal Public Certificate ID Click->here for guide. You also need to sign up for a sandbox account ->here when using sandbox. Sandbox user guide here The user guide makes it look more complicated than it should. Create the fictitious customer and business. Generate a fake credit card number for the fake customer. Write down the details. Use those details to create a customer in your oscommerce store and shop around your store. Use the fake credit card for payment during checkout. If all goes well, you'll see the fictious business gets credited with money, the customer account shows purchased amount, etc. All these happen inside the sandbox. When testing in sandbox mode, you must be logged in to your sandbox account. If there are errors, you'll see them in your email for debugging(see debug email address above).
delta_blues Posted October 24, 2009 Author Posted October 24, 2009 Greetings, Bryce Until your explanation, I had no idea as to why I was to make fake people and accounts. I had not seen anywhere that I was supposed to duplicate the fakes in the admin and fake a purchase. I haven’t made any PayPal buttons because I have no idea as to where I’m supposed to copy and paste the HTML which was generated. I found that the PayPal merchant and payment areas on their website were continuous pages of instructions consisting of suppositions and assumptions. It seems that PayPal should assume that if someone was there to try to figure out how to set-up it meant that they didn’t know anything… Geeezzz, I hate to go back to the PayPal merchant, sandbox, fake, mess, account set-up. I already have 3 fake accounts, because none of them worked. I couldn’t even log in to them. Now I need to find a way to format, delete, remove the merchant account and start over. But I doubt if I can even login. ---------------------------------------------------------------------------- Anyway the settings you posted for the payment module were the same as I had except for - Enable Encrypted Web Payments - which I changed to false. I don't have any PayPal buttons OK, bye for now... Your identity is a figment of your imagination…
BryceJr Posted October 24, 2009 Posted October 24, 2009 The fictitous business and customer can only be ceated in Paypal Sandbox. :'( Anyway, an alternative to sandbox is to go LIVE. Create a product that costs $1.00. Test your checkout, and if it goes through, at least your statement will show $1 purchases. If your paypal checkout doesn't go as planned, check your debug emails. :thumbsup:
delta_blues Posted October 27, 2009 Author Posted October 27, 2009 The fictitous business and customer can only be ceated in Paypal Sandbox. :'( Anyway, an alternative to sandbox is to go LIVE. Create a product that costs $1.00. Test your checkout, and if it goes through, at least your statement will show $1 purchases. If your paypal checkout doesn't go as planned, check your debug emails. :thumbsup: Your identity is a figment of your imagination…
delta_blues Posted October 27, 2009 Author Posted October 27, 2009 Greetings… I finally gave up on the PayPal sandbox. I logged in to the site admin and made a fake product for $1.00 USD. So, I then went live. Then I went to my site and made an account in my own name so I could use my own valid credit card and made a purchase of the $1.00 item. Then I successfully made a purchase thru PayPal until I attempted to login to my real account when I was told that I was attempting to login s the seller. I knew then that I had made it with out any errors. I then returned to my site and changed the payment to MO/ or Personal check and mad a successful purchase. Many Thanks to “BryceJR” for leading the blind to the final destination… Best Regards, Robert Your identity is a figment of your imagination…
rodw Posted October 29, 2009 Posted October 29, 2009 Hi Guys, thanks for this detail, it was exactly my problem too. It is probably worth mentioning that PayPal explains on their web site how to create Public and private keys for free using OpenSSL. I did this and OsCommerce generated a lot of errors similar to above. It said it could not open the data files and the certificate files even with appropiate permissions. Anyway, I gave up and resorted to unencrypted payments and it is all working now with live transactions. I too gave up on the sandbox. Anyway, very early days for me with my shop, and am happy given that I only upgraded to a PayPal Merchant account yesterdy to get this sorted out.
delta_blues Posted October 29, 2009 Author Posted October 29, 2009 Hi Guys, thanks for this detail, it was exactly my problem too. It is probably worth mentioning that PayPal explains on their web site how to create Public and private keys for free using OpenSSL. I did this and OsCommerce generated a lot of errors similar to above. It said it could not open the data files and the certificate files even with appropiate permissions. Anyway, I gave up and resorted to unencrypted payments and it is all working now with live transactions. I too gave up on the sandbox. Anyway, very early days for me with my shop, and am happy given that I only upgraded to a PayPal Merchant account yesterdy to get this sorted out. Your identity is a figment of your imagination…
delta_blues Posted October 29, 2009 Author Posted October 29, 2009 Howdy Rod… Welcome to the Forum! Bryce has got it down. I should compile his instructions and post them for the rest of the members. Do ya think? Regards, Robert Your identity is a figment of your imagination…
rodw Posted October 29, 2009 Posted October 29, 2009 Howdy Rod… Welcome to the Forum! Bryce has got it down. I should compile his instructions and post them for the rest of the members. Do ya think? Regards, Robert I did find all the info I needed here but went up dry gullys at PayPal and the SandBox. I think it would be good to have a nice clean summary of this as a sticky. I was lucky you had the same problem at the same time, so you solved it for me :thumbsup: I think the sandbox adds too much complexity, I like the Live $1.00 approach (in fact mine were $2.00 as it charged me $1 freight), but it would be good to see a how to document for encrypted payments as well. Mine is a brand new business, so I don't want anything in there at the start. I have to agree that paypal instructions make it just too complicated, written for developers not users. I was able to go in and delete all the test orders and a sandbox customers nice and easy. I just left one test one there for a while though. I also deleted Cash on delivery and Credit cards so all customers must use PayPal. My unit sales will hopefully average $500 so I have room to absorb the fees.
delta_blues Posted October 29, 2009 Author Posted October 29, 2009 OK, Rod, so what's your web address so we can take a look at it? Regards, Robert Your identity is a figment of your imagination…
Recommended Posts
Archived
This topic is now archived and is closed to further replies.