Jump to content
Sign in to follow this  
devosc

PayPal_Shopping_Cart_IPN

Recommended Posts

Help!

 

I have Auto-Return set to "On" in my PayPal account. The address it returns to is the ipn.php file included with this.

 

I also have IPN enabled. Do I have to put the ipn.php address in there, too?

 

Am I doing this right?

Share this post


Link to post
Share on other sites

Please cancel my request for help - I found the question had been asked already on page c5 of this thread by Heathman

 

However......

 

Am I being stupid? - I assumed that this contribution would pass the amount to be paid to Paypal to the first Paypal screen - all I get is a blank box asking the customer to input the payment total - it seems to pass the name and address details but not the total

 

Also THIS WAS SCARY - when I set the Shopping Cart Method option in the config to 2 (Itemized) the Paypal screen said there was nothing in the cart. When I pressed 'Update Cart' up came two products from a cart from another company in the same business as me (CreativeSilkFlowers.com)

 

There is something very worrying going on - any ideas?

 

Paul (Floralart.co.uk)

Share this post


Link to post
Share on other sites

I think I have some idea how I got the wrong products in the cart. I had visited that site before to check out the competition and some of the details must have been in my cache. I am not technically profficient enough to understand how it came into my Paypal page.

 

I still cannot get the order total to post to the Paypal form

 

Any ideas for help would be greatfully appreciated

 

Paul - an ignorant trial and error php'er

Share this post


Link to post
Share on other sites

I am still having no luck with the problem I have.

I am thinking about totally removing this contribution, and checking again with the original PayPal option for payment, to check if that one iwll work again.

If so, I will then go through and reinstall this module.

 

However, can anyone tell me which are the original files for the paypal module that was originally part of the OS package ?? I did install all the new ones in this contribution, but I have no idea now which ones to remove, and which ones I need to replace to get the original PayPal payment method working again.

 

Anyone know which files I need to do this ?

 

Thanks

 

Alex

Share this post


Link to post
Share on other sites

I am in the exact same boat. I cant get this contrib to work and tried to go back now neither module show up.

 

I am also looking for a list of files to go back to the original.

Share this post


Link to post
Share on other sites

Well it is not clear which boat you're in there seem to be a few out there,

 

Anyway, if you read the readme file there is a list of the original osC files that were changed, surely this is sufficient information?

 

It is a bit hard to debug everybody's problem's especially when given limited knowledge of there environment, what other contributions are being used etc.....


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
Well it is not clear which boat you're in there seem to be a few out there

I dont know if you mean to be funny or what...

 

I asked for only the info that the guy before me requested to keep it short and too the point. I am having trouble installing the contrib and I am trying to go back to the original paypal module.. if thats not the same boat I dont know what is.

Share this post


Link to post
Share on other sites

One of the problems has been solved (mine)

 

My failure to update Paypal cart for the benefit of any future idiots like me:

 

My currency code from admin localisation currencies was GB? rather than GBP so Paypal must have freaked.

 

Two points:

 

One - this 'flat' forum format makes it difficult to follwo threads within threads - heaven knows how the guru gregbaboolal can follow it

 

Two - Having mothballed my cart for the last 6 months and started to work on it recently, I have just rediscovered the 'oh no its broke - I am out of my depth here- [..a day or so goes by - forum searching etc..] I'll just try one more thing .... - IT WORKS!!!! syndrome

 

love it

Share this post


Link to post
Share on other sites

Paul,

 

I know exactly what you mean by "Out of my league". I had the feeling the first time I actually decided to try and use OSCommerce.

 

However, along the way, I have more or less been able to do it, along with a lot of help from people here on this forum.

 

My current problem PayPal problem is still there, but I am gonna try my best to fix it. I actually tried earlier today to remove the files and see if my original PayPal payment module still worked, but half way through I thought "No, I am gonna get this problem sorted one way or another", and I will keep on trying.

 

I remember when I went about installing a forum for my site. I was so out of my depth that I didnt think I could do it at all, and somehow, I got it all working first time. So I am going to keep trying, having the sleepless nights where you can't figure out what is wrong.

 

And Greg is a great help and I really appreciate all he is doing.

 

Alex

Share this post


Link to post
Share on other sites

Heh. Greg, if you have time to suggest options for a fix, then that's cool (sorry for taking so much of your time already!), but I'm rebuilding EVERYTHING from the ground up.

 

IPN 1.7 works on a fresh install, so I'll work from there ... out of all the additions, that, and the Master/Slave contrib are the most important ...

 

