Jump to content

Lytspeed

Members
  • Content count

    19
  • Joined

  • Last visited

About Lytspeed

  • Birthday 09/29/1965

Profile Information

  • Real Name
    Stace Johnson
  • Gender
    Male
  • Location
    Federal Heights, CO
  • Interests
    Writing, Playing Music, Building Computers
  • Website
  1. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    Another Update: After thinking about my last post, I decided to try removing all the Register Globals 1.5 mods that I had made. I also made sure "register_globals=On" was in my php.ini files, and added "php_value register_globals 1" to my .htaccess files. As a result, I'm no longer getting the XML files error, and I am able to process orders. However, when I run wpp_diagnostics, I'm still getting the same error that I posted in Post #2769. I don't know how significant that is, though, since the orders are processing correctly. Thanks for pointing me in the right direction, Brian. :thumbsup: Stace
  2. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    Update: I combed through all the changes in the Register Globals 1.5 contrib, and it appears that I made all of them correctly, so I'm not sure where the problem is. The odd thing is that before, when my store was working correctly, I did not have to use Register Globals. I just suddenly started getting errors on the site. I suppose that this could mean my web host made a change without letting users know; is there any way to test whether Register Globals is turned off on the ISP side? Thanks, any help is appreciated. Stace
  3. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    Okay, thanks for letting me know. I'll concentrate my troubleshooting efforts on that for now. Please let me know via the forums if anything occurs to you. Stace
  4. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    @dynamoeffects: Hi Brian, Sorry to be a pest, but have you had a chance to look at the code I posted in message #2774 above? Any ideas? Thanks for all your help and for the great contribution. Stace
  5. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    How about both? Here are the results of the test.php file: <?php /* $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', ''); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', ''); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', ''); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?>
  6. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    Brian, et al. I'm stumped. I had a working OSC store for months using WPP .0.8.2. Then when a customer tried to make a purchase, she got the Register Globals problems. I followed the directions in the Register Globals 1.5 contribution and made sure register_globals = Off in my php.ini file. While I was at it, I upgraded to WPP 0.9.2. Then I started getting the following error: PayPal WPP installation incomplete! There should be XML files located in /catalog/includes/wpp_xml/ ! (doDirectPayment.xml) I checked the configure.php file in /catalog/includes, and found that the DIR_FS_CATALOG line is exactly as it should be: define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); Thinking it was a possible security issue, I removed the .htaccess and .htpasswd files from my Admin folder, and I'm still getting the XML files error. When I run wpp_diagnostics.php, I get the following output: Basic Tests Using at least PHP 4.3.0? Yes Does your store have an SSL certificate installed and working? Yes Is cURL installed? Yes Does cURL work? (Simple HTTP test) Yes API Certificate installed? No API Certificate directory protected? No API Username in place? Yes API Password in place? Yes XML Document "doDirectPayment.xml" exists? No XML Document "doExpressCheckout.xml" exists? No XML Document "getExpressCheckoutDetails.xml" exists? No XML Document "setExpressCheckout.xml" exists? No XML Document "transactionSearch.xml" exists? No Test Stopped! Testing cannot be completed until the above errors are fixed. After fixing the above errors, run this script again to complete the test. My XML files are in their proper place, as is my API certificate, though I did remove the .htaccess file from the API certificate directory, hoping to elminate any security problems. Oh great OSC gurus, please tell me there's something simple I'm missing! I really need to get this store back up as soon as possible, and I've dug through every relevant post I can find in the forums. Thanks very much in advance for any help you guys (and gals) can provide. Stace
  7. Lytspeed

    PayPal WPP installation incomplete! Missing WPP_XML

    Brian and others, In looking at other replies to the "Missing XML Files" problem, I have tried adding an "s" to the "http" portion of the DIR_FS_CATALOG and I have tried adding a forward slash. However, I think my situation is different. Here's the relevant line from my includes/configure.php file: define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); Unless I'm mistaken this automatically loads the directory name and appends a forward slash. I did try adding an S to the above $HTTP_SERVER_VARS line, but since that looks like a variable, I can understand why that didn't do any good. Any help would be greatly appreciated. Thanks, Stace
  8. Lytspeed

    PayPal WPP Direct Payments & Express Checkout Support

    Peredur, I'm having the same problem. Can you be more specific about where you modified DIR_FS_CATALOG and what you had to change? Thanks!
  9. KG, I wanted to let you know that the suggestion you made in PM solved the above problem for me. I'll reproduce it here so other people can benefit from it as well. Note to other forum members: These changes are for the Website Payments Pro contribution when used in tandem with Discount Coupon Codes 3.3. The changes listed below need to be made in the /catalog/includes/modules/payment/paypal_wpp.php file. At about lines 985-989, change the following lines from: $order_info['PAYPAL_ITEM_TOTAL'] = $order->info['subtotal']; //The shipping total must be under $10,000. I've removed the check that would //set the shipping total at $10,000 if it was over, but that didn't make any sense //as the totals would be off, causing other errors. Just don't ship anything that'll cost more than $10k $order_info['PAYPAL_SHIPPING_TOTAL'] = $order->info['shipping_cost']; to: $order_info['PAYPAL_ITEM_TOTAL'] = round($order->info['subtotal'], 2); //The shipping total must be under $10,000. I've removed the check that would //set the shipping total at $10,000 if it was over, but that didn't make any sense //as the totals would be off, causing other errors. Just don't ship anything that'll cost more than $10k $order_info['PAYPAL_SHIPPING_TOTAL'] = round($order->info['shipping_cost'], 2); I'm guessing that the PAYPAL_SHIPPING_TOTAL line did not actually need to be changed to accommodate the Discount Coupon Codes contrib, but it certainly doesn't hurt anything and could help someone who has a discount shipping contribution installed. Thanks, KG, for your dedication and assistance. You rock! :thumbsup: Stace
  10. Hi KG, I've been looking at the 1300+ lines of code in paypal_wpp.php, and have found the following lines that seem to relate to my rounding problem. Line 419: $order_info['PAYPAL_ORDER_TOTAL'] = number_format($order->info['total'], 2); Lines 979-992: $order_info = array(); $order_info['PAYPAL_CURRENCY'] = $wpp_currency; $order_info['PAYPAL_ORDER_TOTAL'] = number_format($order->info['total'], 2); $order_info['PAYPAL_ORDER_DESCRIPTION'] = 'Order placed on ' . date("F j, Y, g:i a") . ' by ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . ' (ID: ' . $_SESSION['customer_id'] . ')'; $order_info['PAYPAL_CUSTOM'] = 'Phone: ' . $order->customer['telephone'] . ' -- Email: ' . $order->customer['email_address']; $order_info['PAYPAL_ITEM_TOTAL'] = $order->info['subtotal']; //The shipping total must be under $10,000. I've removed the check that would //set the shipping total at $10,000 if it was over, but that didn't make any sense //as the totals would be off, causing other errors. Just don't ship anything that'll cost more than $10k $order_info['PAYPAL_SHIPPING_TOTAL'] = $order->info['shipping_cost']; $order_info['PAYPAL_HANDLING_TOTAL'] = ''; $order_info['PAYPAL_TAX_TOTAL'] = round($order->info['tax'], 2); $order_info['PAYMENT_DETAILS_ITEM'] = $this->wpp_generate_PDI($wpp_currency); And finally, lines 1120-1124: $transaction_info['PAYPAL_START_DATE'] = date('Y-m-d', mktime(0, 0, 0, date("m"), date("d")-1, date("Y"))) . 'T00:00:00-0700'; $transaction_info['PAYPAL_PAYER'] = $order->customer['email_address']; $transaction_info['PAYPAL_AMOUNT'] = number_format($order->info['total'], 2); $transaction_info['PAYPAL_CURRENCY'] = $wpp_currency; $ts_req = $this->wpp_execute_transaction('transactionSearch', $transaction_info); It appears that the WPP module developer is rounding (truncating?) the amounts, but uses a different rounding method than you described above. Could that be part of the problem, or does it discount my theory about the extra digits? Thanks, Stace
  11. Thanks, KG. I just PMed you the code. Thanks also for the compliment. I'm new here, but I love OSCommerce, and I want to provide as much information as I can to help other people too. :-) Stace
  12. Hi KG et al., I love the Discount Coupon Codes 3.3 contribution, but I'm having a problem and I'm curious whether anyone else has a solution. I'm using OSC 2.2 MS2, with the Website Payments Pro contribution. All works fine except the following: I have set up a staff discount of 55%. A member of the staff ordered 12 of the same item at discount, and it worked fine. However, 2 staff members have tried ordering 2 different items at discount (identical orders, same price for both items), and OSC errors out on the checkout_confirmation.php file. The PayPal error dump returns the following error (summarized): "Transaction refused because of an invalid argument. See additional error messages for details. Item total is invalid. (Error code10426)" Here's what I think is happening: When a staff member orders 12 $14.95 items at 55% discount, the total is $179.40 - 55% ($98.67) = $80.73 When a staff member orders 2 $14.95 items at 55% discount, the total is $29.90 - 55% ($16.445) = $13.455 If OSC is sending the order total amount to PayPal without truncating or rounding the total to two digits, that is causing PayPal to refuse the order as having an invalid total. When a shopper orders something on special using the specials built into OSC, this doesn't happen, so I'm guessing it was introduced by Discount Coupon Codes 3.3. What files do I need to modify in Discount Coupon Codes 3.3 in order to ensure it passes a two digit number to PayPal? Obviously, I need to put a rounding statement in there somewhere, but I'm having trouble identifying where. Thanks much for any help, and thanks again for a great contrib, KG. Stace
  13. Hi KG, I updated with post #1252 earlier, saying that everything was working correctly. Thanks, though, for your response and willingness to help. You wrote an excellent contribution. :thumbsup:
  14. Update: After carefully checking over all the edited code and making sure everything was exactly as it was supposed to be, I checked my settings over again and was able to make the total calculate correctly with the following settings: Sort order: 1 - Discount Coupon, 2 - Sub-Total, 3 - Tax, 4 - Shipping, 5 - Total. Display discount with minus (-) sign? - True Display subtotal with applied discount? - True Display tax in discount line? - None Exclude product specials? - True Random Code Length - 6 Display discount total lines for each tax group? - False Allow negative order total? - False Use the language file to format display string? - False Display Format for Order Total Line - Discount Coupon "[coupon_desc]" applied ([discount_amount]) Debug Mode - false These settings work correctly for single items and multiple items, so it looks like your bug fix worked, KGT. Thanks very much for the clean code! Stace
×