Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Michael J. Allen
  1. zeichner

    Paypal doesn't work!

    Just for the record, I had no problem searching to find information on the PayPal IPN contribution. The problem is that every search turned up incomplete or inconsistent information. The real stumbling block for me, is that once I had the PayPal IPN files uploaded, they didn't show up in my admin panel as PayPal IPN. Add to that the conflicting information regarding PayPal Standard in RC2 & PayPal IPN and it makes for a frustrating situation. I certainly appreciate the fact that anyone at all takes the time to reply to those of us who don't understand all the hidden clues that turn up in search results. Most of the results are for posts telling people to use the search function. The replies that contain helpful information are sometimes cryptic (or in this case, conflict with the OSC documentation.) People like Satish have done a fantastic job of trying to help - so please, accept my thanks for all the good work you do (and my apologies for being so thick-headed that I have to have things spelled out for me!)
  2. zeichner

    Paypal doesn't work!

    OK - here's what I was missing: in OsCommerce v2.2 RC2a, the PayPal IPN payment module is listed as Credit/Debit Card (via PayPal). Now that I've found it, it was easy to remove the PayPal Standard module & install the Credit/Debit Card (via PayPal) module - and finally set it to itemize the order.
  3. zeichner

    Paypal doesn't work!

    Thanks for replying. I've been searching for "paypal" "rc2" "itemize" & various other related terms for the last two days & have seen your responses. (I've also read the documentation for RC2, which states that the new PayPal Standard payment module replaces the old PayPal IPN payment module.) I downloaded the latest version of the PayPal IPN contribution - osCommerce_PayPal_IPN_v2.3.4 - (which says it is for OsCommerce v2.2 MS2, but doesn't mention RC2). I'm using OsCommerce v2.2 RC2a - which I was forced to upgrade to when my web host switched me to a new server with a new version of MySQL & OsCommerce stopped working. I used to have PayPal IPN installed & it worked great for years. So I uploaded the various files for the latest PayPal IPN contrib. to my website, according to the installation instructions - although I'm not quite sure if I should be removing the PayPal Standard payment module first (the instructions say to remove any existing PayPal IPN module, which I don't have - but since PayPal Standard is supposed to have replaced PayPal IPN, I'm not sure.) All of the file names are different, so I'm thinking it should just show up as an additional module. Anyway, I did a chmod to make the file permissions match the existing files in those directories, so everything should be good. When I log in to my OsCommerce Admin panel & go to the payment modules section, PayPal IPN is nowhere to be found. So that's where I'm stopped. Funny thing, the RC2 PayPal Standard payment module is working perfectly, except for the inability to pass an itemized order to PayPal. Otherwise, it is doing exactly what the PayPal IPN contrib used to do for me. I can even see the spot in the paypal_standard.php where it sends the store name in place of the item name & leaves out the fields for the item_number, quantity & amount - I just don't have the programming knowledge to fix it. I admit that I am probably missing something very simple. There must be something that I am neglecting to do after uploading the PayPal IPN files to my server that would make that module show up in my OsCommerce admin panel. If I could see the IPN module in the admin panel, I'm certain that I could set it up exactly as I had it in OsCommerce v2.2 MS2. I'm afraid that I am in need of more than a clue as to where to find the answer. Specific instructions would be much appreciated! Thanks.
  4. zeichner

    Paypal doesn't work!

    I have the same issue - and it's really starting to frustrate me. As a workaround, you can look up the order on your Admin panel & print an itemized invoice.
  5. Maybe it's just me being dense, but I'm seeing conflicting information on this forum regarding PayPal Standard & PayPal IPN in OSC v2.2 rc2. In some places, I see that PayPal Standard replaces PayPal IPN & that PayPal IPN isn't compatible with rc2. In other places, I see people being told to install PayPal IPN in rc2. I only want one PayPal payment option with my store - will I break things if I install the latest PayPal IPN contribution & remove PayPal Standard?
  6. zeichner

    Store title instead of item on Paypal page

    I think the answer lies in a modification to paypal_standard.php, but I don't think changing STORE_NAME to Sale is quite right. There is a promising link here - http://forums.oscommerce.com/index.php?sho...39217&st=40 - but it involves modifying paypal.php, not paypal_standard.php, so the code doesn't quite match. It points to a section about 100 lines down, where some hidden fields are being defined. Here is what is proposed for changes in paypal.php: function process_button() { global $order, $currencies, $currency; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } /* Old code $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); */ // new parameters to the $process_button_string $process_button_string = tep_draw_hidden_field('cmd', '_cart') . tep_draw_hidden_field('upload', '1') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')) . tep_draw_hidden_field('shipping_1', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('tax_cart', number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))); for ($i=0; $i<sizeof($order->products); $i++) { $j = $i+1; $process_button_string .= tep_draw_hidden_field('item_name_' . $j, $order->products[$i]['name']) . tep_draw_hidden_field('item_number_' . $j, $order->products[$i]['model']) . tep_draw_hidden_field('quantity_' . $j, $order->products[$i]['qty']) . tep_draw_hidden_field('amount_' . $j, $order->products[$i]['final_price']); } // end changes return $process_button_string; } But here is the analogous code in paypal_standard.php: function process_button() { global $customer_id, $order, $sendto, $currency, $cart_PayPal_Standard_ID, $shipping; $process_button_string = ''; $parameters = array('cmd' => '_xclick', 'item_name' => STORE_NAME, 'shipping' => $this->format_raw($order->info['shipping_cost']), 'tax' => $this->format_raw($order->info['tax']), 'business' => MODULE_PAYMENT_PAYPAL_STANDARD_ID, 'amount' => $this->format_raw($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']), 'currency_code' => $currency, 'invoice' => substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1), 'custom' => $customer_id, 'no_note' => '1', 'notify_url' => tep_href_link('ext/modules/payment/paypal/standard_ipn.php', '', 'SSL', false, false), 'return' => tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'cancel_return' => tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'bn' => 'osCommerce22_Default_ST', 'paymentaction' => ((MODULE_PAYMENT_PAYPAL_STANDARD_TRANSACTION_METHOD == 'Sale') ? 'sale' : 'authorization')); if (is_numeric($sendto) && ($sendto > 0)) { $parameters['address_override'] = '1'; $parameters['first_name'] = $order->delivery['firstname']; $parameters['last_name'] = $order->delivery['lastname']; $parameters['address1'] = $order->delivery['street_address']; $parameters['city'] = $order->delivery['city']; $parameters['state'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']); $parameters['zip'] = $order->delivery['postcode']; $parameters['country'] = $order->delivery['country']['iso_code_2']; } else { $parameters['no_shipping'] = '1'; $parameters['first_name'] = $order->billing['firstname']; $parameters['last_name'] = $order->billing['lastname']; $parameters['address1'] = $order->billing['street_address']; $parameters['city'] = $order->billing['city']; $parameters['state'] = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], $order->billing['state']); $parameters['zip'] = $order->billing['postcode']; $parameters['country'] = $order->billing['country']['iso_code_2']; } if (tep_not_null(MODULE_PAYMENT_PAYPAL_STANDARD_PAGE_STYLE)) { $parameters['page_style'] = MODULE_PAYMENT_PAYPAL_STANDARD_PAGE_STYLE; } 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; } I can see that the proposed modification is adding fields for item name, item number, quantity & amount - but since the structure of the change doesn't match the section in paypal_standard.php, I don't trust my php skills enough to just paste it in. Anyone out there who has made this change to the paypal_standard.php file?
  7. zeichner

    Please help! 1054 - Unknown column

    Oops - mine is similar, not the same. But this thread helped to point me in the right direction!
  8. zeichner

    Ok, I am frustrated and really could use PayPal assistance

    I have OSC 2.2 rc2a, with the PayPal Website Payments Standard module installed. I may be missing something, but I don't see a setting for itemized/aggregate. I've seen this mentioned in at least two other threads when the PayPal Standard module is only passing the store name & total amount to PayPal - so if it's really that simple a fix, please give just one more clue as to where the itemized/aggregate setting is to be found. Thanks for your patience in leading me down the correct path!
  9. zeichner

    Please help! 1054 - Unknown column

    I'm using OSC v2.2 rc2a & getting this exact same error when I've completed a PayPal payment & am redirected back to my store 1054 - Unknown column 'os.downloads_flag' in 'where clause' select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from orders o, orders_products op, orders_products_download opd, orders_status os where o.customers_id = '2' and o.orders_id = '118' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != '' and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '1' [TEP STOP] Otherwise the page looks correct. Below this message, I have the regular "Your order has been processed!" message. I can imagine this doesn't inspire confidence in my customers. And I don't know if this is related, but the PayPal Standard payment module isn't transferring the purchased items to PayPal - just the total price - the item shows up as my store name. I can look at the order in the admin panel & see which items were ordered, but my PayPal account only shows the total purchase as a lump sum. Any help would be greatly appreciated!