Excellent contrib btw. if you have somewhere I could make a donation (once the store is up and selling) I'd like to donate =)

Share this post


Link to post
Share on other sites

veral,

Excellent contrib btw.  if you have somewhere I could make a donation (once the store is up and selling) I'd like to donate =)

Have a look at his website...

 

Regards,

Marcus

Share this post


Link to post
Share on other sites

Whenever i test this contribution it works fine but whenefver a real customer uses it i get an email "COULD NOT PROCESS: You have received a payment of 63.24 USD"

I have auto return of at paypal and here are my osc settings

Credit Card Processing via PayPal

(no PayPal account needed)

 

 

PayPal

 

Enable PayPal Module

True

 

E-Mail Address

payment@mysite.com

 

Business Name

payment@1athena.com

 

Transaction Currency

Selected Currency

 

Payment Zone

--none--

 

Set Order Status

Processing

 

Sort order of display.

0

 

Background Color

0

 

Enable Store Logo

1

 

Store logo

https://mysite.ixwebhosting.com/images/minijewellogo.gif

 

Include a note with payment

0

 

Shopping Cart Method

1

 

Email Notifications

1

 

Test Mode

0

 

Notification Address

matt@1athena.com

 

Return URL behavior

2

 

 

Any ideas?

Share this post


Link to post
Share on other sites

Hi Matt,

 

It looks like you might be using an older version, the current one is 1.7 (I think :) ), because in the list below are not some of the newer (optional) options provided.

 

The casue is because in an earlier version the cart_total checks don't validiate. You can either comment out this IF statement in catalog/ipn.php or upgrade to the new version.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Hi, this contrib works with the Credit Clas & Gift Vouchers contrib?

 

Cause when i use paypal_ipn to made a payment, the discount is not rested to the order in the paypal site.

 

Someboy have this problem too?

Share this post


Link to post
Share on other sites
Hi, this contrib works with the Credit Clas & Gift Vouchers contrib?

Speaking about version 1.7 you need to adapt the changes for this CCVG contribution in the checkout_process part in /catalog/ipn.php like you changed /catalog/ceckout_process.php because the latter is not used when payment method is paypal. Everything is handled via /catalog/ipn.php then.

 

Make a backup first.

Share this post


Link to post
Share on other sites

Hi Marcus, thanks for your help..

 

I adapt all the changes for the CCVG contrib, and still not resting the coupon or voucher.

 

This is my catalog/ipn.php the CCVG lines are in RED, can you tell me if i add the line in the right plase?

 

Thanks...

 

