Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jerseyboy

Pioneers
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Real Name
    John Ewin

jerseyboy's Achievements

  1. Is there a problem with the tax_cart field that is passed to Paypal? Does this have to be formatted a certain way? I made the changes in bold to payment_standard.php. This is driving me crazy!!!!! Please help anyone. function process_button() { global $customer_id, $order, $sendto, $currency, $cart_PayPal_Standard_ID, $shipping, $discount; // Discount Code $customer_query1 = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = $customer_id order by orders_id desc"); $orders_query = tep_db_fetch_array($customer_query1); $orders_id = $orders_query['orders_id']; if (MODULE_ORDER_TOTAL_INSTALLED) { $discount_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = $orders_id and class = 'ot_quantity_discount'"); if (tep_db_num_rows($discount_query) > 0) { $discount_tot = tep_db_fetch_array($discount_query); $final_discount = $discount_tot['value']; } $tax_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = $orders_id and class = 'ot_tax'"); if (tep_db_num_rows($tax_query) > 0) { $discounted_tax = tep_db_fetch_array($tax_query); $finaltax = $discounted_tax['value']; } } $process_button_string = ''; $parameters = array('cmd' => '_cart', 'upload' => '1', 'business' => MODULE_PAYMENT_PAYPAL_STANDARD_ID, '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', 'discount_amount_cart' => $final_discount, 'tax_cart' => $finaltax, 'paymentaction' => ((MODULE_PAYMENT_PAYPAL_STANDARD_TRANSACTION_METHOD == 'Sale') ? 'sale' : 'authorization')); [
  2. I've added the following code to paypal_standard.php to pass the discount amount created by the Quantity Discount add_on. if (MODULE_ORDER_TOTAL_INSTALLED) { $discount_query = tep_db_query('select value from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int)$order_id . '" and class = "ot_quantity_discount" '); $discount_var = tep_db_fetch_array($discount_query); $parameters['discount_amount_cart'] = $discount_var['value']; } However, no discount line appears in paypal. When I just force a value such as if (MODULE_ORDER_TOTAL_INSTALLED) { $parameters['discount_amount_cart'] = 5.40; } it works The query returns a single row. Is there a problem with how the decimal value is being assigned? Any help would be greatly appreciated. Thanks.
  3. Chris, I understand your point, but I didn't make clear what I was trying to do. I want all customer information to be added in paypal. No login on my site. I just want to pass to paypal the items that have been selected on my website. I understood that I did not need to create a button for the link as this was part of the add-on. As I said, there is already an express check-out button provided with the original install. Why is there not one for the Standard paypal install? I'm probably missing the obvious, but I don't get it. Thanks, John
  4. I am using OSCommerce 2.3.1 with Paypal Website Standard Paymant option. However, there is no Paypal button displayed on any of the web pages. Anyone have any suggestions as to what the problem is? I thought by installing paypal, the buttons would be displayed. Express checkout, if enabled, displays the button on the checkout screen.
×
×
  • Create New...