[SIZE=1]<?php
/*
 $Id: ipn.php,v 1.0 2003/12/31 19:41:45 gregbaboolal@yahoo.com Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 if ( strcmp(phpversion(),'4.0.6') <= 0 ) {
   $_GET = $HTTP_GET_VARS;
   $_POST = $HTTP_POST_VARS;
   $_SERVER = $HTTP_SERVER_VARS;
 }

 unset($_GET,$HTTP_GET_VARS,$HTTP_POST_VARS);

 //Continue the session
 $HTTP_POST_VARS['osCsid'] = $_POST['custom'];
 //Start up osC
 require_once('includes/application_top.php');

 require_once DIR_WS_CLASSES . 'paypal/ipn.php';
 require_once DIR_WS_LANGUAGES.'english/modules/payment/paypal.php';
 $ipn = new paypal_ipn(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL,$_POST,tep_session_name(),MODULE_PAYMENT_PAYPAL_IPN_DEBUG);
 unset($_POST,$HTTP_POST_VARS);

 //post back to PayPal system to validate
 //For a sample VALID IPN view PayPal's source page prior to returning checkout_success.php
 //If the IPN is not valid then don't do anything, set 'paypal_debug' to non-zero if
 //you want to investigate these occurances.
 if(!$ipn->authenticate('www.paypal.com') && !MODULE_PAYMENT_PAYPAL_IPN_DEBUG_TEST) exit;

 //Check that the receiver_email is your Primary PayPal email
 if (!$ipn->validate_receiver_email(MODULE_PAYMENT_PAYPAL_ID,MODULE_PAYMENT_PAYPAL_BUSINESS_ID) && !MODULE_PAYMENT_PAYPAL_IPN_DEBUG_TEST) exit;

 //Check the payment_status is Completed
 if ( $ipn->key['payment_status'] != 'Completed' && !MODULE_PAYMENT_PAYPAL_IPN_DEBUG_TEST) exit;

 //Check that txn_id has not been previously processed
 //NOTE: This disable notifications on refunds/reversals(?) with same transaction id's
 if (!$ipn->unique_txn_id() && !MODULE_PAYMENT_PAYPAL_IPN_DEBUG_TEST) exit;

 //Process payment
 if ( $ipn->txn_type() == 'web_accept' || $ipn->txn_type() == 'cart') {
   include_once DIR_WS_CLASSES . 'paypal/cart.php';
   $ipn_cart = new paypal_ipn_cart();
   //check that payment_amount/payment_currency are correct
   if ($ipn_cart->valid_payment($ipn,$cart,$currency) ) { //needs work
     $description = sprintf(PAYMENT_CART_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency'],$ipn->key['first_name'],$ipn->key['last_name']);
     if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG > 1) $ipn->send_email(PAYMENT_CART_DESCRIPTION, $description);
     unset($description);
     $ipn->insert_ipn_txn();
///////////////////////////////////////////////////////////////////////////////////////////////////
//                            BEGIN CHECKOUT_PROCESS                                             //
///////////////////////////////////////////////////////////////////////////////////////////////////
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);
 require(DIR_WS_CLASSES . 'payment.php');
[COLOR=red]  if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS[/COLOR]
 $payment_modules = new payment($payment);
 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;
 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_totals = $order_total_modules->process();
 $sql_data_array = array('customers_id' => $customer_id,
                         'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
                         'customers_company' => $order->customer['company'],
                         'customers_street_address' => $order->customer['street_address'],
                         'customers_suburb' => $order->customer['suburb'],
                         'customers_city' => $order->customer['city'],
                         'customers_postcode' => $order->customer['postcode'],
                         'customers_state' => $order->customer['state'],
                         'customers_country' => $order->customer['country']['title'],
                         'customers_telephone' => $order->customer['telephone'],
                         'customers_email_address' => $order->customer['email_address'],
                         'customers_address_format_id' => $order->customer['format_id'],
                         'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                         'delivery_company' => $order->delivery['company'],
                         'delivery_street_address' => $order->delivery['street_address'],
                         'delivery_suburb' => $order->delivery['suburb'],
                         'delivery_city' => $order->delivery['city'],
                         'delivery_postcode' => $order->delivery['postcode'],
                         'delivery_state' => $order->delivery['state'],
                         'delivery_country' => $order->delivery['country']['title'],
                         'delivery_address_format_id' => $order->delivery['format_id'],
                         'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'],
                         'billing_company' => $order->billing['company'],
                         'billing_street_address' => $order->billing['street_address'],
                         'billing_suburb' => $order->billing['suburb'],
                         'billing_city' => $order->billing['city'],
                         'billing_postcode' => $order->billing['postcode'],
                         'billing_state' => $order->billing['state'],
                         'billing_country' => $order->billing['country']['title'],
                         'billing_address_format_id' => $order->billing['format_id'],
                         'payment_method' => $order->info['payment_method'],
                         'cc_type' => $order->info['cc_type'],
                         'cc_owner' => $order->info['cc_owner'],
                         'cc_number' => $order->info['cc_number'],
                         'cc_expires' => $order->info['cc_expires'],
                         'date_purchased' => 'now()',
                         'orders_status' => $order->info['order_status'],
                         'currency' => $order->info['currency'],
                         'currency_value' => $order->info['currency_value'],
                         'paypal_ipn_id' => $ipn->get_paypal_ipn_id());
 tep_db_perform(TABLE_ORDERS, $sql_data_array);
 $insert_id = tep_db_insert_id();
 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $sql_data_array = array('orders_id' => $insert_id,
                           'title' => $order_totals[$i]['title'],
                           'text' => $order_totals[$i]['text'],
                           'value' => $order_totals[$i]['value'],
                           'class' => $order_totals[$i]['code'],
                           'sort_order' => $order_totals[$i]['sort_order']);
   tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
 }
 $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';
 $sql_data_array = array('orders_id' => $insert_id,
                         'orders_status_id' => $order->info['order_status'],
                         'date_added' => 'now()',
                         'customer_notified' => $customer_notification,
                         'comments' => $order->info['comments']);
 tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
// initialized for the email confirmation
 $products_ordered = '';
 $subtotal = 0;
 $total_tax = 0;
 for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
// Stock Update - Joao Correia
   if (STOCK_LIMITED == 'true') {
     if (DOWNLOAD_ENABLED == 'true') {
       $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename
                           FROM " . TABLE_PRODUCTS . " p
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                            ON p.products_id=pa.products_id
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
                            ON pa.products_attributes_id=pad.products_attributes_id
                           WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";
// Will work with only one option for downloadable products
// otherwise, we have to build the query dynamically with a loop
       $products_attributes = $order->products[$i]['attributes'];
       if (is_array($products_attributes)) {
         $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
       }
       $stock_query = tep_db_query($stock_query_raw);
     } else {
       $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
     }
     if (tep_db_num_rows($stock_query) > 0) {
       $stock_values = tep_db_fetch_array($stock_query);
// do not decrement quantities if products_attributes_filename exists
       if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {
         $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
       } else {
         $stock_left = $stock_values['products_quantity'];
       }
       tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
       if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
         tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
       }
     }
   }
// Update products_ordered (for bestsellers list)
   tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

   $sql_data_array = array('orders_id' => $insert_id,
                           'products_id' => tep_get_prid($order->products[$i]['id']),
                           'products_model' => $order->products[$i]['model'],
                           'products_name' => $order->products[$i]['name'],
                           'products_price' => $order->products[$i]['price'],
                           'final_price' => $order->products[$i]['final_price'],
                           'products_tax' => $order->products[$i]['tax'],
                           'products_quantity' => $order->products[$i]['qty']);
   tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
   $order_products_id = tep_db_insert_id();
[COLOR=red]    $order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM[/COLOR]
//------insert customer choosen option to order--------
   $attributes_exist = '0';
   $products_ordered_attributes = '';
   if (isset($order->products[$i]['attributes'])) {
     $attributes_exist = '1';
     for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
       if (DOWNLOAD_ENABLED == 'true') {
         $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename
                              from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                              left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
                               on pa.products_attributes_id=pad.products_attributes_id
                              where pa.products_id = '" . $order->products[$i]['id'] . "'
                               and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'
                               and pa.options_id = popt.products_options_id
                               and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'
                               and pa.options_values_id = poval.products_options_values_id
                               and popt.language_id = '" . $languages_id . "'
                               and poval.language_id = '" . $languages_id . "'";
         $attributes = tep_db_query($attributes_query);
       } else {
         $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");
       }
       $attributes_values = tep_db_fetch_array($attributes);

       $sql_data_array = array('orders_id' => $insert_id,
                               'orders_products_id' => $order_products_id,
                               'products_options' => $attributes_values['products_options_name'],
                               'products_options_values' => $attributes_values['products_options_values_name'],
                               'options_values_price' => $attributes_values['options_values_price'],
                               'price_prefix' => $attributes_values['price_prefix']);
       tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);

       if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {
         $sql_data_array = array('orders_id' => $insert_id,
                                 'orders_products_id' => $order_products_id,
                                 'orders_products_filename' => $attributes_values['products_attributes_filename'],
                                 'download_maxdays' => $attributes_values['products_attributes_maxdays'],
                                 'download_count' => $attributes_values['products_attributes_maxcount']);
         tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
       }
       $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
     }
   }
//------insert customer choosen option eof ----
   $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
   $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
   $total_cost += $total_products_price;

   $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
 }
[COLOR=red]$order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM[/COLOR]// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" .
                EMAIL_SEPARATOR . "\n" .
                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments']) {
   $email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 $products_ordered .
                 EMAIL_SEPARATOR . "\n";

 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 if ($order->content_type != 'virtual') {
   $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
                   EMAIL_SEPARATOR . "\n" .
                   tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
                   EMAIL_SEPARATOR . "\n";
   $payment_class = $$payment;
   $email_order .= $payment_class->title . "\n\n";
   if ($payment_class->email_footer) {
     $email_order .= $payment_class->email_footer . "\n\n";
   }
 }
 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }
///////////////////////////////////////////////////////////////////////////////////////////////////
//                            END CHECKOUT_PROCESS                                               //
///////////////////////////////////////////////////////////////////////////////////////////////////
   } else {
       if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) {
         $description = sprintf(PAYMENT_CART_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency'],$ipn->key['first_name'],$ipn->key['last_name']);
         $ipn->send_email(PAYMENT_CART_DESCRIPTION,$description);
         unset($description);
       }
   }
 } else if ($ipn->txn_type() == 'send_money') {
   $description = sprintf(PAYMENT_SEND_MONEY_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency']);
   if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) $ipn->send_email(PAYMENT_SEND_MONEY_DESCRIPTION,$description);
   unset($description);
 } else if ($ipn->txn_type() == 'reversal') {
   $description = sprintf(PAYMENT_REVERSAL_DESCRIPTION_MSG,number_format($ipn->key['mc_gross'],2),$ipn->key['mc_currency']);
   if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) $ipn->send_email(PAYMENT_REVERSAL_DESCRIPTION,$description);
   unset($description);
 } else {
   if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG) $ipn->send_email(PAYMENT_UNKNOWN_DESCRIPTION,PAYMENT_UNKNOWN_DESCRIPTION);
 }
 if (MODULE_PAYMENT_PAYPAL_IPN_DEBUG_TEST) {
     echo $ipn->debug_info();
 }
[COLOR=red]if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');
 $order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM[/COLOR]
 require(DIR_WS_INCLUDES . 'application_bottom.php');
?>[/SIZE]

 

....

Share this post


Link to post
Share on other sites

Hi, Hope you can help.

 

I'm a relative newbie to OSCommerce and the shopping cart plug in - versions 2.2MS2 and 1.7 (28/2/04) respectively. I have installed following instructions and am now trying to post a test transaction through to paypal.

 

In my OSc shopping cart the item is displayed priced correctly as 1.00 excl tax and 1.18 incl tax (UK VAt = 17.5 %), however when I check out I get to the paypal screen and it only shows the the unit price of 1.00, no VAT at all. I aborted the transaction at that point as I am assuming that there must be a setting somewhere which I have not set properly. Can you help please?

 

Thanks

 

Malcolm

Share this post


Link to post
Share on other sites

Ok I am having the issue still and any help is appreciated. Im getting the Following Error and I will provide a link to the site to see if someone else can test for me to see what they think.

 

Fatal error: Call to a member function on a non-object in /homepages/3/d93781876/htdocs/store/catalog/includes/modules/payment/paypal.php on line 214

 

http://shop.glacialgraphics.net

 

What the heck could it be with this? Just create an account and follow the purchase and checkout procedure after chossing Paypal you will get the error on checkout_confirmation.php.


Woody

Share this post


Link to post
Share on other sites

Re tax values not displaying paypal screen:

 

Just been doing a bit more investigation - i can see that in the POST to paypal there is the following<input type="hidden" name="tax_1" value="0.18"> - does this mean that the problem lies in my paypal configuration rather than oscommerce /paypal_ipn settings?

Share this post


Link to post
Share on other sites

Re tax values not displaying paypal screen:

 

Just been doing a bit more investigation - i can see that in the POST to paypal there is the following<input type="hidden" name="tax_1" value="0.18"> - does this mean that the problem lies in my paypal configuration rather than oscommerce /paypal_ipn settings?

Share this post


Link to post
Share on other sites

Re Tax values not displaying in first paypal screen after checkout:

 

OK I've now realised that PayPal only shows the complete values e.g VAT etc after signing in. So my tax values are going through correctly which is excellent news.

 

Are there anyother little gotchas like that to do with PayPal that I should know about? Any info would be greatly appreciated.

 

Thanks

 

Malcolm

Share this post


Link to post
Share on other sites

ok I'm confused again now. Post my first transaction through paypal and the returned to Oscommerce where it said thank you for your order etc - problem is there doesn't seem to be an order anywhere. I received one email confirmation from PayPal telling me that payment hadd been received from the 'customer'.

 

I have the following settings in my config:-

 

 

Using PayPal Auto-Return set to 1

 

Email Notifications

The email notification level set to 2

 

Test Mode

1 = On

 

 

I would have thought that I would have more debug emails. I thought the order was created by IPN. How is the best way to debug what is happening here

 

I also wonder what the significance of the following paypal config fields is:

1. Email address - what is this address - is it the primary address used to setup paypal

2. Business Id - had to set this up to my primary paypal address for the paypal screens to even come up in the first place

3.Notification address - I would have thought that this would be the address that paypal would use

Items 1 and 3 don't seem to have been used at all in my test transaction.

 

Where does all the debugging info appear- emails / log / other?

 

Most importantly - why haven't i got an order on OSc?

Share this post


Link to post
Share on other sites

What do i need to due to upgrade from 1.6 to 1.7 if i have the cred class & gift voucher contribution?

Share this post


Link to post
Share on other sites
I have Auto-Return set to "On" in my PayPal account. The address it returns to is the ipn.php file included with this.

 

I also have IPN enabled. Do I have to put the ipn.php address in there, too?

I am still having issues with this contribution. The order still will not show up under "Orders" and I don't get anything in the IPN table, either.

 

Could somebody please help me?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×